fix: window.location.pathname statt gestes Wert

This commit is contained in:
ISA
2025-08-18 10:21:52 +02:00
parent 984c776b2a
commit e6aafd6b0c
7 changed files with 17 additions and 8 deletions

View File

@@ -12,7 +12,7 @@ const handleClearDatabase = async () => {
}
// Full URL with host, current path, and clear database command
const url = `${window.location.origin}/CPL?${currentPath}&DEDB=1`;
const url = `${window.location.origin}/CPL?/${window.location.pathname}&DEDB=1`;
// Log the full URL to the console for debugging
console.log(url);

View File

@@ -53,7 +53,7 @@ const TDRChartActionBar: React.FC = () => {
}),
});
} else {
const url = `/CPL?KTR${slotNumber}=${selectedId}`;
const url = `/CPL?/${window.location.pathname}&KTR${slotNumber}=${selectedId}`;
await fetch(url, { method: "GET" });
}
if (!isDev) {
@@ -89,7 +89,7 @@ const TDRChartActionBar: React.FC = () => {
return;
}
const cgiUrl = `${window.location.origin}/CPL?kabelueberwachung.html&KTT${selectedSlot}=1`;
const cgiUrl = `${window.location.origin}/CPL?/${window.location.pathname}&KTT${selectedSlot}=1`;
try {
console.log("🚀 Starte TDR Messung für Slot:", selectedSlot);