Skip to content

Commit 3826410

Browse files
author
OpenShift Bot
authored
Merge pull request #2093 from spadgett/applications-step-label
Merged by openshift-bot
2 parents 5bf079c + c0550de commit 3826410

File tree

2 files changed

+18
-12
lines changed

2 files changed

+18
-12
lines changed

app/scripts/directives/unbindService.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
var ctrl = this;
2424
var validityWatcher;
2525
var context;
26+
var enableTechPreviewFeature = $filter('enableTechPreviewFeature');
2627
var serviceInstanceDisplayName = $filter('serviceInstanceDisplayName');
2728

2829
var unbindService = function() {
@@ -77,7 +78,12 @@
7778
};
7879

7980
ctrl.$onInit = function() {
80-
var formStepLabel = (ctrl.target.kind === 'ServiceInstance') ? 'Applications' : 'Services';
81+
var formStepLabel;
82+
if (ctrl.target.kind === 'ServiceInstance') {
83+
formStepLabel = enableTechPreviewFeature('pod_presets') ? 'Applications' : 'Bindings';
84+
} else {
85+
formStepLabel = 'Services';
86+
}
8187
ctrl.displayName = serviceInstanceDisplayName(ctrl.target);
8288
ctrl.steps = [{
8389
id: 'deleteForm',

dist/scripts/scripts.js

+11-11
Original file line numberDiff line numberDiff line change
@@ -12490,7 +12490,7 @@ templateUrl: "views/directives/bind-service.html"
1249012490
}(), function() {
1249112491
angular.module("openshiftConsole").component("unbindService", {
1249212492
controller: [ "$scope", "$filter", "DataService", function(e, t, n) {
12493-
var a, r, o = this, i = t("serviceInstanceDisplayName"), s = function() {
12493+
var a, r, o = this, i = t("enableTechPreviewFeature"), s = t("serviceInstanceDisplayName"), c = function() {
1249412494
var e = o.selectedBinding.metadata.name;
1249512495
o.unboundApps = o.appsForBinding(e), n.delete({
1249612496
group: "servicecatalog.k8s.io",
@@ -12500,30 +12500,30 @@ propagationPolicy: null
1250012500
}).then(_.noop, function(e) {
1250112501
o.error = e;
1250212502
});
12503-
}, c = function() {
12503+
}, l = function() {
1250412504
var t = _.head(o.steps);
1250512505
t.valid = !1, a = e.$watch("ctrl.selectedBinding", function(e) {
1250612506
t.valid = !!e;
1250712507
});
12508-
}, l = function() {
12509-
a && (a(), a = void 0);
1251012508
}, u = function() {
12511-
o.nextTitle = "Delete", c();
12509+
a && (a(), a = void 0);
1251212510
}, d = function() {
12513-
o.nextTitle = "Close", o.wizardComplete = !0, s(), l();
12511+
o.nextTitle = "Delete", l();
12512+
}, m = function() {
12513+
o.nextTitle = "Close", o.wizardComplete = !0, c(), u();
1251412514
};
1251512515
o.$onInit = function() {
12516-
var e = "ServiceInstance" === o.target.kind ? "Applications" : "Services";
12517-
o.displayName = i(o.target), o.steps = [ {
12516+
var e;
12517+
e = "ServiceInstance" === o.target.kind ? i("pod_presets") ? "Applications" : "Bindings" : "Services", o.displayName = s(o.target), o.steps = [ {
1251812518
id: "deleteForm",
1251912519
label: e,
1252012520
view: "views/directives/bind-service/delete-binding-select-form.html",
12521-
onShow: u
12521+
onShow: d
1252212522
}, {
1252312523
id: "results",
1252412524
label: "Results",
1252512525
view: "views/directives/bind-service/delete-binding-result.html",
12526-
onShow: d
12526+
onShow: m
1252712527
} ], r = {
1252812528
namespace: _.get(o.target, "metadata.namespace")
1252912529
};
@@ -12532,7 +12532,7 @@ return _.get(o.applicationsByBinding, e);
1253212532
}, o.closeWizard = function() {
1253312533
_.isFunction(o.onClose) && o.onClose();
1253412534
}, o.$onDestroy = function() {
12535-
l();
12535+
u();
1253612536
};
1253712537
} ],
1253812538
controllerAs: "ctrl",

0 commit comments

Comments
 (0)