summaryrefslogtreecommitdiff
path: root/src/store
diff options
context:
space:
mode:
authorDixsie Wolmers <dixsie@ibm.com>2021-06-03 15:38:12 +0300
committerDerick Montague <derick.montague@ibm.com>2021-07-28 18:14:32 +0300
commit7e2ba5432d067101e4c2931b388b4b6f07979dba (patch)
tree7bdd08eab75d41c26328d55e0782c487df99d2e9 /src/store
parentcd57a686fcf5cfe731005fe4b6593601cbcf3ec2 (diff)
downloadwebui-vue-7e2ba5432d067101e4c2931b388b4b6f07979dba.tar.xz
Add export all and delete all buttons to event logs
- Uses new table action button style above table. - Adds ability to export all and delete all logs. - Disables toolbar table action buttons when table is empty. - Event logs file name is not translated to avoid potential translation issues in the future, users can rename the file - Adds toast messages for delete all - Updates resolve logs toast messages to use `tc` count Signed-off-by: Dixsie Wolmers <dixsie@ibm.com> Change-Id: Idda2ae309e4248db60f89f68669e6e3b9f2cb832
Diffstat (limited to 'src/store')
-rw-r--r--src/store/modules/Health/EventLogStore.js11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/store/modules/Health/EventLogStore.js b/src/store/modules/Health/EventLogStore.js
index 5664e99f..c9bd82fd 100644
--- a/src/store/modules/Health/EventLogStore.js
+++ b/src/store/modules/Health/EventLogStore.js
@@ -80,10 +80,12 @@ const EventLogStore = {
'/redfish/v1/Systems/system/LogServices/EventLog/Actions/LogService.ClearLog'
)
.then(() => dispatch('getEventLogData'))
- .then(() => i18n.tc('pageEventLogs.toast.successDelete', data))
+ .then(() => i18n.tc('pageEventLogs.toast.successDelete', data.length))
.catch((error) => {
console.log(error);
- throw new Error(i18n.tc('pageEventLogs.toast.errorDelete', data));
+ throw new Error(
+ i18n.tc('pageEventLogs.toast.errorDelete', data.length)
+ );
});
},
async deleteEventLogs({ dispatch }, uris = []) {
@@ -194,6 +196,7 @@ const EventLogStore = {
})
);
},
+ // Single log entry
async updateEventLogStatus({ dispatch }, log) {
const updatedEventLogStatus = log.status;
return await api
@@ -203,9 +206,9 @@ const EventLogStore = {
})
.then(() => {
if (log.status) {
- return i18n.t('pageEventLogs.toast.successResolveLog');
+ return i18n.tc('pageEventLogs.toast.successResolveLogs', 1);
} else {
- return i18n.t('pageEventLogs.toast.successUnresolveLog');
+ return i18n.tc('pageEventLogs.toast.successUnresolveLogs', 1);
}
})
.catch((error) => {