UI and code improvements to make working with the multiple SCMs easier
This commit is contained in:
parent
f091aaa07e
commit
d07f9f04e9
10 changed files with 70 additions and 114 deletions
|
@ -55,9 +55,6 @@ angular.module('quay').factory('TriggerService', ['UtilService', '$sanitize', 'K
|
|||
'credentials': '/static/directives/trigger/githost/credentials.html',
|
||||
'trigger-description': '/static/directives/trigger/github/trigger-description.html'
|
||||
},
|
||||
'repository_url': function(build) {
|
||||
return KeyService['githubTriggerEndpoint'] + build.trigger.build_source;
|
||||
},
|
||||
'link_templates': {
|
||||
'commit': '/commit/{sha}',
|
||||
'branch': '/tree/{branch}',
|
||||
|
@ -94,9 +91,6 @@ angular.module('quay').factory('TriggerService', ['UtilService', '$sanitize', 'K
|
|||
'credentials': '/static/directives/trigger/githost/credentials.html',
|
||||
'trigger-description': '/static/directives/trigger/bitbucket/trigger-description.html'
|
||||
},
|
||||
'repository_url': function(build) {
|
||||
return 'https://bitbucket.org/' + build.trigger.build_source;
|
||||
},
|
||||
'link_templates': {
|
||||
'commit': '/commits/{sha}',
|
||||
'branch': '/branch/{branch}',
|
||||
|
@ -137,9 +131,6 @@ angular.module('quay').factory('TriggerService', ['UtilService', '$sanitize', 'K
|
|||
'credentials': '/static/directives/trigger/githost/credentials.html',
|
||||
'trigger-description': '/static/directives/trigger/gitlab/trigger-description.html'
|
||||
},
|
||||
'repository_url': function(build) {
|
||||
return 'https://bitbucket.org/' + build.trigger.build_source;
|
||||
},
|
||||
'link_templates': {
|
||||
'commit': '/commit/{sha}',
|
||||
'branch': '/tree/{branch}',
|
||||
|
@ -191,8 +182,8 @@ angular.module('quay').factory('TriggerService', ['UtilService', '$sanitize', 'K
|
|||
return null;
|
||||
}
|
||||
|
||||
var repositoryUrl = type.repository_url;
|
||||
if (!repositoryUrl || !repositoryUrl(build)) {
|
||||
var repositoryUrl = build.trigger.repository_url;
|
||||
if (!repositoryUrl) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -201,7 +192,7 @@ angular.module('quay').factory('TriggerService', ['UtilService', '$sanitize', 'K
|
|||
return null;
|
||||
}
|
||||
|
||||
return repositoryUrl(build) + linkTemplate[templateName];
|
||||
return repositoryUrl + linkTemplate[templateName];
|
||||
};
|
||||
|
||||
triggerService.supportsFullListing = function(name) {
|
||||
|
|
Reference in a new issue