mockApi erstellt, um die Eingabe zu simulieren, aber funktioniert nocht nicht ganz

This commit is contained in:
ISA
2025-03-05 12:37:08 +01:00
parent 3a21abd4bb
commit 82001a4beb
20 changed files with 294 additions and 763 deletions

View File

@@ -0,0 +1,25 @@
export const fetchGisStationsStatusDistrict = async (url, setGisStationsStatusDistrict, fetchOptions) => {
console.log("⚠️ Mock-API: fetchGisStationsStatusDistrict wird verwendet!");
const mockData = {
Name: "Liste aller Statis der Geraete",
Zeitstempel: "2025-03-05T12:26:29.4884924+01: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 01: Aderbruch 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 },
],
};
setGisStationsStatusDistrict(mockData.Statis); // Direkt das Array übergeben
};