From 5c158a03952723f2a5b8493f74e2f37627d8e1aa Mon Sep 17 00:00:00 2001 From: ISA Date: Tue, 3 Jun 2025 13:34:38 +0200 Subject: [PATCH] =?UTF-8?q?feat:=20Webservice-Mockdaten=20im=20public-Verz?= =?UTF-8?q?eichnis=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - JSON-Dateien für Linienstatus, Stationsstatus, Systemdaten und Benutzerrechte unter /public/mocks/webservice/ abgelegt - Struktur der Dateien an echte Webservice-Antworten angepasst (z. B. 'Statis' statt 'Status') - Dienste wurden entsprechend auf Umschaltung zwischen Mock- und Echtbetrieb vorbereitet - Ermöglicht lokale Entwicklung und Tests ohne Backend-Verbindung --- .env.local | 4 +- .npmignore | 2 +- .../webservice/gisStationsMeasurements.js | 6 +- .../webservice/gisStationsStaticDistrict.js | 11 +- config/appVersion.js | 2 +- public/mocks/webservice/gisLinesStatus.json | 1435 +++++++++++++++++ .../webservice/gisStationsMeasurements.json | 117 ++ .../webservice/gisStationsStaticDistrict.json | 160 ++ .../webservice/gisStationsStatusDistrict.json | 106 ++ public/mocks/webservice/gisSystemStatic.json | 170 ++ public/mocks/webservice/userRights.json | 170 ++ .../webservice/fetchGisLinesStatusService.js | 26 +- .../fetchGisStationsMeasurementsService.js | 19 +- .../fetchGisStationsStaticDistrictService.js | 19 +- .../fetchGisStationsStatusDistrictService.js | 20 +- .../webservice/fetchGisSystemStaticService.js | 17 +- services/webservice/fetchUserRightsService.js | 13 +- 17 files changed, 2251 insertions(+), 46 deletions(-) create mode 100644 public/mocks/webservice/gisLinesStatus.json create mode 100644 public/mocks/webservice/gisStationsMeasurements.json create mode 100644 public/mocks/webservice/gisStationsStaticDistrict.json create mode 100644 public/mocks/webservice/gisStationsStatusDistrict.json create mode 100644 public/mocks/webservice/gisSystemStatic.json create mode 100644 public/mocks/webservice/userRights.json diff --git a/.env.local b/.env.local index 1ae3ed34f..8ba22df24 100644 --- a/.env.local +++ b/.env.local @@ -12,8 +12,8 @@ NEXT_PUBLIC_DEBUG_LOG=true #auf dem Entwicklungsrechner dev läuft auf Port 3000 und auf dem Server prod auf Port 80, aber der WebService ist immer auf PORT 80 -NEXT_PUBLIC_API_PORT_MODE=prod -NEXT_PUBLIC_USE_MOCKS=false +NEXT_PUBLIC_API_PORT_MODE=dev +NEXT_PUBLIC_USE_MOCKS=true # Der Unterordner talas5 gleich hinter der IP-Adresse (oder Servername) muss konfigurierbar sein. # Es muss auch möglich sein kein Unterorder anzugeben (z.B. nur http://talasserver/). diff --git a/.npmignore b/.npmignore index dee87cc22..a6c9e189f 100644 --- a/.npmignore +++ b/.npmignore @@ -1,2 +1,2 @@ __tests__/ -__mocks__/ +__mocks__/ \ No newline at end of file diff --git a/__mocks__/webservice/gisStationsMeasurements.js b/__mocks__/webservice/gisStationsMeasurements.js index e40b1e57d..cab2d4688 100644 --- a/__mocks__/webservice/gisStationsMeasurements.js +++ b/__mocks__/webservice/gisStationsMeasurements.js @@ -120,11 +120,11 @@ export const mockGisStationsMeasurements = { // Optional: Funktion zum Ändern export const updateMeasurement = (id, changes) => { - const deviceMeasurement = mockGisStationsMeasurements.Statis.find((p) => p.IdLD === id); + const deviceMeasurement = mockGisStationsMeasurements.Statis.find(p => p.IdLD === id); if (deviceMeasurement) Object.assign(deviceMeasurement, changes); }; -export const deleteMeasurement = (id) => { - const index = mockGisStationsMeasurements.Statis.findIndex((p) => p.IdLD === id); +export const deleteMeasurement = id => { + const index = mockGisStationsMeasurements.Statis.findIndex(p => p.IdLD === id); if (index !== -1) mockGisStationsMeasurements.Statis.splice(index, 1); }; diff --git a/__mocks__/webservice/gisStationsStaticDistrict.js b/__mocks__/webservice/gisStationsStaticDistrict.js index fd0edb8d1..465b4ddc9 100644 --- a/__mocks__/webservice/gisStationsStaticDistrict.js +++ b/__mocks__/webservice/gisStationsStaticDistrict.js @@ -1,4 +1,9 @@ // __mocks__/webservice/gisStationsStaticDistrict.js +/* +Icon: 20, CPL rot +Icon: 19, Telefon rot + +*/ export const mockGisStationsStaticDistrict = { Name: "Liste aller Geraete einer bestimmten Karte", @@ -163,11 +168,11 @@ export const mockGisStationsStaticDistrict = { // Optional: Funktion zum Ändern export const updateDevice = (id, changes) => { - const device = mockGisStationsStaticDistrict.Points.find((p) => p.IdLD === id); + const device = mockGisStationsStaticDistrict.Points.find(p => p.IdLD === id); if (device) Object.assign(device, changes); }; -export const deleteDevice = (id) => { - const index = mockGisStationsStaticDistrict.Points.findIndex((p) => p.IdLD === id); +export const deleteDevice = id => { + const index = mockGisStationsStaticDistrict.Points.findIndex(p => p.IdLD === id); if (index !== -1) mockGisStationsStaticDistrict.Points.splice(index, 1); }; diff --git a/config/appVersion.js b/config/appVersion.js index 0d9fbbfc5..c5551df13 100644 --- a/config/appVersion.js +++ b/config/appVersion.js @@ -1,2 +1,2 @@ // /config/appVersion -export const APP_VERSION = "1.1.225"; +export const APP_VERSION = "1.1.226"; diff --git a/public/mocks/webservice/gisLinesStatus.json b/public/mocks/webservice/gisLinesStatus.json new file mode 100644 index 000000000..a41dc4007 --- /dev/null +++ b/public/mocks/webservice/gisLinesStatus.json @@ -0,0 +1,1435 @@ +{ + "Name": "Liste aller Statis der Linien", + "Zeitstempel": "2025-05-29T09:00:26.5822469+02:00", + "IdMap": "12", + "Statis": [ + { + "IdLD": 50922, + "Modul": 8, + "DpName": "KUE08_Messwertalarm", + "ModulName": "Test8", + "ModulTyp": "Kü705-FO", + "Message": "KÜG 08: Überspannung gehend", + "Level": 3, + "PrioColor": "#FFFF00", + "PrioName": "minor", + "Value": "False" + }, + { + "IdLD": 50922, + "Modul": 2, + "DpName": "KUE02_Aderbruch", + "ModulName": "Kue 2", + "ModulTyp": "Kü705-FO", + "Message": "KÜG 02: Aderbruch kommend", + "Level": 1, + "PrioColor": "#FF0000", + "PrioName": "critical", + "Value": "?" + }, + { + "IdLD": 50922, + "Modul": 3, + "DpName": "KUE03_Aderbruch", + "ModulName": "Kue 3", + "ModulTyp": "Kü705-FO", + "Message": "KÜG 03: Aderbruch kommend", + "Level": 1, + "PrioColor": "#FF0000", + "PrioName": "critical", + "Value": "?" + }, + { + "IdLD": 50000, + "Modul": 4, + "DpName": "KUE04_Messwert", + "ModulName": "?", + "ModulTyp": "nicht vorhanden", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "1.36 MOhm" + }, + { + "IdLD": 50000, + "Modul": 5, + "DpName": "KUE05_Messwert", + "ModulName": "?", + "ModulTyp": "nicht vorhanden", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "10 MOhm" + }, + { + "IdLD": 50000, + "Modul": 6, + "DpName": "KUE06_Messwert", + "ModulName": "?", + "ModulTyp": "?", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "0 MOhm" + }, + { + "IdLD": 50000, + "Modul": 7, + "DpName": "KUE07_Messwert", + "ModulName": "?", + "ModulTyp": "?", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "10 MOhm" + }, + { + "IdLD": 50000, + "Modul": 8, + "DpName": "KUE08_Messwert", + "ModulName": "?", + "ModulTyp": "?", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "516.72 MOhm" + }, + { + "IdLD": 50000, + "Modul": 13, + "DpName": "KUE13_Messwert", + "ModulName": "?", + "ModulTyp": "?", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "8 MOhm" + }, + { + "IdLD": 50000, + "Modul": 1, + "DpName": "KUE01_Schleifenwert", + "ModulName": "?", + "ModulTyp": "?", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "4.01 kOhm" + }, + { + "IdLD": 50000, + "Modul": 2, + "DpName": "KUE02_Schleifenwert", + "ModulName": "L3", + "ModulTyp": "Kü605µC", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "4.01 kOhm" + }, + { + "IdLD": 50000, + "Modul": 3, + "DpName": "KUE03_Schleifenwert", + "ModulName": "?", + "ModulTyp": "?", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "4.01 kOhm" + }, + { + "IdLD": 50000, + "Modul": 4, + "DpName": "KUE04_Schleifenwert", + "ModulName": "?", + "ModulTyp": "nicht vorhanden", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "0 kOhm" + }, + { + "IdLD": 50000, + "Modul": 5, + "DpName": "KUE05_Schleifenwert", + "ModulName": "?", + "ModulTyp": "nicht vorhanden", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "2.78 kOhm" + }, + { + "IdLD": 50000, + "Modul": 6, + "DpName": "KUE06_Schleifenwert", + "ModulName": "?", + "ModulTyp": "?", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "0 kOhm" + }, + { + "IdLD": 50000, + "Modul": 7, + "DpName": "KUE07_Schleifenwert", + "ModulName": "?", + "ModulTyp": "?", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "2.76 kOhm" + }, + { + "IdLD": 50000, + "Modul": 8, + "DpName": "KUE08_Schleifenwert", + "ModulName": "?", + "ModulTyp": "?", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "0 kOhm" + }, + { + "IdLD": 50000, + "Modul": 9, + "DpName": "KUE09_Schleifenwert", + "ModulName": "?", + "ModulTyp": "?", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "4.01 kOhm" + }, + { + "IdLD": 50000, + "Modul": 10, + "DpName": "KUE10_Schleifenwert", + "ModulName": "?", + "ModulTyp": "?", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "4.01 kOhm" + }, + { + "IdLD": 50000, + "Modul": 11, + "DpName": "KUE11_Schleifenwert", + "ModulName": "?", + "ModulTyp": "?", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "4.01 kOhm" + }, + { + "IdLD": 50000, + "Modul": 12, + "DpName": "KUE12_Schleifenwert", + "ModulName": "?", + "ModulTyp": "?", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "4.01 kOhm" + }, + { + "IdLD": 50000, + "Modul": 13, + "DpName": "KUE13_Schleifenwert", + "ModulName": "?", + "ModulTyp": "?", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "0 kOhm" + }, + { + "IdLD": 50000, + "Modul": 14, + "DpName": "KUE14_Schleifenwert", + "ModulName": "?", + "ModulTyp": "?", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "4.01 kOhm" + }, + { + "IdLD": 50000, + "Modul": 15, + "DpName": "KUE15_Schleifenwert", + "ModulName": "?", + "ModulTyp": "?", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "4.01 kOhm" + }, + { + "IdLD": 50000, + "Modul": 16, + "DpName": "KUE16_Schleifenwert", + "ModulName": "?", + "ModulTyp": "?", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "4.01 kOhm" + }, + { + "IdLD": 50000, + "Modul": 17, + "DpName": "KUE17_Schleifenwert", + "ModulName": "?", + "ModulTyp": "?", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "4.01 kOhm" + }, + { + "IdLD": 50000, + "Modul": 18, + "DpName": "KUE18_Schleifenwert", + "ModulName": "?", + "ModulTyp": "?", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "4.01 kOhm" + }, + { + "IdLD": 50000, + "Modul": 19, + "DpName": "KUE19_Schleifenwert", + "ModulName": "?", + "ModulTyp": "?", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "4.01 kOhm" + }, + { + "IdLD": 50000, + "Modul": 20, + "DpName": "KUE20_Schleifenwert", + "ModulName": "?", + "ModulTyp": "?", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "4.01 kOhm" + }, + { + "IdLD": 50000, + "Modul": 21, + "DpName": "KUE21_Schleifenwert", + "ModulName": "?", + "ModulTyp": "?", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "4.01 kOhm" + }, + { + "IdLD": 50000, + "Modul": 22, + "DpName": "KUE22_Schleifenwert", + "ModulName": "?", + "ModulTyp": "?", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "4.01 kOhm" + }, + { + "IdLD": 50000, + "Modul": 23, + "DpName": "KUE23_Schleifenwert", + "ModulName": "?", + "ModulTyp": "?", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "4.01 kOhm" + }, + { + "IdLD": 50000, + "Modul": 24, + "DpName": "KUE24_Schleifenwert", + "ModulName": "?", + "ModulTyp": "?", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "4.01 kOhm" + }, + { + "IdLD": 50001, + "Modul": 1, + "DpName": "KUE01_Schleifenwert", + "ModulName": "?", + "ModulTyp": "Kü605µC", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "4.01 kOhm" + }, + { + "IdLD": 50001, + "Modul": 2, + "DpName": "KUE02_Schleifenwert", + "ModulName": "?", + "ModulTyp": "Kü605µC", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "4.01 kOhm" + }, + { + "IdLD": 50001, + "Modul": 3, + "DpName": "KUE03_Schleifenwert", + "ModulName": "?", + "ModulTyp": "Kü605µC", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "4.01 kOhm" + }, + { + "IdLD": 50001, + "Modul": 4, + "DpName": "KUE04_Schleifenwert", + "ModulName": "?", + "ModulTyp": "Kü605µC", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "4.01 kOhm" + }, + { + "IdLD": 50001, + "Modul": 5, + "DpName": "KUE05_Schleifenwert", + "ModulName": "?", + "ModulTyp": "Kü705-FO", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "4.01 kOhm" + }, + { + "IdLD": 50001, + "Modul": 6, + "DpName": "KUE06_Schleifenwert", + "ModulName": "?", + "ModulTyp": "KÜSS V2", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "4.01 kOhm" + }, + { + "IdLD": 50001, + "Modul": 7, + "DpName": "KUE07_Schleifenwert", + "ModulName": "?", + "ModulTyp": "?", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "4.01 kOhm" + }, + { + "IdLD": 50001, + "Modul": 8, + "DpName": "KUE08_Schleifenwert", + "ModulName": "?", + "ModulTyp": "?", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "4.01 kOhm" + }, + { + "IdLD": 50001, + "Modul": 9, + "DpName": "KUE09_Schleifenwert", + "ModulName": "?", + "ModulTyp": "?", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "4.01 kOhm" + }, + { + "IdLD": 50001, + "Modul": 10, + "DpName": "KUE10_Schleifenwert", + "ModulName": "?", + "ModulTyp": "?", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "4.01 kOhm" + }, + { + "IdLD": 50001, + "Modul": 11, + "DpName": "KUE11_Schleifenwert", + "ModulName": "?", + "ModulTyp": "?", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "4.01 kOhm" + }, + { + "IdLD": 50001, + "Modul": 12, + "DpName": "KUE12_Schleifenwert", + "ModulName": "?", + "ModulTyp": "?", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "4.01 kOhm" + }, + { + "IdLD": 50001, + "Modul": 13, + "DpName": "KUE13_Schleifenwert", + "ModulName": "?", + "ModulTyp": "?", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "4.01 kOhm" + }, + { + "IdLD": 50001, + "Modul": 14, + "DpName": "KUE14_Schleifenwert", + "ModulName": "?", + "ModulTyp": "?", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "4.01 kOhm" + }, + { + "IdLD": 50001, + "Modul": 15, + "DpName": "KUE15_Schleifenwert", + "ModulName": "?", + "ModulTyp": "?", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "4.01 kOhm" + }, + { + "IdLD": 50001, + "Modul": 16, + "DpName": "KUE16_Schleifenwert", + "ModulName": "?", + "ModulTyp": "?", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "4.01 kOhm" + }, + { + "IdLD": 50001, + "Modul": 17, + "DpName": "KUE17_Schleifenwert", + "ModulName": "?", + "ModulTyp": "?", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "4.01 kOhm" + }, + { + "IdLD": 50001, + "Modul": 18, + "DpName": "KUE18_Schleifenwert", + "ModulName": "?", + "ModulTyp": "?", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "4.01 kOhm" + }, + { + "IdLD": 50001, + "Modul": 19, + "DpName": "KUE19_Schleifenwert", + "ModulName": "?", + "ModulTyp": "?", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "4.01 kOhm" + }, + { + "IdLD": 50001, + "Modul": 20, + "DpName": "KUE20_Schleifenwert", + "ModulName": "?", + "ModulTyp": "?", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "4.01 kOhm" + }, + { + "IdLD": 50001, + "Modul": 21, + "DpName": "KUE21_Schleifenwert", + "ModulName": "?", + "ModulTyp": "?", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "4.01 kOhm" + }, + { + "IdLD": 50001, + "Modul": 22, + "DpName": "KUE22_Schleifenwert", + "ModulName": "?", + "ModulTyp": "?", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "4.01 kOhm" + }, + { + "IdLD": 50001, + "Modul": 23, + "DpName": "KUE23_Schleifenwert", + "ModulName": "?", + "ModulTyp": "?", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "4.01 kOhm" + }, + { + "IdLD": 50001, + "Modul": 24, + "DpName": "KUE24_Schleifenwert", + "ModulName": "?", + "ModulTyp": "?", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "4.01 kOhm" + }, + { + "IdLD": 50011, + "Modul": 2, + "DpName": "KUE02_Messwert", + "ModulName": "?", + "ModulTyp": "Kü605µC", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "200 MOhm" + }, + { + "IdLD": 50011, + "Modul": 3, + "DpName": "KUE03_Messwert", + "ModulName": "?", + "ModulTyp": "Kü605µC", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "200 MOhm" + }, + { + "IdLD": 50011, + "Modul": 4, + "DpName": "KUE04_Messwert", + "ModulName": "?", + "ModulTyp": "Kü605µC", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "200 MOhm" + }, + { + "IdLD": 50011, + "Modul": 5, + "DpName": "KUE05_Messwert", + "ModulName": "?", + "ModulTyp": "Kü705-FO", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "200 MOhm" + }, + { + "IdLD": 50011, + "Modul": 6, + "DpName": "KUE06_Messwert", + "ModulName": "?", + "ModulTyp": "?", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "0 MOhm" + }, + { + "IdLD": 50011, + "Modul": 1, + "DpName": "KUE01_Schleifenwert", + "ModulName": "?", + "ModulTyp": "Kü605µC", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "4.01 kOhm" + }, + { + "IdLD": 50011, + "Modul": 2, + "DpName": "KUE02_Schleifenwert", + "ModulName": "?", + "ModulTyp": "Kü605µC", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "5.53 kOhm" + }, + { + "IdLD": 50011, + "Modul": 3, + "DpName": "KUE03_Schleifenwert", + "ModulName": "?", + "ModulTyp": "Kü605µC", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "4.2 kOhm" + }, + { + "IdLD": 50011, + "Modul": 4, + "DpName": "KUE04_Schleifenwert", + "ModulName": "?", + "ModulTyp": "Kü605µC", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "6.09 kOhm" + }, + { + "IdLD": 50011, + "Modul": 5, + "DpName": "KUE05_Schleifenwert", + "ModulName": "?", + "ModulTyp": "Kü705-FO", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "22.37 kOhm" + }, + { + "IdLD": 50011, + "Modul": 6, + "DpName": "KUE06_Schleifenwert", + "ModulName": "?", + "ModulTyp": "?", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "0 kOhm" + }, + { + "IdLD": 50011, + "Modul": 19, + "DpName": "KUE19_Schleifenwert", + "ModulName": "?", + "ModulTyp": "?", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "4.21 kOhm" + }, + { + "IdLD": 50063, + "Modul": 4, + "DpName": "KUE04_Messwert", + "ModulName": "?", + "ModulTyp": "?", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "10 MOhm" + }, + { + "IdLD": 50063, + "Modul": 12, + "DpName": "KUE12_Messwert", + "ModulName": "?", + "ModulTyp": "?", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "10 MOhm" + }, + { + "IdLD": 50063, + "Modul": 13, + "DpName": "KUE13_Messwert", + "ModulName": "?", + "ModulTyp": "?", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "10 MOhm" + }, + { + "IdLD": 50063, + "Modul": 14, + "DpName": "KUE14_Messwert", + "ModulName": "?", + "ModulTyp": "?", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "10 MOhm" + }, + { + "IdLD": 50063, + "Modul": 23, + "DpName": "KUE23_Messwert", + "ModulName": "?", + "ModulTyp": "?", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "10 MOhm" + }, + { + "IdLD": 50063, + "Modul": 24, + "DpName": "KUE24_Messwert", + "ModulName": "?", + "ModulTyp": "?", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "10 MOhm" + }, + { + "IdLD": 50063, + "Modul": 1, + "DpName": "KUE01_Schleifenwert", + "ModulName": "?", + "ModulTyp": "?", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "4.01 kOhm" + }, + { + "IdLD": 50063, + "Modul": 2, + "DpName": "KUE02_Schleifenwert", + "ModulName": "?", + "ModulTyp": "?", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "4.01 kOhm" + }, + { + "IdLD": 50063, + "Modul": 4, + "DpName": "KUE04_Schleifenwert", + "ModulName": "?", + "ModulTyp": "?", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "4.01 kOhm" + }, + { + "IdLD": 50063, + "Modul": 5, + "DpName": "KUE05_Schleifenwert", + "ModulName": "?", + "ModulTyp": "?", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "4.01 kOhm" + }, + { + "IdLD": 50066, + "Modul": 1, + "DpName": "KUE01_Messwert", + "ModulName": "K1", + "ModulTyp": "Kü705-FO", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "11 MOhm" + }, + { + "IdLD": 50066, + "Modul": 3, + "DpName": "KUE03_Messwert", + "ModulName": "K4", + "ModulTyp": "Kü605µC", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "200 MOhm" + }, + { + "IdLD": 50066, + "Modul": 4, + "DpName": "KUE04_Messwert", + "ModulName": "?", + "ModulTyp": "?", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "200 MOhm" + }, + { + "IdLD": 50066, + "Modul": 6, + "DpName": "KUE06_Messwert", + "ModulName": "?", + "ModulTyp": "Kü705-FO", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "0 MOhm" + }, + { + "IdLD": 50066, + "Modul": 7, + "DpName": "KUE07_Messwert", + "ModulName": "?", + "ModulTyp": "KÜSS V2", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "10.5 MOhm" + }, + { + "IdLD": 50066, + "Modul": 8, + "DpName": "KUE08_Messwert", + "ModulName": "?", + "ModulTyp": "?", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "0 MOhm" + }, + { + "IdLD": 50066, + "Modul": 9, + "DpName": "KUE09_Messwert", + "ModulName": "?", + "ModulTyp": "?", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "200 MOhm" + }, + { + "IdLD": 50066, + "Modul": 14, + "DpName": "KUE14_Messwert", + "ModulName": "?", + "ModulTyp": "?", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "200 MOhm" + }, + { + "IdLD": 50066, + "Modul": 21, + "DpName": "KUE21_Messwert", + "ModulName": "?", + "ModulTyp": "?", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "2.67 MOhm" + }, + { + "IdLD": 50066, + "Modul": 22, + "DpName": "KUE22_Messwert", + "ModulName": "?", + "ModulTyp": "?", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "2.71 MOhm" + }, + { + "IdLD": 50066, + "Modul": 24, + "DpName": "KUE24_Messwert", + "ModulName": "?", + "ModulTyp": "?", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "2.95 MOhm" + }, + { + "IdLD": 50066, + "Modul": 1, + "DpName": "KUE01_Schleifenwert", + "ModulName": "K1", + "ModulTyp": "Kü705-FO", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "2.33 kOhm" + }, + { + "IdLD": 50066, + "Modul": 2, + "DpName": "KUE02_Schleifenwert", + "ModulName": "K2", + "ModulTyp": "Kü705-FO", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "4.01 kOhm" + }, + { + "IdLD": 50066, + "Modul": 3, + "DpName": "KUE03_Schleifenwert", + "ModulName": "K4", + "ModulTyp": "Kü605µC", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "49.10 kOhm" + }, + { + "IdLD": 50066, + "Modul": 4, + "DpName": "KUE04_Schleifenwert", + "ModulName": "?", + "ModulTyp": "?", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "0 kOhm" + }, + { + "IdLD": 50066, + "Modul": 5, + "DpName": "KUE05_Schleifenwert", + "ModulName": "?", + "ModulTyp": "Kü705-FO", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "5.72 kOhm" + }, + { + "IdLD": 50066, + "Modul": 6, + "DpName": "KUE06_Schleifenwert", + "ModulName": "?", + "ModulTyp": "Kü705-FO", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "0 kOhm" + }, + { + "IdLD": 50066, + "Modul": 7, + "DpName": "KUE07_Schleifenwert", + "ModulName": "?", + "ModulTyp": "KÜSS V2", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "2.74 kOhm" + }, + { + "IdLD": 50066, + "Modul": 8, + "DpName": "KUE08_Schleifenwert", + "ModulName": "?", + "ModulTyp": "?", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "0 kOhm" + }, + { + "IdLD": 50066, + "Modul": 14, + "DpName": "KUE14_Schleifenwert", + "ModulName": "?", + "ModulTyp": "?", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "5.69 kOhm" + }, + { + "IdLD": 50922, + "Modul": 5, + "DpName": "KUE05_Messwert", + "ModulName": "Kue 5", + "ModulTyp": "Kü705-FO", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "0 MOhm" + }, + { + "IdLD": 50922, + "Modul": 6, + "DpName": "KUE06_Messwert", + "ModulName": "Kue 6", + "ModulTyp": "Kü605µC", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "0 MOhm" + }, + { + "IdLD": 50922, + "Modul": 7, + "DpName": "KUE07_Messwert", + "ModulName": "KUESS 7", + "ModulTyp": "KÜSS V2", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "0 MOhm" + }, + { + "IdLD": 50922, + "Modul": 8, + "DpName": "KUE08_Messwert", + "ModulName": "Test8", + "ModulTyp": "Kü705-FO", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "0 MOhm" + }, + { + "IdLD": 50922, + "Modul": 14, + "DpName": "KUE14_Messwert", + "ModulName": "?", + "ModulTyp": "?", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "0 MOhm" + }, + { + "IdLD": 50922, + "Modul": 1, + "DpName": "KUE01_Schleifenwert", + "ModulName": "Test1", + "ModulTyp": "Kü705-FO", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "0 kOhm" + }, + { + "IdLD": 50922, + "Modul": 2, + "DpName": "KUE02_Schleifenwert", + "ModulName": "Kue 2", + "ModulTyp": "Kü705-FO", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "64.01 kOhm" + }, + { + "IdLD": 50922, + "Modul": 3, + "DpName": "KUE03_Schleifenwert", + "ModulName": "Kue 3", + "ModulTyp": "Kü705-FO", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "64.01 kOhm" + }, + { + "IdLD": 50922, + "Modul": 4, + "DpName": "KUE04_Schleifenwert", + "ModulName": "Kue 4", + "ModulTyp": "Kü705-FO", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "64.01 kOhm" + }, + { + "IdLD": 50922, + "Modul": 5, + "DpName": "KUE05_Schleifenwert", + "ModulName": "Kue 5", + "ModulTyp": "Kü705-FO", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "0 kOhm" + }, + { + "IdLD": 50922, + "Modul": 6, + "DpName": "KUE06_Schleifenwert", + "ModulName": "Kue 6", + "ModulTyp": "Kü605µC", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "0 kOhm" + }, + { + "IdLD": 50922, + "Modul": 7, + "DpName": "KUE07_Schleifenwert", + "ModulName": "KUESS 7", + "ModulTyp": "KÜSS V2", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "0 kOhm" + }, + { + "IdLD": 50922, + "Modul": 8, + "DpName": "KUE08_Schleifenwert", + "ModulName": "Test8", + "ModulTyp": "Kü705-FO", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "0.25 kOhm" + }, + { + "IdLD": 50922, + "Modul": 9, + "DpName": "KUE09_Schleifenwert", + "ModulName": "?", + "ModulTyp": "?", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "0 kOhm" + }, + { + "IdLD": 50922, + "Modul": 10, + "DpName": "KUE10_Schleifenwert", + "ModulName": "?", + "ModulTyp": "?", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "0 kOhm" + }, + { + "IdLD": 50922, + "Modul": 11, + "DpName": "KUE11_Schleifenwert", + "ModulName": "?", + "ModulTyp": "?", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "0 kOhm" + }, + { + "IdLD": 50922, + "Modul": 12, + "DpName": "KUE12_Schleifenwert", + "ModulName": "?", + "ModulTyp": "?", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "0 kOhm" + }, + { + "IdLD": 50922, + "Modul": 13, + "DpName": "KUE13_Schleifenwert", + "ModulName": "?", + "ModulTyp": "?", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "0 kOhm" + }, + { + "IdLD": 50922, + "Modul": 14, + "DpName": "KUE14_Schleifenwert", + "ModulName": "?", + "ModulTyp": "?", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "0 kOhm" + }, + { + "IdLD": 50922, + "Modul": 15, + "DpName": "KUE15_Schleifenwert", + "ModulName": "?", + "ModulTyp": "?", + "Message": "?", + "Level": -1, + "PrioColor": "#ffffff", + "PrioName": "?", + "Value": "0 kOhm" + } + ] +} diff --git a/public/mocks/webservice/gisStationsMeasurements.json b/public/mocks/webservice/gisStationsMeasurements.json new file mode 100644 index 000000000..f9198df02 --- /dev/null +++ b/public/mocks/webservice/gisStationsMeasurements.json @@ -0,0 +1,117 @@ +{ + "Name": "Liste aller Messungen der Geraete", + "Zeitstempel": "2025-05-29T08:53:04.1449106+02:00", + "IdMap": "12", + "Statis": [ + { + "IdLD": 50937, + "IdL": 24101, + "IdDP": 3, + "Na": "FBT", + "Val": "6", + "Unit": "°C", + "Gr": "GMA", + "Area_Name": "Rastede" + }, + { + "IdLD": 50937, + "IdL": 24101, + "IdDP": 10, + "Na": "GT", + "Val": "-2.14", + "Unit": "°C", + "Gr": "GMA", + "Area_Name": "Rastede" + }, + { + "IdLD": 50937, + "IdL": 24101, + "IdDP": 2, + "Na": "LT", + "Val": "0.21", + "Unit": "°C", + "Gr": "GMA", + "Area_Name": "Rastede" + }, + { + "IdLD": 50937, + "IdL": 24101, + "IdDP": 6, + "Na": "RLF", + "Val": "77.54", + "Unit": "%", + "Gr": "GMA", + "Area_Name": "Rastede" + }, + { + "IdLD": 50937, + "IdL": 24101, + "IdDP": 4, + "Na": "RS", + "Val": "30.33", + "Unit": "%", + "Gr": "GMA", + "Area_Name": "Rastede" + }, + { + "IdLD": 50937, + "IdL": 24101, + "IdDP": 11, + "Na": "TPT", + "Val": "2.99", + "Unit": "°C", + "Gr": "GMA", + "Area_Name": "Rastede" + }, + { + "IdLD": 50937, + "IdL": 24101, + "IdDP": 12, + "Na": "TT1", + "Val": "0.1245", + "Unit": "°C", + "Gr": "GMA", + "Area_Name": "Rastede" + }, + { + "IdLD": 50937, + "IdL": 24101, + "IdDP": 16, + "Na": "WFD", + "Val": "0.211", + "Unit": "mm", + "Gr": "GMA", + "Area_Name": "Rastede" + }, + { + "IdLD": 50937, + "IdL": 24101, + "IdDP": 8, + "Na": "WGM", + "Val": "0.5", + "Unit": "m/s", + "Gr": "GMA", + "Area_Name": "Rastede" + }, + { + "IdLD": 50937, + "IdL": 24101, + "IdDP": 9, + "Na": "WGS", + "Val": "0.75", + "Unit": "m/s", + "Gr": "GMA", + "Area_Name": "Rastede" + }, + { + "IdLD": 50937, + "IdL": 24101, + "IdDP": 7, + "Na": "WR", + "Val": "180", + "Unit": "°", + "Gr": "GMA", + "Area_Name": "Rastede" + } + ] +} diff --git a/public/mocks/webservice/gisStationsStaticDistrict.json b/public/mocks/webservice/gisStationsStaticDistrict.json new file mode 100644 index 000000000..9127e7889 --- /dev/null +++ b/public/mocks/webservice/gisStationsStaticDistrict.json @@ -0,0 +1,160 @@ +{ + "Name": "Liste aller Geraete einer bestimmten Karte", + "Zeitstempel": "2025-05-29T08:08:34.2019886+02:00", + "IdMap": "12", + "Points": [ + { + "LD_Name": "CPL Ismail", + "IdLD": 50922, + "Device": "CPL V3.5 mit 24 Kü", + "Link": "cpl.aspx?ver=35&kue=24&id=50922", + "Location_Name": "Littwin", + "Location_Short": "LTW", + "IdLocation": 24101, + "Area_Name": "Rastede", + "Area_Short": "", + "IdArea": 20998, + "X": 53.242157, + "Y": 8.160353, + "Icon": 20, + "System": 1, + "Active": 1 + }, + { + "LD_Name": "LR 77 ISA", + "IdLD": 50935, + "Device": "LTE Modem LR77", + "Link": "lr77.aspx?ver=1&id=50935", + "Location_Name": "Littwin", + "Location_Short": "LTW", + "IdLocation": 24101, + "Area_Name": "Rastede", + "Area_Short": "", + "IdArea": 20998, + "X": 53.242157, + "Y": 8.160353, + "Icon": 12, + "System": 5, + "Active": 1 + }, + { + "LD_Name": "Cisco Router 1841", + "IdLD": 50936, + "Device": "Cisco 1841", + "Link": "cisco1841.aspx?ver=1&id=50936", + "Location_Name": "Littwin", + "Location_Short": "LTW", + "IdLocation": 24101, + "Area_Name": "Rastede", + "Area_Short": "", + "IdArea": 20998, + "X": 53.242157, + "Y": 8.160353, + "Icon": 21, + "System": 6, + "Active": 1 + }, + { + "LD_Name": "GMA Testgerät ISA", + "IdLD": 50937, + "Device": "Glättemeldeanlage", + "Link": "gma.aspx?ver=1&id=50937", + "Location_Name": "Littwin", + "Location_Short": "LTW", + "IdLocation": 24101, + "Area_Name": "Rastede", + "Area_Short": "", + "IdArea": 20998, + "X": 53.242157, + "Y": 8.160353, + "Icon": 1, + "System": 11, + "Active": 1 + }, + { + "LD_Name": "SMS-Funkmodem", + "IdLD": 50938, + "Device": "SMS Funkmodem", + "Link": "sms_modem.aspx?ver=1&id=50938", + "Location_Name": "Littwin", + "Location_Short": "LTW", + "IdLocation": 24101, + "Area_Name": "Rastede", + "Area_Short": "", + "IdArea": 20998, + "X": 53.242157, + "Y": 8.160353, + "Icon": 12, + "System": 111, + "Active": 1 + }, + { + "LD_Name": "TALAS Meldestationen ISA", + "IdLD": 50939, + "Device": "CPL V3.5 mit 16 Kü", + "Link": "cpl.aspx?ver=35&kue=16&id=50939", + "Location_Name": "Littwin", + "Location_Short": "LTW", + "IdLocation": 24101, + "Area_Name": "Rastede", + "Area_Short": "", + "IdArea": 20998, + "X": 53.242157, + "Y": 8.160353, + "Icon": 20, + "System": 1, + "Active": 1 + }, + { + "LD_Name": "WAGO Klemmen ISA", + "IdLD": 50941, + "Device": "WAGO 16 DE", + "Link": "wago.aspx?ver=1&DE=16&id=50941", + "Location_Name": "Littwin", + "Location_Short": "LTW", + "IdLocation": 24101, + "Area_Name": "Rastede", + "Area_Short": "", + "IdArea": 20998, + "X": 53.242157, + "Y": 8.160353, + "Icon": 9, + "System": 7, + "Active": 1 + }, + { + "LD_Name": "Cisco 1921", + "IdLD": 50942, + "Device": "Cisco 1921", + "Link": "cisco1921.aspx?ver=1&id=50942", + "Location_Name": "Littwin", + "Location_Short": "LTW", + "IdLocation": 24101, + "Area_Name": "Rastede", + "Area_Short": "", + "IdArea": 20998, + "X": 53.242157, + "Y": 8.160353, + "Icon": 21, + "System": 6, + "Active": 1 + }, + { + "LD_Name": "Cisco 8200", + "IdLD": 50943, + "Device": "Cisco 8200", + "Link": "cisco8200.aspx?ver=1&id=50943", + "Location_Name": "Littwin", + "Location_Short": "LTW", + "IdLocation": 24101, + "Area_Name": "Rastede", + "Area_Short": "", + "IdArea": 20998, + "X": 53.242157, + "Y": 8.160353, + "Icon": 21, + "System": 6, + "Active": 1 + } + ] +} diff --git a/public/mocks/webservice/gisStationsStatusDistrict.json b/public/mocks/webservice/gisStationsStatusDistrict.json new file mode 100644 index 000000000..be79037c1 --- /dev/null +++ b/public/mocks/webservice/gisStationsStatusDistrict.json @@ -0,0 +1,106 @@ +{ + "Name": "Liste aller Statis der Geraete", + "Zeitstempel": "2025-05-29T08:45:50.7257018+02:00", + "IdMap": "12", + "Statis": [ + { + "IdLD": 50922, + "Na": "system", + "Le": 4, + "Co": "#FF00FF", + "Me": "Eingang DE 01 kommend", + "Feld": 4, + "Icon": 0 + }, + { + "IdLD": 50922, + "Na": "system", + "Le": 4, + "Co": "#FF00FF", + "Me": "Eingang DE 05 kommend", + "Feld": 4, + "Icon": 0 + }, + { + "IdLD": 50922, + "Na": "system", + "Le": 4, + "Co": "#FF00FF", + "Me": "Eingang DE 17 kommend", + "Feld": 4, + "Icon": 0 + }, + { + "IdLD": 50922, + "Na": "system", + "Le": 4, + "Co": "#FF00FF", + "Me": "Eingang DE 31 kommend", + "Feld": 4, + "Icon": 0 + }, + { + "IdLD": 50922, + "Na": "system", + "Le": 4, + "Co": "#FF00FF", + "Me": "Eingang DE 32 kommend", + "Feld": 4, + "Icon": 0 + }, + { + "IdLD": 50922, + "Na": "system", + "Le": 4, + "Co": "#FF00FF", + "Me": "Station offline", + "Feld": 4, + "Icon": 0 + }, + { + "IdLD": 50922, + "Na": "minor", + "Le": 3, + "Co": "#FFFF00", + "Me": "Eingang DE 02 kommend", + "Feld": 4, + "Icon": 0 + }, + { + "IdLD": 50922, + "Na": "minor", + "Le": 3, + "Co": "#FFFF00", + "Me": "KÜG 08: Überspannung gehend", + "Feld": 4, + "Icon": 0 + }, + { + "IdLD": 50922, + "Na": "major", + "Le": 2, + "Co": "#FF9900", + "Me": "Eingang DE 03 kommend", + "Feld": 4, + "Icon": 0 + }, + { + "IdLD": 50922, + "Na": "critical", + "Le": 1, + "Co": "#FF0000", + "Me": "KÜG 02: Aderbruch kommend", + "Feld": 4, + "Icon": 0 + }, + { + "IdLD": 50922, + "Na": "critical", + "Le": 1, + "Co": "#FF0000", + "Me": "KÜG 03: Aderbruch kommend", + "Feld": 4, + "Icon": 0 + } + ] +} diff --git a/public/mocks/webservice/gisSystemStatic.json b/public/mocks/webservice/gisSystemStatic.json new file mode 100644 index 000000000..618fd5eb9 --- /dev/null +++ b/public/mocks/webservice/gisSystemStatic.json @@ -0,0 +1,170 @@ +{ + "Name": "Liste aller angezeigten Systeme", + "Zeitstempel": "2025-05-29T08:57:47.6981898+02:00", + "IdMap": "12", + "Systems": [ + { + "IdSystem": 1, + "Name": "TALAS", + "Longname": "Talas Meldestationen", + "Allow": 1, + "Icon": 1 + }, + { + "IdSystem": 2, + "Name": "ECI", + "Longname": "ECI Geräte", + "Allow": 1, + "Icon": 2 + }, + { + "IdSystem": 3, + "Name": "ULAF", + "Longname": "ULAF Geräte", + "Allow": 0, + "Icon": 3 + }, + { + "IdSystem": 5, + "Name": "GSM Modem", + "Longname": "LR77 GSM Modems", + "Allow": 1, + "Icon": 5 + }, + { + "IdSystem": 6, + "Name": "Cisco Router", + "Longname": "Cisco Router", + "Allow": 1, + "Icon": 6 + }, + { + "IdSystem": 7, + "Name": "WAGO", + "Longname": "WAGO I/O Systeme", + "Allow": 1, + "Icon": 7 + }, + { + "IdSystem": 8, + "Name": "Siemens", + "Longname": "Siemens Notrufsysteme", + "Allow": 1, + "Icon": 8 + }, + { + "IdSystem": 9, + "Name": "OTDR", + "Longname": "Glasfaserüberwachung OTU", + "Allow": 1, + "Icon": 9 + }, + { + "IdSystem": 10, + "Name": "WDM", + "Longname": " Wavelength Division Multiplexing", + "Allow": 1, + "Icon": 10 + }, + { + "IdSystem": 11, + "Name": "GMA", + "Longname": "Glättemeldeanlagen", + "Allow": 1, + "Icon": 11 + }, + { + "IdSystem": 13, + "Name": "Messstellen", + "Longname": "Messstellen", + "Allow": 1, + "Icon": 13 + }, + { + "IdSystem": 30, + "Name": "TK-Komponenten", + "Longname": "TK-Komponenten", + "Allow": 1, + "Icon": 30 + }, + { + "IdSystem": 100, + "Name": "TALAS ICL", + "Longname": "Talas ICL Unterstationen", + "Allow": 1, + "Icon": 100 + }, + { + "IdSystem": 110, + "Name": "DAUZ", + "Longname": "Dauerzählstellen", + "Allow": 1, + "Icon": 110 + }, + { + "IdSystem": 111, + "Name": "SMS Modem", + "Longname": "SMS Modem", + "Allow": 1, + "Icon": 111 + }, + { + "IdSystem": 200, + "Name": "Sonstige", + "Longname": "Sonstige", + "Allow": 1, + "Icon": 200 + } + ], + "Rights": [ + { "IdRight": 1 }, + { "IdRight": 2 }, + { "IdRight": 3 }, + { "IdRight": 5 }, + { "IdRight": 6 }, + { "IdRight": 7 }, + { "IdRight": 8 }, + { "IdRight": 10 }, + { "IdRight": 11 }, + { "IdRight": 12 }, + { "IdRight": 20 }, + { "IdRight": 22 }, + { "IdRight": 23 }, + { "IdRight": 25 }, + { "IdRight": 30 }, + { "IdRight": 40 }, + { "IdRight": 41 }, + { "IdRight": 42 }, + { "IdRight": 43 }, + { "IdRight": 44 }, + { "IdRight": 45 }, + { "IdRight": 46 }, + { "IdRight": 47 }, + { "IdRight": 48 }, + { "IdRight": 49 }, + { "IdRight": 50 }, + { "IdRight": 51 }, + { "IdRight": 52 }, + { "IdRight": 55 }, + { "IdRight": 56 }, + { "IdRight": 60 }, + { "IdRight": 61 }, + { "IdRight": 62 }, + { "IdRight": 63 }, + { "IdRight": 64 }, + { "IdRight": 65 }, + { "IdRight": 68 }, + { "IdRight": 69 }, + { "IdRight": 70 }, + { "IdRight": 71 }, + { "IdRight": 72 }, + { "IdRight": 73 }, + { "IdRight": 79 }, + { "IdRight": 80 }, + { "IdRight": 90 }, + { "IdRight": 93 }, + { "IdRight": 94 }, + { "IdRight": 95 }, + { "IdRight": 96 } + ] +} diff --git a/public/mocks/webservice/userRights.json b/public/mocks/webservice/userRights.json new file mode 100644 index 000000000..618fd5eb9 --- /dev/null +++ b/public/mocks/webservice/userRights.json @@ -0,0 +1,170 @@ +{ + "Name": "Liste aller angezeigten Systeme", + "Zeitstempel": "2025-05-29T08:57:47.6981898+02:00", + "IdMap": "12", + "Systems": [ + { + "IdSystem": 1, + "Name": "TALAS", + "Longname": "Talas Meldestationen", + "Allow": 1, + "Icon": 1 + }, + { + "IdSystem": 2, + "Name": "ECI", + "Longname": "ECI Geräte", + "Allow": 1, + "Icon": 2 + }, + { + "IdSystem": 3, + "Name": "ULAF", + "Longname": "ULAF Geräte", + "Allow": 0, + "Icon": 3 + }, + { + "IdSystem": 5, + "Name": "GSM Modem", + "Longname": "LR77 GSM Modems", + "Allow": 1, + "Icon": 5 + }, + { + "IdSystem": 6, + "Name": "Cisco Router", + "Longname": "Cisco Router", + "Allow": 1, + "Icon": 6 + }, + { + "IdSystem": 7, + "Name": "WAGO", + "Longname": "WAGO I/O Systeme", + "Allow": 1, + "Icon": 7 + }, + { + "IdSystem": 8, + "Name": "Siemens", + "Longname": "Siemens Notrufsysteme", + "Allow": 1, + "Icon": 8 + }, + { + "IdSystem": 9, + "Name": "OTDR", + "Longname": "Glasfaserüberwachung OTU", + "Allow": 1, + "Icon": 9 + }, + { + "IdSystem": 10, + "Name": "WDM", + "Longname": " Wavelength Division Multiplexing", + "Allow": 1, + "Icon": 10 + }, + { + "IdSystem": 11, + "Name": "GMA", + "Longname": "Glättemeldeanlagen", + "Allow": 1, + "Icon": 11 + }, + { + "IdSystem": 13, + "Name": "Messstellen", + "Longname": "Messstellen", + "Allow": 1, + "Icon": 13 + }, + { + "IdSystem": 30, + "Name": "TK-Komponenten", + "Longname": "TK-Komponenten", + "Allow": 1, + "Icon": 30 + }, + { + "IdSystem": 100, + "Name": "TALAS ICL", + "Longname": "Talas ICL Unterstationen", + "Allow": 1, + "Icon": 100 + }, + { + "IdSystem": 110, + "Name": "DAUZ", + "Longname": "Dauerzählstellen", + "Allow": 1, + "Icon": 110 + }, + { + "IdSystem": 111, + "Name": "SMS Modem", + "Longname": "SMS Modem", + "Allow": 1, + "Icon": 111 + }, + { + "IdSystem": 200, + "Name": "Sonstige", + "Longname": "Sonstige", + "Allow": 1, + "Icon": 200 + } + ], + "Rights": [ + { "IdRight": 1 }, + { "IdRight": 2 }, + { "IdRight": 3 }, + { "IdRight": 5 }, + { "IdRight": 6 }, + { "IdRight": 7 }, + { "IdRight": 8 }, + { "IdRight": 10 }, + { "IdRight": 11 }, + { "IdRight": 12 }, + { "IdRight": 20 }, + { "IdRight": 22 }, + { "IdRight": 23 }, + { "IdRight": 25 }, + { "IdRight": 30 }, + { "IdRight": 40 }, + { "IdRight": 41 }, + { "IdRight": 42 }, + { "IdRight": 43 }, + { "IdRight": 44 }, + { "IdRight": 45 }, + { "IdRight": 46 }, + { "IdRight": 47 }, + { "IdRight": 48 }, + { "IdRight": 49 }, + { "IdRight": 50 }, + { "IdRight": 51 }, + { "IdRight": 52 }, + { "IdRight": 55 }, + { "IdRight": 56 }, + { "IdRight": 60 }, + { "IdRight": 61 }, + { "IdRight": 62 }, + { "IdRight": 63 }, + { "IdRight": 64 }, + { "IdRight": 65 }, + { "IdRight": 68 }, + { "IdRight": 69 }, + { "IdRight": 70 }, + { "IdRight": 71 }, + { "IdRight": 72 }, + { "IdRight": 73 }, + { "IdRight": 79 }, + { "IdRight": 80 }, + { "IdRight": 90 }, + { "IdRight": 93 }, + { "IdRight": 94 }, + { "IdRight": 95 }, + { "IdRight": 96 } + ] +} diff --git a/services/webservice/fetchGisLinesStatusService.js b/services/webservice/fetchGisLinesStatusService.js index 35a927d2c..f7e8648ab 100644 --- a/services/webservice/fetchGisLinesStatusService.js +++ b/services/webservice/fetchGisLinesStatusService.js @@ -1,14 +1,22 @@ -// /services/webservice/fetchGisLinesStatusService.js - export const fetchGisLinesStatusService = async () => { const useMocks = process.env.NEXT_PUBLIC_USE_MOCKS === "true"; - const mode = process.env.NEXT_PUBLIC_API_PORT_MODE; const basePath = process.env.NEXT_PUBLIC_BASE_PATH || ""; if (useMocks) { console.log("🧪 Mock-Modus aktiviert: fetchGisLinesStatusService"); - const { mockGisLinesStatus } = await import("../../__mocks__/webservice/gisLinesStatus.js"); - return mockGisLinesStatus.Statis; + + const response = await fetch("/mocks/webservice/gisLinesStatus.json"); + if (!response.ok) { + throw new Error("Mockdaten konnten nicht geladen werden"); + } + + const mockData = await response.json(); + + if (!Array.isArray(mockData.Statis)) { + throw new Error("Ungültige Struktur: 'Status' fehlt im Mock"); + } + + return mockData.Statis; } else { const baseUrl = `${window.location.protocol}//${window.location.hostname}:80${basePath}/ClientData/WebServiceMap.asmx`; @@ -19,7 +27,9 @@ export const fetchGisLinesStatusService = async () => { console.log("📡 fetchGisLinesStatusService URL:", url); const response = await fetch(url); - if (!response.ok) throw new Error("Fehler beim Laden der Linienstatusdaten"); + if (!response.ok) { + throw new Error("Fehler beim Laden der Linienstatusdaten"); + } const text = await response.text(); @@ -31,7 +41,9 @@ export const fetchGisLinesStatusService = async () => { throw new Error("Antwort ist kein gültiges JSON"); } - if (!Array.isArray(json.Statis)) throw new Error("Ungültige Antwortstruktur: Statis fehlt"); + if (!Array.isArray(json.Statis)) { + throw new Error("Ungültige Antwortstruktur: Statis fehlt"); + } return json.Statis; } diff --git a/services/webservice/fetchGisStationsMeasurementsService.js b/services/webservice/fetchGisStationsMeasurementsService.js index cbb404db4..f3fe13ab7 100644 --- a/services/webservice/fetchGisStationsMeasurementsService.js +++ b/services/webservice/fetchGisStationsMeasurementsService.js @@ -1,14 +1,21 @@ -// /services/webservice/fetchGisStationsMeasurementsService.js - export const fetchGisStationsMeasurementsService = async () => { const useMocks = process.env.NEXT_PUBLIC_USE_MOCKS === "true"; - const mode = process.env.NEXT_PUBLIC_API_PORT_MODE; const basePath = process.env.NEXT_PUBLIC_BASE_PATH || ""; if (useMocks) { console.log("🧪 Mock-Modus aktiviert: fetchGisStationsMeasurementsService"); - const { mockGisStationsMeasurements } = await import("../../__mocks__/webservice/gisStationsMeasurements.js"); - return mockGisStationsMeasurements.Statis; + + const response = await fetch("/mocks/webservice/gisStationsMeasurements.json"); + if (!response.ok) { + throw new Error("Mockdaten konnten nicht geladen werden"); + } + + const mockData = await response.json(); + if (!Array.isArray(mockData.Statis)) { + throw new Error("Ungültige Struktur: 'Statis' fehlt im Mock"); + } + + return mockData.Statis; } else { const baseUrl = `${window.location.protocol}//${window.location.hostname}:80${basePath}/ClientData/WebServiceMap.asmx`; @@ -36,7 +43,7 @@ export const fetchGisStationsMeasurementsService = async () => { throw new Error("Antwort ist kein gültiges JSON"); } - if (!jsonResponse?.Statis) { + if (!Array.isArray(jsonResponse.Statis)) { throw new Error("Antwortstruktur ungültig – 'Statis' fehlt"); } diff --git a/services/webservice/fetchGisStationsStaticDistrictService.js b/services/webservice/fetchGisStationsStaticDistrictService.js index bbda94dbc..31b9d4bbb 100644 --- a/services/webservice/fetchGisStationsStaticDistrictService.js +++ b/services/webservice/fetchGisStationsStaticDistrictService.js @@ -1,5 +1,3 @@ -// /services/webservice/fetchGisStationsStaticDistrictService.js - /** * Holt statische GIS-Stationen-Daten für Bezirke. * Wechselt automatisch zwischen echten Daten und Mock-Daten via .env.local @@ -9,13 +7,22 @@ */ export const fetchGisStationsStaticDistrictService = async () => { const useMocks = process.env.NEXT_PUBLIC_USE_MOCKS === "true"; - const mode = process.env.NEXT_PUBLIC_API_PORT_MODE; const basePath = process.env.NEXT_PUBLIC_BASE_PATH || ""; if (useMocks) { console.log("🧪 Mock-Modus aktiviert: fetchGisStationsStaticDistrictService"); - const { mockGisStationsStaticDistrict } = await import("../../__mocks__/webservice/gisStationsStaticDistrict.js"); - return mockGisStationsStaticDistrict.Points; + + const res = await fetch("/mocks/webservice/gisStationsStaticDistrict.json"); + if (!res.ok) { + throw new Error("Mockdaten konnten nicht geladen werden"); + } + + const mockData = await res.json(); + if (!Array.isArray(mockData.Points)) { + throw new Error("Mockdaten enthalten kein gültiges 'Points'-Feld"); + } + + return mockData.Points; } else { const baseUrl = `${window.location.protocol}//${window.location.hostname}:80${basePath}/ClientData/WebServiceMap.asmx`; @@ -34,7 +41,7 @@ export const fetchGisStationsStaticDistrictService = async () => { } const jsonResponse = await response.json(); - if (!jsonResponse?.Points) { + if (!Array.isArray(jsonResponse.Points)) { throw new Error("Antwortstruktur ungültig – 'Points' fehlt"); } diff --git a/services/webservice/fetchGisStationsStatusDistrictService.js b/services/webservice/fetchGisStationsStatusDistrictService.js index be751a7ac..77cf38416 100644 --- a/services/webservice/fetchGisStationsStatusDistrictService.js +++ b/services/webservice/fetchGisStationsStatusDistrictService.js @@ -1,5 +1,3 @@ -// /services/webservice/fetchGisStationsStatusDistrictService.js - /** * Holt Statusinformationen der GIS-Bezirksstationen. * Unterstützt dynamische Umschaltung zwischen echten und Mock-Daten. @@ -9,13 +7,22 @@ */ export const fetchGisStationsStatusDistrictService = async () => { const useMocks = process.env.NEXT_PUBLIC_USE_MOCKS === "true"; - const mode = process.env.NEXT_PUBLIC_API_PORT_MODE; const basePath = process.env.NEXT_PUBLIC_BASE_PATH || ""; if (useMocks) { console.log("🧪 Mock-Modus aktiviert: fetchGisStationsStatusDistrictService"); - const { mockGisStationsStatusDistrict } = await import("../../__mocks__/webservice/gisStationsStatusDistrict.js"); - return mockGisStationsStatusDistrict.Statis; + + const response = await fetch("/mocks/webservice/gisStationsStatusDistrict.json"); + if (!response.ok) { + throw new Error("Mockdaten konnten nicht geladen werden"); + } + + const mockData = await response.json(); + if (!Array.isArray(mockData.Statis)) { + throw new Error("Ungültige Struktur: 'Statis' fehlt im Mock"); + } + + return mockData.Statis; } else { const baseUrl = `${window.location.protocol}//${window.location.hostname}:80${basePath}/ClientData/WebServiceMap.asmx`; @@ -27,7 +34,6 @@ export const fetchGisStationsStatusDistrictService = async () => { console.log("📡 fetchGisStationsStatusDistrictService URL:", url); const response = await fetch(url); - if (!response.ok) { const message = `❌ Fehler: ${response.status} ${response.statusText}`; console.error(message); @@ -36,7 +42,7 @@ export const fetchGisStationsStatusDistrictService = async () => { const jsonResponse = await response.json(); - if (!jsonResponse?.Statis) { + if (!Array.isArray(jsonResponse.Statis)) { throw new Error("Antwortstruktur ungültig – 'Statis' fehlt"); } diff --git a/services/webservice/fetchGisSystemStaticService.js b/services/webservice/fetchGisSystemStaticService.js index 27e3fd836..1f0597e6e 100644 --- a/services/webservice/fetchGisSystemStaticService.js +++ b/services/webservice/fetchGisSystemStaticService.js @@ -1,5 +1,3 @@ -// /services/webservice/fetchGisSystemStaticService.js - /** * Holt GIS-Systemdaten (Systemübersicht) vom TALAS WebService oder aus Mocks. * @@ -8,13 +6,22 @@ */ export const fetchGisSystemStaticService = async () => { const useMocks = process.env.NEXT_PUBLIC_USE_MOCKS === "true"; - const mode = process.env.NEXT_PUBLIC_API_PORT_MODE; const basePath = process.env.NEXT_PUBLIC_BASE_PATH || ""; if (useMocks) { console.log("🧪 Mock-Modus aktiviert: fetchGisSystemStaticService"); - const { mockGisSystemStatic } = await import("../../__mocks__/webservice/gisSystemStatic.js"); - return mockGisSystemStatic.Systems; + + const response = await fetch("/mocks/webservice/gisSystemStatic.json"); + if (!response.ok) { + throw new Error("Mockdaten konnten nicht geladen werden"); + } + + const mockData = await response.json(); + if (!Array.isArray(mockData.Systems)) { + throw new Error("Ungültige Struktur: 'Systems' fehlt im Mock"); + } + + return mockData.Systems; } else { const baseUrl = `${window.location.protocol}//${window.location.hostname}:80${basePath}/ClientData/WebServiceMap.asmx`; diff --git a/services/webservice/fetchUserRightsService.js b/services/webservice/fetchUserRightsService.js index 7825078c7..57cbce35a 100644 --- a/services/webservice/fetchUserRightsService.js +++ b/services/webservice/fetchUserRightsService.js @@ -1,5 +1,3 @@ -// /services/webservice/fetchUserRightsService.js - /** * Holt Benutzerrechte aus TALAS-Webservice oder aus Mocks. * @@ -8,13 +6,18 @@ */ export const fetchUserRightsService = async () => { const useMocks = process.env.NEXT_PUBLIC_USE_MOCKS === "true"; - const mode = process.env.NEXT_PUBLIC_API_PORT_MODE; const basePath = process.env.NEXT_PUBLIC_BASE_PATH || ""; if (useMocks) { console.log("🧪 Mock-Modus aktiviert: fetchUserRightsService"); - const { mockUserRights } = await import("../../__mocks__/webservice/userRights.js"); - return mockUserRights.Rights || []; + + const response = await fetch("/mocks/webservice/userRights.json"); + if (!response.ok) { + throw new Error("Mockdaten konnten nicht geladen werden"); + } + + const mockData = await response.json(); + return mockData.Rights || []; } else { const baseUrl = `${window.location.protocol}//${window.location.hostname}:80${basePath}/ClientData/WebServiceMap.asmx`;