Skip to content

Commit fbfb181

Browse files
[UI] Fix primary storage details display when the uuid has different pattern (eg. for pools with SolidFireShared provider)
1 parent 47a6ac8 commit fbfb181

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

ui/src/components/view/InfoCard.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -622,7 +622,7 @@
622622
<div class="resource-detail-item__label">{{ $t('label.storagepool') }}</div>
623623
<div class="resource-detail-item__details">
624624
<database-outlined />
625-
<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>
625+
<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>
626626
<span v-else>{{ resource.storage || resource.storageid }}</span>
627627
<a-tag style="margin-left: 5px;" v-if="resource.storagetype">
628628
{{ resource.storagetype }}

ui/src/components/view/ListView.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
<router-link :to="{ path: $route.path + '/' + record.id, query: { displaynetwork: false } }" v-if="record.id">{{ $t(text.toLowerCase()) }}</router-link>
9595
</span>
9696
<span v-else>
97-
<router-link :to="{ path: $route.path + '/' + record.id }" v-if="record.id">{{ text }}</router-link>
97+
<router-link :to="{ path: $route.path + '/' + encodeURIComponent(record.id) }" v-if="record.id">{{ text }}</router-link>
9898
<router-link :to="{ path: $route.path + '/' + record.name }" v-else>{{ text }}</router-link>
9999
<span v-if="['guestnetwork','vpc'].includes($route.path.split('/')[1]) && record.restartrequired && !record.vpcid">
100100
&nbsp;
@@ -306,7 +306,7 @@
306306
<span v-else>{{ text }}</span>
307307
</template>
308308
<template v-if="column.key === 'storage'">
309-
<router-link v-if="record.storageid" :to="{ path: '/storagepool/' + record.storageid }">{{ text }}</router-link>
309+
<router-link v-if="record.storageid" :to="{ path: '/storagepool/' + encodeURIComponent(record.storageid) }">{{ text }}</router-link>
310310
<span v-else>{{ text }}</span>
311311
</template>
312312
<template v-for="(value, name) in thresholdMapping" :key="name">

ui/src/components/view/VolumesTab.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
{{ parseFloat(record.size / (1024.0 * 1024.0 * 1024.0)).toFixed(2) }} GB
4242
</template>
4343
<template v-if="column.key === 'storage'">
44-
<router-link v-if="record.storageid" :to="{ path: '/storagepool/' + record.storageid }">{{ text }}</router-link>
44+
<router-link v-if="record.storageid" :to="{ path: '/storagepool/' + encodeURIComponent(record.storageid) }">{{ text }}</router-link>
4545
<span v-else>{{ text }}</span>
4646
</template>
4747
</template>

ui/src/views/image/IsoZones.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
:rowKey="record => record.zoneid">
9191
<template #bodyCell="{ text, record, column }">
9292
<template v-if="column.dataIndex === 'datastore' && record.datastoreId">
93-
<router-link :to="{ path: '/storagepool/' + record.datastoreId }">
93+
<router-link :to="{ path: '/storagepool/' + encodeURIComponent(record.datastoreId) }">
9494
{{ text }}
9595
</router-link>
9696
</template>

ui/src/views/image/TemplateZones.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
:rowKey="record => record.datastoreId">
8181
<template #bodyCell="{ text, record, column }">
8282
<template v-if="column.dataIndex === 'datastore' && record.datastoreId">
83-
<router-link :to="{ path: '/storagepool/' + record.datastoreId }">
83+
<router-link :to="{ path: '/storagepool/' + encodeURIComponent(record.datastoreId) }">
8484
{{ text }}
8585
</router-link>
8686
</template>

ui/src/views/storage/SnapshotZones.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
<template #bodyCell="{ column, record }">
3939
<template v-if="column.key === 'zonename'">
4040
<span v-if="record.datastoreid">
41-
<router-link :to="{ path: (record.datastoretype === 'Primary' ? '/storagepool/' : '/imagestore/') + record.datastoreid }">
41+
<router-link :to="{ path: (record.datastoretype === 'Primary' ? '/storagepool/' : '/imagestore/') + encodeURIComponent(record.datastoreid) }">
4242
<span v-if="fetchZoneIcon(record.zoneid)">
4343
<resource-icon :image="zoneIcon" size="1x" style="margin-right: 5px"/>
4444
</span>

0 commit comments

Comments
 (0)