add: implement Prioritätskonfiguration fetchPriorityConfig function
This commit is contained in:
@@ -49,6 +49,22 @@ const plusRoundIcon = L.icon({
|
||||
});
|
||||
|
||||
const MapComponent = ({ locations, onLocationUpdate, lineCoordinates }) => {
|
||||
const [priorityConfig, setPriorityConfig] = useState([]);
|
||||
|
||||
const fetchPriorityConfig = async () => {
|
||||
try {
|
||||
const response = await fetch("/api/talas_v5_DB/priorityConfig");
|
||||
const data = await response.json();
|
||||
console.log("Prioritätskonfiguration:", data);
|
||||
setPriorityConfig(data);
|
||||
} catch (error) {
|
||||
console.error("Fehler beim Laden der Prioritätskonfiguration:", error);
|
||||
}
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
fetchPriorityConfig();
|
||||
}, []);
|
||||
/*
|
||||
path.includes("critical") || // Priorität 1
|
||||
path.includes("major") || // Priorität 2
|
||||
@@ -465,10 +481,12 @@ const MapComponent = ({ locations, onLocationUpdate, lineCoordinates }) => {
|
||||
|
||||
// Wenn der Pfad das Wort "critical" oder "major" enthält, dann den Marker bouncing options setzen
|
||||
if (
|
||||
path.includes("critical") || // Priorität 1
|
||||
path.includes("major") || // Priorität 2
|
||||
path.includes("minor") || // Priorität 3
|
||||
path.includes("system") // Priorität 4
|
||||
//Stationsausfall
|
||||
path.includes("Stationsausfall") || // Priorität 1, Level 0
|
||||
path.includes("critical") || // Priorität 2, Level 1
|
||||
path.includes("major") || // Priorität 3, Level 2
|
||||
path.includes("minor") || // Priorität 4, Level 3
|
||||
path.includes("system") // Priorität 5, Level 4
|
||||
) {
|
||||
// Setze Bouncing-Optionen
|
||||
marker.setBouncingOptions({
|
||||
@@ -1231,7 +1249,7 @@ const MapComponent = ({ locations, onLocationUpdate, lineCoordinates }) => {
|
||||
const { latitude, longitude } = parsePoint(location.position);
|
||||
const poiTypName = poiTypMap.get(location.idPoiTyp) || "Unbekannt";
|
||||
const deviceName = await fetchDeviceNameById(location.idLD);
|
||||
console.log("deviceName:", deviceName); // Das ist in Modal POI hinzufügen
|
||||
//console.log("deviceName:", deviceName); // Das ist in Modal POI hinzufügen
|
||||
|
||||
const canDrag = userRights ? userRights.includes(56) : false;
|
||||
const matchingIcon = poiData.find(
|
||||
|
||||
30
nssm.exe Installation.txt
Normal file
30
nssm.exe Installation.txt
Normal file
@@ -0,0 +1,30 @@
|
||||
-als Administrator Eingabeaufforderung oder PowerShell öffnen
|
||||
|
||||
- navigiere zu den NodeMap Projekt Verzeichnis
|
||||
C:\Users\Administrator>cd C:\inetpub\wwwroot\talas5\nodeMap
|
||||
|
||||
-Befehl zum Erstellen eines Dienstes:
|
||||
Führen Sie den folgenden Befehl aus, um einen neuen Dienst zu erstellen:
|
||||
nssm.exe install NodeMapService
|
||||
Nachdem Sie diesen Befehl ausgeführt haben, öffnet sich ein NSSM-Dialogfenster.
|
||||
Dienstkonfiguration:
|
||||
In dem geöffneten NSSM-Dialogfenster müssen Sie einige Parameter angeben:
|
||||
|
||||
path: Der Pfad zur ausführbaren Datei, die der Dienst ausführen soll.
|
||||
C:\inetpub\wwwroot\talas5\nodeMap\StartNodeApp.bat
|
||||
Startup directory: Das Verzeichnis, in dem die Anwendung gestartet werden soll.
|
||||
C:\inetpub\wwwroot\talas5\nodeMap
|
||||
Arguments: kann leer gelassen werden.
|
||||
|
||||
- Dienst starten:
|
||||
Sobald der Dienst erstellt wurde, können Sie ihn starten.
|
||||
Das können Sie entweder über die Eingabeaufforderung oder über die Diensteverwaltung von Windows tun.
|
||||
Um den Dienst über die Eingabeaufforderung zu starten, verwenden Sie den folgenden Befehl:
|
||||
nssm.exe start DienstName
|
||||
|
||||
---------------------
|
||||
Dienst bearbeiten
|
||||
nssm.exe edit NodeMapService
|
||||
Dienst entfernen
|
||||
nssm.exe remove NodeMapService confirm
|
||||
dauert bis 1 Minute
|
||||
Reference in New Issue
Block a user