Add: SERVICE JSON Files

This commit is contained in:
ISA
2025-06-25 15:26:00 +02:00
parent 53c2a02224
commit 845c2dd658
23 changed files with 242 additions and 53 deletions

BIN
redux/slices.zip Normal file

Binary file not shown.

View File

@@ -0,0 +1,35 @@
// /redux/slices/selectedAnalogInputSlice.ts
import { createSlice, PayloadAction } from "@reduxjs/toolkit";
export interface SelectedAnalogInput {
id: number;
label: string;
unit?: string;
value?: number;
offset?: number;
factor?: number;
loggerInterval?: number;
weighting?: number;
}
const initialState: SelectedAnalogInput | null = null;
const selectedAnalogInputSlice = createSlice({
name: "selectedAnalogInput",
initialState,
reducers: {
setSelectedAnalogInput: (
state,
action: PayloadAction<SelectedAnalogInput>
) => {
return action.payload;
},
clearSelectedAnalogInput: () => {
return null;
},
},
});
export const { setSelectedAnalogInput, clearSelectedAnalogInput } =
selectedAnalogInputSlice.actions;
export default selectedAnalogInputSlice.reducer;

View File

@@ -24,6 +24,7 @@ import tdrReferenceChartDataBySlotReducer from "./slices/tdrReferenceChartDataBy
import loopChartTypeSlice from "./slices/loopChartTypeSlice";
import systemVoltTempReducer from "./slices/systemVoltTempSlice";
import analogInputsHistoryReducer from "./slices/analogInputsHistorySlice";
import selectedAnalogInputReducer from "./slices/selectedAnalogInputSlice";
const store = configureStore({
reducer: {
@@ -50,6 +51,7 @@ const store = configureStore({
loopChartType: loopChartTypeSlice,
systemVoltTemp: systemVoltTempReducer,
analogInputsHistory: analogInputsHistoryReducer,
selectedAnalogInput: selectedAnalogInputReducer,
},
});

BIN
redux/thunks.zip Normal file

Binary file not shown.

BIN
redux/types.zip Normal file

Binary file not shown.