Add info to the build pane that shows if a trigger started the build
This commit is contained in:
parent
5b0300ab62
commit
c494c889f5
5 changed files with 37 additions and 11 deletions
9
static/directives/trigger-description.html
Normal file
9
static/directives/trigger-description.html
Normal file
|
@ -0,0 +1,9 @@
|
|||
<span class="trigger-description-element" ng-switch on="trigger.service">
|
||||
<span ng-switch-when="github">
|
||||
<i class="fa fa-github fa-lg" style="margin-right: 6px" title="GitHub" bs-tooltip="tooltip.title"></i>
|
||||
Push to GitHub repository <a href="https://github.com/{{ trigger.config.build_source }}" target="_new">{{ trigger.config.build_source }}</a>
|
||||
</span>
|
||||
<span ng-switch-default>
|
||||
Unknown
|
||||
</span>
|
||||
</span>
|
|
@ -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,
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -211,7 +211,7 @@
|
|||
<div id="trigger" class="tab-pane">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">Build Triggers
|
||||
<i class="info-icon fa fa-info-circle" data-placement="left" data-content="Callbacks from various services (suchas GitHub) which can cause the repository to be built and updated."></i>
|
||||
<i class="info-icon fa fa-info-circle" data-placement="left" data-content="Triggers from various services (such as GitHub) which tell the repository to be built and updated."></i>
|
||||
</div>
|
||||
|
||||
<div class="panel-body">
|
||||
|
@ -230,15 +230,7 @@
|
|||
<tbody>
|
||||
<tr ng-repeat="trigger in triggers">
|
||||
<td>
|
||||
<div ng-switch on="trigger.service">
|
||||
<div ng-switch-when="github">
|
||||
<i class="fa fa-github fa-lg" style="margin-right: 6px" title="GitHub" bs-tooltip="tooltip.title"></i>
|
||||
Push to GitHub repository <a href="https://github.com/{{ trigger.config.build_source }}" target="_new">{{ trigger.config.build_source }}</a>
|
||||
</div>
|
||||
<div ng-switch-default>
|
||||
Unknown
|
||||
</div>
|
||||
</div>
|
||||
<div class="trigger-description" trigger="trigger"></div>
|
||||
</td>
|
||||
<td style="white-space: nowrap;">
|
||||
<div class="dropdown" style="display: inline-block">
|
||||
|
|
|
@ -39,6 +39,10 @@
|
|||
<div class="col-sm-10">
|
||||
<div class="tab-content" onresize="adjustLogHeight()">
|
||||
<div ng-repeat="build in builds" class="tab-pane build-pane" ng-class="currentBuild == build ? 'active' : ''">
|
||||
<div class="alert alert-info" ng-show="build.trigger">
|
||||
Triggered by: <span class="trigger-description" trigger="build.trigger" style="margin-left: 10px"></span>
|
||||
</div>
|
||||
|
||||
<div class="build-header">
|
||||
<div class="timing">
|
||||
<i class="fa fa-clock-o"></i>
|
||||
|
|
Reference in a new issue