diff options
author | Glukhov Mikhail <mikl@greenfil.ru> | 2023-02-13 16:07:35 +0300 |
---|---|---|
committer | Glukhov Mikhail <mikl@greenfil.ru> | 2023-04-12 21:49:18 +0300 |
commit | 7c26338edd6fdb16e72702910987a8e5fd899c10 (patch) | |
tree | 39c9f650baadf990609ba2afb28fd80d529b01d4 | |
parent | 2f2f64d2f6a2daf8a8b6c42d5e04e184d22642d5 (diff) | |
download | webui-vue-7c26338edd6fdb16e72702910987a8e5fd899c10.tar.xz |
Added a "solved" check
Now Health status will be "Ok" if there are no unsolved problems in the
log.
Before this patch, the flag "solved" was not considered.
Test:
Created a log entry with the status of "Critical" and "Warning".
Health became Critical.
Event Critical pressed Resolved. Health became "Warning".
Event Warning pressed Resolved. Health became "Ok".
Change-Id: Ic74a4c488c1c806c478c562a17fc0bb132e66e8f
Signed-off-by: Glukhov Mikhail <mikl@greenfil.ru>
-rw-r--r-- | src/store/modules/Logs/EventLogStore.js | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/store/modules/Logs/EventLogStore.js b/src/store/modules/Logs/EventLogStore.js index c9bd82fd..f3980075 100644 --- a/src/store/modules/Logs/EventLogStore.js +++ b/src/store/modules/Logs/EventLogStore.js @@ -4,12 +4,14 @@ import i18n from '@/i18n'; const getHealthStatus = (events, loadedEvents) => { let status = loadedEvents ? 'OK' : ''; for (const event of events) { - if (event.severity === 'Warning') { - status = 'Warning'; - } - if (event.severity === 'Critical') { - status = 'Critical'; - break; + if (event.filterByStatus === 'Unresolved') { + if (event.severity === 'Warning') { + status = 'Warning'; + } + if (event.severity === 'Critical') { + status = 'Critical'; + break; + } } } return status; |