summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSandeepa Singh <sandeepa.singh@ibm.com>2021-08-05 13:21:56 +0300
committerDerick Montague <derick.montague@ibm.com>2021-08-16 22:11:57 +0300
commit450bdb0a31778b8da885a172f8456ba31e08ad86 (patch)
treee721f43dfa70b9cbb013b9bbad5d21b6daab9343
parent5287a8b46ad6ed3ceb7570fa3ef23495341571cb (diff)
downloadwebui-vue-450bdb0a31778b8da885a172f8456ba31e08ad86.tar.xz
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
-rw-r--r--src/components/Global/TableRowAction.vue12
-rw-r--r--src/views/Logs/PostCodeLogs/PostCodeLogs.vue1
2 files changed, 10 insertions, 3 deletions
diff --git a/src/components/Global/TableRowAction.vue b/src/components/Global/TableRowAction.vue
index 99fa58b3..549f1b52 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 @@ export default {
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 1154cbff..01e9409a 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'" />