Skip to content

Commit bc496f8

Browse files
author
OpenShift Bot
authored
Merge pull request #916 from jhadvig/issue-6486
Merged by openshift-bot
2 parents da4a37d + e2b313e commit bc496f8

File tree

6 files changed

+13
-11
lines changed

6 files changed

+13
-11
lines changed

app/scripts/controllers/build.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,10 @@ angular.module('openshiftConsole')
103103
type: "warning",
104104
message: "Build configuration " + $scope.buildConfigName + " has been deleted."
105105
};
106+
$scope.buildConfigDeleted = true;
106107
}
107108
$scope.buildConfig = buildConfig;
108-
$scope.paused = BuildsService.isPaused($scope.buildConfig);
109+
$scope.buildConfigPaused = BuildsService.isPaused($scope.buildConfig);
109110
updateCanBuild();
110111
};
111112

app/scripts/controllers/buildConfig.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ angular.module('openshiftConsole')
107107
var buildConfigResolved = function(buildConfig, action) {
108108
$scope.loaded = true;
109109
$scope.buildConfig = buildConfig;
110-
$scope.paused = BuildsService.isPaused($scope.buildConfig);
110+
$scope.buildConfigPaused = BuildsService.isPaused($scope.buildConfig);
111111
if ($scope.buildConfig.spec.source.images) {
112112
$scope.imageSources = $scope.buildConfig.spec.source.images;
113113
$scope.imageSourcesPaths = [];
@@ -138,6 +138,7 @@ angular.module('openshiftConsole')
138138
type: "warning",
139139
message: "This build configuration has been deleted."
140140
};
141+
$scope.buildConfigDeleted = true;
141142
}
142143
if (!$scope.forms.bcEnvVars || $scope.forms.bcEnvVars.$pristine) {
143144
copyBuildConfigAndEnsureEnv(buildConfig);

app/views/browse/build-config.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
<h1>
1111
{{buildConfigName}}
1212
<span class="pficon pficon-warning-triangle-o"
13-
ng-if="paused"
13+
ng-if="buildConfigPaused || buildConfigDeleted"
1414
aria-hidden="true"
1515
data-toggle="tooltip"
16-
data-original-title="Building from build configuration {{buildConfig.metadata.name}} has been paused.">
16+
data-original-title="{{buildConfigDeleted ? 'This build configuration no longer exists' : 'Building from build configuration ' + buildConfig.metadata.name + ' has been paused.'}}">
1717
</span>
1818
<div class="pull-right dropdown" ng-if="buildConfig" ng-hide="!('buildConfigs' | canIDoAny)">
1919
<!-- Primary Actions -->

app/views/browse/build.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ <h1>
1414
{{build.metadata.name}}
1515
<span ng-if="build.status.message" class="pficon pficon-warning-triangle-o" style="cursor: help;" data-toggle="popover" data-trigger="hover" dynamic-content="{{build.status.message}}"></span>
1616
<span class="pficon pficon-warning-triangle-o"
17-
ng-if="paused"
17+
ng-if="buildConfigPaused || buildConfigDeleted"
1818
aria-hidden="true"
1919
data-toggle="tooltip"
20-
data-original-title="Building from build configuration {{buildConfig.metadata.name}} has been paused.">
20+
data-original-title="{{buildConfigDeleted ? 'The build configuration for this build no longer exists.' : 'Building from build configuration ' + buildConfig.metadata.name + ' has been paused.'}}">
2121
</span>
2222
<small class="meta">created <span am-time-ago="build.metadata.creationTimestamp"></span></small>
2323
<div class="pull-right dropdown" ng-hide="!('builds' | canIDoAny)">

dist/scripts/scripts.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -5208,7 +5208,7 @@ details:"Reason: " + b("getErrorDetails")(c)
52085208
q(a.buildConfig), a.forms.bcEnvVars.$setPristine();
52095209
};
52105210
var r, s = function(c, d) {
5211-
a.loaded = !0, a.buildConfig = c, a.paused = f.isPaused(a.buildConfig), a.buildConfig.spec.source.images && (a.imageSources = a.buildConfig.spec.source.images, a.imageSourcesPaths = [], a.imageSources.forEach(function(c) {
5211+
a.loaded = !0, a.buildConfig = c, a.buildConfigPaused = f.isPaused(a.buildConfig), a.buildConfig.spec.source.images && (a.imageSources = a.buildConfig.spec.source.images, a.imageSourcesPaths = [], a.imageSources.forEach(function(c) {
52125212
a.imageSourcesPaths.push(b("destinationSourcePair")(c.paths));
52135213
}));
52145214
var i = _.get(o(c), "from", {}), j = i.kind + "/" + i.name + "/" + (i.namespace || a.projectName);
@@ -5223,7 +5223,7 @@ a.BCEnvVarsFromImage = [];
52235223
})) :a.BCEnvVarsFromImage = []), q(c), "DELETED" === d && (a.alerts.deleted = {
52245224
type:"warning",
52255225
message:"This build configuration has been deleted."
5226-
}), !a.forms.bcEnvVars || a.forms.bcEnvVars.$pristine ? q(c) :a.alerts.background_update = {
5226+
}, a.buildConfigDeleted = !0), !a.forms.bcEnvVars || a.forms.bcEnvVars.$pristine ? q(c) :a.alerts.background_update = {
52275227
type:"warning",
52285228
message:"This build configuration has been updated in the background. Saving your changes may create a conflict or cause loss of data.",
52295229
links:[ {
@@ -5335,7 +5335,7 @@ details:"Reason: " + b("getErrorDetails")(c)
53355335
"DELETED" === c && (a.alerts.deleted = {
53365336
type:"warning",
53375337
message:"Build configuration " + a.buildConfigName + " has been deleted."
5338-
}), a.buildConfig = b, a.paused = d.isPaused(a.buildConfig), j();
5338+
}, a.buildConfigDeleted = !0), a.buildConfig = b, a.buildConfigPaused = d.isPaused(a.buildConfig), j();
53395339
};
53405340
g.get(c.project).then(_.spread(function(g, i) {
53415341
a.project = g, a.projectContext = i, a.logOptions = {}, e.get("builds", c.build, i).then(function(a) {

dist/scripts/templates.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1498,7 +1498,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
14981498
"<alerts alerts=\"alerts\"></alerts>\n" +
14991499
"<h1>\n" +
15001500
"{{buildConfigName}}\n" +
1501-
"<span class=\"pficon pficon-warning-triangle-o\" ng-if=\"paused\" aria-hidden=\"true\" data-toggle=\"tooltip\" data-original-title=\"Building from build configuration {{buildConfig.metadata.name}} has been paused.\">\n" +
1501+
"<span class=\"pficon pficon-warning-triangle-o\" ng-if=\"buildConfigPaused || buildConfigDeleted\" aria-hidden=\"true\" data-toggle=\"tooltip\" data-original-title=\"{{buildConfigDeleted ? 'This build configuration no longer exists' : 'Building from build configuration ' + buildConfig.metadata.name + ' has been paused.'}}\">\n" +
15021502
"</span>\n" +
15031503
"<div class=\"pull-right dropdown\" ng-if=\"buildConfig\" ng-hide=\"!('buildConfigs' | canIDoAny)\">\n" +
15041504
"\n" +
@@ -1863,7 +1863,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
18631863
"<h1>\n" +
18641864
"{{build.metadata.name}}\n" +
18651865
"<span ng-if=\"build.status.message\" class=\"pficon pficon-warning-triangle-o\" style=\"cursor: help\" data-toggle=\"popover\" data-trigger=\"hover\" dynamic-content=\"{{build.status.message}}\"></span>\n" +
1866-
"<span class=\"pficon pficon-warning-triangle-o\" ng-if=\"paused\" aria-hidden=\"true\" data-toggle=\"tooltip\" data-original-title=\"Building from build configuration {{buildConfig.metadata.name}} has been paused.\">\n" +
1866+
"<span class=\"pficon pficon-warning-triangle-o\" ng-if=\"buildConfigPaused || buildConfigDeleted\" aria-hidden=\"true\" data-toggle=\"tooltip\" data-original-title=\"{{buildConfigDeleted ? 'The build configuration for this build no longer exists.' : 'Building from build configuration ' + buildConfig.metadata.name + ' has been paused.'}}\">\n" +
18671867
"</span>\n" +
18681868
"<small class=\"meta\">created <span am-time-ago=\"build.metadata.creationTimestamp\"></span></small>\n" +
18691869
"<div class=\"pull-right dropdown\" ng-hide=\"!('builds' | canIDoAny)\">\n" +

0 commit comments

Comments
 (0)