From 3c9c115931794f7e370f68361031fe0241e2aea6 Mon Sep 17 00:00:00 2001 From: DJ2LS Date: Thu, 8 Feb 2024 13:39:18 +0100 Subject: [PATCH] adjusted health status check --- gui/src/components/main_modem_healthcheck.vue | 11 ++--------- gui/src/js/api.js | 2 +- gui/src/js/eventHandler.js | 16 ++++++++++++++++ gui/src/js/event_sock.js | 8 ++++---- gui/src/js/freedata.ts | 2 +- 5 files changed, 24 insertions(+), 15 deletions(-) diff --git a/gui/src/components/main_modem_healthcheck.vue b/gui/src/components/main_modem_healthcheck.vue index 951ef1a4..eac73b61 100644 --- a/gui/src/components/main_modem_healthcheck.vue +++ b/gui/src/components/main_modem_healthcheck.vue @@ -6,15 +6,8 @@ setActivePinia(pinia); import { useStateStore } from "../store/stateStore.js"; const state = useStateStore(pinia); -function getOverallHealth() { - //Return a number indicating health for icon bg color; lower the number the healthier - let health = 0; - if (state.modem_connection !== "connected") health += 5; - if (!state.is_modem_running) health += 3; - if (state.radio_status === false) health += 2; - if (process.env.FDUpdateAvail === "1") health += 1; - return health; -} +import { getOverallHealth } from "../js/eventHandler.js" +