für TDR liste für json Dateien directory.json statt directory.csv

This commit is contained in:
ISA
2025-01-27 15:10:13 +01:00
parent dc96128fad
commit 98672fcbd5
17 changed files with 163 additions and 14 deletions

View File

@@ -285,13 +285,13 @@ const Kue705FO: React.FC<Kue705FOProps> = ({
console.error("Canvas mit ID 'myChart' nicht gefunden.");
return;
}
const ctx = canvas.getContext("2d");
if (!ctx) {
console.error("2D-Kontext für Canvas konnte nicht erstellt werden.");
return;
}
// Konvertiere Zeitstempel in ein lesbares Format für die X-Achse
const labels = data.map((row) => {
const date = new Date(String(row.t).replace(/-/g, "/")); // Zeitstring parsen
@@ -301,7 +301,7 @@ const Kue705FO: React.FC<Kue705FOProps> = ({
second: "2-digit",
});
});
new Chart(ctx, {
type: "line",
data: {
@@ -368,7 +368,6 @@ const Kue705FO: React.FC<Kue705FOProps> = ({
},
});
};
useEffect(() => {
const updateAlarmStatus = () => {
@@ -388,7 +387,7 @@ const Kue705FO: React.FC<Kue705FOProps> = ({
useEffect(() => {
if (reduxKueVersion?.[slotIndex]) {
setKueVersion("V" + reduxKueVersion[slotIndex] / 100);
setKueVersion("V" + Number(reduxKueVersion[slotIndex]) / 100);
}
}, [slotIndex, reduxKueVersion]);
//---------------------------------------------------
@@ -474,6 +473,11 @@ const Kue705FO: React.FC<Kue705FOProps> = ({
}
}, [schleifenwiderstand, activeButton]);
//---------------------------------------------------
const noLetter = (e: React.KeyboardEvent<HTMLInputElement>) => {
const input = e.currentTarget;
input.value = input.value.replace(/[^0-9]/g, "");
};
return (
<div
className="relative bg-gray-300 w-[7.25rem] h-[24.375rem] border border-gray-400 transform laptop:-translate-y-12 2xl:-translate-y-0
@@ -665,7 +669,120 @@ const Kue705FO: React.FC<Kue705FOProps> = ({
<i className="bi bi-x-circle-fill"></i>{" "}
{/* Bootstrap Icon "X" */}
</button>
<h2>Messkurve Slot {slotIndex + 1}</h2>
<input
className="input-group-field"
id="jahrSelect"
type="number"
value=""
min="2020"
max="2030"
onKeyUp={(e) => noLetter(e)}
/>
<ul className="menu">
<li>
<div
className="input-group"
style={{
marginTop: "12px",
width: "125px",
paddingRight: "5px",
}}
>
<span className="input-group-label">Jahr</span>
<input
className="input-group-field"
id="jahrSelect"
type="number"
value=""
min="2020"
max="2030"
onKeyUp={() => noLetter(this)}
/>
</div>
</li>
<li>
<div
className="input-group"
style={{
marginTop: "12px",
width: "125px",
paddingRight: "10px",
}}
>
<span className="input-group-label">Monat</span>
<input
className="input-group-field"
id="monatSelect"
type="number"
value=""
min="1"
max="12"
onkeyup="noLetter(this);"
/>
</div>
</li>
<li>
<div
className="input-group"
style={{
marginTop: "12px",
width: "160px",
paddingRight: "10px",
height: "28px",
}}
>
<select
id="options"
name="options"
style={{
width: "100%",
height: "100%",
fontSize: "13px",
}}
></select>
</div>
</li>
<li
style={{
marginTop: "7px",
paddingLeft: "5px",
paddingRight: "5px",
}}
>
<button
type="button"
className="button littwin small"
onClick={() => sortieren()}
>
<i
className="fi-arrow-up"
style={{ fontSize: "1.2em" }}
></i>
<i
className="fi-arrow-down"
style={{ fontSize: "1.2em" }}
></i>
</button>
</li>
<li
style={{
marginTop: "7px",
paddingLeft: "5px",
paddingRight: "5px",
}}
>
<button
type="button"
className="button littwin small"
onclick="aktualisieren()"
>
Aktualisieren
</button>
</li>
</ul>
<canvas
id="myChart"
ref={chartRef}

View File

@@ -1,2 +0,0 @@
05-0829.csv
05-1911.csv
1 05-0829.csv
2 05-1911.csv

View File

@@ -0,0 +1,10 @@
{
"files": [
{
"filename": "05-0829.json"
},
{
"filename": "05-1911.json"
}
]
}

View File

@@ -1,2 +0,0 @@
05-0829.csv
05-1911.csv
1 05-0829.csv
2 05-1911.csv

View File

@@ -0,0 +1,10 @@
{
"files": [
{
"filename": "05-0829.json"
},
{
"filename": "05-1911.json"
}
]
}

View File

@@ -1,2 +0,0 @@
05-0829.csv
05-1911.csv
1 05-0829.csv
2 05-1911.csv

View File

@@ -0,0 +1,10 @@
{
"files": [
{
"filename": "05-0829.json"
},
{
"filename": "05-1911.json"
}
]
}

View File

@@ -1,2 +0,0 @@
05-0829.csv
05-1911.csv
1 05-0829.csv
2 05-1911.csv

View File

@@ -0,0 +1,10 @@
{
"files": [
{
"filename": "05-0829.json"
},
{
"filename": "05-1911.json"
}
]
}