From 4b135dcdf94d98c150abe364d95a152d9bb061af Mon Sep 17 00:00:00 2001 From: Samuel Padgett Date: Sat, 23 Sep 2017 11:05:46 -0400 Subject: [PATCH] Don't show parameters step when bind has no parameters * Remove unnecessary `pf-wizard-no-back` class since it's handled by the wizard component itself now * Don't hide button in process-template dialog since there's now an extra info step --- app/scripts/directives/bindService.js | 2 ++ app/styles/_wizard.less | 4 ---- app/views/directives/bind-service.html | 4 +++- app/views/directives/deploy-image-dialog.html | 3 +-- app/views/directives/process-template-dialog.html | 4 +--- app/views/directives/unbind-service.html | 3 +-- dist/scripts/scripts.js | 4 ++-- dist/scripts/templates.js | 12 ++++++------ dist/styles/main.css | 1 - 9 files changed, 16 insertions(+), 21 deletions(-) diff --git a/app/scripts/directives/bindService.js b/app/scripts/directives/bindService.js index a968465787..ee4dd00966 100644 --- a/app/scripts/directives/bindService.js +++ b/app/scripts/directives/bindService.js @@ -161,6 +161,7 @@ ctrl.parameterSchema = _.get(ctrl.plan, 'serviceInstanceCredentialCreateParameterSchema'); bindParametersStep.hidden = !_.has(ctrl.parameterSchema, 'properties'); ctrl.nextTitle = bindParametersStep.hidden ? 'Bind' : 'Next >'; + ctrl.hideBack = bindParametersStep.hidden; }; $scope.$watch("ctrl.serviceToBind", updateInstance); @@ -172,6 +173,7 @@ ctrl.parameterData = {}; ctrl.steps = [ bindFormStep, bindParametersStep, resultsStep ]; + ctrl.hideBack = bindParametersStep.hidden; // We will want ServiceClasses either way for display purposes DataService.list({ diff --git a/app/styles/_wizard.less b/app/styles/_wizard.less index c067580690..73abb92924 100644 --- a/app/styles/_wizard.less +++ b/app/styles/_wizard.less @@ -1,7 +1,3 @@ -.pf-wizard-no-back .wizard-pf-footer .btn-cancel { - margin-right: 0; -} - .wizard-pf-steps-indicator .wizard-pf-step-number { // The numbers do not center inside the step indicator bubble otherwise since // the console changes the base font size. diff --git a/app/views/directives/bind-service.html b/app/views/directives/bind-service.html index 3d1972d64e..d54d2d3d00 100644 --- a/app/views/directives/bind-service.html +++ b/app/views/directives/bind-service.html @@ -5,19 +5,21 @@ step-class="bind-service-wizard-step" wizard-ready="ctrl.wizardReady" next-title="ctrl.nextTitle" + hide-back-button="{{ctrl.hideBack}}" on-finish="ctrl.closeWizard()" on-cancel="ctrl.closeWizard()" wizard-done="ctrl.wizardComplete">
-
+
diff --git a/app/views/directives/deploy-image-dialog.html b/app/views/directives/deploy-image-dialog.html index e2e116271f..fa920af046 100644 --- a/app/views/directives/deploy-image-dialog.html +++ b/app/views/directives/deploy-image-dialog.html @@ -9,8 +9,7 @@ current-step="$ctrl.currentStep" on-step-changed="$ctrl.stepChanged(step)" step-class="order-service-wizard-step" - wizard-done="$ctrl.wizardDone" - class="pf-wizard-no-back"> + wizard-done="$ctrl.wizardDone"> + current-step="$ctrl.currentStep"> + wizard-done="ctrl.wizardComplete"> "); +e && (d.serviceClass = d.serviceClasses[e.spec.serviceClassName], d.serviceClassName = e.spec.serviceClassName, d.plan = r.getPlanForInstance(e, d.serviceClass), d.parameterSchema = _.get(d.plan, "serviceInstanceCredentialCreateParameterSchema"), i.hidden = !_.has(d.parameterSchema, "properties"), d.nextTitle = i.hidden ? "Bind" : "Next >", d.hideBack = i.hidden); } }; e.$watch("ctrl.serviceToBind", y), d.$onInit = function() { -d.serviceSelection = {}, d.projectDisplayName = t("displayName")(d.project), d.podPresets = m("pod_presets"), d.parameterData = {}, d.steps = [ o, i, s ], a.list({ +d.serviceSelection = {}, d.projectDisplayName = t("displayName")(d.project), d.podPresets = m("pod_presets"), d.parameterData = {}, d.steps = [ o, i, s ], d.hideBack = i.hidden, a.list({ group: "servicecatalog.k8s.io", resource: "serviceclasses" }, {}).then(function(e) { diff --git a/dist/scripts/templates.js b/dist/scripts/templates.js index 2b08d7688f..4d941093e4 100644 --- a/dist/scripts/templates.js +++ b/dist/scripts/templates.js @@ -5836,11 +5836,11 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function( $templateCache.put('views/directives/bind-service.html', "
\n" + - "\n" + - "\n" + + "\n" + + "\n" + "
\n" + "
\n" + - "
\n" + + "
\n" + "
\n" + "
\n" + "
\n" + @@ -6255,7 +6255,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function( $templateCache.put('views/directives/deploy-image-dialog.html', - "\n" + + "\n" + "\n" + "
\n" + "
\n" + @@ -8812,7 +8812,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function( $templateCache.put('views/directives/process-template-dialog.html', "
\n" + - "\n" + + "\n" + "\n" + "
\n" + "
\n" + @@ -9173,7 +9173,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function( $templateCache.put('views/directives/unbind-service.html', "
\n" + - "\n" + + "\n" + "\n" + "
\n" + "
\n" + diff --git a/dist/styles/main.css b/dist/styles/main.css index 816188e03e..e7567ba476 100644 --- a/dist/styles/main.css +++ b/dist/styles/main.css @@ -5946,7 +5946,6 @@ notification-drawer-wrapper .expanded-notification.unread .drawer-pf-notificatio .applauncher-pf.open>a,.applauncher-pf.open>a:focus,.applauncher-pf.open>a:hover{background:0 0} .applauncher-pf .dropdown-toggle{color:#d1d1d1;display:block;font-size:16px;padding:17px 15px 15px 12px!important} .applauncher-pf .dropdown-toggle:focus,.applauncher-pf .dropdown-toggle:hover{color:#fff} -.pf-wizard-no-back .wizard-pf-footer .btn-cancel{margin-right:0} .wizard-pf-steps-indicator .wizard-pf-step-number{font-size:12px} .build-triggers .copy-to-clipboard{margin-bottom:10px} .ace-bordered{border:1px solid #8b8d8f}