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
diff --git a/src/store/modules/Health/EventLogStore.js b/src/store/modules/Health/EventLogStore.js
index 5664e99..c9bd82f 100644
--- a/src/store/modules/Health/EventLogStore.js
+++ b/src/store/modules/Health/EventLogStore.js
@@ -80,10 +80,12 @@
'/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 @@
})
);
},
+ // Single log entry
async updateEventLogStatus({ dispatch }, log) {
const updatedEventLogStatus = log.status;
return await api
@@ -203,9 +206,9 @@
})
.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) => {