diff options
author | Sukanya Pandey <sukapan1@in.ibm.com> | 2020-10-28 08:08:00 +0300 |
---|---|---|
committer | Yoshie Muranaka <yoshiemuranaka@gmail.com> | 2020-11-12 22:02:34 +0300 |
commit | 2f6d5520fd63c516684c753efcde54d493aa8c5f (patch) | |
tree | 41f910c48f2f2786986ea0f84754e69fe225f482 /src/views | |
parent | 7e6fc97fc9eafad3c3fdd279648ed0a707f6ba34 (diff) | |
download | webui-vue-2f6d5520fd63c516684c753efcde54d493aa8c5f.tar.xz |
Delete all selected event logs
-Earlier all the event logs were deleted ID wise.
-Now when all logs are selected then below API will be called to delete all the logs.
-API : '/redfish/v1/Systems/system/LogServices/EventLog/Actions/LogService.ClearLog'.
Signed-off-by: Sukanya Pandey <sukapan1@in.ibm.com>
Change-Id: Ib7026a4fe3c324e6a998be747325f379a944f1c8
Diffstat (limited to 'src/views')
-rw-r--r-- | src/views/Health/EventLogs/EventLogs.vue | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/views/Health/EventLogs/EventLogs.vue b/src/views/Health/EventLogs/EventLogs.vue index 90f589a3..b4a47120 100644 --- a/src/views/Health/EventLogs/EventLogs.vue +++ b/src/views/Health/EventLogs/EventLogs.vue @@ -353,7 +353,19 @@ export default { } ) .then((deleteConfirmed) => { - if (deleteConfirmed) this.deleteLogs(uris); + if (deleteConfirmed) { + if (this.selectedRows.length === this.allLogs.length) { + this.$store + .dispatch( + 'eventLog/deleteAllEventLogs', + this.selectedRows.length + ) + .then((message) => this.successToast(message)) + .catch(({ message }) => this.errorToast(message)); + } else { + this.deleteLogs(uris); + } + } }); } }, |