Merge branch 'temp-branch2' into feature/main-contextmenu-line
This commit is contained in:
@@ -25,7 +25,7 @@ const useLineData = (webserviceGisLinesStatusUrl, setLineStatusData) => {
|
||||
|
||||
// Sortiere die Meldungen nach Level, damit die höchste Priorität (kleinster Level) zuerst kommt
|
||||
const sortedStatis = [...data1.Statis].sort((a, b) => a.Level - b.Level);
|
||||
//console.log("Sortierte Daten:", sortedStatis);
|
||||
console.log("Sortierte Daten:", sortedStatis);
|
||||
|
||||
// Filtere Objekte mit gleichem IdLD und Modul, und Level > 0, und entferne die Objekte mit dem höchsten Level
|
||||
const filteredStatis = [];
|
||||
@@ -45,7 +45,7 @@ const useLineData = (webserviceGisLinesStatusUrl, setLineStatusData) => {
|
||||
}
|
||||
});
|
||||
|
||||
//console.log("Gefilterte Daten (Objekte mit höchstem Level entfernt):", filteredStatis);
|
||||
console.log("Gefilterte Daten (Objekte mit höchstem Level entfernt):", filteredStatis);
|
||||
|
||||
filteredStatis.forEach((statis) => {
|
||||
const key = `${statis.IdLD}-${statis.Modul}`;
|
||||
@@ -147,10 +147,10 @@ const useLineData = (webserviceGisLinesStatusUrl, setLineStatusData) => {
|
||||
fetchData();
|
||||
|
||||
// Setze ein Intervall, um die Daten alle 20 Sekunden erneut abzurufen
|
||||
const intervalId = setInterval(fetchData, 20000);
|
||||
//const intervalId = setInterval(fetchData, 20000);
|
||||
|
||||
// Räumt das Intervall auf, wenn die Komponente entladen wird
|
||||
return () => clearInterval(intervalId);
|
||||
//return () => clearInterval(intervalId);
|
||||
}, [webserviceGisLinesStatusUrl, setLineStatusData]);
|
||||
|
||||
return { lineColors, tooltipContents };
|
||||
|
||||
Reference in New Issue
Block a user