This is an automated email from the ASF dual-hosted git repository.

dahn pushed a commit to branch 4.20
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/4.20 by this push:
     new 32af4a25d01 Update ownership selection component to be language 
independent (#10052)
32af4a25d01 is described below

commit 32af4a25d010f6537d759016d449ac213d5ca33d
Author: Bryan Lima <42067040+bryanml...@users.noreply.github.com>
AuthorDate: Fri Dec 27 06:34:51 2024 -0300

    Update ownership selection component to be language independent (#10052)
---
 ui/src/views/compute/DeployVM.vue                  |  4 ++--
 ui/src/views/compute/wizard/OwnershipSelection.vue | 10 +++++-----
 ui/src/views/network/CreateIsolatedNetworkForm.vue |  4 ++--
 ui/src/views/network/CreateL2NetworkForm.vue       |  4 ++--
 ui/src/views/storage/CreateSharedFS.vue            |  4 ++--
 ui/src/views/storage/CreateVolume.vue              |  4 ++--
 6 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/ui/src/views/compute/DeployVM.vue 
b/ui/src/views/compute/DeployVM.vue
index cb9f4a6dce7..57dbe8eeabc 100644
--- a/ui/src/views/compute/DeployVM.vue
+++ b/ui/src/views/compute/DeployVM.vue
@@ -2312,14 +2312,14 @@ export default {
         domainid: store.getters.userInfo.domainid,
         account: store.getters.userInfo.account
       }
-      if (OwnerOptions.selectedAccountType === this.$t('label.account')) {
+      if (OwnerOptions.selectedAccountType === 'Account') {
         if (!OwnerOptions.selectedAccount) {
           return
         }
         this.owner.account = OwnerOptions.selectedAccount
         this.owner.domainid = OwnerOptions.selectedDomain
         this.owner.projectid = null
-      } else if (OwnerOptions.selectedAccountType === 
this.$t('label.project')) {
+      } else if (OwnerOptions.selectedAccountType === 'Project') {
         if (!OwnerOptions.selectedProject) {
           return
         }
diff --git a/ui/src/views/compute/wizard/OwnershipSelection.vue 
b/ui/src/views/compute/wizard/OwnershipSelection.vue
index 61c30f340ac..a2c7ea4c1f8 100644
--- a/ui/src/views/compute/wizard/OwnershipSelection.vue
+++ b/ui/src/views/compute/wizard/OwnershipSelection.vue
@@ -31,8 +31,8 @@
           }
         "
       >
-        <a-select-option :value="$t('label.account')">{{ $t('label.account') 
}}</a-select-option>
-        <a-select-option :value="$t('label.project')">{{ $t('label.project') 
}}</a-select-option>
+        <a-select-option :value="'Account'">{{ $t('label.account') 
}}</a-select-option>
+        <a-select-option :value="'Project'">{{ $t('label.project') 
}}</a-select-option>
       </a-select>
     </a-form-item>
     <a-form-item :label="$t('label.domain')" required>
@@ -67,7 +67,7 @@
       </a-select>
     </a-form-item>
 
-    <template v-if="selectedAccountType === $t('label.account')">
+    <template v-if="selectedAccountType === 'Account'">
       <a-form-item :label="$t('label.account')" required>
         <a-select
           @change="emitChangeEvent"
@@ -139,7 +139,7 @@ export default {
       domains: [],
       accounts: [],
       projects: [],
-      selectedAccountType: this.$store.getters.project?.id ? 
this.$t('label.project') : this.$t('label.account'),
+      selectedAccountType: this.$store.getters.project?.id ? 'Project' : 
'Account',
       selectedDomain: null,
       selectedAccount: null,
       selectedProject: null,
@@ -243,7 +243,7 @@ export default {
         })
     },
     changeDomain () {
-      if (this.selectedAccountType === this.$t('label.account')) {
+      if (this.selectedAccountType === 'Account') {
         this.fetchAccounts()
       } else {
         this.fetchProjects()
diff --git a/ui/src/views/network/CreateIsolatedNetworkForm.vue 
b/ui/src/views/network/CreateIsolatedNetworkForm.vue
index 2c3fa17fa35..cbfc2f97cfc 100644
--- a/ui/src/views/network/CreateIsolatedNetworkForm.vue
+++ b/ui/src/views/network/CreateIsolatedNetworkForm.vue
@@ -492,14 +492,14 @@ export default {
         domainid: this.$store.getters.userInfo.domainid,
         account: this.$store.getters.userInfo.account
       }
-      if (OwnerOptions.selectedAccountType === this.$t('label.account')) {
+      if (OwnerOptions.selectedAccountType === 'Account') {
         if (!OwnerOptions.selectedAccount) {
           return
         }
         this.owner.account = OwnerOptions.selectedAccount
         this.owner.domainid = OwnerOptions.selectedDomain
         this.owner.projectid = null
-      } else if (OwnerOptions.selectedAccountType === 
this.$t('label.project')) {
+      } else if (OwnerOptions.selectedAccountType === 'Project') {
         if (!OwnerOptions.selectedProject) {
           return
         }
diff --git a/ui/src/views/network/CreateL2NetworkForm.vue 
b/ui/src/views/network/CreateL2NetworkForm.vue
index 41d2ec8c2f2..897233c5260 100644
--- a/ui/src/views/network/CreateL2NetworkForm.vue
+++ b/ui/src/views/network/CreateL2NetworkForm.vue
@@ -294,14 +294,14 @@ export default {
         domainid: this.$store.getters.userInfo.domainid,
         account: this.$store.getters.userInfo.account
       }
-      if (OwnerOptions.selectedAccountType === this.$t('label.account')) {
+      if (OwnerOptions.selectedAccountType === 'Account') {
         if (!OwnerOptions.selectedAccount) {
           return
         }
         this.owner.account = OwnerOptions.selectedAccount
         this.owner.domainid = OwnerOptions.selectedDomain
         this.owner.projectid = null
-      } else if (OwnerOptions.selectedAccountType === 
this.$t('label.project')) {
+      } else if (OwnerOptions.selectedAccountType === 'Project') {
         if (!OwnerOptions.selectedProject) {
           return
         }
diff --git a/ui/src/views/storage/CreateSharedFS.vue 
b/ui/src/views/storage/CreateSharedFS.vue
index 4f5b1d9da68..fc9f43c704e 100644
--- a/ui/src/views/storage/CreateSharedFS.vue
+++ b/ui/src/views/storage/CreateSharedFS.vue
@@ -273,14 +273,14 @@ export default {
     fetchOwnerOptions (OwnerOptions) {
       this.owner = {}
       console.log('fetching owner')
-      if (OwnerOptions.selectedAccountType === this.$t('label.account')) {
+      if (OwnerOptions.selectedAccountType === 'Account') {
         if (!OwnerOptions.selectedAccount) {
           return
         }
         console.log('fetched account')
         this.owner.account = OwnerOptions.selectedAccount
         this.owner.domainid = OwnerOptions.selectedDomain
-      } else if (OwnerOptions.selectedAccountType === 
this.$t('label.project')) {
+      } else if (OwnerOptions.selectedAccountType === 'Project') {
         if (!OwnerOptions.selectedProject) {
           return
         }
diff --git a/ui/src/views/storage/CreateVolume.vue 
b/ui/src/views/storage/CreateVolume.vue
index 32a5e667d51..0b667a1f51f 100644
--- a/ui/src/views/storage/CreateVolume.vue
+++ b/ui/src/views/storage/CreateVolume.vue
@@ -211,13 +211,13 @@ export default {
     },
     fetchOwnerOptions (OwnerOptions) {
       this.owner = {}
-      if (OwnerOptions.selectedAccountType === this.$t('label.account')) {
+      if (OwnerOptions.selectedAccountType === 'Account') {
         if (!OwnerOptions.selectedAccount) {
           return
         }
         this.owner.account = OwnerOptions.selectedAccount
         this.owner.domainid = OwnerOptions.selectedDomain
-      } else if (OwnerOptions.selectedAccountType === 
this.$t('label.project')) {
+      } else if (OwnerOptions.selectedAccountType === 'Project') {
         if (!OwnerOptions.selectedProject) {
           return
         }

Reply via email to