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

weizhou 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 25f1d203403 ui: show multiple domains as links in list view (#11536)
25f1d203403 is described below

commit 25f1d203403fcc85023244896c9c98b95d40fb01
Author: Abhishek Kumar <[email protected]>
AuthorDate: Wed Sep 3 18:35:06 2025 +0530

    ui: show multiple domains as links in list view (#11536)
    
    * ui: show multiple domains as links in list view
    
    Currently, when resources are linked to multiple domains and they are
    shown in the list view, they are not clickable. This PR fixes it.
    
    Signed-off-by: Abhishek Kumar <[email protected]>
    
    * fix
    
    Signed-off-by: Abhishek Kumar <[email protected]>
    
    ---------
    
    Signed-off-by: Abhishek Kumar <[email protected]>
---
 ui/src/components/view/ListView.vue | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/ui/src/components/view/ListView.vue 
b/ui/src/components/view/ListView.vue
index eca99dc0346..0109784047a 100644
--- a/ui/src/components/view/ListView.vue
+++ b/ui/src/components/view/ListView.vue
@@ -365,7 +365,14 @@
         <resource-label :resourceType="record.resourcetype" 
:resourceId="record.resourceid" :resourceName="record.resourcename" />
       </template>
       <template v-if="column.key === 'domain'">
-        <router-link v-if="record.domainid && 
!record.domainid.toString().includes(',') && $store.getters.userInfo.roletype 
!== 'User'" :to="{ path: '/domain/' + record.domainid, query: { tab: 'details' 
} }">{{ text }}</router-link>
+        <span v-if="record.domainid && $store.getters.userInfo.roletype !== 
'User'">
+          <template v-for="(id, idx) in record.domainid.split(',')" :key="id">
+            <router-link :to="{ path: '/domain/' + id, query: { tab: 'details' 
} }">
+              {{ record.domain.split(',')[idx] || id }}
+            </router-link>
+            <span v-if="idx < record.domainid.split(',').length - 1">, </span>
+          </template>
+        </span>
         <span v-else>{{ text }}</span>
       </template>
       <template v-if="column.key === 'domainpath'">

Reply via email to