Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add warning that BC has been deleted for the BC and build page #916

Merged
merged 1 commit into from
Nov 22, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion app/scripts/controllers/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,10 @@ angular.module('openshiftConsole')
type: "warning",
message: "Build configuration " + $scope.buildConfigName + " has been deleted."
};
$scope.buildConfigDeleted = true;
}
$scope.buildConfig = buildConfig;
$scope.paused = BuildsService.isPaused($scope.buildConfig);
$scope.buildConfigPaused = BuildsService.isPaused($scope.buildConfig);
updateCanBuild();
};

Expand Down
3 changes: 2 additions & 1 deletion app/scripts/controllers/buildConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ angular.module('openshiftConsole')
var buildConfigResolved = function(buildConfig, action) {
$scope.loaded = true;
$scope.buildConfig = buildConfig;
$scope.paused = BuildsService.isPaused($scope.buildConfig);
$scope.buildConfigPaused = BuildsService.isPaused($scope.buildConfig);
if ($scope.buildConfig.spec.source.images) {
$scope.imageSources = $scope.buildConfig.spec.source.images;
$scope.imageSourcesPaths = [];
Expand Down Expand Up @@ -138,6 +138,7 @@ angular.module('openshiftConsole')
type: "warning",
message: "This build configuration has been deleted."
};
$scope.buildConfigDeleted = true;
}
if (!$scope.forms.bcEnvVars || $scope.forms.bcEnvVars.$pristine) {
copyBuildConfigAndEnsureEnv(buildConfig);
Expand Down
4 changes: 2 additions & 2 deletions app/views/browse/build-config.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
<h1>
{{buildConfigName}}
<span class="pficon pficon-warning-triangle-o"
ng-if="paused"
ng-if="buildConfigPaused || buildConfigDeleted"
aria-hidden="true"
data-toggle="tooltip"
data-original-title="Building from build configuration {{buildConfig.metadata.name}} has been paused.">
data-original-title="{{buildConfigDeleted ? 'This build configuration no longer exists' : 'Building from build configuration ' + buildConfig.metadata.name + ' has been paused.'}}">
</span>
<div class="pull-right dropdown" ng-if="buildConfig" ng-hide="!('buildConfigs' | canIDoAny)">
<!-- Primary Actions -->
Expand Down
4 changes: 2 additions & 2 deletions app/views/browse/build.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ <h1>
{{build.metadata.name}}
<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>
<span class="pficon pficon-warning-triangle-o"
ng-if="paused"
ng-if="buildConfigPaused || buildConfigDeleted"
aria-hidden="true"
data-toggle="tooltip"
data-original-title="Building from build configuration {{buildConfig.metadata.name}} has been paused.">
data-original-title="{{buildConfigDeleted ? 'The build configuration for this build no longer exists.' : 'Building from build configuration ' + buildConfig.metadata.name + ' has been paused.'}}">
</span>
<small class="meta">created <span am-time-ago="build.metadata.creationTimestamp"></span></small>
<div class="pull-right dropdown" ng-hide="!('builds' | canIDoAny)">
Expand Down
6 changes: 3 additions & 3 deletions dist/scripts/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -5208,7 +5208,7 @@ details:"Reason: " + b("getErrorDetails")(c)
q(a.buildConfig), a.forms.bcEnvVars.$setPristine();
};
var r, s = function(c, d) {
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) {
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) {
a.imageSourcesPaths.push(b("destinationSourcePair")(c.paths));
}));
var i = _.get(o(c), "from", {}), j = i.kind + "/" + i.name + "/" + (i.namespace || a.projectName);
Expand All @@ -5223,7 +5223,7 @@ a.BCEnvVarsFromImage = [];
})) :a.BCEnvVarsFromImage = []), q(c), "DELETED" === d && (a.alerts.deleted = {
type:"warning",
message:"This build configuration has been deleted."
}), !a.forms.bcEnvVars || a.forms.bcEnvVars.$pristine ? q(c) :a.alerts.background_update = {
}, a.buildConfigDeleted = !0), !a.forms.bcEnvVars || a.forms.bcEnvVars.$pristine ? q(c) :a.alerts.background_update = {
type:"warning",
message:"This build configuration has been updated in the background. Saving your changes may create a conflict or cause loss of data.",
links:[ {
Expand Down Expand Up @@ -5335,7 +5335,7 @@ details:"Reason: " + b("getErrorDetails")(c)
"DELETED" === c && (a.alerts.deleted = {
type:"warning",
message:"Build configuration " + a.buildConfigName + " has been deleted."
}), a.buildConfig = b, a.paused = d.isPaused(a.buildConfig), j();
}, a.buildConfigDeleted = !0), a.buildConfig = b, a.buildConfigPaused = d.isPaused(a.buildConfig), j();
};
g.get(c.project).then(_.spread(function(g, i) {
a.project = g, a.projectContext = i, a.logOptions = {}, e.get("builds", c.build, i).then(function(a) {
Expand Down
4 changes: 2 additions & 2 deletions dist/scripts/templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -1498,7 +1498,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
"<alerts alerts=\"alerts\"></alerts>\n" +
"<h1>\n" +
"{{buildConfigName}}\n" +
"<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" +
"<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" +
"</span>\n" +
"<div class=\"pull-right dropdown\" ng-if=\"buildConfig\" ng-hide=\"!('buildConfigs' | canIDoAny)\">\n" +
"\n" +
Expand Down Expand Up @@ -1863,7 +1863,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
"<h1>\n" +
"{{build.metadata.name}}\n" +
"<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" +
"<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" +
"<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" +
"</span>\n" +
"<small class=\"meta\">created <span am-time-ago=\"build.metadata.creationTimestamp\"></span></small>\n" +
"<div class=\"pull-right dropdown\" ng-hide=\"!('builds' | canIDoAny)\">\n" +
Expand Down