diff options
-rw-r--r-- | src/components/Global/TableRowAction.vue | 16 | ||||
-rw-r--r-- | src/env/components/Dumps/Dumps.vue | 9 |
2 files changed, 25 insertions, 0 deletions
diff --git a/src/components/Global/TableRowAction.vue b/src/components/Global/TableRowAction.vue index 94ef6ce4..5b2c4a99 100644 --- a/src/components/Global/TableRowAction.vue +++ b/src/components/Global/TableRowAction.vue @@ -12,6 +12,18 @@ {{ $t('global.action.export') }} </slot> </b-link> + <b-link + v-else-if="value === 'download'" + class="align-bottom btn-icon-only py-0 btn-link" + :download="exportName" + :href="downloadLocation" + :title="title" + > + <slot name="icon" /> + <span class="sr-only"> + {{ $t('global.action.download') }} + </span> + </b-link> <b-button v-else variant="link" @@ -54,6 +66,10 @@ export default { type: String, default: 'export', }, + downloadLocation: { + type: String, + default: '', + }, }, computed: { dataForExport() { diff --git a/src/env/components/Dumps/Dumps.vue b/src/env/components/Dumps/Dumps.vue index 3bf5579a..8181c5ba 100644 --- a/src/env/components/Dumps/Dumps.vue +++ b/src/env/components/Dumps/Dumps.vue @@ -91,9 +91,12 @@ :key="index" :value="action.value" :title="action.title" + :download-location="row.item.data" + :export-name="`${row.item.dumpType} ${row.item.id}`" @click-table-action="onTableRowAction($event, row.item)" > <template #icon> + <icon-download v-if="action.value === 'download'" /> <icon-delete v-if="action.value === 'delete'" /> </template> </table-row-action> @@ -107,6 +110,7 @@ <script> import IconDelete from '@carbon/icons-vue/es/trash-can/20'; +import IconDownload from '@carbon/icons-vue/es/download/20'; import DumpsForm from './DumpsForm'; import PageSection from '@/components/Global/PageSection'; @@ -133,6 +137,7 @@ export default { components: { DumpsForm, IconDelete, + IconDownload, PageSection, PageTitle, Search, @@ -213,6 +218,10 @@ export default { ...item, actions: [ { + value: 'download', + title: this.$t('global.action.download'), + }, + { value: 'delete', title: this.$t('global.action.delete'), }, |