[UI] Fix primary storage details display when the uuid has divergent pattern (#12307)

* [UI] Fix primary storage details display when the uuid has different pattern (eg. for pools with SolidFireShared provider)

* Fix on refresh

---------

Co-authored-by: vishesh92 <vishesh92@gmail.com>
This commit is contained in:
Suresh Kumar Anaparti 2026-01-12 14:18:35 +05:30 committed by GitHub
parent c7cfeb5caa
commit 2b373a4659
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 10 additions and 10 deletions

View File

@ -622,7 +622,7 @@
<div class="resource-detail-item__label">{{ $t('label.storagepool') }}</div>
<div class="resource-detail-item__details">
<database-outlined />
<router-link v-if="!isStatic && $router.resolve('/storagepool/' + resource.storageid).matched[0].redirect !== '/exception/404'" :to="{ path: '/storagepool/' + resource.storageid }">{{ resource.storage || resource.storageid }} </router-link>
<router-link v-if="!isStatic && $router.resolve('/storagepool/' + encodeURIComponent(resource.storageid)).matched[0].redirect !== '/exception/404'" :to="{ path: '/storagepool/' + encodeURIComponent(resource.storageid) }">{{ resource.storage || resource.storageid }} </router-link>
<span v-else>{{ resource.storage || resource.storageid }}</span>
<a-tag style="margin-left: 5px;" v-if="resource.storagetype">
{{ resource.storagetype }}

View File

@ -94,7 +94,7 @@
<router-link :to="{ path: $route.path + '/' + record.id, query: { displaynetwork: false } }" v-if="record.id">{{ $t(text.toLowerCase()) }}</router-link>
</span>
<span v-else>
<router-link :to="{ path: $route.path + '/' + record.id }" v-if="record.id">{{ text }}</router-link>
<router-link :to="{ path: $route.path + '/' + encodeURIComponent(record.id) }" v-if="record.id">{{ text }}</router-link>
<router-link :to="{ path: $route.path + '/' + record.name }" v-else>{{ text }}</router-link>
<span v-if="['guestnetwork','vpc'].includes($route.path.split('/')[1]) && record.restartrequired && !record.vpcid">
&nbsp;
@ -306,7 +306,7 @@
<span v-else>{{ text }}</span>
</template>
<template v-if="column.key === 'storage'">
<router-link v-if="record.storageid" :to="{ path: '/storagepool/' + record.storageid }">{{ text }}</router-link>
<router-link v-if="record.storageid" :to="{ path: '/storagepool/' + encodeURIComponent(record.storageid) }">{{ text }}</router-link>
<span v-else>{{ text }}</span>
</template>
<template v-for="(value, name) in thresholdMapping" :key="name">

View File

@ -41,7 +41,7 @@
{{ parseFloat(record.size / (1024.0 * 1024.0 * 1024.0)).toFixed(2) }} GB
</template>
<template v-if="column.key === 'storage'">
<router-link v-if="record.storageid" :to="{ path: '/storagepool/' + record.storageid }">{{ text }}</router-link>
<router-link v-if="record.storageid" :to="{ path: '/storagepool/' + encodeURIComponent(record.storageid) }">{{ text }}</router-link>
<span v-else>{{ text }}</span>
</template>
</template>

View File

@ -100,7 +100,7 @@ export default {
this.breadList = []
this.$route.matched.forEach((item, idx) => {
const parent = this.$route.matched[idx - 1]
if (item && parent && parent.name !== 'index' && !item.path.endsWith(':id')) {
if (item && parent && parent.name !== 'index' && !item.path.endsWith(':id') && !item.path.endsWith(':id(.*)')) {
this.breadList.pop()
}
this.breadList.push(item)

View File

@ -90,7 +90,7 @@ function generateRouterMap (section) {
hideChildrenInMenu: true,
children: [
{
path: '/' + child.name + '/:id',
path: '/' + child.name + '/:id(.*)',
hidden: child.hidden,
meta: {
title: child.title,
@ -145,7 +145,7 @@ function generateRouterMap (section) {
map.meta.tabs = section.tabs
map.children = [{
path: '/' + section.name + '/:id',
path: '/' + section.name + '/:id(.*)',
actions: section.actions ? section.actions : [],
meta: {
title: section.title,

View File

@ -90,7 +90,7 @@
:rowKey="record => record.zoneid">
<template #bodyCell="{ text, record, column }">
<template v-if="column.dataIndex === 'datastore' && record.datastoreId">
<router-link :to="{ path: '/storagepool/' + record.datastoreId }">
<router-link :to="{ path: '/storagepool/' + encodeURIComponent(record.datastoreId) }">
{{ text }}
</router-link>
</template>

View File

@ -80,7 +80,7 @@
:rowKey="record => record.datastoreId">
<template #bodyCell="{ text, record, column }">
<template v-if="column.dataIndex === 'datastore' && record.datastoreId">
<router-link :to="{ path: '/storagepool/' + record.datastoreId }">
<router-link :to="{ path: '/storagepool/' + encodeURIComponent(record.datastoreId) }">
{{ text }}
</router-link>
</template>

View File

@ -38,7 +38,7 @@
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'zonename'">
<span v-if="record.datastoreid">
<router-link :to="{ path: (record.datastoretype === 'Primary' ? '/storagepool/' : '/imagestore/') + record.datastoreid }">
<router-link :to="{ path: (record.datastoretype === 'Primary' ? '/storagepool/' : '/imagestore/') + encodeURIComponent(record.datastoreid) }">
<span v-if="fetchZoneIcon(record.zoneid)">
<resource-icon :image="zoneIcon" size="1x" style="margin-right: 5px"/>
</span>