From c494c889f56e79e0aa55c220e357604c8724c922 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Thu, 20 Feb 2014 13:27:59 -0500 Subject: [PATCH] Add info to the build pane that shows if a trigger started the build --- static/directives/trigger-description.html | 9 +++++++++ static/js/app.js | 17 +++++++++++++++++ static/js/controllers.js | 6 +++++- static/partials/repo-admin.html | 12 ++---------- static/partials/repo-build.html | 4 ++++ 5 files changed, 37 insertions(+), 11 deletions(-) create mode 100644 static/directives/trigger-description.html diff --git a/static/directives/trigger-description.html b/static/directives/trigger-description.html new file mode 100644 index 000000000..11f48e57d --- /dev/null +++ b/static/directives/trigger-description.html @@ -0,0 +1,9 @@ + + + + Push to GitHub repository {{ trigger.config.build_source }} + + + Unknown + + diff --git a/static/js/app.js b/static/js/app.js index cdb939745..20851b2b8 100644 --- a/static/js/app.js +++ b/static/js/app.js @@ -2527,6 +2527,23 @@ quayApp.directive('buildLogError', function () { }); +quayApp.directive('triggerDescription', function () { + var directiveDefinitionObject = { + priority: 0, + templateUrl: '/static/directives/trigger-description.html', + replace: false, + transclude: false, + restrict: 'C', + scope: { + 'trigger': '=trigger' + }, + controller: function($scope, $element) { + } + }; + return directiveDefinitionObject; +}); + + quayApp.directive('buildLogCommand', function () { var directiveDefinitionObject = { priority: 0, diff --git a/static/js/controllers.js b/static/js/controllers.js index a071e6572..fe7ca7004 100644 --- a/static/js/controllers.js +++ b/static/js/controllers.js @@ -936,7 +936,11 @@ function RepoBuildCtrl($scope, Restangular, ApiService, $routeParams, $rootScope }; $scope.adjustLogHeight = function() { - $('.build-logs').height($(window).height() - 415); + var triggerOffset = 0; + if ($scope.currentBuild && $scope.currentBuild.trigger) { + triggerOffset = 85; + } + $('.build-logs').height($(window).height() - 415 - triggerOffset); }; $scope.askRestartBuild = function(build) { diff --git a/static/partials/repo-admin.html b/static/partials/repo-admin.html index 2964c8936..1c165e32f 100644 --- a/static/partials/repo-admin.html +++ b/static/partials/repo-admin.html @@ -211,7 +211,7 @@
Build Triggers - +
@@ -230,15 +230,7 @@ -
-
- - Push to GitHub repository {{ trigger.config.build_source }} -
-
- Unknown -
-
+