Skip to content

Commit 25f1d20

Browse files
authored
ui: show multiple domains as links in list view (apache#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 <abhishek.mrt22@gmail.com> * fix Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com> --------- Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
1 parent f24b175 commit 25f1d20

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

ui/src/components/view/ListView.vue

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,14 @@
365365
<resource-label :resourceType="record.resourcetype" :resourceId="record.resourceid" :resourceName="record.resourcename" />
366366
</template>
367367
<template v-if="column.key === 'domain'">
368-
<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>
368+
<span v-if="record.domainid && $store.getters.userInfo.roletype !== 'User'">
369+
<template v-for="(id, idx) in record.domainid.split(',')" :key="id">
370+
<router-link :to="{ path: '/domain/' + id, query: { tab: 'details' } }">
371+
{{ record.domain.split(',')[idx] || id }}
372+
</router-link>
373+
<span v-if="idx < record.domainid.split(',').length - 1">, </span>
374+
</template>
375+
</span>
369376
<span v-else>{{ text }}</span>
370377
</template>
371378
<template v-if="column.key === 'domainpath'">

0 commit comments

Comments
 (0)