Skip to content

Commit 5b3d18a

Browse files
BryanMLimadhslove
authored andcommitted
Update ownership selection component to be language independent (apache#10052)
1 parent 9a17639 commit 5b3d18a

File tree

6 files changed

+15
-15
lines changed

6 files changed

+15
-15
lines changed

ui/src/views/compute/DeployVM.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2491,14 +2491,14 @@ export default {
24912491
domainid: store.getters.userInfo.domainid,
24922492
account: store.getters.userInfo.account
24932493
}
2494-
if (OwnerOptions.selectedAccountType === this.$t('label.account')) {
2494+
if (OwnerOptions.selectedAccountType === 'Account') {
24952495
if (!OwnerOptions.selectedAccount) {
24962496
return
24972497
}
24982498
this.owner.account = OwnerOptions.selectedAccount
24992499
this.owner.domainid = OwnerOptions.selectedDomain
25002500
this.owner.projectid = null
2501-
} else if (OwnerOptions.selectedAccountType === this.$t('label.project')) {
2501+
} else if (OwnerOptions.selectedAccountType === 'Project') {
25022502
if (!OwnerOptions.selectedProject) {
25032503
return
25042504
}

ui/src/views/compute/wizard/OwnershipSelection.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@
3131
}
3232
"
3333
>
34-
<a-select-option value="Account">{{ $t('label.account') }}</a-select-option>
35-
<a-select-option value="Project">{{ $t('label.project') }}</a-select-option>
34+
<a-select-option :value="'Account'">{{ $t('label.account') }}</a-select-option>
35+
<a-select-option :value="'Project'">{{ $t('label.project') }}</a-select-option>
3636
</a-select>
3737
</a-form-item>
3838
<a-form-item :label="$t('label.domain')" required>
@@ -67,7 +67,7 @@
6767
</a-select>
6868
</a-form-item>
6969

70-
<template v-if="selectedAccountType === $t('label.account')">
70+
<template v-if="selectedAccountType === 'Account'">
7171
<a-form-item :label="$t('label.account')" required>
7272
<a-select
7373
@change="emitChangeEvent"
@@ -139,7 +139,7 @@ export default {
139139
domains: [],
140140
accounts: [],
141141
projects: [],
142-
selectedAccountType: this.$store.getters.project?.id ? this.$t('label.project') : this.$t('label.account'),
142+
selectedAccountType: this.$store.getters.project?.id ? 'Project' : 'Account',
143143
selectedDomain: null,
144144
selectedAccount: null,
145145
selectedProject: null,
@@ -243,7 +243,7 @@ export default {
243243
})
244244
},
245245
changeDomain () {
246-
if (this.selectedAccountType === this.$t('label.account')) {
246+
if (this.selectedAccountType === 'Account') {
247247
this.fetchAccounts()
248248
} else {
249249
this.fetchProjects()

ui/src/views/network/CreateIsolatedNetworkForm.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -492,14 +492,14 @@ export default {
492492
domainid: this.$store.getters.userInfo.domainid,
493493
account: this.$store.getters.userInfo.account
494494
}
495-
if (OwnerOptions.selectedAccountType === this.$t('label.account')) {
495+
if (OwnerOptions.selectedAccountType === 'Account') {
496496
if (!OwnerOptions.selectedAccount) {
497497
return
498498
}
499499
this.owner.account = OwnerOptions.selectedAccount
500500
this.owner.domainid = OwnerOptions.selectedDomain
501501
this.owner.projectid = null
502-
} else if (OwnerOptions.selectedAccountType === this.$t('label.project')) {
502+
} else if (OwnerOptions.selectedAccountType === 'Project') {
503503
if (!OwnerOptions.selectedProject) {
504504
return
505505
}

ui/src/views/network/CreateL2NetworkForm.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,14 +294,14 @@ export default {
294294
domainid: this.$store.getters.userInfo.domainid,
295295
account: this.$store.getters.userInfo.account
296296
}
297-
if (OwnerOptions.selectedAccountType === this.$t('label.account')) {
297+
if (OwnerOptions.selectedAccountType === 'Account') {
298298
if (!OwnerOptions.selectedAccount) {
299299
return
300300
}
301301
this.owner.account = OwnerOptions.selectedAccount
302302
this.owner.domainid = OwnerOptions.selectedDomain
303303
this.owner.projectid = null
304-
} else if (OwnerOptions.selectedAccountType === this.$t('label.project')) {
304+
} else if (OwnerOptions.selectedAccountType === 'Project') {
305305
if (!OwnerOptions.selectedProject) {
306306
return
307307
}

ui/src/views/storage/CreateSharedFS.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,14 +273,14 @@ export default {
273273
fetchOwnerOptions (OwnerOptions) {
274274
this.owner = {}
275275
console.log('fetching owner')
276-
if (OwnerOptions.selectedAccountType === this.$t('label.account')) {
276+
if (OwnerOptions.selectedAccountType === 'Account') {
277277
if (!OwnerOptions.selectedAccount) {
278278
return
279279
}
280280
console.log('fetched account')
281281
this.owner.account = OwnerOptions.selectedAccount
282282
this.owner.domainid = OwnerOptions.selectedDomain
283-
} else if (OwnerOptions.selectedAccountType === this.$t('label.project')) {
283+
} else if (OwnerOptions.selectedAccountType === 'Project') {
284284
if (!OwnerOptions.selectedProject) {
285285
return
286286
}

ui/src/views/storage/CreateVolume.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,13 +211,13 @@ export default {
211211
},
212212
fetchOwnerOptions (OwnerOptions) {
213213
this.owner = {}
214-
if (OwnerOptions.selectedAccountType === this.$t('label.account')) {
214+
if (OwnerOptions.selectedAccountType === 'Account') {
215215
if (!OwnerOptions.selectedAccount) {
216216
return
217217
}
218218
this.owner.account = OwnerOptions.selectedAccount
219219
this.owner.domainid = OwnerOptions.selectedDomain
220-
} else if (OwnerOptions.selectedAccountType === this.$t('label.project')) {
220+
} else if (OwnerOptions.selectedAccountType === 'Project') {
221221
if (!OwnerOptions.selectedProject) {
222222
return
223223
}

0 commit comments

Comments
 (0)