This repository has been archived on 2020-03-24. You can view files and clone it, but cannot push or open issues or pull requests.
quay/static/js/directives/ui/super-user-build-logs.js
2019-11-12 11:09:47 -05:00

32 lines
902 B
JavaScript

/**
* An element for managing global messages.
*/
angular.module('quay').directive('superUserBuildLogs', function () {
var directiveDefinitionObject = {
priority: 0,
templateUrl: '/static/directives/super-user-build-logs.html',
replace: false,
transclude: true,
restrict: 'C',
scope: {
'isEnabled': '=isEnabled'
},
controller: function ($scope, $element, ApiService) {
$scope.buildParams = {};
$scope.showLogTimestamps = true;
$scope.buildId = null;
$scope.loadBuild = function () {
var params = {
'build_uuid': $scope.buildParams.buildUuid
};
$scope.buildId = $scope.buildParams.buildUuid;
$scope.buildResource = ApiService.getRepoBuildSuperUserAsResource(params).get(function (build) {
$scope.build = build;
});
};
}
};
return directiveDefinitionObject;
});