Resolve the download bug on postcode logs page
The design has been updated to hide the download button when the
key 'AdditionalDataURI' is not present in the redfish API response.
Signed-off-by: Sandeepa Singh <sandeepa.singh@ibm.com>
Change-Id: If78968ad72e62348b4b81967a3b61c2af53fa020
diff --git a/src/components/Global/TableRowAction.vue b/src/components/Global/TableRowAction.vue
index 99fa58b..549f1b5 100644
--- a/src/components/Global/TableRowAction.vue
+++ b/src/components/Global/TableRowAction.vue
@@ -13,7 +13,9 @@
<span v-if="btnIconOnly" class="sr-only">{{ title }}</span>
</b-link>
<b-link
- v-else-if="value === 'download' && downloadInNewTab"
+ v-else-if="
+ value === 'download' && downloadInNewTab && downloadLocation !== ''
+ "
class="align-bottom btn-icon-only py-0 btn-link"
target="_blank"
:href="downloadLocation"
@@ -25,7 +27,7 @@
</span>
</b-link>
<b-link
- v-else-if="value === 'download'"
+ v-else-if="value === 'download' && downloadLocation !== ''"
class="align-bottom btn-icon-only py-0 btn-link"
:download="exportName"
:href="downloadLocation"
@@ -37,7 +39,7 @@
</span>
</b-link>
<b-button
- v-else
+ v-else-if="showButton"
variant="link"
:class="{ 'btn-icon-only': btnIconOnly }"
:disabled="!enabled"
@@ -90,6 +92,10 @@
type: Boolean,
default: false,
},
+ showButton: {
+ type: Boolean,
+ default: true,
+ },
},
computed: {
dataForExport() {
diff --git a/src/views/Logs/PostCodeLogs/PostCodeLogs.vue b/src/views/Logs/PostCodeLogs/PostCodeLogs.vue
index 1154cbf..01e9409 100644
--- a/src/views/Logs/PostCodeLogs/PostCodeLogs.vue
+++ b/src/views/Logs/PostCodeLogs/PostCodeLogs.vue
@@ -105,6 +105,7 @@
:export-name="exportFileNameByDate(action.value)"
:download-location="row.item.uri"
:download-in-new-tab="true"
+ :show-button="false"
>
<template #icon>
<icon-export v-if="action.value === 'export'" />