From 4b3cca6f7a535292d384d39ccdb87f3df1375c57 Mon Sep 17 00:00:00 2001 From: Yinyin Liu Date: Wed, 26 Nov 2025 15:57:18 +0100 Subject: [PATCH] added Cluster and PV number in Configuration tab --- .../src/content/dashboards/Log/graph.util.tsx | 4 ++ .../SodistoreHomeConfiguration.tsx | 69 +++++++++++++++++++ 2 files changed, 73 insertions(+) diff --git a/typescript/frontend-marios2/src/content/dashboards/Log/graph.util.tsx b/typescript/frontend-marios2/src/content/dashboards/Log/graph.util.tsx index cc71df690..9237e137d 100644 --- a/typescript/frontend-marios2/src/content/dashboards/Log/graph.util.tsx +++ b/typescript/frontend-marios2/src/content/dashboards/Log/graph.util.tsx @@ -329,6 +329,8 @@ export interface JSONRecordData { MaximumDischargingCurrent: number; OperatingPriority: string; BatteriesCount: number; + ClusterNumber: number; + PvNumber: number; //For Sinexcel: TimeChargeDischarge mode TimeChargeDischargePower?: number; @@ -638,6 +640,8 @@ export type ConfigurationValues = { maximumChargingCurrent: number; operatingPriority: number; batteriesCount: number; + clusterNumber: number; + PvNumber: number; // For Sinexcel: TimeChargeDischarge mode timeChargeDischargePower?: number; diff --git a/typescript/frontend-marios2/src/content/dashboards/SodiohomeInstallations/SodistoreHomeConfiguration.tsx b/typescript/frontend-marios2/src/content/dashboards/SodiohomeInstallations/SodistoreHomeConfiguration.tsx index b98cddaa6..20689750e 100644 --- a/typescript/frontend-marios2/src/content/dashboards/SodiohomeInstallations/SodistoreHomeConfiguration.tsx +++ b/typescript/frontend-marios2/src/content/dashboards/SodiohomeInstallations/SodistoreHomeConfiguration.tsx @@ -89,6 +89,8 @@ function SodistoreHomeConfiguration(props: SodistoreHomeConfigurationProps) { batteriesCount: props.values.Config.BatteriesCount, ...(device === 4 ? { + clusterNumber: props.values.Config.ClusterNumber??1, + PvNumber: props.values.Config.PvNumber??0, timeChargeDischargePower: props.values.Config?.TimeChargeDischargePower ?? 0, // default 0 W timeChargeDischargeTime: props.values.Config?.TimeChargeDischargeTime @@ -118,6 +120,8 @@ function SodistoreHomeConfiguration(props: SodistoreHomeConfigurationProps) { maximumChargingCurrent: formValues.maximumChargingCurrent, operatingPriority: formValues.operatingPriority, batteriesCount:formValues.batteriesCount, + clusterNumber:formValues.clusterNumber, + PvNumber:formValues.PvNumber, // ...(device === 4 && // OperatingPriorityOptions[formValues.operatingPriority] === @@ -301,6 +305,71 @@ function SodistoreHomeConfiguration(props: SodistoreHomeConfigurationProps) { /> + {/*
*/} + {/* */} + {/* }*/} + {/* name="clusterNumber"*/} + {/* value={formValues.clusterNumber}*/} + {/* onChange={handleChange}*/} + {/* fullWidth*/} + {/* />*/} + {/*
*/} + + {/*
*/} + {/* */} + {/* }*/} + {/* name="PvNumber"*/} + {/* value={formValues.PvNumber}*/} + {/* onChange={handleChange}*/} + {/* fullWidth*/} + {/* />*/} + {/*
*/} + + {device === 4 && ( + <> +
+ + } + name="clusterNumber" + value={formValues.clusterNumber} + onChange={handleChange} + fullWidth + /> +
+ +
+ + } + name="PvNumber" + value={formValues.PvNumber} + onChange={handleChange} + fullWidth + /> +
+ + )} + +