refactor: Systemdaten über eigenen Redux Thunk und Service laden
- Systeminformationen (IP, Subnetz, Gateway, NTP, etc.) werden nun über fetchSystemSettingsThunk geladen - loadWindowVariables.ts von systemSettings-Logik bereinigt - Aufruf erfolgt lokal in NetworkInfo.tsx statt global in _app.tsx - Verbesserte Struktur, reduzierte Netzwerklast, klarere Trennung der Zuständigkeiten
This commit is contained in:
17
services/fetchSystemSettings.ts
Normal file
17
services/fetchSystemSettings.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
// /services/fetchSystemSettings.ts
|
||||
export const fetchSystemSettings = async () => {
|
||||
const win = window as any;
|
||||
return {
|
||||
deviceName: win.win_deviceName || "",
|
||||
mac1: win.win_mac1 || "",
|
||||
ip: win.win_ip || "",
|
||||
subnet: win.win_subnet || "",
|
||||
gateway: win.win_gateway || "",
|
||||
cplInternalTimestamp: win.win_cplInternalTimestamp || "",
|
||||
ntp1: win.win_ntp1 || "",
|
||||
ntp2: win.win_ntp2 || "",
|
||||
ntp3: win.win_ntp3 || "",
|
||||
ntpTimezone: win.win_ntpTimezone || "",
|
||||
ntpActive: win.win_ntpActive || false,
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user