fix: nur 8 analoge Eingänge anzeigen durch api handler

This commit is contained in:
ISA
2025-06-19 13:36:17 +02:00
parent 3a829f2298
commit b804fb88c1
8 changed files with 17 additions and 10 deletions

View File

@@ -6,5 +6,5 @@ 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.420
NEXT_PUBLIC_APP_VERSION=1.6.421
NEXT_PUBLIC_CPL_MODE=jsmock # json (Entwicklungsumgebung) oder jsmock (CPL ->CGI-Interface-Simulator) oder production (CPL-> CGI-Interface Platzhalter)

View File

@@ -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.420
NEXT_PUBLIC_APP_VERSION=1.6.421
NEXT_PUBLIC_CPL_MODE=production

View File

@@ -24,7 +24,7 @@ export default function AnalogInputsTable({
}, [dispatch]);
const analogInputs = useSelector(
(state: RootState) => state.analogeInputsSlice
(state: RootState) => state.analogInputs ?? []
);
const handleSelect = (id: number) => {

View File

@@ -2,10 +2,10 @@
var win_analogInputsValues = [
4.771072, 5.665244, 0.005467, -0.007468, 0.000002, 0.000001, 0.000001,
0.000007,
0.070007,
];
var win_analogInputsNames = [
"AE1",
"AE 1",
"AE 2",
"AE 3",
"AE 4",

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "cpl-v4",
"version": "1.6.420",
"version": "1.6.421",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "cpl-v4",
"version": "1.6.420",
"version": "1.6.421",
"dependencies": {
"@fontsource/roboto": "^5.1.0",
"@iconify-icons/ri": "^1.2.10",

View File

@@ -1,6 +1,6 @@
{
"name": "cpl-v4",
"version": "1.6.420",
"version": "1.6.421",
"private": true,
"scripts": {
"dev": "next dev",

View File

@@ -56,6 +56,13 @@ export default async function handler(
),
};
// Begrenzung auf maximal 8 Elemente je Array
Object.keys(result).forEach((key) => {
if (Array.isArray(result[key])) {
result[key] = result[key].slice(0, 8);
}
});
return res.status(200).json(result);
}

View File

@@ -11,7 +11,7 @@ import opcuaSettingsReducer from "./slices/opcuaSettingsSlice";
import digitalOutputsReducer from "./slices/digitalOutputsSlice";
import brushReducer from "./slices/brushSlice";
import tdrChartReducer from "./slices/tdrChartSlice";
import analogInputsReducer from "./slices/analogInputsSlice";
import analogInputsSlice from "./slices/analogInputsSlice";
import digitalInputsReducer from "./slices/digitalInputsSlice";
import tdrReferenceChartReducer from "./slices/tdrReferenceChartSlice";
import loopChartReducer from "./slices/loopChartSlice";
@@ -36,7 +36,7 @@ const store = configureStore({
systemSettingsSlice: systemSettingsReducer,
opcuaSettingsSlice: opcuaSettingsReducer,
digitalOutputsSlice: digitalOutputsReducer,
analogeInputsSlice: analogInputsReducer,
analogInputs: analogInputsSlice,
brushSlice: brushReducer,
tdrChartSlice: tdrChartReducer,
tdrReferenceChartSlice: tdrReferenceChartReducer,