feat: Konstanten in separate Dateien aufteilen " /config/urls.js"

This commit is contained in:
ISA
2024-07-10 07:38:30 +02:00
parent 6cc3cdc483
commit b82253cae1
3 changed files with 74 additions and 27 deletions

View File

@@ -1,4 +1,34 @@
// Definieren der grundlegenden Umgebungseinstellungen und Konfigurationen der Karte
// /config/config.js
// BASE_URL für Station öffnen in neuer tab und gleicher tab, im localhost gab es keine Probleme mit der Frame
export const BASE_URL = "http://10.10.0.13/talas5/devices/";
//const baseUrl = "http://localhost:3000/talas5/devices/";
//const baseUrl = "http://192.168.10.14/talas5/devices/";
//----
//Talas_v5 Server
//export const OFFLINE_TILE_LAYER = "/mapTiles/{z}/{x}/{y}.png"; // wenn im von localhost also selben Server die Karte angezeigt wird
export const OFFLINE_TILE_LAYER = "/mapTiles/{z}/{x}/{y}.png";
//const onlineTileLayer = "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png";
export const ONLINE_TILE_LAYER =
"http://10.10.0.13:3000/mapTiles/{z}/{x}/{y}.png"; //Talas_v5 Server
// Create map layers
export const MAP_LAYERS = {
TALAS: new L.layerGroup(),
ECI: new L.layerGroup(),
ULAF: new L.layerGroup(),
GSMModem: new L.layerGroup(),
CiscoRouter: new L.layerGroup(),
WAGO: new L.layerGroup(),
Siemens: new L.layerGroup(),
OTDR: new L.layerGroup(),
WDM: new L.layerGroup(),
GMA: new L.layerGroup(),
Sonstige: new L.layerGroup(),
TALASICL: new L.layerGroup(),
lineLayer: new L.LayerGroup(),
};
// Definieren der grundlegenden Umgebungseinstellungen und Konfigurationen der Karte
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

22
config/urls.js Normal file
View File

@@ -0,0 +1,22 @@
// /sonstige/urls.js
export const BASE_URL = "http://10.10.0.13/talas5/devices/";
export const OFFLINE_TILE_LAYER = "/mapTiles/{z}/{x}/{y}.png";
export const ONLINE_TILE_LAYER =
"http://10.10.0.13:3000/mapTiles/{z}/{x}/{y}.png";
//-----------------------------------
// weil ich keine API habe, ansonsten serverURL ist localhost(IP-Adresse) für GisSystemStatic für die Benutzerrechte
//const serverURL = `${protocol}//${hostname}`;
//const serverURL = `${protocol}//${hostname}${port ? `:${port}` : ""}`;
//const serverURL = "http://localhost:3000";
export const SERVER_URL = "http://10.10.0.13";
// Online Daten URLs
/* export const MAP_GIS_STATIONS_STATIC_DISTRICT_URL = `${SERVER_URL}/talas5/ClientData/WebserviceMap.asmx/GisStationsStaticDistrict?idMap=${c}&idUser=${user}`; //idMap: 10, idUser: 484
export const MAP_GIS_STATIONS_STATUS_DISTRICT_URL = `${SERVER_URL}/talas5/ClientData/WebserviceMap.asmx/GisStationsStatusDistrict?idMap=${c}&idUser=${user}`;
export const MAP_GIS_STATIONS_MEASUREMENTS_URL = `${SERVER_URL}/talas5/ClientData/WebserviceMap.asmx/GisStationsMeasurements?idMap=${c}`;
export const MAP_GIS_SYSTEM_STATIC_URL = `${SERVER_URL}/talas5/ClientData/WebserviceMap.asmx/GisSystemStatic?idMap=${c}&idUser=${user}`;
export const MAP_DATA_ICON_URL = `${SERVER_URL}/talas5/ClientData/WebserviceMap.asmx/GetIconsStatic`;
export const WEBSERVICE_GIS_LINES_STATUS_URL =
"http://localhost:3000/api/linesColorApi";
*/