From a823bd609e3f9b730e99febae052e71c53b5bf1c Mon Sep 17 00:00:00 2001 From: ISA Date: Mon, 17 Mar 2025 07:25:06 +0100 Subject: [PATCH] feat: OPC-UA Status lesbar darstellen MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - OPC-UA Zustand wird jetzt als "Server betriebsbereit" oder "Server außer Betrieb" ausgegeben - Unbekannte Werte werden explizit als "Unbekannt" angezeigt - Code-Struktur optimiert für bessere Lesbarkeit --- components/main/uebersicht/NetworkInfo.tsx | 13 ++++++++++--- config/webVersion.ts | 2 +- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/components/main/uebersicht/NetworkInfo.tsx b/components/main/uebersicht/NetworkInfo.tsx index aaafa53..8b68bd5 100644 --- a/components/main/uebersicht/NetworkInfo.tsx +++ b/components/main/uebersicht/NetworkInfo.tsx @@ -13,12 +13,19 @@ const NetworkInfo: React.FC = () => { const gateway = useSelector((state: RootState) => state.systemSettings.gateway) || "Unbekannt"; - const opcUaZustand = - useSelector((state: RootState) => state.opcuaSettings.opcUaZustand) || - "Unbekannt"; + const opcUaZustandRaw = useSelector( + (state: RootState) => state.opcuaSettings.opcUaZustand + ); const opcUaNodesetName = useSelector((state: RootState) => state.opcuaSettings.opcUaNodesetName) || "Unbekannt"; + // OPC-UA Zustand in lesbaren Text umwandeln + const opcUaZustand = + Number(opcUaZustandRaw) === 1 + ? "Server betriebsbereit" + : Number(opcUaZustandRaw) === 0 + ? "Server außer Betrieb" + : "Unbekannt"; return (
diff --git a/config/webVersion.ts b/config/webVersion.ts index c3cad1d..284612b 100644 --- a/config/webVersion.ts +++ b/config/webVersion.ts @@ -6,5 +6,5 @@ 2: Patch oder Hotfix (Bugfixes oder kleine Änderungen). */ -const webVersion = "1.6.129"; +const webVersion = "1.6.130"; export default webVersion;