diff --git a/static/css/quay.css b/static/css/quay.css index 0bb108ed3..6fdc5b864 100644 --- a/static/css/quay.css +++ b/static/css/quay.css @@ -1899,6 +1899,13 @@ p.editable:hover i { left: 4px; } +.repo-admin .right-controls { + text-align: right; + margin-top: 10px; + padding-top: 10px; + border-top: 1px solid #eee; +} + .repo-admin .right-info { font-size: 11px; margin-top: 10px; diff --git a/static/js/controllers.js b/static/js/controllers.js index 897281520..a071e6572 100644 --- a/static/js/controllers.js +++ b/static/js/controllers.js @@ -1145,7 +1145,7 @@ function RepoBuildCtrl($scope, Restangular, ApiService, $routeParams, $rootScope fetchRepository(); } -function RepoAdminCtrl($scope, Restangular, ApiService, KeyService, $routeParams, $rootScope) { +function RepoAdminCtrl($scope, Restangular, ApiService, KeyService, $routeParams, $rootScope, $location) { var namespace = $routeParams.namespace; var name = $routeParams.name; @@ -1378,19 +1378,38 @@ function RepoAdminCtrl($scope, Restangular, ApiService, KeyService, $routeParams }); }; + $scope.showBuild = function(buildInfo) { + $location.path('/repository/' + namespace + '/' + name + '/build'); + $location.search('current', buildInfo.id); + }; + + $scope.loadTriggerBuildHistory = function(trigger) { + trigger.$loadingHistory = true; + + var params = { + 'repository': namespace + '/' + name, + 'trigger_uuid': trigger.id, + 'limit': 3 + }; + + ApiService.listTriggerRecentBuilds(null, params).then(function(resp) { + trigger.$builds = resp['builds']; + trigger.$loadingHistory = false; + }); + }; + $scope.loadTriggers = function() { var params = { 'repository': namespace + '/' + name }; - $scope.newWebhook = {}; $scope.triggersResource = ApiService.listBuildTriggersAsResource(params).get(function(resp) { $scope.triggers = resp.triggers; return $scope.triggers; }); }; - $scope.deletetrigger = function(trigger) { + $scope.deleteTrigger = function(trigger) { var params = { 'repository': namespace + '/' + name, 'trigger_uuid': trigger.id diff --git a/static/partials/repo-admin.html b/static/partials/repo-admin.html index d320433b2..2964c8936 100644 --- a/static/partials/repo-admin.html +++ b/static/partials/repo-admin.html @@ -211,16 +211,82 @@
Trigger | ++ |
+
+
+
+
+ Push to GitHub repository {{ trigger.config.build_source }}
+
+
+ Unknown
+
+ |
+
+
+
+
+
+
+
+
+
+
+ |
+