feat(api): Zeitraum und Eingang als Pflichtparameter für AnalogInputs-API eingeführt
- API-Handler für /api/cpl/getAnalogInputsHistory überarbeitet - `zeitraum` (DIA0, DIA1, DIA2) und `eingang` (1–8) sind jetzt Pflichtfelder - Bei fehlenden oder ungültigen Parametern strukturierte Fehlerantwort mit Beispielen - Daten werden nun gezielt pro Eingang und Zeitraum geladen (z. B. AE3 + DIA1) - Bessere Fehlerbehandlung bei nicht vorhandenen Dateien
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.593
|
||||
NEXT_PUBLIC_APP_VERSION=1.6.594
|
||||
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.593
|
||||
NEXT_PUBLIC_APP_VERSION=1.6.594
|
||||
NEXT_PUBLIC_CPL_MODE=production
|
||||
11
CHANGELOG.md
11
CHANGELOG.md
@@ -1,3 +1,14 @@
|
||||
## [1.6.594] – 2025-07-11
|
||||
|
||||
- feat(api): Zeitraum und Eingang als Pflichtparameter für AnalogInputs-API eingeführt
|
||||
|
||||
- API-Handler für /api/cpl/getAnalogInputsHistory überarbeitet
|
||||
- `zeitraum` (DIA0, DIA1, DIA2) und `eingang` (1–8) sind jetzt Pflichtfelder
|
||||
- Bei fehlenden oder ungültigen Parametern strukturierte Fehlerantwort mit Beispielen
|
||||
- Daten werden nun gezielt pro Eingang und Zeitraum geladen (z. B. AE3 + DIA1)
|
||||
- Bessere Fehlerbehandlung bei nicht vorhandenen Dateien
|
||||
|
||||
---
|
||||
## [1.6.593] – 2025-07-11
|
||||
|
||||
- fix: Von/Bis-Datum beim Schließen des DetailModals zurücksetzen
|
||||
|
||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "cpl-v4",
|
||||
"version": "1.6.593",
|
||||
"version": "1.6.594",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "cpl-v4",
|
||||
"version": "1.6.593",
|
||||
"version": "1.6.594",
|
||||
"dependencies": {
|
||||
"@fontsource/roboto": "^5.1.0",
|
||||
"@headlessui/react": "^2.2.4",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "cpl-v4",
|
||||
"version": "1.6.593",
|
||||
"version": "1.6.594",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev",
|
||||
|
||||
@@ -5,8 +5,6 @@ import fs from "fs";
|
||||
import path from "path";
|
||||
|
||||
export default function handler(req: NextApiRequest, res: NextApiResponse) {
|
||||
const mode = process.env.NEXT_PUBLIC_CPL_MODE;
|
||||
|
||||
try {
|
||||
const filePath = path.join(
|
||||
process.cwd(),
|
||||
|
||||
@@ -8,8 +8,6 @@ export default async function handler(
|
||||
req: NextApiRequest,
|
||||
res: NextApiResponse
|
||||
) {
|
||||
const mode = process.env.NEXT_PUBLIC_CPL_MODE ?? "json";
|
||||
|
||||
// Lese JSON-Datei z.B. digitalOutputsMockData.json
|
||||
const filePath = path.join(
|
||||
process.cwd(),
|
||||
|
||||
@@ -8,7 +8,6 @@ export default function handler(req: NextApiRequest, res: NextApiResponse) {
|
||||
return res.status(405).json({ error: "Method not allowed" });
|
||||
}
|
||||
|
||||
const mode = process.env.NEXT_PUBLIC_CPL_MODE;
|
||||
const updates = req.body.updates;
|
||||
|
||||
if (!Array.isArray(updates)) {
|
||||
|
||||
@@ -6,15 +6,15 @@ export const getAnalogInputsChartDataThunk = createAsyncThunk(
|
||||
"analogInputsChart/fetchChartData",
|
||||
async (_, { getState }) => {
|
||||
const state = getState() as RootState;
|
||||
const { zeitraum, vonDatum, bisDatum } = state.analogInputsChart;
|
||||
//const { zeitraum, vonDatum, bisDatum } = state.analogInputsChart;
|
||||
const selectedInput = state.selectedAnalogInput;
|
||||
|
||||
if (!selectedInput) return [];
|
||||
|
||||
const res = await fetch(
|
||||
/* const res = await fetch(
|
||||
`/api/cpl/getAnalogInputsHistory?inputId=${selectedInput.id}&zeitraum=${zeitraum}&von=${vonDatum}&bis=${bisDatum}`
|
||||
);
|
||||
const data = await res.json();
|
||||
return data;
|
||||
return data; */
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user