feat(mock): zentrale Mock-API-Struktur eingeführt mit .env-Steuerung

- Mock-API-Endpunkte unter pages/api/mocks/webservice erstellt (JSON-basiert)
- Zentrale Variable NEXT_PUBLIC_USE_MOCKS zur Modussteuerung eingeführt
- fetchGis*-Services rufen je nach Modus reale oder Mockdaten ab
- Alert-Hinweis im UI für aktive Mockumgebung eingebaut
- .env.production sichert produktives Verhalten (Mocks deaktiviert)
- mockData-Verzeichnis via .gitignore vom Repo ausgeschlossen
- appVersion.js auf 1.1.231 erhöht
This commit is contained in:
ISA
2025-06-04 11:18:44 +02:00
parent 569790d35f
commit d80b36cb2d
24 changed files with 202 additions and 2165 deletions

26
.env.production Normal file
View File

@@ -0,0 +1,26 @@
#.env.local
# DB-Settings (nur Backend)
DB_HOST=localhost
DB_USER=root
DB_PASSWORD="root#$"
DB_NAME=talas_v5
DB_PORT=3306
# Public Settings (Client braucht IP/Domain) , Variablen mit dem Präfix "NEXT_PUBLIC" ist in Browser sichtbar
NEXT_PUBLIC_DEBUG_LOG=false
#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
# 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/).
# Ein Unterordner in der dort hinter liegenden Ordnerstruktur (z.B. http://talasserver/talas5/nodemap/api/talas_v5_DB/ usw.)
# kann bleiben da der Kunde diesen Unterordner talas:v5_db nicht ändert.
#Füge in deiner .env.local Datei die folgende Zeile hinzu wenn du einen Unterordner verwenden möchtest mit entsprechende Bezeichnung.
# z.B. http://10.10.0.13/talas5/index.aspx -> NEXT_PUBLIC_BASE_PATH=/talas5
# z.B. http://10.10.0.13/xyz/index.aspx -> NEXT_PUBLIC_BASE_PATH=/xyz
NEXT_PUBLIC_BASE_PATH=/talas5
# Oder leer lassen für direkten Zugriff -> NEXT_PUBLIC_BASE_PATH=

2
.gitignore vendored
View File

@@ -31,3 +31,5 @@ Lastenheft.js
# Ignore docs.zip
docs.zip
# Entwicklungsdaten
/mockData/

View File

@@ -4,6 +4,39 @@ Alle bedeutenden Änderungen an diesem Projekt werden in dieser Datei dokumentie
---
## [1.1.231] 2025-06-04
### ✨ Added
- Neue API-Endpunkte unter `pages/api/mocks/webservice/` erstellt zum Abruf statischer Mockdaten
(`GisSystemStatic.json`, `GisLinesStatus.json`, `GisStationsStaticDistrict.json`, ...).
- Zentrale Umgebungsvariable `NEXT_PUBLIC_USE_MOCKS` eingeführt zur Steuerung des Mockbetriebs.
### 🧠 Architektur
- Alle `fetchGis*.js` Service-Dateien prüfen nun `process.env.NEXT_PUBLIC_USE_MOCKS`, um je nach
Modus echte Webservices oder Mock-API-Endpunkte aufzurufen.
- `.env.production` setzt `NEXT_PUBLIC_USE_MOCKS=false` für sichere Produktionsumgebung.
- `.env.local` erlaubt flexiblen Mock-Modus für lokale Entwicklung.
- Alert-Hinweis (nur zu Testzwecken) im Mock-Mode eingebaut zur Visualisierung des aktuellen Modus.
### 🛡️ Sicherheit
- Mockdaten-Verzeichnis `/mockData/*.json` vollständig über `.gitignore` vom Repository
ausgeschlossen.
- `.env.local` bleibt lokal Produktionsbuild verwendet automatisch `.env.production`.
### 🛠 Clean
- Alle alten Zugriffe auf `/public/*.json` ersetzt durch `pages/api/mocks/webservice/*.js`.
- Entwicklungsversionen nutzen nun `http://localhost:3000/api/mocks/webservice/...` statt `/public`.
### 🔧 Version
- 📦 `appVersion.js` auf Version **1.1.231** erhöht
---
## [1.1.230] 2025-06-04
### 🐞 Fixed

View File

@@ -761,6 +761,12 @@ const MapComponent = ({ locations, onLocationUpdate, lineCoordinates }) => {
}
}, [oms]);
//----------------------------------------------
useEffect(() => {
if (process.env.NODE_ENV === "development") {
alert("🚧 Development Mode aktiviert Mock-Daten werden verwendet!");
}
}, []);
//---------------------------------------------
//--------------------------------------------
return (

View File

@@ -1,2 +1,2 @@
// /config/appVersion
export const APP_VERSION = "1.1.231";
export const APP_VERSION = "1.1.232";

View File

@@ -0,0 +1,26 @@
import fs from "fs";
import path from "path";
// ⛔ Schutz: API nur im Development-Modus aktiv
const filePath = path.join(process.cwd(), "mockData", "CablesStatic.json");
function devHandler(req, res) {
if (req.method === "GET") {
try {
const data = fs.readFileSync(filePath, "utf-8");
res.status(200).json(JSON.parse(data));
} catch (error) {
res.status(500).json({ error: "Fehler beim Lesen der CablesStatic.json" });
}
} else {
res.status(405).json({ error: "Methode nicht erlaubt" });
}
}
function prodHandler(_, res) {
return res.status(404).json({ error: "Mock-API ist nur im Entwicklungsmodus verfügbar." });
}
const handler = process.env.NODE_ENV !== "development" ? prodHandler : devHandler;
export default handler;

View File

@@ -0,0 +1,17 @@
import fs from "fs";
import path from "path";
const filePath = path.join(process.cwd(), "mockData", "GetIconsStatic.json");
export default function handler(req, res) {
if (req.method === "GET") {
try {
const data = fs.readFileSync(filePath, "utf-8");
res.status(200).json(JSON.parse(data));
} catch (error) {
res.status(500).json({ error: "Fehler beim Lesen der GetIconsStatic.json" });
}
} else {
res.status(405).json({ error: "Methode nicht erlaubt" });
}
}

View File

@@ -0,0 +1,17 @@
import fs from "fs";
import path from "path";
const filePath = path.join(process.cwd(), "mockData", "GisLinesStatus.json");
export default function handler(req, res) {
if (req.method === "GET") {
try {
const data = fs.readFileSync(filePath, "utf-8");
res.status(200).json(JSON.parse(data));
} catch (error) {
res.status(500).json({ error: "Fehler beim Lesen der GisLinesStatus.json" });
}
} else {
res.status(405).json({ error: "Methode nicht erlaubt" });
}
}

View File

@@ -0,0 +1,17 @@
import fs from "fs";
import path from "path";
const filePath = path.join(process.cwd(), "mockData", "GisStationsMeasurements.json");
export default function handler(req, res) {
if (req.method === "GET") {
try {
const data = fs.readFileSync(filePath, "utf-8");
res.status(200).json(JSON.parse(data));
} catch (error) {
res.status(500).json({ error: "Fehler beim Lesen der GisStationsMeasurements.json" });
}
} else {
res.status(405).json({ error: "Methode nicht erlaubt" });
}
}

View File

@@ -0,0 +1,17 @@
import fs from "fs";
import path from "path";
const filePath = path.join(process.cwd(), "mockData", "GisStationsStaticDistrict.json");
export default function handler(req, res) {
if (req.method === "GET") {
try {
const data = fs.readFileSync(filePath, "utf-8");
res.status(200).json(JSON.parse(data));
} catch (error) {
res.status(500).json({ error: "Fehler beim Lesen der GisStationsStaticDistrict.json" });
}
} else {
res.status(405).json({ error: "Methode nicht erlaubt" });
}
}

View File

@@ -0,0 +1,17 @@
import fs from "fs";
import path from "path";
const filePath = path.join(process.cwd(), "mockData", "GisStationsStatusDistrict.json");
export default function handler(req, res) {
if (req.method === "GET") {
try {
const data = fs.readFileSync(filePath, "utf-8");
res.status(200).json(JSON.parse(data));
} catch (error) {
res.status(500).json({ error: "Fehler beim Lesen der GisStationsStatusDistrict.json" });
}
} else {
res.status(405).json({ error: "Methode nicht erlaubt" });
}
}

View File

@@ -0,0 +1,17 @@
import fs from "fs";
import path from "path";
const filePath = path.join(process.cwd(), "mockData", "GisSystemStatic.json");
export default function handler(req, res) {
if (req.method === "GET") {
try {
const data = fs.readFileSync(filePath, "utf-8");
res.status(200).json(JSON.parse(data));
} catch (error) {
res.status(500).json({ error: "Fehler beim Lesen der GisSystemStatic.json" });
}
} else {
res.status(405).json({ error: "Methode nicht erlaubt" });
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,117 +0,0 @@
{
"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"
}
]
}

View File

@@ -1,160 +0,0 @@
{
"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
}
]
}

View File

@@ -1,106 +0,0 @@
{
"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
}
]
}

View File

@@ -1,170 +0,0 @@
{
"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 }
]
}

View File

@@ -1,170 +0,0 @@
{
"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 }
]
}

View File

@@ -5,7 +5,7 @@ export const fetchGisLinesStatusService = async () => {
if (useMocks) {
console.log("🧪 Mock-Modus aktiviert: fetchGisLinesStatusService");
const response = await fetch("/mocks/webservice/gisLinesStatus.json");
const response = await fetch("/api/mocks/webservice/gisLinesStatus");
if (!response.ok) {
throw new Error("Mockdaten konnten nicht geladen werden");
}

View File

@@ -5,7 +5,7 @@ export const fetchGisStationsMeasurementsService = async () => {
if (useMocks) {
console.log("🧪 Mock-Modus aktiviert: fetchGisStationsMeasurementsService");
const response = await fetch("/mocks/webservice/gisStationsMeasurements.json");
const response = await fetch("/api/mocks/webservice/gisStationsMeasurements");
if (!response.ok) {
throw new Error("Mockdaten konnten nicht geladen werden");
}

View File

@@ -12,7 +12,7 @@ export const fetchGisStationsStaticDistrictService = async () => {
if (useMocks) {
console.log("🧪 Mock-Modus aktiviert: fetchGisStationsStaticDistrictService");
const res = await fetch("/mocks/webservice/gisStationsStaticDistrict.json");
const res = await fetch("/api/mocks/webservice/gisStationsStaticDistrict");
if (!res.ok) {
throw new Error("Mockdaten konnten nicht geladen werden");
}

View File

@@ -12,7 +12,7 @@ export const fetchGisStationsStatusDistrictService = async () => {
if (useMocks) {
console.log("🧪 Mock-Modus aktiviert: fetchGisStationsStatusDistrictService");
const response = await fetch("/mocks/webservice/gisStationsStatusDistrict.json");
const response = await fetch("/api/mocks/webservice/gisStationsStatusDistrict");
if (!response.ok) {
throw new Error("Mockdaten konnten nicht geladen werden");
}

View File

@@ -11,7 +11,7 @@ export const fetchGisSystemStaticService = async () => {
if (useMocks) {
console.log("🧪 Mock-Modus aktiviert: fetchGisSystemStaticService");
const response = await fetch("/mocks/webservice/gisSystemStatic.json");
const response = await fetch("/api/mocks/webservice/gisSystemStatic");
if (!response.ok) {
throw new Error("Mockdaten konnten nicht geladen werden");
}

View File

@@ -11,7 +11,7 @@ export const fetchUserRightsService = async () => {
if (useMocks) {
console.log("🧪 Mock-Modus aktiviert: fetchUserRightsService");
const response = await fetch("/mocks/webservice/userRights.json");
const response = await fetch("/api/mocks/webservice/gisSystemStatic"); //gisSystemStatic enthält die Systeme (Systems) und die User Rechte (Rights)
if (!response.ok) {
throw new Error("Mockdaten konnten nicht geladen werden");
}