- Add a build now command to the trigger

- Have the trigger description use the master_branch in the config
This commit is contained in:
Joseph Schorr 2014-02-25 19:53:41 -05:00
parent 011490d36d
commit 206049dbf8
5 changed files with 35 additions and 5 deletions

View file

@ -132,9 +132,7 @@ quayApp = angular.module('quay', ['ngRoute', 'chieffancypants.loadingBar', 'angu
var source = $sanitize(UtilService.textToSafeHtml(config['build_source']));
var desc = '<i class="fa fa-github fa-lg" style="margin-left: 2px; margin-right: 2px"></i> Push to Github Repository ';
desc += '<a href="https://github.com/' + source + '" target="_blank">' + source + '</a>';
if (config['subdir']) {
desc += '<br>Dockerfile folder: ' + UtilService.textToSafeHtml(config['subdir']);
}
desc += '<br>Dockerfile folder: //' + UtilService.textToSafeHtml(config['subdir']);
return desc;
default:

View file

@ -1470,6 +1470,30 @@ function RepoAdminCtrl($scope, Restangular, ApiService, KeyService, $routeParams
$scope.currentSetupTrigger = null;
};
$scope.startTrigger = function(trigger) {
var params = {
'repository': namespace + '/' + name,
'trigger_uuid': trigger.id
};
ApiService.manuallyStartBuildTrigger(null, params).then(function(resp) {
window.console.log(resp);
var url = '/repository/' + namespace + '/' + name + '/build?current=' + resp['id'];
document.location = url;
}, function(resp) {
bootbox.dialog({
"message": resp['message'] || 'The build could not be started',
"title": "Could not start build",
"buttons": {
"close": {
"label": "Close",
"className": "btn-primary"
}
}
});
});
};
$scope.deleteTrigger = function(trigger) {
var params = {
'repository': namespace + '/' + name,