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_USE_CGI=false
|
||||
# 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)
|
||||
|
||||
|
||||
@@ -5,5 +5,5 @@ NEXT_PUBLIC_CPL_API_PATH=/CPL
|
||||
NEXT_PUBLIC_EXPORT_STATIC=true
|
||||
NEXT_PUBLIC_USE_CGI=true
|
||||
# App-Versionsnummer
|
||||
NEXT_PUBLIC_APP_VERSION=1.6.675
|
||||
NEXT_PUBLIC_APP_VERSION=1.6.676
|
||||
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
|
||||
|
||||
- feat: fetchSystemData.mjs erweitert und optimiert
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
// /components/main/system/DetailModal.tsx
|
||||
import React, { useEffect, useRef, useState } from "react";
|
||||
import { Line } from "react-chartjs-2";
|
||||
import { useSelector, useDispatch } from "react-redux";
|
||||
import { RootState } from "@/redux/store";
|
||||
import { useSelector } from "react-redux";
|
||||
import { RootState, useAppDispatch } from "@/redux/store";
|
||||
import { Listbox } from "@headlessui/react";
|
||||
import { setFullScreen } from "@/redux/slices/kabelueberwachungChartSlice";
|
||||
import DateRangePicker from "@/components/common/DateRangePicker";
|
||||
@@ -12,6 +12,14 @@ import {
|
||||
setBisDatum,
|
||||
} 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 {
|
||||
Chart as ChartJS,
|
||||
LineElement,
|
||||
@@ -158,7 +166,7 @@ export const DetailModal = ({
|
||||
const isFullScreen = useSelector(
|
||||
(state: RootState) => state.kabelueberwachungChartSlice.isFullScreen
|
||||
);
|
||||
const dispatch = useDispatch();
|
||||
const dispatch = useAppDispatch();
|
||||
|
||||
const toggleFullScreen = () => {
|
||||
dispatch(setFullScreen(!isFullScreen));
|
||||
@@ -186,55 +194,31 @@ export const DetailModal = ({
|
||||
loadZoomPlugin();
|
||||
}, []);
|
||||
|
||||
// API-Request beim Klick auf "Daten laden"
|
||||
const handleFetchData = () => {
|
||||
setIsLoading(true);
|
||||
let sortedData = [...reduxData].reverse();
|
||||
|
||||
if (vonDatum && bisDatum) {
|
||||
const vonDate = new Date(vonDatum);
|
||||
const bisDate = new Date(bisDatum);
|
||||
sortedData = sortedData.filter((entry) => {
|
||||
const entryDate = new Date(entry.t);
|
||||
return entryDate >= vonDate && entryDate <= bisDate;
|
||||
});
|
||||
switch (selectedKey) {
|
||||
case "+5V":
|
||||
dispatch(getSystemspannung5VplusThunk(zeitraum));
|
||||
break;
|
||||
case "+15V":
|
||||
dispatch(getSystemspannung15VplusThunk(zeitraum));
|
||||
break;
|
||||
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(() => {
|
||||
|
||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "cpl-v4",
|
||||
"version": "1.6.675",
|
||||
"version": "1.6.676",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "cpl-v4",
|
||||
"version": "1.6.675",
|
||||
"version": "1.6.676",
|
||||
"dependencies": {
|
||||
"@fontsource/roboto": "^5.1.0",
|
||||
"@headlessui/react": "^2.2.4",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "cpl-v4",
|
||||
"version": "1.6.675",
|
||||
"version": "1.6.676",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev",
|
||||
|
||||
@@ -26,6 +26,7 @@ export const fetchSystemspannung15VminusService = async (
|
||||
? `/api/cpl/getSystemspannung15VminusHandler?typ=${type}`
|
||||
: `/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);
|
||||
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}`
|
||||
: `/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);
|
||||
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}`
|
||||
: `/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);
|
||||
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}`
|
||||
: `/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);
|
||||
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}`
|
||||
: `/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);
|
||||
if (!res.ok)
|
||||
throw new Error(
|
||||
|
||||
@@ -26,6 +26,7 @@ export const fetchTemperaturProzessorService = async (
|
||||
? `/api/cpl/getTemperaturProzessorHandler?typ=${type}`
|
||||
: `/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);
|
||||
if (!res.ok)
|
||||
throw new Error("❌ Fehler beim Abrufen der Temperaturdaten (Prozessor)");
|
||||
|
||||
Reference in New Issue
Block a user