Vorbereitung für den Umzug auf den TALAS-Server

This commit is contained in:
ISA
2024-04-29 11:46:22 +02:00
parent 4e4755dad4
commit a07d5f940e
6 changed files with 10 additions and 1169 deletions

View File

@@ -22,8 +22,8 @@ function DataSheet() {
const selectedIndex = event.target.options.selectedIndex;
const areaName = event.target.options[selectedIndex].text;
setSelectedArea(areaName);
console.log("Area selected oder areaName in DataSheet.js:", areaName); // Nur zur Bestätigung in der Konsole
console.log("event.target:", event.target);
//console.log("Area selected oder areaName in DataSheet.js:", areaName); // Nur zur Bestätigung in der Konsole
//console.log("event.target:", event.target);
};
useEffect(() => {
@@ -33,7 +33,7 @@ function DataSheet() {
(system) => system.IdSystem
)
);
console.log("allowedSystems:", allowedSystems);
//console.log("allowedSystems:", allowedSystems);
// Filter unique areas that belong to allowed systems
const seenNames = new Set();
@@ -64,7 +64,7 @@ function DataSheet() {
const isUnique = !seenSystemNames.has(formattedName) && item.Allow === 1;
if (isUnique) {
seenSystemNames.add(formattedName); // Füge den formatierten Namen hinzu
console.log("Unique system in DataSheet:", formattedName); // Zeige den formatierten Namen in der Konsole
//console.log("Unique system in DataSheet:", formattedName); // Zeige den formatierten Namen in der Konsole
}
return isUnique;
});
@@ -79,14 +79,14 @@ function DataSheet() {
//---------------------------------------------------------
const handleCheckboxChange = (name, event) => {
const { checked } = event.target;
console.log(`Checkbox ${name} checked state:`, checked); // Log the checked state of the checkbox
//console.log(`Checkbox ${name} checked state:`, checked); // Log the checked state of the checkbox
setMapLayersVisibility((prev) => {
const newState = {
...prev,
[name]: checked,
};
console.log(`New mapLayersVisibility state:`, newState); // Log the new state after update
//console.log(`New mapLayersVisibility state:`, newState); // Log the new state after update
return newState;
});
};

File diff suppressed because it is too large Load Diff

View File

@@ -337,7 +337,7 @@ const MapComponent = ({ locations, onLocationUpdate }) => {
const zoomIn = (e) => {
initMap.flyTo(e.latlng, 12);
console.log("ZoomIn koordinaten in MapComponent", e.latlng);
//console.log("ZoomIn koordinaten in MapComponent", e.latlng);
};
const zoomOut = (e) => {
@@ -1297,7 +1297,7 @@ const MapComponent = ({ locations, onLocationUpdate }) => {
// Nutzt die Map, um den internen Namen zu bekommen
const internalName = layerNames["Cisco Router"] || "CiscoRouter";
toggleLayer(mapLayersVisibility[internalName]);
console.log("internalName Cisco Router: ", internalName);
//console.log("internalName Cisco Router: ", internalName);
}, [map, ciscoRouterMarkers, mapLayersVisibility]);
//------------------------------------------ */
@@ -1409,7 +1409,7 @@ const MapComponent = ({ locations, onLocationUpdate }) => {
useEffect(() => {
if (!map || !talasiclMarkers) return;
console.log("talasiclMarkers", talasiclMarkers);
//console.log("talasiclMarkers", talasiclMarkers);
const toggleLayer = (isVisible) => {
if (isVisible) {
talasiclMarkers.forEach((marker) => marker.addTo(map)); // Ensure markers are added
@@ -1422,7 +1422,7 @@ const MapComponent = ({ locations, onLocationUpdate }) => {
const internalName =
layerNames["TALAS ICL"] || "TALASICL || talasiclMarkers ";
toggleLayer(mapLayersVisibility[internalName]);
console.log("internalName for TALAS ICL in MapComponent: ", internalName);
//console.log("internalName for TALAS ICL in MapComponent: ", internalName);
}, [map, talasiclMarkers, mapLayersVisibility]);
//------------------------------------------ */

View File

@@ -2,7 +2,6 @@
const mapVersion = "0.5.3"; // Die Version der verwendeten Karte
const standardSideMenu = true; // Einstellung, ob ein standardmäßiges Seitenmenü verwendet wird
const fullSideMenu = false; // Einstellung, ob ein vollständiges Seitenmenü verwendet wird
const offlineData = false; // Schalter, um anzugeben, ob Daten offline verfügbar gemacht werden sollen
const serverURL = "/api"; // Die Basis-URL des Servers, von dem Daten bezogen werden
// Initialisieren von Variablen, die später im Browserkontext gesetzt werden
@@ -14,13 +13,6 @@ let mapGisStationsStaticDistrictUrl,
mapGisSystemStaticUrl,
mapDataIconUrl;
//Offline Daten
/* let mapStaticOfflineURL,
mapStatusOfflineURL,
mapSystemOfflineURL,
mapIconsOfflineURL,
mapMeasuresOfflineURL; */
// Prüfen, ob das Code im Browser ausgeführt wird
if (typeof window !== "undefined") {
// Diese Variablen werden nur im Browser-Kontext initialisiert
@@ -36,14 +28,6 @@ if (typeof window !== "undefined") {
mapGisStationsMeasurementsUrl = `${serverURL}/talas5/ClientData/WebserviceMap.asmx/GisStationsMeasurements?idMap=${c}`;
mapGisSystemStaticUrl = `${serverURL}/talas5/ClientData/WebserviceMap.asmx/GisSystemStatic?idMap=${c}&idUser=${user}`;
mapDataIconUrl = `${serverURL}/talas5/ClientData/WebserviceMap.asmx/GetIconsStatic`;
/* mapGisStationsStaticDistrictUrl = `${serverURL}/talas5/ClientData/WebserviceMap.asmx/GisStationsStaticDistrict`;
mapGisStationsStatusDistrictUrl = `${serverURL}/talas5/ClientData/WebserviceMap.asmx/GisStationsStatusDistrict`;
mapGisStationsMeasurementsUrl = `${serverURL}/talas5/ClientData/WebserviceMap.asmx/GisStationsMeasurements`;
mapGisSystemStaticUrl = `${serverURL}/talas5/ClientData/WebserviceMap.asmx/GisSystemStatic`;
mapDataIconUrl = `${serverURL}/talas5/ClientData/WebserviceMap.asmx/GetIconsStatic`; */
// URLs zu Offline-Daten, falls benötigt
}
// Export der definierten Variablen und URLs, damit sie in anderen Teilen der Anwendung verwendet werden können
@@ -51,7 +35,6 @@ export {
mapVersion,
standardSideMenu,
fullSideMenu,
offlineData,
serverURL,
windowHeight,
url_string,

View File

@@ -3,7 +3,6 @@ import { createProxyMiddleware } from "http-proxy-middleware";
export default createProxyMiddleware({
target: "http://10.10.0.13", // Ziel-URL des Proxys
//target: "http://192.168.10.187:3000", // Ziel-URL des Proxys
changeOrigin: true,
pathRewrite: {
"^/api": "/", // Optional: Entfernt /api aus dem Pfad, wenn das Backend dies nicht erfordert

View File

@@ -1,7 +0,0 @@
// store/zoomOutState.js
import { atom } from "recoil";
export const zoomOutState = atom({
key: "zoomOutState", // eindeutiger Key
default: 7, // Start-Zoomlevel
});