feat: OPC-UA Status lesbar darstellen

- 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
This commit is contained in:
ISA
2025-03-17 07:25:06 +01:00
parent c2568a7505
commit a823bd609e
2 changed files with 11 additions and 4 deletions

View File

@@ -13,12 +13,19 @@ const NetworkInfo: React.FC = () => {
const gateway = const gateway =
useSelector((state: RootState) => state.systemSettings.gateway) || useSelector((state: RootState) => state.systemSettings.gateway) ||
"Unbekannt"; "Unbekannt";
const opcUaZustand = const opcUaZustandRaw = useSelector(
useSelector((state: RootState) => state.opcuaSettings.opcUaZustand) || (state: RootState) => state.opcuaSettings.opcUaZustand
"Unbekannt"; );
const opcUaNodesetName = const opcUaNodesetName =
useSelector((state: RootState) => state.opcuaSettings.opcUaNodesetName) || useSelector((state: RootState) => state.opcuaSettings.opcUaNodesetName) ||
"Unbekannt"; "Unbekannt";
// OPC-UA Zustand in lesbaren Text umwandeln
const opcUaZustand =
Number(opcUaZustandRaw) === 1
? "Server betriebsbereit"
: Number(opcUaZustandRaw) === 0
? "Server außer Betrieb"
: "Unbekannt";
return ( return (
<div className="w-full flex-direction: row flex"> <div className="w-full flex-direction: row flex">

View File

@@ -6,5 +6,5 @@
2: Patch oder Hotfix (Bugfixes oder kleine Änderungen). 2: Patch oder Hotfix (Bugfixes oder kleine Änderungen).
*/ */
const webVersion = "1.6.129"; const webVersion = "1.6.130";
export default webVersion; export default webVersion;