File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 827827 <div class =" resource-detail-item__label" >{{ $t('label.storagepool') }}</div >
828828 <div class =" resource-detail-item__details" >
829829 <database-outlined />
830- <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 >
830+ <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 >
831831 <span v-else >{{ resource.storage || resource.storageid }}</span >
832832 <a-tag style =" margin-left : 5px ;" v-if =" resource.storagetype" >
833833 {{ resource.storagetype }}
Original file line number Diff line number Diff line change 150150 >{{ $t(text.toLowerCase()) }}</router-link >
151151 </span >
152152 <span v-else >
153- <router-link
154- :to =" { path: $route.path + '/' + record.id }"
155- v-if =" record.id"
156- >{{ text }}</router-link >
157- <router-link
158- :to =" { path: $route.path + '/' + record.name }"
159- v-else
160- >{{ text }}</router-link >
161- <span
162- v-if =" ['guestnetwork','vpc'].includes($route.path.split('/')[1]) && record.restartrequired && !record.vpcid"
163- >
153+ <router-link :to =" { path: $route.path + '/' + encodeURIComponent(record.id) }" v-if =" record.id" >{{ text }}</router-link >
154+ <router-link :to =" { path: $route.path + '/' + record.name }" v-else >{{ text }}</router-link >
155+ <span v-if =" ['guestnetwork','vpc'].includes($route.path.split('/')[1]) && record.restartrequired && !record.vpcid" >
164156   ;
165157 <a-tooltip >
166158 <template #title >{{ $t('label.restartrequired') }}</template >
588580 <span v-else >{{ text }}</span >
589581 </template >
590582 <template v-if =" column .key === ' storage' " >
591- <router-link
592- v-if =" record.storageid"
593- :to =" { path: '/storagepool/' + record.storageid }"
594- >{{ text }}</router-link >
583+ <router-link v-if =" record.storageid" :to =" { path: '/storagepool/' + encodeURIComponent(record.storageid) }" >{{ text }}</router-link >
595584 <span v-else >{{ text }}</span >
596585 </template >
597586 <template v-if =" column .key === ' diskofferingname' " >
Original file line number Diff line number Diff line change 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 >
Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ export default {
100100 this .breadList = []
101101 this .$route .matched .forEach ((item , idx ) => {
102102 const parent = this .$route .matched [idx - 1 ]
103- if (item && parent && parent .name !== ' index' && ! item .path .endsWith (' :id' )) {
103+ if (item && parent && parent .name !== ' index' && ! item .path .endsWith (' :id' ) && ! item . path . endsWith ( ' :id(.*) ' ) ) {
104104 this .breadList .pop ()
105105 }
106106 this .breadList .push (item)
Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ function generateRouterMap (section) {
9494 hideChildrenInMenu : true ,
9595 children : [
9696 {
97- path : '/' + child . name + '/:id' ,
97+ path : '/' + child . name + '/:id(.*) ' ,
9898 hidden : child . hidden ,
9999 meta : {
100100 title : child . title ,
@@ -149,7 +149,7 @@ function generateRouterMap (section) {
149149 map . meta . tabs = section . tabs
150150
151151 map . children = [ {
152- path : '/' + section . name + '/:id' ,
152+ path : '/' + section . name + '/:id(.*) ' ,
153153 actions : section . actions ? section . actions : [ ] ,
154154 meta : {
155155 title : section . title ,
Original file line number Diff line number Diff line change 100100 :rowKey =" record => record.zoneid" >
101101 <template #bodyCell =" { text , record , column } " >
102102 <template v-if =" column .dataIndex === ' datastore' && record .datastoreId " >
103- <router-link :to =" { path: '/storagepool/' + record.datastoreId }" >
103+ <router-link :to =" { path: '/storagepool/' + encodeURIComponent( record.datastoreId) }" >
104104 {{ text }}
105105 </router-link >
106106 </template >
Original file line number Diff line number Diff line change 9292 :rowKey =" record => record.datastoreId" >
9393 <template #bodyCell =" { text , record , column } " >
9494 <template v-if =" column .dataIndex === ' datastore' && record .datastoreId " >
95- <router-link :to =" { path: '/storagepool/' + record.datastoreId }" >
95+ <router-link :to =" { path: '/storagepool/' + encodeURIComponent( record.datastoreId) }" >
9696 {{ text }}
9797 </router-link >
9898 </template >
Original file line number Diff line number Diff line change 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 >
You can’t perform that action at this time.
0 commit comments