Skip to content

Commit b999d35

Browse files
committed
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]>
1 parent 8756be5 commit b999d35

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

ui/src/components/view/ListView.vue

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,21 @@
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-if="record.domainid.toString().includes(',')">
370+
<template v-for="(id, idx) in record.domainid.toString().split(',')" :key="id">
371+
<router-link :to="{ path: '/domain/' + id, query: { tab: 'details' } }">
372+
{{ record.domain.split(',')[idx] || id }}
373+
</router-link>
374+
<span v-if="idx < record.domainid.split(',').length - 1">, </span>
375+
</template>
376+
</template>
377+
<template v-else>
378+
<router-link :to="{ path: '/domain/' + record.domainid, query: { tab: 'details' } }">
379+
{{ record.domain || text }}
380+
</router-link>
381+
</template>
382+
</span>
369383
<span v-else>{{ text }}</span>
370384
</template>
371385
<template v-if="column.key === 'domainpath'">

0 commit comments

Comments
 (0)