fix: link in console
This commit is contained in:
@@ -6,6 +6,6 @@ NEXT_PUBLIC_USE_MOCK_BACKEND_LOOP_START=false
|
|||||||
NEXT_PUBLIC_EXPORT_STATIC=false
|
NEXT_PUBLIC_EXPORT_STATIC=false
|
||||||
NEXT_PUBLIC_USE_CGI=false
|
NEXT_PUBLIC_USE_CGI=false
|
||||||
# App-Versionsnummer
|
# App-Versionsnummer
|
||||||
NEXT_PUBLIC_APP_VERSION=1.6.675
|
NEXT_PUBLIC_APP_VERSION=1.6.676
|
||||||
NEXT_PUBLIC_CPL_MODE=json # json (Entwicklungsumgebung) oder jsSimulatedProd (CPL ->CGI-Interface-Simulator) oder production (CPL-> CGI-Interface Platzhalter)
|
NEXT_PUBLIC_CPL_MODE=json # json (Entwicklungsumgebung) oder jsSimulatedProd (CPL ->CGI-Interface-Simulator) oder production (CPL-> CGI-Interface Platzhalter)
|
||||||
|
|
||||||
|
|||||||
@@ -5,5 +5,5 @@ NEXT_PUBLIC_CPL_API_PATH=/CPL
|
|||||||
NEXT_PUBLIC_EXPORT_STATIC=true
|
NEXT_PUBLIC_EXPORT_STATIC=true
|
||||||
NEXT_PUBLIC_USE_CGI=true
|
NEXT_PUBLIC_USE_CGI=true
|
||||||
# App-Versionsnummer
|
# App-Versionsnummer
|
||||||
NEXT_PUBLIC_APP_VERSION=1.6.675
|
NEXT_PUBLIC_APP_VERSION=1.6.676
|
||||||
NEXT_PUBLIC_CPL_MODE=production
|
NEXT_PUBLIC_CPL_MODE=production
|
||||||
@@ -1,3 +1,8 @@
|
|||||||
|
## [1.6.676] – 2025-08-01
|
||||||
|
|
||||||
|
- fix: richtige Link in system fetch service
|
||||||
|
|
||||||
|
---
|
||||||
## [1.6.675] – 2025-08-01
|
## [1.6.675] – 2025-08-01
|
||||||
|
|
||||||
- feat: fetchSystemData.mjs erweitert und optimiert
|
- feat: fetchSystemData.mjs erweitert und optimiert
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
// /components/main/system/DetailModal.tsx
|
// /components/main/system/DetailModal.tsx
|
||||||
import React, { useEffect, useRef, useState } from "react";
|
import React, { useEffect, useRef, useState } from "react";
|
||||||
import { Line } from "react-chartjs-2";
|
import { Line } from "react-chartjs-2";
|
||||||
import { useSelector, useDispatch } from "react-redux";
|
import { useSelector } from "react-redux";
|
||||||
import { RootState } from "@/redux/store";
|
import { RootState, useAppDispatch } from "@/redux/store";
|
||||||
import { Listbox } from "@headlessui/react";
|
import { Listbox } from "@headlessui/react";
|
||||||
import { setFullScreen } from "@/redux/slices/kabelueberwachungChartSlice";
|
import { setFullScreen } from "@/redux/slices/kabelueberwachungChartSlice";
|
||||||
import DateRangePicker from "@/components/common/DateRangePicker";
|
import DateRangePicker from "@/components/common/DateRangePicker";
|
||||||
@@ -12,6 +12,14 @@ import {
|
|||||||
setBisDatum,
|
setBisDatum,
|
||||||
} from "@/redux/slices/kabelueberwachungChartSlice";
|
} from "@/redux/slices/kabelueberwachungChartSlice";
|
||||||
|
|
||||||
|
// Import Thunks
|
||||||
|
import { getSystemspannung5VplusThunk } from "@/redux/thunks/getSystemspannung5VplusThunk";
|
||||||
|
import { getSystemspannung15VplusThunk } from "@/redux/thunks/getSystemspannung15VplusThunk";
|
||||||
|
import { getSystemspannung15VminusThunk } from "@/redux/thunks/getSystemspannung15VminusThunk";
|
||||||
|
import { getSystemspannung98VminusThunk } from "@/redux/thunks/getSystemspannung98VminusThunk";
|
||||||
|
import { getTemperaturAdWandlerThunk } from "@/redux/thunks/getTemperaturAdWandlerThunk";
|
||||||
|
import { getTemperaturProzessorThunk } from "@/redux/thunks/getTemperaturProzessorThunk";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
Chart as ChartJS,
|
Chart as ChartJS,
|
||||||
LineElement,
|
LineElement,
|
||||||
@@ -158,7 +166,7 @@ export const DetailModal = ({
|
|||||||
const isFullScreen = useSelector(
|
const isFullScreen = useSelector(
|
||||||
(state: RootState) => state.kabelueberwachungChartSlice.isFullScreen
|
(state: RootState) => state.kabelueberwachungChartSlice.isFullScreen
|
||||||
);
|
);
|
||||||
const dispatch = useDispatch();
|
const dispatch = useAppDispatch();
|
||||||
|
|
||||||
const toggleFullScreen = () => {
|
const toggleFullScreen = () => {
|
||||||
dispatch(setFullScreen(!isFullScreen));
|
dispatch(setFullScreen(!isFullScreen));
|
||||||
@@ -186,55 +194,31 @@ export const DetailModal = ({
|
|||||||
loadZoomPlugin();
|
loadZoomPlugin();
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
// API-Request beim Klick auf "Daten laden"
|
||||||
const handleFetchData = () => {
|
const handleFetchData = () => {
|
||||||
setIsLoading(true);
|
setIsLoading(true);
|
||||||
let sortedData = [...reduxData].reverse();
|
switch (selectedKey) {
|
||||||
|
case "+5V":
|
||||||
if (vonDatum && bisDatum) {
|
dispatch(getSystemspannung5VplusThunk(zeitraum));
|
||||||
const vonDate = new Date(vonDatum);
|
break;
|
||||||
const bisDate = new Date(bisDatum);
|
case "+15V":
|
||||||
sortedData = sortedData.filter((entry) => {
|
dispatch(getSystemspannung15VplusThunk(zeitraum));
|
||||||
const entryDate = new Date(entry.t);
|
break;
|
||||||
return entryDate >= vonDate && entryDate <= bisDate;
|
case "-15V":
|
||||||
});
|
dispatch(getSystemspannung15VminusThunk(zeitraum));
|
||||||
|
break;
|
||||||
|
case "-98V":
|
||||||
|
dispatch(getSystemspannung98VminusThunk(zeitraum));
|
||||||
|
break;
|
||||||
|
case "ADC Temp":
|
||||||
|
dispatch(getTemperaturAdWandlerThunk(zeitraum));
|
||||||
|
break;
|
||||||
|
case "CPU Temp":
|
||||||
|
dispatch(getTemperaturProzessorThunk(zeitraum));
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
setFilteredData(sortedData);
|
|
||||||
|
|
||||||
setChartData({
|
|
||||||
datasets: [
|
|
||||||
{
|
|
||||||
label: "Minimum",
|
|
||||||
data: sortedData.map((p) => ({ x: new Date(p.t), y: p.i })),
|
|
||||||
borderColor: "lightgrey",
|
|
||||||
backgroundColor: "rgba(211,211,211,0.3)",
|
|
||||||
borderWidth: 2,
|
|
||||||
pointRadius: 0,
|
|
||||||
tension: 0.1,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "Maximum",
|
|
||||||
data: sortedData.map((p) => ({ x: new Date(p.t), y: p.a })),
|
|
||||||
borderColor: "lightgrey",
|
|
||||||
backgroundColor: "rgba(211,211,211,0.3)",
|
|
||||||
borderWidth: 2,
|
|
||||||
pointRadius: 0,
|
|
||||||
tension: 0.1,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: zeitraum === "DIA0" ? "Messwert" : "Durchschnitt",
|
|
||||||
data: sortedData.map((p) => ({
|
|
||||||
x: new Date(p.t),
|
|
||||||
y: zeitraum === "DIA0" ? p.m : p.g,
|
|
||||||
})),
|
|
||||||
borderColor: "rgba(59,130,246,1)",
|
|
||||||
backgroundColor: "rgba(59,130,246,0.3)",
|
|
||||||
borderWidth: 2,
|
|
||||||
pointRadius: 0,
|
|
||||||
tension: 0.1,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|||||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "cpl-v4",
|
"name": "cpl-v4",
|
||||||
"version": "1.6.675",
|
"version": "1.6.676",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "cpl-v4",
|
"name": "cpl-v4",
|
||||||
"version": "1.6.675",
|
"version": "1.6.676",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fontsource/roboto": "^5.1.0",
|
"@fontsource/roboto": "^5.1.0",
|
||||||
"@headlessui/react": "^2.2.4",
|
"@headlessui/react": "^2.2.4",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "cpl-v4",
|
"name": "cpl-v4",
|
||||||
"version": "1.6.675",
|
"version": "1.6.676",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev",
|
"dev": "next dev",
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ export const fetchSystemspannung15VminusService = async (
|
|||||||
? `/api/cpl/getSystemspannung15VminusHandler?typ=${type}`
|
? `/api/cpl/getSystemspannung15VminusHandler?typ=${type}`
|
||||||
: `/CPL?seite.ACP&${type}=${fromParts.y};${fromParts.m};${fromParts.d};${toParts.y};${toParts.m};${toParts.d};${channel};1`;
|
: `/CPL?seite.ACP&${type}=${fromParts.y};${fromParts.m};${fromParts.d};${toParts.y};${toParts.m};${toParts.d};${channel};1`;
|
||||||
|
|
||||||
|
console.log("[Service] fetchSystemspannung15VminusService", path);
|
||||||
const res = await fetch(path);
|
const res = await fetch(path);
|
||||||
if (!res.ok) throw new Error("❌ Fehler beim Abrufen der -15V-Daten");
|
if (!res.ok) throw new Error("❌ Fehler beim Abrufen der -15V-Daten");
|
||||||
|
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ export const fetchSystemspannung15VplusService = async (
|
|||||||
? `/api/cpl/getSystemspannung15VplusHandler?typ=${type}`
|
? `/api/cpl/getSystemspannung15VplusHandler?typ=${type}`
|
||||||
: `/CPL?seite.ACP&${type}=${fromParts.y};${fromParts.m};${fromParts.d};${toParts.y};${toParts.m};${toParts.d};${channel};1`;
|
: `/CPL?seite.ACP&${type}=${fromParts.y};${fromParts.m};${fromParts.d};${toParts.y};${toParts.m};${toParts.d};${channel};1`;
|
||||||
|
|
||||||
|
console.log("[Service] fetchSystemspannung15VplusService", path);
|
||||||
const res = await fetch(path);
|
const res = await fetch(path);
|
||||||
if (!res.ok) throw new Error("❌ Fehler beim Abrufen der +15V-Daten");
|
if (!res.ok) throw new Error("❌ Fehler beim Abrufen der +15V-Daten");
|
||||||
|
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ export const fetchSystemspannung5VplusService = async (
|
|||||||
? `/api/cpl/getSystemspannung5VplusHandler?typ=${type}`
|
? `/api/cpl/getSystemspannung5VplusHandler?typ=${type}`
|
||||||
: `/CPL?seite.ACP&${type}=${fromParts.y};${fromParts.m};${fromParts.d};${toParts.y};${toParts.m};${toParts.d};${channel};1`;
|
: `/CPL?seite.ACP&${type}=${fromParts.y};${fromParts.m};${fromParts.d};${toParts.y};${toParts.m};${toParts.d};${channel};1`;
|
||||||
|
|
||||||
|
console.log("[Service] fetchSystemspannung5VplusService", path);
|
||||||
const res = await fetch(path);
|
const res = await fetch(path);
|
||||||
if (!res.ok) throw new Error("❌ Fehler beim Abrufen der +5V-Daten");
|
if (!res.ok) throw new Error("❌ Fehler beim Abrufen der +5V-Daten");
|
||||||
|
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ export const fetchSystemspannung98VminusService = async (
|
|||||||
? `/api/cpl/getSystemspannung98VminusHandler?typ=${type}`
|
? `/api/cpl/getSystemspannung98VminusHandler?typ=${type}`
|
||||||
: `/CPL?seite.ACP&${type}=${fromParts.y};${fromParts.m};${fromParts.d};${toParts.y};${toParts.m};${toParts.d};${channel};1`;
|
: `/CPL?seite.ACP&${type}=${fromParts.y};${fromParts.m};${fromParts.d};${toParts.y};${toParts.m};${toParts.d};${channel};1`;
|
||||||
|
|
||||||
|
console.log("[Service] fetchSystemspannung98VminusService", path);
|
||||||
const res = await fetch(path);
|
const res = await fetch(path);
|
||||||
if (!res.ok) throw new Error("❌ Fehler beim Abrufen der -98V-Daten");
|
if (!res.ok) throw new Error("❌ Fehler beim Abrufen der -98V-Daten");
|
||||||
|
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ export const fetchTemperaturAdWandlerService = async (
|
|||||||
? `/api/cpl/getTemperaturAdWandlerHandler?typ=${type}`
|
? `/api/cpl/getTemperaturAdWandlerHandler?typ=${type}`
|
||||||
: `/CPL?seite.ACP&${type}=${fromParts.y};${fromParts.m};${fromParts.d};${toParts.y};${toParts.m};${toParts.d};${channel};1`;
|
: `/CPL?seite.ACP&${type}=${fromParts.y};${fromParts.m};${fromParts.d};${toParts.y};${toParts.m};${toParts.d};${channel};1`;
|
||||||
|
|
||||||
|
console.log("[Service] fetchTemperaturAdWandlerService", path);
|
||||||
const res = await fetch(path);
|
const res = await fetch(path);
|
||||||
if (!res.ok)
|
if (!res.ok)
|
||||||
throw new Error(
|
throw new Error(
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ export const fetchTemperaturProzessorService = async (
|
|||||||
? `/api/cpl/getTemperaturProzessorHandler?typ=${type}`
|
? `/api/cpl/getTemperaturProzessorHandler?typ=${type}`
|
||||||
: `/CPL?seite.ACP&${type}=${fromParts.y};${fromParts.m};${fromParts.d};${toParts.y};${toParts.m};${toParts.d};${channel};1`;
|
: `/CPL?seite.ACP&${type}=${fromParts.y};${fromParts.m};${fromParts.d};${toParts.y};${toParts.m};${toParts.d};${channel};1`;
|
||||||
|
|
||||||
|
console.log("[Service] fetchTemperaturProzessorService", path);
|
||||||
const res = await fetch(path);
|
const res = await fetch(path);
|
||||||
if (!res.ok)
|
if (!res.ok)
|
||||||
throw new Error("❌ Fehler beim Abrufen der Temperaturdaten (Prozessor)");
|
throw new Error("❌ Fehler beim Abrufen der Temperaturdaten (Prozessor)");
|
||||||
|
|||||||
Reference in New Issue
Block a user