diff options
author | SurenNeware <sneware9@in.ibm.com> | 2020-09-08 15:12:39 +0300 |
---|---|---|
committer | Yoshie Muranaka <yoshiemuranaka@gmail.com> | 2020-09-16 17:37:47 +0300 |
commit | 96ebb0d91eea9ed9d0614663eca8644e86fcbc6b (patch) | |
tree | 986c00a35ab00fa7236e822a58caaa91c40c0918 /src/views/Health | |
parent | 1d2da29ea75951ee3f1ae08a25f9c5241eb89ad0 (diff) | |
download | webui-vue-96ebb0d91eea9ed9d0614663eca8644e86fcbc6b.tar.xz |
Update name of file of exported log files
- The name of exported event log file would be combination of event logs
prefix and current date and time.
Signed-off-by: Suren Neware <sneware9@in.ibm.com>
Change-Id: Iaaf46fed5df1942e9cc2e4157dafa8e3e755ecf8
Diffstat (limited to 'src/views/Health')
-rw-r--r-- | src/views/Health/EventLogs/EventLogs.vue | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/views/Health/EventLogs/EventLogs.vue b/src/views/Health/EventLogs/EventLogs.vue index 0e8a5448..dcede596 100644 --- a/src/views/Health/EventLogs/EventLogs.vue +++ b/src/views/Health/EventLogs/EventLogs.vue @@ -34,7 +34,7 @@ <template v-slot:export> <table-toolbar-export :data="batchExportData" - :file-name="$t('appPageTitle.eventLogs')" + :file-name="exportFileNameByDate()" /> </template> </table-toolbar> @@ -96,7 +96,7 @@ :value="action.value" :title="action.title" :row-data="row.item" - :export-name="row.item.id" + :export-name="exportFileNameByDate()" :data-test-id="`eventLogs-button-deleteRow-${row.index}`" @click:tableAction="onTableRowAction($event, row.item)" > @@ -345,6 +345,19 @@ export default { }, onChangeSearchInput(searchValue) { this.searchFilter = searchValue; + }, + // Create export file name based on date + exportFileNameByDate() { + let date = new Date(); + date = + date.toISOString().slice(0, 10) + + '_' + + date + .toString() + .split(':') + .join('-') + .split(' ')[4]; + return this.$t('pageEventLogs.exportFilePrefix') + date; } } }; |