TDR Modal Slot Nummer anzeigen
This commit is contained in:
@@ -6,20 +6,24 @@ export const goTDR = (
|
||||
return;
|
||||
}
|
||||
|
||||
const slotFormat = slotIndex < 10 ? `${slotIndex}` : `${slotIndex}`;
|
||||
//const slotFormat = slotIndex < 10 ? `${slotIndex}` : `${slotIndex}`;
|
||||
|
||||
setLoading(true);
|
||||
alert(`TDR wird für Slot ${slotIndex + 1} gestartet...`);
|
||||
//alert(`TDR wird für Slot ${slotIndex + 1} gestartet...`);
|
||||
|
||||
fetch(
|
||||
`/CPL?Service/Kabelueberwachung.html&KTT${slotFormat}=1&slot=${slotIndex}`,
|
||||
//`${window.location.origin}/CPL?Service/Kabelueberwachung.html&KTT${slotFormat}=1&slot=${slotIndex}`,
|
||||
`${window.location.origin}/CPL?Service/Kabelueberwachung.html&KTT${slotIndex}=1`,
|
||||
{
|
||||
method: "GET",
|
||||
}
|
||||
)
|
||||
.then((response) => {
|
||||
if (response.ok) {
|
||||
alert(`TDR erfolgreich gestartet für Slot ${slotIndex + 1}`);
|
||||
alert(`TDR erfolgreich gestartet für Slot index ${slotIndex + 1}`);
|
||||
/* alert(
|
||||
`TDR erfolgreich gestartet für Slot format ${Number(slotFormat) + 1}`
|
||||
); */
|
||||
console.log("TDR erfolgreich gestartet für Slot", slotIndex + 1);
|
||||
} else {
|
||||
console.error("Fehler beim Senden der TDR-Anfrage");
|
||||
|
||||
Reference in New Issue
Block a user