From 25a21ea57334d9677f9b2340905432172d8565f9 Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Wed, 20 May 2026 15:18:25 +0530 Subject: [PATCH 1/2] ui: fix info card showing invalid template, iso link Signed-off-by: Abhishek Kumar --- ui/src/components/view/InfoCard.vue | 7 +++++-- ui/src/utils/links.js | 13 ++++++++++++- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/ui/src/components/view/InfoCard.vue b/ui/src/components/view/InfoCard.vue index 0272df028a35..888c47179bfb 100644 --- a/ui/src/components/view/InfoCard.vue +++ b/ui/src/components/view/InfoCard.vue @@ -560,7 +560,8 @@
- {{ resource.templatedisplaytext || resource.templatename || resource.templateid }} + {{ resource.templatedisplaytext || resource.templatename || resource.templateid }} + {{ resource.templatedisplaytext || resource.templatename || resource.templateid }}
@@ -568,7 +569,8 @@
- {{ resource.isodisplaytext || resource.isoname || resource.isoid }} + {{ resource.isodisplaytext || resource.isoname || resource.isoid }} + {{ resource.isodisplaytext || resource.isoname || resource.isoid }}
@@ -985,6 +987,7 @@ export default { }, created () { this.setData() + this.validLinks = validateLinks(this.$router, this.isStatic, this.resource) eventBus.on('handle-close', (showModal) => { this.showUploadModal(showModal) }) diff --git a/ui/src/utils/links.js b/ui/src/utils/links.js index fa650cdd7b8b..dcab5fe852ed 100644 --- a/ui/src/utils/links.js +++ b/ui/src/utils/links.js @@ -17,7 +17,9 @@ export function validateLinks (router, isStatic, resource) { const validLinks = { - volume: false + volume: false, + template: false, + iso: false } if (isStatic) { @@ -32,5 +34,14 @@ export function validateLinks (router, isStatic, resource) { } } + if (resource.templateid) { + const templatePath = (resource.templateformat === 'ISO' ? '/iso/' : '/template/') + resource.templateid + validLinks.template = router.resolve(templatePath).matched[0].redirect !== '/exception/404' + } + + if (resource.isoid) { + validLinks.iso = router.resolve('/iso/' + resource.isoid).matched[0].redirect !== '/exception/404' + } + return validLinks } From fadc6c1f143ddd14d2ffa793f84d686daca72781 Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Wed, 20 May 2026 16:59:54 +0530 Subject: [PATCH 2/2] fix Signed-off-by: Abhishek Kumar --- ui/src/components/view/InfoCard.vue | 6 +-- ui/src/utils/links.js | 65 ++++++++++++++++++++++++++++- 2 files changed, 66 insertions(+), 5 deletions(-) diff --git a/ui/src/components/view/InfoCard.vue b/ui/src/components/view/InfoCard.vue index 888c47179bfb..218db57ed4e9 100644 --- a/ui/src/components/view/InfoCard.vue +++ b/ui/src/components/view/InfoCard.vue @@ -883,7 +883,7 @@