Adding in cancel notifications

This commit is contained in:
Charlton Austin 2016-11-29 11:48:08 -05:00
parent b7aac159ae
commit 4103a0b75f
9 changed files with 153 additions and 29 deletions

View file

@ -80,6 +80,22 @@ function(Config, Features, VulnerabilityService) {
'placeholder': '(refs/heads/somebranch)|(refs/tags/sometag)'
}
]
},
{
'id': 'build_cancelled',
'title': 'Docker Build Cancelled',
'icon': 'fa-minus-circle',
'fields': [
{
'name': 'ref-regex',
'type': 'regex',
'title': 'matching ref(s)',
'help_text': 'An optional regular expression for matching the git branch or tag ' +
'git ref. If left blank, the notification will fire for all builds.',
'optional': true,
'placeholder': '(refs/heads/somebranch)|(refs/tags/sometag)'
}
]
}];
for (var i = 0; i < buildEvents.length; ++i) {

View file

@ -121,6 +121,14 @@ function($rootScope, $interval, UserService, ApiService, StringBuilderService, P
},
'dismissable': true
},
'build_cancelled': {
'level': 'info',
'message': 'A build was cancelled for repository {repository}',
'page': function(metadata) {
return '/repository/' + metadata.repository + '/build?current=' + metadata.build_id;
},
'dismissable': true
},
'vulnerability_found': {
'level': function(metadata) {
var priority = metadata['vulnerability']['priority'];