diff --git a/typescript/frontend-marios2/src/Resources/routes.json b/typescript/frontend-marios2/src/Resources/routes.json index 538990ff5..88f219a2a 100644 --- a/typescript/frontend-marios2/src/Resources/routes.json +++ b/typescript/frontend-marios2/src/Resources/routes.json @@ -11,6 +11,7 @@ "overview": "overview", "manage": "manage", "batteryview": "batteryview", + "pvview": "pvview", "log": "log", "live": "live", "information": "information", diff --git a/typescript/frontend-marios2/src/content/dashboards/Installations/Installation.tsx b/typescript/frontend-marios2/src/content/dashboards/Installations/Installation.tsx index 909250ad5..d6f4cf84b 100644 --- a/typescript/frontend-marios2/src/content/dashboards/Installations/Installation.tsx +++ b/typescript/frontend-marios2/src/content/dashboards/Installations/Installation.tsx @@ -310,6 +310,20 @@ function Installation(props: singleInstallationProps) { > } > + + + } + > + } diff --git a/typescript/frontend-marios2/src/content/dashboards/Installations/index.tsx b/typescript/frontend-marios2/src/content/dashboards/Installations/index.tsx index 878ff948f..34d6e9e21 100644 --- a/typescript/frontend-marios2/src/content/dashboards/Installations/index.tsx +++ b/typescript/frontend-marios2/src/content/dashboards/Installations/index.tsx @@ -27,7 +27,8 @@ function InstallationTabs() { 'log', 'information', 'configuration', - 'history' + 'history', + 'pvview' ]; const [currentTab, setCurrentTab] = useState(undefined); @@ -139,14 +140,18 @@ function InstallationTabs() { /> ) }, + // { + // value: 'history', + // label: ( + // + // ) + // }, { - value: 'history', - label: ( - - ) + value: 'pvview', + label: } ] : currentUser.userType == UserType.partner @@ -168,6 +173,10 @@ function InstallationTabs() { /> ) }, + { + value: 'pvview', + label: + }, { value: 'information', @@ -227,6 +236,10 @@ function InstallationTabs() { /> ) }, + { + value: 'pvview', + label: + }, { value: 'manage', label: ( @@ -258,16 +271,16 @@ function InstallationTabs() { defaultMessage="Configuration" /> ) - }, - { - value: 'history', - label: ( - - ) } + // { + // value: 'history', + // label: ( + // + // ) + // } ] : currentUser.userType == UserType.partner ? [ @@ -299,6 +312,10 @@ function InstallationTabs() { /> ) }, + { + value: 'pvview', + label: + }, { value: 'information', 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 79237a1e5..ec4dad776 100644 --- a/typescript/frontend-marios2/src/content/dashboards/Log/graph.util.tsx +++ b/typescript/frontend-marios2/src/content/dashboards/Log/graph.util.tsx @@ -35,6 +35,8 @@ export type ConfigurationValues = { calibrationChargeDate: Date | null; }; +export interface Pv {} + export interface Battery { BatteryId: number; FwVersion: I_BoxDataValue; @@ -163,11 +165,19 @@ export type TopologyValues = { additionalCalibrationChargeDate: I_BoxDataValue[]; batteryView: Battery[]; + + pvView: Pv[]; }; type TopologyPaths = { [key in keyof TopologyValues]: string[] }; const batteryIds = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; +const PvPaths = [ + '/PvOnDc/Strings/%id%/Voltage', + '/PvOnDc/Strings/%id%/Current', + '/PvOnDc/Strings/%id%/Power' +]; + const batteryPaths = [ '/Battery/Devices/%id%/FwVersion', '/Battery/Devices/%id%/Dc/Power', @@ -290,6 +300,10 @@ export const topologyPaths: TopologyPaths = { batteryPaths.map((path) => path.replace('%id%', id.toString())) ), + pvView: batteryIds.flatMap((id) => + PvPaths.map((path) => path.replace('%id%', id.toString())) + ), + minimumSoC: ['/Config/MinSoc'], installedDcDcPower: ['/DcDc/SystemControl/NumberOfConnectedSlaves'], gridSetPoint: ['/Config/GridSetPoint'], diff --git a/typescript/frontend-marios2/src/content/dashboards/PvView/PvView.tsx b/typescript/frontend-marios2/src/content/dashboards/PvView/PvView.tsx new file mode 100644 index 000000000..e69de29bb