diff --git a/shell/components/CruResource.vue b/shell/components/CruResource.vue index 911e12af5a3..2f125e24655 100644 --- a/shell/components/CruResource.vue +++ b/shell/components/CruResource.vue @@ -120,6 +120,11 @@ export default { default: () => [] }, + stepsOptions: { + type: Object, + default: () => ({ editFirstStep: true }) + }, + // The set of labels to display for the finish AsyncButton finishMode: { type: String, @@ -562,6 +567,7 @@ export default { ref="Wizard" :header-mode="mode" :steps="steps" + :edit-first-step="stepsOptions.editFirstStep" :errors="errors" :finish-mode="finishMode" class="wizard" diff --git a/shell/edit/fleet.cattle.io.gitrepo.vue b/shell/edit/fleet.cattle.io.gitrepo.vue index 3fce4b0726e..b111897f6ef 100644 --- a/shell/edit/fleet.cattle.io.gitrepo.vue +++ b/shell/edit/fleet.cattle.io.gitrepo.vue @@ -119,7 +119,7 @@ export default { subtext: this.t('fleet.gitRepo.add.steps.repoInfo.subtext'), descriptionKey: 'fleet.gitRepo.add.steps.repoInfo.description', ready: false, - weight: 30 + weight: 1 }; const stepTargetInfo = { @@ -129,11 +129,9 @@ export default { subtext: this.t('fleet.gitRepo.add.steps.targetInfo.subtext'), descriptionKey: 'fleet.gitRepo.steps.add.targetInfo.description', ready: true, - weight: 30 + weight: 1 }; - const addRepositorySteps = [stepRepoInfo, stepTargetInfo].sort((a, b) => (b.weight || 0) - (a.weight || 0)); - return { allClusters: [], allClusterGroups: [], @@ -155,7 +153,6 @@ export default { targetAdvanced, stepRepoInfo, stepTargetInfo, - addRepositorySteps, displayHelmRepoURLRegex: false, fvFormRuleSets: [{ path: 'spec.repo', rules: ['required'] }] }; @@ -168,6 +165,13 @@ export default { return _SPECIFY; }, + steps() { + return [ + this.stepRepoInfo, + this.stepTargetInfo + ]; + }, + isLocal() { return this.value.metadata.namespace === 'fleet-local'; }, @@ -463,7 +467,7 @@ export default { }, stepOneReady() { - this.addRepositorySteps[0]['ready'] = this.stepOneRequires; + this.stepRepoInfo['ready'] = this.stepOneRequires; }, updateTls() { @@ -507,8 +511,7 @@ export default { :subtypes="[]" :validation-passed="true" :errors="errors" - :steps="addRepositorySteps" - :edit-first-step="true" + :steps="steps" :finish-mode="'finish'" class="wizard" @cancel="done"