TDR Modal Slot Nummer anzeigen
This commit is contained in:
@@ -58,6 +58,13 @@ const TDRChartActionBar: React.FC = () => {
|
|||||||
//--------------------------------
|
//--------------------------------
|
||||||
return (
|
return (
|
||||||
<div className="flex justify-between items-center p-2 bg-gray-100 rounded-lg space-x-4">
|
<div className="flex justify-between items-center p-2 bg-gray-100 rounded-lg space-x-4">
|
||||||
|
{/* Ausgewählte Slot Nummer anzeigen */}
|
||||||
|
<div className="text-sm font-semibold">
|
||||||
|
{selectedSlot !== null
|
||||||
|
? `Slot ${selectedSlot + 1}`
|
||||||
|
: "Kein Slot gewählt"}
|
||||||
|
</div>
|
||||||
|
|
||||||
{/* 🔵 Linke Seite: Reset-Button */}
|
{/* 🔵 Linke Seite: Reset-Button */}
|
||||||
<button
|
<button
|
||||||
className="border border-gray-300 bg-white rounded px-3 py-1 text-sm hover:bg-gray-200"
|
className="border border-gray-300 bg-white rounded px-3 py-1 text-sm hover:bg-gray-200"
|
||||||
|
|||||||
@@ -148,13 +148,19 @@ const Kue705FO: React.FC<Kue705FOProps> = ({
|
|||||||
modulName
|
modulName
|
||||||
);
|
);
|
||||||
|
|
||||||
const { loopDisplayValue, setLoopDisplayValue } = useLoopDisplay(
|
const loopValue =
|
||||||
typeof schleifenwiderstand === "number"
|
activeButton === "TDR"
|
||||||
|
? Array.isArray(tdrLocation) && typeof tdrLocation[slotIndex] === "number"
|
||||||
|
? tdrLocation[slotIndex]
|
||||||
|
: 0
|
||||||
|
: typeof schleifenwiderstand === "number"
|
||||||
? schleifenwiderstand
|
? schleifenwiderstand
|
||||||
: Number(schleifenwiderstand),
|
: Number(schleifenwiderstand);
|
||||||
|
|
||||||
|
const { loopDisplayValue, setLoopDisplayValue } = useLoopDisplay(
|
||||||
|
loopValue,
|
||||||
activeButton
|
activeButton
|
||||||
);
|
);
|
||||||
|
|
||||||
const zoomPlugin = useChartPlugin();
|
const zoomPlugin = useChartPlugin();
|
||||||
useChartData(loopMeasurementCurveChartData);
|
useChartData(loopMeasurementCurveChartData);
|
||||||
const { chartInstance } = useTDRChart(selectedChartData);
|
const { chartInstance } = useTDRChart(selectedChartData);
|
||||||
|
|||||||
@@ -6,5 +6,5 @@
|
|||||||
2: Patch oder Hotfix (Bugfixes oder kleine Änderungen).
|
2: Patch oder Hotfix (Bugfixes oder kleine Änderungen).
|
||||||
|
|
||||||
*/
|
*/
|
||||||
const webVersion = "1.6.159";
|
const webVersion = "1.6.160";
|
||||||
export default webVersion;
|
export default webVersion;
|
||||||
|
|||||||
@@ -6,20 +6,24 @@ export const goTDR = (
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const slotFormat = slotIndex < 10 ? `${slotIndex}` : `${slotIndex}`;
|
//const slotFormat = slotIndex < 10 ? `${slotIndex}` : `${slotIndex}`;
|
||||||
|
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
alert(`TDR wird für Slot ${slotIndex + 1} gestartet...`);
|
//alert(`TDR wird für Slot ${slotIndex + 1} gestartet...`);
|
||||||
|
|
||||||
fetch(
|
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",
|
method: "GET",
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
if (response.ok) {
|
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);
|
console.log("TDR erfolgreich gestartet für Slot", slotIndex + 1);
|
||||||
} else {
|
} else {
|
||||||
console.error("Fehler beim Senden der TDR-Anfrage");
|
console.error("Fehler beim Senden der TDR-Anfrage");
|
||||||
|
|||||||
Reference in New Issue
Block a user