Skip to content

Commit

Permalink
Merge pull request #2093 from spadgett/applications-step-label
Browse files Browse the repository at this point in the history
Merged by openshift-bot
  • Loading branch information
OpenShift Bot committed Sep 16, 2017
2 parents 5bf079c + c0550de commit 3826410
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 12 deletions.
8 changes: 7 additions & 1 deletion app/scripts/directives/unbindService.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
var ctrl = this;
var validityWatcher;
var context;
var enableTechPreviewFeature = $filter('enableTechPreviewFeature');
var serviceInstanceDisplayName = $filter('serviceInstanceDisplayName');

var unbindService = function() {
Expand Down Expand Up @@ -77,7 +78,12 @@
};

ctrl.$onInit = function() {
var formStepLabel = (ctrl.target.kind === 'ServiceInstance') ? 'Applications' : 'Services';
var formStepLabel;
if (ctrl.target.kind === 'ServiceInstance') {
formStepLabel = enableTechPreviewFeature('pod_presets') ? 'Applications' : 'Bindings';
} else {
formStepLabel = 'Services';
}
ctrl.displayName = serviceInstanceDisplayName(ctrl.target);
ctrl.steps = [{
id: 'deleteForm',
Expand Down
22 changes: 11 additions & 11 deletions dist/scripts/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -12490,7 +12490,7 @@ templateUrl: "views/directives/bind-service.html"
}(), function() {
angular.module("openshiftConsole").component("unbindService", {
controller: [ "$scope", "$filter", "DataService", function(e, t, n) {
var a, r, o = this, i = t("serviceInstanceDisplayName"), s = function() {
var a, r, o = this, i = t("enableTechPreviewFeature"), s = t("serviceInstanceDisplayName"), c = function() {
var e = o.selectedBinding.metadata.name;
o.unboundApps = o.appsForBinding(e), n.delete({
group: "servicecatalog.k8s.io",
Expand All @@ -12500,30 +12500,30 @@ propagationPolicy: null
}).then(_.noop, function(e) {
o.error = e;
});
}, c = function() {
}, l = function() {
var t = _.head(o.steps);
t.valid = !1, a = e.$watch("ctrl.selectedBinding", function(e) {
t.valid = !!e;
});
}, l = function() {
a && (a(), a = void 0);
}, u = function() {
o.nextTitle = "Delete", c();
a && (a(), a = void 0);
}, d = function() {
o.nextTitle = "Close", o.wizardComplete = !0, s(), l();
o.nextTitle = "Delete", l();
}, m = function() {
o.nextTitle = "Close", o.wizardComplete = !0, c(), u();
};
o.$onInit = function() {
var e = "ServiceInstance" === o.target.kind ? "Applications" : "Services";
o.displayName = i(o.target), o.steps = [ {
var e;
e = "ServiceInstance" === o.target.kind ? i("pod_presets") ? "Applications" : "Bindings" : "Services", o.displayName = s(o.target), o.steps = [ {
id: "deleteForm",
label: e,
view: "views/directives/bind-service/delete-binding-select-form.html",
onShow: u
onShow: d
}, {
id: "results",
label: "Results",
view: "views/directives/bind-service/delete-binding-result.html",
onShow: d
onShow: m
} ], r = {
namespace: _.get(o.target, "metadata.namespace")
};
Expand All @@ -12532,7 +12532,7 @@ return _.get(o.applicationsByBinding, e);
}, o.closeWizard = function() {
_.isFunction(o.onClose) && o.onClose();
}, o.$onDestroy = function() {
l();
u();
};
} ],
controllerAs: "ctrl",
Expand Down

0 comments on commit 3826410

Please sign in to comment.