Skip to content

Commit

Permalink
Fix Fleet - GitRepo first step
Browse files Browse the repository at this point in the history
Signed-off-by: Francesco Torchia <[email protected]>
  • Loading branch information
torchiaf committed Jan 13, 2025
1 parent 8644a25 commit bdca9a8
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions shell/edit/fleet.cattle.io.gitrepo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ export default {
label: this.t('fleet.gitRepo.add.steps.repoInfo.label'),
subtext: this.t('fleet.gitRepo.add.steps.repoInfo.subtext'),
descriptionKey: 'fleet.gitRepo.add.steps.repoInfo.description',
ready: false,
weight: 30
ready: true,
weight: 1
};
const stepTargetInfo = {
Expand All @@ -128,12 +128,10 @@ export default {
label: this.t('fleet.gitRepo.add.steps.targetInfo.label'),
subtext: this.t('fleet.gitRepo.add.steps.targetInfo.subtext'),
descriptionKey: 'fleet.gitRepo.steps.add.targetInfo.description',
ready: true,
weight: 30
ready: false,
weight: 1
};
const addRepositorySteps = [stepRepoInfo, stepTargetInfo].sort((a, b) => (b.weight || 0) - (a.weight || 0));
return {
allClusters: [],
allClusterGroups: [],
Expand All @@ -155,7 +153,6 @@ export default {
targetAdvanced,
stepRepoInfo,
stepTargetInfo,
addRepositorySteps,
displayHelmRepoURLRegex: false,
fvFormRuleSets: [{ path: 'spec.repo', rules: ['required'] }]
};
Expand All @@ -168,6 +165,13 @@ export default {
return _SPECIFY;
},
steps() {
return [
this.stepRepoInfo,
this.stepTargetInfo
];
},
isLocal() {
return this.value.metadata.namespace === 'fleet-local';
},
Expand Down Expand Up @@ -463,7 +467,7 @@ export default {
},
stepOneReady() {
this.addRepositorySteps[0]['ready'] = this.stepOneRequires;
this.stepRepoInfo['ready'] = this.stepOneRequires;
},
updateTls() {
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit bdca9a8

Please sign in to comment.