mirror of https://github.com/apache/cloudstack.git
[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:
parent
c7cfeb5caa
commit
2b373a4659
|
|
@ -622,7 +622,7 @@
|
||||||
<div class="resource-detail-item__label">{{ $t('label.storagepool') }}</div>
|
<div class="resource-detail-item__label">{{ $t('label.storagepool') }}</div>
|
||||||
<div class="resource-detail-item__details">
|
<div class="resource-detail-item__details">
|
||||||
<database-outlined />
|
<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>
|
<span v-else>{{ resource.storage || resource.storageid }}</span>
|
||||||
<a-tag style="margin-left: 5px;" v-if="resource.storagetype">
|
<a-tag style="margin-left: 5px;" v-if="resource.storagetype">
|
||||||
{{ resource.storagetype }}
|
{{ resource.storagetype }}
|
||||||
|
|
|
||||||
|
|
@ -94,7 +94,7 @@
|
||||||
<router-link :to="{ path: $route.path + '/' + record.id, query: { displaynetwork: false } }" v-if="record.id">{{ $t(text.toLowerCase()) }}</router-link>
|
<router-link :to="{ path: $route.path + '/' + record.id, query: { displaynetwork: false } }" v-if="record.id">{{ $t(text.toLowerCase()) }}</router-link>
|
||||||
</span>
|
</span>
|
||||||
<span v-else>
|
<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>
|
<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">
|
<span v-if="['guestnetwork','vpc'].includes($route.path.split('/')[1]) && record.restartrequired && !record.vpcid">
|
||||||
|
|
||||||
|
|
@ -306,7 +306,7 @@
|
||||||
<span v-else>{{ text }}</span>
|
<span v-else>{{ text }}</span>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="column.key === 'storage'">
|
<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>
|
<span v-else>{{ text }}</span>
|
||||||
</template>
|
</template>
|
||||||
<template v-for="(value, name) in thresholdMapping" :key="name">
|
<template v-for="(value, name) in thresholdMapping" :key="name">
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@
|
||||||
{{ parseFloat(record.size / (1024.0 * 1024.0 * 1024.0)).toFixed(2) }} GB
|
{{ parseFloat(record.size / (1024.0 * 1024.0 * 1024.0)).toFixed(2) }} GB
|
||||||
</template>
|
</template>
|
||||||
<template v-if="column.key === 'storage'">
|
<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>
|
<span v-else>{{ text }}</span>
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -100,7 +100,7 @@ export default {
|
||||||
this.breadList = []
|
this.breadList = []
|
||||||
this.$route.matched.forEach((item, idx) => {
|
this.$route.matched.forEach((item, idx) => {
|
||||||
const parent = this.$route.matched[idx - 1]
|
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.pop()
|
||||||
}
|
}
|
||||||
this.breadList.push(item)
|
this.breadList.push(item)
|
||||||
|
|
|
||||||
|
|
@ -90,7 +90,7 @@ function generateRouterMap (section) {
|
||||||
hideChildrenInMenu: true,
|
hideChildrenInMenu: true,
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: '/' + child.name + '/:id',
|
path: '/' + child.name + '/:id(.*)',
|
||||||
hidden: child.hidden,
|
hidden: child.hidden,
|
||||||
meta: {
|
meta: {
|
||||||
title: child.title,
|
title: child.title,
|
||||||
|
|
@ -145,7 +145,7 @@ function generateRouterMap (section) {
|
||||||
map.meta.tabs = section.tabs
|
map.meta.tabs = section.tabs
|
||||||
|
|
||||||
map.children = [{
|
map.children = [{
|
||||||
path: '/' + section.name + '/:id',
|
path: '/' + section.name + '/:id(.*)',
|
||||||
actions: section.actions ? section.actions : [],
|
actions: section.actions ? section.actions : [],
|
||||||
meta: {
|
meta: {
|
||||||
title: section.title,
|
title: section.title,
|
||||||
|
|
|
||||||
|
|
@ -90,7 +90,7 @@
|
||||||
:rowKey="record => record.zoneid">
|
:rowKey="record => record.zoneid">
|
||||||
<template #bodyCell="{ text, record, column }">
|
<template #bodyCell="{ text, record, column }">
|
||||||
<template v-if="column.dataIndex === 'datastore' && record.datastoreId">
|
<template v-if="column.dataIndex === 'datastore' && record.datastoreId">
|
||||||
<router-link :to="{ path: '/storagepool/' + record.datastoreId }">
|
<router-link :to="{ path: '/storagepool/' + encodeURIComponent(record.datastoreId) }">
|
||||||
{{ text }}
|
{{ text }}
|
||||||
</router-link>
|
</router-link>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,7 @@
|
||||||
:rowKey="record => record.datastoreId">
|
:rowKey="record => record.datastoreId">
|
||||||
<template #bodyCell="{ text, record, column }">
|
<template #bodyCell="{ text, record, column }">
|
||||||
<template v-if="column.dataIndex === 'datastore' && record.datastoreId">
|
<template v-if="column.dataIndex === 'datastore' && record.datastoreId">
|
||||||
<router-link :to="{ path: '/storagepool/' + record.datastoreId }">
|
<router-link :to="{ path: '/storagepool/' + encodeURIComponent(record.datastoreId) }">
|
||||||
{{ text }}
|
{{ text }}
|
||||||
</router-link>
|
</router-link>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@
|
||||||
<template #bodyCell="{ column, record }">
|
<template #bodyCell="{ column, record }">
|
||||||
<template v-if="column.key === 'zonename'">
|
<template v-if="column.key === 'zonename'">
|
||||||
<span v-if="record.datastoreid">
|
<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)">
|
<span v-if="fetchZoneIcon(record.zoneid)">
|
||||||
<resource-icon :image="zoneIcon" size="1x" style="margin-right: 5px"/>
|
<resource-icon :image="zoneIcon" size="1x" style="margin-right: 5px"/>
|
||||||
</span>
|
</span>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue