refactor: basePath als Umgebungsvariable eingeführt (NEXT_PUBLIC_BASE_PATH)
- alle festen "/talas5/" Pfade entfernt - dynamischer basePath für API-Links und Station öffnen - README.md und CHANGELOG.md aktualisiert - Version erhöht auf 1.1.188
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
import { useEffect } from "react";
|
||||
// [x]: 1- Bei GMA Datenfeld Rechtsklick „Station öffnen“ funktioniert nicht.
|
||||
//FIXME: Link zu /talas5/devices/ wird nicht korrekt erstellt.
|
||||
// [x]: test Chaeckbox für TODO-Tree (TODOs)
|
||||
//FIXME: test FIXME für TODO-Tree (TODOs)
|
||||
|
||||
// BUG: GMA Tooltip openInNewTab falsche brauche Refactoring zu richtige link mit .../talas5/devices/...
|
||||
// BUG: test BUG für TODO-Tree (TODOs)
|
||||
|
||||
const useGmaMarkersLayer = (map, markers, GisStationsMeasurements, GMA, oms, isVisible) => {
|
||||
const mode = process.env.NEXT_PUBLIC_API_PORT_MODE;
|
||||
const basePath = process.env.NEXT_PUBLIC_BASE_PATH || "";
|
||||
let currentMenu = null; // Variable für das aktuelle Kontextmenü
|
||||
|
||||
const closeContextMenu = () => {
|
||||
@@ -94,8 +96,8 @@ const useGmaMarkersLayer = (map, markers, GisStationsMeasurements, GMA, oms, isV
|
||||
//hostname without port
|
||||
const hostname = window.location.hostname;
|
||||
const port = 80;
|
||||
const correctUrl = `http://${hostname}:${port}/talas5/devices/${marker.options.link}`;
|
||||
const fullUrl = correctUrl || "http://example.com";
|
||||
const correctUrl = `http://${hostname}:${port}${basePath}/devices/${marker.options.link}`;
|
||||
const fullUrl = correctUrl;
|
||||
console.log(fullUrl);
|
||||
window.open(fullUrl, "_blank");
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user