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

Don't show parameters step when bind has no parameters #2152

Merged
merged 1 commit into from
Sep 25, 2017
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
2 changes: 2 additions & 0 deletions app/scripts/directives/bindService.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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({
Expand Down
4 changes: 0 additions & 4 deletions app/styles/_wizard.less
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
4 changes: 3 additions & 1 deletion app/views/directives/bind-service.html
Original file line number Diff line number Diff line change
Expand Up @@ -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">
<pf-wizard-step ng-repeat="step in ctrl.steps track by step.id"
step-title="{{step.label}}"
next-enabled="step.valid"
wz-disabled="{{step.hidden}}"
on-show="step.onShow"
step-id="{{step.id}}"
step-priority="{{$index}}"
allow-click-nav="step.allowClickNav">
<div class="wizard-pf-main-inner-shadow-covers">
<div class="bind-service-config">
<div ng-include="step.view" class="wizard-pf-main-form-contents"></div>
<div ng-if="!step.hidden" ng-include="step.view" class="wizard-pf-main-form-contents"></div>
</div>
</div>
</pf-wizard-step>
Expand Down
3 changes: 1 addition & 2 deletions app/views/directives/deploy-image-dialog.html
Original file line number Diff line number Diff line change
Expand Up @@ -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">
<pf-wizard-step
step-title="Image"
step-id="image"
Expand Down
4 changes: 1 addition & 3 deletions app/views/directives/process-template-dialog.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,14 @@
<pf-wizard
title="{{!$ctrl.useProjectTemplate && ($ctrl.template | displayName) || 'Select from Project'}}"
hide-sidebar="true"
hide-back-button="!$ctrl.useProjectTemplate"
step-class="order-service-wizard-step"
wizard-ready="$ctrl.wizardReady"
next-title="$ctrl.nextTitle"
next-callback="$ctrl.next"
on-finish="$ctrl.close()"
on-cancel="$ctrl.close()"
wizard-done="$ctrl.wizardDone"
current-step="$ctrl.currentStep"
ng-class="{'pf-wizard-no-back': !$ctrl.useProjectTemplate}">
current-step="$ctrl.currentStep">
<pf-wizard-step ng-repeat="step in $ctrl.steps track by step.id"
step-title="{{step.label}}"
wz-disabled="{{step.hidden}}"
Expand Down
3 changes: 1 addition & 2 deletions app/views/directives/unbind-service.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
next-title="ctrl.nextTitle"
on-finish="ctrl.closeWizard()"
on-cancel="ctrl.closeWizard()"
wizard-done="ctrl.wizardComplete"
class="pf-wizard-no-back">
wizard-done="ctrl.wizardComplete">
<pf-wizard-step
ng-repeat="step in ctrl.steps track by step.id"
step-title="{{step.label}}"
Expand Down
4 changes: 2 additions & 2 deletions dist/scripts/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -12660,11 +12660,11 @@ c && (c(), c = void 0), l && (l(), l = void 0), d.nextTitle = "Close", d.wizardC
var y = function() {
if (d.serviceClasses) {
var e = "ServiceInstance" === d.target.kind ? d.target : d.serviceToBind;
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 >");
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) {
Expand Down
12 changes: 6 additions & 6 deletions dist/scripts/templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -5836,11 +5836,11 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(

$templateCache.put('views/directives/bind-service.html',
"<div class=\"bind-service-wizard\">\n" +
"<pf-wizard title=\"Create Binding\" hide-sidebar=\"true\" step-class=\"bind-service-wizard-step\" wizard-ready=\"ctrl.wizardReady\" next-title=\"ctrl.nextTitle\" on-finish=\"ctrl.closeWizard()\" on-cancel=\"ctrl.closeWizard()\" wizard-done=\"ctrl.wizardComplete\">\n" +
"<pf-wizard-step ng-repeat=\"step in ctrl.steps track by step.id\" step-title=\"{{step.label}}\" next-enabled=\"step.valid\" on-show=\"step.onShow\" step-id=\"{{step.id}}\" step-priority=\"{{$index}}\" allow-click-nav=\"step.allowClickNav\">\n" +
"<pf-wizard title=\"Create Binding\" hide-sidebar=\"true\" 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\">\n" +
"<pf-wizard-step ng-repeat=\"step in ctrl.steps track by step.id\" step-title=\"{{step.label}}\" next-enabled=\"step.valid\" wz-disabled=\"{{step.hidden}}\" on-show=\"step.onShow\" step-id=\"{{step.id}}\" step-priority=\"{{$index}}\" allow-click-nav=\"step.allowClickNav\">\n" +
"<div class=\"wizard-pf-main-inner-shadow-covers\">\n" +
"<div class=\"bind-service-config\">\n" +
"<div ng-include=\"step.view\" class=\"wizard-pf-main-form-contents\"></div>\n" +
"<div ng-if=\"!step.hidden\" ng-include=\"step.view\" class=\"wizard-pf-main-form-contents\"></div>\n" +
"</div>\n" +
"</div>\n" +
"</pf-wizard-step>\n" +
Expand Down Expand Up @@ -6255,7 +6255,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(


$templateCache.put('views/directives/deploy-image-dialog.html',
"<pf-wizard title=\"Deploy Image\" on-cancel=\"$ctrl.close()\" on-finish=\"$ctrl.close()\" hide-back-button=\"true\" hide-sidebar=\"true\" next-title=\"$ctrl.nextButtonTitle\" next-callback=\"$ctrl.nextCallback\" 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\">\n" +
"<pf-wizard title=\"Deploy Image\" on-cancel=\"$ctrl.close()\" on-finish=\"$ctrl.close()\" hide-back-button=\"true\" hide-sidebar=\"true\" next-title=\"$ctrl.nextButtonTitle\" next-callback=\"$ctrl.nextCallback\" current-step=\"$ctrl.currentStep\" on-step-changed=\"$ctrl.stepChanged(step)\" step-class=\"order-service-wizard-step\" wizard-done=\"$ctrl.wizardDone\">\n" +
"<pf-wizard-step step-title=\"Image\" step-id=\"image\" step-priority=\"1\" substeps=\"false\" ok-to-nav-away=\"true\" allow-click-nav=\"false\" next-enabled=\"$ctrl.deployForm.$valid || $ctrl.deployImageNewAppCreated\">\n" +
"<div class=\"wizard-pf-main-inner-shadow-covers\">\n" +
"<div class=\"order-service-config\">\n" +
Expand Down Expand Up @@ -8812,7 +8812,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(

$templateCache.put('views/directives/process-template-dialog.html',
"<div class=\"order-service\">\n" +
"<pf-wizard title=\"{{!$ctrl.useProjectTemplate && ($ctrl.template | displayName) || 'Select from Project'}}\" hide-sidebar=\"true\" hide-back-button=\"!$ctrl.useProjectTemplate\" step-class=\"order-service-wizard-step\" wizard-ready=\"$ctrl.wizardReady\" next-title=\"$ctrl.nextTitle\" next-callback=\"$ctrl.next\" on-finish=\"$ctrl.close()\" on-cancel=\"$ctrl.close()\" wizard-done=\"$ctrl.wizardDone\" current-step=\"$ctrl.currentStep\" ng-class=\"{'pf-wizard-no-back': !$ctrl.useProjectTemplate}\">\n" +
"<pf-wizard title=\"{{!$ctrl.useProjectTemplate && ($ctrl.template | displayName) || 'Select from Project'}}\" hide-sidebar=\"true\" step-class=\"order-service-wizard-step\" wizard-ready=\"$ctrl.wizardReady\" next-title=\"$ctrl.nextTitle\" next-callback=\"$ctrl.next\" on-finish=\"$ctrl.close()\" on-cancel=\"$ctrl.close()\" wizard-done=\"$ctrl.wizardDone\" current-step=\"$ctrl.currentStep\">\n" +
"<pf-wizard-step ng-repeat=\"step in $ctrl.steps track by step.id\" step-title=\"{{step.label}}\" wz-disabled=\"{{step.hidden}}\" allow-click-nav=\"step.allowClickNav\" next-enabled=\"step.valid\" prev-enabled=\"step.prevEnabled\" on-show=\"step.onShow\" step-id=\"{{step.id}}\" step-priority=\"{{$index}}\">\n" +
"<div class=\"wizard-pf-main-inner-shadow-covers\">\n" +
"<div ng-if=\"step.selected\" ng-include=\"step.view\" class=\"wizard-pf-main-form-contents\"></div>\n" +
Expand Down Expand Up @@ -9173,7 +9173,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(

$templateCache.put('views/directives/unbind-service.html',
"<div class=\"bind-service-wizard unbind-service\">\n" +
"<pf-wizard title=\"Delete Binding\" hide-sidebar=\"true\" hide-back-button=\"true\" step-class=\"bind-service-wizard-step\" wizard-ready=\"ctrl.wizardReady\" next-title=\"ctrl.nextTitle\" on-finish=\"ctrl.closeWizard()\" on-cancel=\"ctrl.closeWizard()\" wizard-done=\"ctrl.wizardComplete\" class=\"pf-wizard-no-back\">\n" +
"<pf-wizard title=\"Delete Binding\" hide-sidebar=\"true\" hide-back-button=\"true\" step-class=\"bind-service-wizard-step\" wizard-ready=\"ctrl.wizardReady\" next-title=\"ctrl.nextTitle\" on-finish=\"ctrl.closeWizard()\" on-cancel=\"ctrl.closeWizard()\" wizard-done=\"ctrl.wizardComplete\">\n" +
"<pf-wizard-step ng-repeat=\"step in ctrl.steps track by step.id\" step-title=\"{{step.label}}\" next-enabled=\"step.valid\" allow-click-nav=\"false\" on-show=\"step.onShow\" step-id=\"{{step.id}}\" step-priority=\"{{$index}}\">\n" +
"<div class=\"wizard-pf-main-inner-shadow-covers\">\n" +
"<div class=\"bind-service-config\">\n" +
Expand Down
1 change: 0 additions & 1 deletion dist/styles/main.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.