diff options
author | Yoshie Muranaka <yoshiemuranaka@gmail.com> | 2020-05-11 18:23:04 +0300 |
---|---|---|
committer | Yoshie Muranaka <yoshiemuranaka@gmail.com> | 2020-06-10 23:49:39 +0300 |
commit | be3af3360cec7ba3eb2921662689c437f92e2fc7 (patch) | |
tree | 7686417c8a7809f0576ad107f8f09de4817713ef /src/store/api.js | |
parent | f9832b0edc48b349f6de2df419815ef38a6ae469 (diff) | |
download | webui-vue-be3af3360cec7ba3eb2921662689c437f92e2fc7.tar.xz |
Add batch actions and row action to Event Logs
Adds ability to export and delete event logs by row or in a
table batch action.
- Modifications to TableRowAction component to allow single
row export functionality
Signed-off-by: Yoshie Muranaka <yoshiemuranaka@gmail.com>
Change-Id: Ica50dd0868ac85cc2d6925a9448858b40da9c529
Diffstat (limited to 'src/store/api.js')
-rw-r--r-- | src/store/api.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/store/api.js b/src/store/api.js index 4a8b8e80..63fd75cb 100644 --- a/src/store/api.js +++ b/src/store/api.js @@ -55,3 +55,18 @@ export default { return Axios.spread(callback); } }; + +export const getResponseCount = responses => { + let successCount = 0; + let errorCount = 0; + + responses.forEach(response => { + if (response instanceof Error) errorCount++; + else successCount++; + }); + + return { + successCount, + errorCount + }; +}; |