Marios push test
This commit is contained in:
parent
9481a9be66
commit
c19c32a1ec
|
@ -11,6 +11,7 @@
|
||||||
"overview": "overview",
|
"overview": "overview",
|
||||||
"manage": "manage",
|
"manage": "manage",
|
||||||
"batteryview": "batteryview",
|
"batteryview": "batteryview",
|
||||||
|
"pvview": "pvview",
|
||||||
"log": "log",
|
"log": "log",
|
||||||
"live": "live",
|
"live": "live",
|
||||||
"information": "information",
|
"information": "information",
|
||||||
|
|
|
@ -310,6 +310,20 @@ function Installation(props: singleInstallationProps) {
|
||||||
></BatteryView>
|
></BatteryView>
|
||||||
}
|
}
|
||||||
></Route>
|
></Route>
|
||||||
|
|
||||||
|
<Route
|
||||||
|
path={routes.pvview + '*'}
|
||||||
|
element={
|
||||||
|
<PvView
|
||||||
|
values={values}
|
||||||
|
s3Credentials={s3Credentials}
|
||||||
|
installationId={props.current_installation.id}
|
||||||
|
productNum={props.current_installation.product}
|
||||||
|
connected={connected}
|
||||||
|
></PvView>
|
||||||
|
}
|
||||||
|
></Route>
|
||||||
|
|
||||||
<Route
|
<Route
|
||||||
path={routes.overview}
|
path={routes.overview}
|
||||||
element={<Overview s3Credentials={s3Credentials}></Overview>}
|
element={<Overview s3Credentials={s3Credentials}></Overview>}
|
||||||
|
|
|
@ -27,7 +27,8 @@ function InstallationTabs() {
|
||||||
'log',
|
'log',
|
||||||
'information',
|
'information',
|
||||||
'configuration',
|
'configuration',
|
||||||
'history'
|
'history',
|
||||||
|
'pvview'
|
||||||
];
|
];
|
||||||
|
|
||||||
const [currentTab, setCurrentTab] = useState<string>(undefined);
|
const [currentTab, setCurrentTab] = useState<string>(undefined);
|
||||||
|
@ -139,14 +140,18 @@ function InstallationTabs() {
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
// {
|
||||||
|
// value: 'history',
|
||||||
|
// label: (
|
||||||
|
// <FormattedMessage
|
||||||
|
// id="history"
|
||||||
|
// defaultMessage="History Of Actions"
|
||||||
|
// />
|
||||||
|
// )
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
value: 'history',
|
value: 'pvview',
|
||||||
label: (
|
label: <FormattedMessage id="pvview" defaultMessage="Pv View" />
|
||||||
<FormattedMessage
|
|
||||||
id="history"
|
|
||||||
defaultMessage="History Of Actions"
|
|
||||||
/>
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
: currentUser.userType == UserType.partner
|
: currentUser.userType == UserType.partner
|
||||||
|
@ -168,6 +173,10 @@ function InstallationTabs() {
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
value: 'pvview',
|
||||||
|
label: <FormattedMessage id="pvview" defaultMessage="Pv View" />
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
value: 'information',
|
value: 'information',
|
||||||
|
@ -227,6 +236,10 @@ function InstallationTabs() {
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
value: 'pvview',
|
||||||
|
label: <FormattedMessage id="pvview" defaultMessage="Pv View" />
|
||||||
|
},
|
||||||
{
|
{
|
||||||
value: 'manage',
|
value: 'manage',
|
||||||
label: (
|
label: (
|
||||||
|
@ -258,16 +271,16 @@ function InstallationTabs() {
|
||||||
defaultMessage="Configuration"
|
defaultMessage="Configuration"
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
},
|
|
||||||
{
|
|
||||||
value: 'history',
|
|
||||||
label: (
|
|
||||||
<FormattedMessage
|
|
||||||
id="history"
|
|
||||||
defaultMessage="History Of Actions"
|
|
||||||
/>
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
// {
|
||||||
|
// value: 'history',
|
||||||
|
// label: (
|
||||||
|
// <FormattedMessage
|
||||||
|
// id="history"
|
||||||
|
// defaultMessage="History Of Actions"
|
||||||
|
// />
|
||||||
|
// )
|
||||||
|
// }
|
||||||
]
|
]
|
||||||
: currentUser.userType == UserType.partner
|
: currentUser.userType == UserType.partner
|
||||||
? [
|
? [
|
||||||
|
@ -299,6 +312,10 @@ function InstallationTabs() {
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
value: 'pvview',
|
||||||
|
label: <FormattedMessage id="pvview" defaultMessage="Pv View" />
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
value: 'information',
|
value: 'information',
|
||||||
|
|
|
@ -35,6 +35,8 @@ export type ConfigurationValues = {
|
||||||
calibrationChargeDate: Date | null;
|
calibrationChargeDate: Date | null;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export interface Pv {}
|
||||||
|
|
||||||
export interface Battery {
|
export interface Battery {
|
||||||
BatteryId: number;
|
BatteryId: number;
|
||||||
FwVersion: I_BoxDataValue;
|
FwVersion: I_BoxDataValue;
|
||||||
|
@ -163,11 +165,19 @@ export type TopologyValues = {
|
||||||
additionalCalibrationChargeDate: I_BoxDataValue[];
|
additionalCalibrationChargeDate: I_BoxDataValue[];
|
||||||
|
|
||||||
batteryView: Battery[];
|
batteryView: Battery[];
|
||||||
|
|
||||||
|
pvView: Pv[];
|
||||||
};
|
};
|
||||||
type TopologyPaths = { [key in keyof TopologyValues]: string[] };
|
type TopologyPaths = { [key in keyof TopologyValues]: string[] };
|
||||||
|
|
||||||
const batteryIds = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
|
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 = [
|
const batteryPaths = [
|
||||||
'/Battery/Devices/%id%/FwVersion',
|
'/Battery/Devices/%id%/FwVersion',
|
||||||
'/Battery/Devices/%id%/Dc/Power',
|
'/Battery/Devices/%id%/Dc/Power',
|
||||||
|
@ -290,6 +300,10 @@ export const topologyPaths: TopologyPaths = {
|
||||||
batteryPaths.map((path) => path.replace('%id%', id.toString()))
|
batteryPaths.map((path) => path.replace('%id%', id.toString()))
|
||||||
),
|
),
|
||||||
|
|
||||||
|
pvView: batteryIds.flatMap((id) =>
|
||||||
|
PvPaths.map((path) => path.replace('%id%', id.toString()))
|
||||||
|
),
|
||||||
|
|
||||||
minimumSoC: ['/Config/MinSoc'],
|
minimumSoC: ['/Config/MinSoc'],
|
||||||
installedDcDcPower: ['/DcDc/SystemControl/NumberOfConnectedSlaves'],
|
installedDcDcPower: ['/DcDc/SystemControl/NumberOfConnectedSlaves'],
|
||||||
gridSetPoint: ['/Config/GridSetPoint'],
|
gridSetPoint: ['/Config/GridSetPoint'],
|
||||||
|
|
Loading…
Reference in New Issue