Skip to content

Commit

Permalink
Merge pull request #1763 from jwforres/bug-1464397-webhook-urls
Browse files Browse the repository at this point in the history
Merged by openshift-bot
  • Loading branch information
OpenShift Bot authored Jun 23, 2017
2 parents 93f3bfb + b27c9ac commit 066938a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions app/scripts/controllers/buildConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ angular.module('openshiftConsole')
};

$scope.compareTriggers = function(lhs, rhs) {
if (_.isNumber(lhs.value)) {
// This method gets called again with array indices when dealing with duplicates of the same trigger type
// just let them go in order
return -1;
}
if (lhs.value === "ConfigChange") {
return -1;
}
Expand Down
2 changes: 1 addition & 1 deletion app/views/directives/edit-webhook-triggers.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ <h5>{{type}} Webhooks
<div ng-repeat="trigger in triggers">
<div class="trigger-info">
<span class="trigger-url">
<copy-to-clipboard is-disabled="trigger.disabled" clipboard-text="bcName | webhookURL : trigger.data.type : trigger.data[webhookType].secret : projectName"></copy-to-clipboard>
<copy-to-clipboard is-disabled="trigger.disabled" clipboard-text="bcName | webhookURL : trigger.data.type : trigger.data[type.toLowerCase()].secret : projectName"></copy-to-clipboard>
</span>
<span class="visible-xs-inline trigger-actions">
<a href="" ng-if="!trigger.disabled" class="action-icon" ng-click="trigger.disabled = true; form.$setDirty()" role="button">
Expand Down
2 changes: 1 addition & 1 deletion dist/scripts/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -4975,7 +4975,7 @@ var l, m = b("buildConfigForBuild"), n = b("buildStrategy"), o = [], p = functio
a.updatedBuildConfig = angular.copy(b), a.envVars = n(a.updatedBuildConfig).env || [];
};
a.compareTriggers = function(a, b) {
return "ConfigChange" === a.value ? -1 :"ConfigChange" === b.value ? 1 :"ImageChange" === a.value ? -1 :"ImageChange" === b.value ? 1 :a.value.localeCompare(b.value);
return _.isNumber(a.value) ? -1 :"ConfigChange" === a.value ? -1 :"ConfigChange" === b.value ? 1 :"ImageChange" === a.value ? -1 :"ImageChange" === b.value ? 1 :a.value.localeCompare(b.value);
}, a.saveEnvVars = function() {
a.envVars = _.filter(a.envVars, "name"), n(a.updatedBuildConfig).env = k.compactEntries(angular.copy(a.envVars)), g.update("buildconfigs", c.buildconfig, a.updatedBuildConfig, l).then(function() {
a.alerts.saveBCEnvVarsSuccess = {
Expand Down
2 changes: 1 addition & 1 deletion dist/scripts/templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -6699,7 +6699,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
"<div ng-repeat=\"trigger in triggers\">\n" +
"<div class=\"trigger-info\">\n" +
"<span class=\"trigger-url\">\n" +
"<copy-to-clipboard is-disabled=\"trigger.disabled\" clipboard-text=\"bcName | webhookURL : trigger.data.type : trigger.data[webhookType].secret : projectName\"></copy-to-clipboard>\n" +
"<copy-to-clipboard is-disabled=\"trigger.disabled\" clipboard-text=\"bcName | webhookURL : trigger.data.type : trigger.data[type.toLowerCase()].secret : projectName\"></copy-to-clipboard>\n" +
"</span>\n" +
"<span class=\"visible-xs-inline trigger-actions\">\n" +
"<a href=\"\" ng-if=\"!trigger.disabled\" class=\"action-icon\" ng-click=\"trigger.disabled = true; form.$setDirty()\" role=\"button\">\n" +
Expand Down

0 comments on commit 066938a

Please sign in to comment.