Added Mode in live tab, fixed max discharge power in configuration

This commit is contained in:
Noe 2023-11-14 16:05:39 +01:00
parent f1cad8d69a
commit 22dd4222ca
5 changed files with 210 additions and 3 deletions

View File

@ -43,6 +43,171 @@
<None Update="Resources/s3cmd.py"> <None Update="Resources/s3cmd.py">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
<None Remove="DbBackups\db-1698326303.sqlite" />
<None Remove="DbBackups\db-1698327045.sqlite" />
<None Remove="DbBackups\db-1699453468.sqlite" />
<None Remove="DbBackups\db-1699453414.sqlite" />
<None Remove="DbBackups\db-1699453413.sqlite" />
<None Remove="DbBackups\db-1699452457.sqlite" />
<None Remove="DbBackups\db-1699452190.sqlite" />
<None Remove="DbBackups\db-1699452189.sqlite" />
<None Remove="DbBackups\db-1699452183.sqlite" />
<None Remove="DbBackups\db-1699452182.sqlite" />
<None Remove="DbBackups\db-1699452103.sqlite" />
<None Remove="DbBackups\db-1699452102.sqlite" />
<None Remove="DbBackups\db-1699448121.sqlite" />
<None Remove="DbBackups\db-1699448016.sqlite" />
<None Remove="DbBackups\db-1699448015.sqlite" />
<None Remove="DbBackups\db-1699448014.sqlite" />
<None Remove="DbBackups\db-1699441586.sqlite" />
<None Remove="DbBackups\db-1699441583.sqlite" />
<None Remove="DbBackups\db-1699441582.sqlite" />
<None Remove="DbBackups\db-1699440129.sqlite" />
<None Remove="DbBackups\db-1699440124.sqlite" />
<None Remove="DbBackups\db-1699440123.sqlite" />
<None Remove="DbBackups\db-1699438975.sqlite" />
<None Remove="DbBackups\db-1699438972.sqlite" />
<None Remove="DbBackups\db-1699438971.sqlite" />
<None Remove="DbBackups\db-1699438952.sqlite" />
<None Remove="DbBackups\db-1699438945.sqlite" />
<None Remove="DbBackups\db-1699438944.sqlite" />
<None Remove="DbBackups\db-1699438895.sqlite" />
<None Remove="DbBackups\db-1699438888.sqlite" />
<None Remove="DbBackups\db-1699438887.sqlite" />
<None Remove="DbBackups\db-1699437588.sqlite" />
<None Remove="DbBackups\db-1699437586.sqlite" />
<None Remove="DbBackups\db-1699437585.sqlite" />
<None Remove="DbBackups\db-1699437584.sqlite" />
<None Remove="DbBackups\db-1699437551.sqlite" />
<None Remove="DbBackups\db-1699437550.sqlite" />
<None Remove="DbBackups\db-1699437549.sqlite" />
<None Remove="DbBackups\db-1699436793.sqlite" />
<None Remove="DbBackups\db-1699436791.sqlite" />
<None Remove="DbBackups\db-1699436790.sqlite" />
<None Remove="DbBackups\db-1699436653.sqlite" />
<None Remove="DbBackups\db-1699436652.sqlite" />
<None Remove="DbBackups\db-1699436088.sqlite" />
<None Remove="DbBackups\db-1699436067.sqlite" />
<None Remove="DbBackups\db-1699436066.sqlite" />
<None Remove="DbBackups\db-1699434989.sqlite" />
<None Remove="DbBackups\db-1699434979.sqlite" />
<None Remove="DbBackups\db-1699434978.sqlite" />
<None Remove="DbBackups\db-1699434917.sqlite" />
<None Remove="DbBackups\db-1699434916.sqlite" />
<None Remove="DbBackups\db-1699433682.sqlite" />
<None Remove="DbBackups\db-1699433681.sqlite" />
<None Remove="DbBackups\db-1699433494.sqlite" />
<None Remove="DbBackups\db-1699433493.sqlite" />
<None Remove="DbBackups\db-1699432892.sqlite" />
<None Remove="DbBackups\db-1699432891.sqlite" />
<None Remove="DbBackups\db-1699432622.sqlite" />
<None Remove="DbBackups\db-1699432621.sqlite" />
<None Remove="DbBackups\db-1699375972.sqlite" />
<None Remove="DbBackups\db-1699375971.sqlite" />
<None Remove="DbBackups\db-1699375970.sqlite" />
<None Remove="DbBackups\db-1699375582.sqlite" />
<None Remove="DbBackups\db-1699375581.sqlite" />
<None Remove="DbBackups\db-1699375265.sqlite" />
<None Remove="DbBackups\db-1699375264.sqlite" />
<None Remove="DbBackups\db-1699375174.sqlite" />
<None Remove="DbBackups\db-1699375173.sqlite" />
<None Remove="DbBackups\db-1699375167.sqlite" />
<None Remove="DbBackups\db-1699375166.sqlite" />
<None Remove="DbBackups\db-1699374877.sqlite" />
<None Remove="DbBackups\db-1699374876.sqlite" />
<None Remove="DbBackups\db-1699374338.sqlite" />
<None Remove="DbBackups\db-1699374337.sqlite" />
<None Remove="DbBackups\db-1699374216.sqlite" />
<None Remove="DbBackups\db-1699374215.sqlite" />
<None Remove="DbBackups\db-1699369902.sqlite" />
<None Remove="DbBackups\db-1699369901.sqlite" />
<None Remove="DbBackups\db-1699369278.sqlite" />
<None Remove="DbBackups\db-1699369277.sqlite" />
<None Remove="DbBackups\db-1699368950.sqlite" />
<None Remove="DbBackups\db-1699368949.sqlite" />
<None Remove="DbBackups\db-1699368806.sqlite" />
<None Remove="DbBackups\db-1699368805.sqlite" />
<None Remove="DbBackups\db-1699368804.sqlite" />
<None Remove="DbBackups\db-1699366271.sqlite" />
<None Remove="DbBackups\db-1699366256.sqlite" />
<None Remove="DbBackups\db-1699366255.sqlite" />
<None Remove="DbBackups\db-1699366240.sqlite" />
<None Remove="DbBackups\db-1699366239.sqlite" />
<None Remove="DbBackups\db-1699366132.sqlite" />
<None Remove="DbBackups\db-1699365906.sqlite" />
<None Remove="DbBackups\db-1699365905.sqlite" />
<None Remove="DbBackups\db-1698656873.sqlite" />
<None Remove="DbBackups\db-1698656872.sqlite" />
<None Remove="DbBackups\db-1698330524.sqlite" />
<None Remove="DbBackups\db-1698330511.sqlite" />
<None Remove="DbBackups\db-1698330510.sqlite" />
<None Remove="DbBackups\db-1698330455.sqlite" />
<None Remove="DbBackups\db-1698330444.sqlite" />
<None Remove="DbBackups\db-1698330406.sqlite" />
<None Remove="DbBackups\db-1698330386.sqlite" />
<None Remove="DbBackups\db-1698330385.sqlite" />
<None Remove="DbBackups\db-1698329746.sqlite" />
<None Remove="DbBackups\db-1698329745.sqlite" />
<None Remove="DbBackups\db-1698329744.sqlite" />
<None Remove="DbBackups\db-1698329652.sqlite" />
<None Remove="DbBackups\db-1698329603.sqlite" />
<None Remove="DbBackups\db-1698329346.sqlite" />
<None Remove="DbBackups\db-1698329331.sqlite" />
<None Remove="DbBackups\db-1698329329.sqlite" />
<None Remove="DbBackups\db-1698329274.sqlite" />
<None Remove="DbBackups\db-1698329086.sqlite" />
<None Remove="DbBackups\db-1698329070.sqlite" />
<None Remove="DbBackups\db-1698329067.sqlite" />
<None Remove="DbBackups\db-1698329009.sqlite" />
<None Remove="DbBackups\db-1698328961.sqlite" />
<None Remove="DbBackups\db-1698328621.sqlite" />
<None Remove="DbBackups\db-1698328605.sqlite" />
<None Remove="DbBackups\db-1698328557.sqlite" />
<None Remove="DbBackups\db-1698328538.sqlite" />
<None Remove="DbBackups\db-1698328537.sqlite" />
<None Remove="DbBackups\db-1698328516.sqlite" />
<None Remove="DbBackups\db-1698328504.sqlite" />
<None Remove="DbBackups\db-1698328489.sqlite" />
<None Remove="DbBackups\db-1698328461.sqlite" />
<None Remove="DbBackups\db-1698328447.sqlite" />
<None Remove="DbBackups\db-1698328381.sqlite" />
<None Remove="DbBackups\db-1698328203.sqlite" />
<None Remove="DbBackups\db-1698328201.sqlite" />
<None Remove="DbBackups\db-1698328184.sqlite" />
<None Remove="DbBackups\db-1698328174.sqlite" />
<None Remove="DbBackups\db-1698328173.sqlite" />
<None Remove="DbBackups\db-1698327908.sqlite" />
<None Remove="DbBackups\db-1698327870.sqlite" />
<None Remove="DbBackups\db-1698327855.sqlite" />
<None Remove="DbBackups\db-1698327854.sqlite" />
<None Remove="DbBackups\db-1698327853.sqlite" />
<None Remove="DbBackups\db-1698327737.sqlite" />
<None Remove="DbBackups\db-1698327658.sqlite" />
<None Remove="DbBackups\db-1698327641.sqlite" />
<None Remove="DbBackups\db-1698327640.sqlite" />
<None Remove="DbBackups\db-1698327639.sqlite" />
<None Remove="DbBackups\db-1698327576.sqlite" />
<None Remove="DbBackups\db-1698327461.sqlite" />
<None Remove="DbBackups\db-1698327450.sqlite" />
<None Remove="DbBackups\db-1698327449.sqlite" />
<None Remove="DbBackups\db-1698327398.sqlite" />
<None Remove="DbBackups\db-1698327351.sqlite" />
<None Remove="DbBackups\db-1698327339.sqlite" />
<None Remove="DbBackups\db-1698327338.sqlite" />
<None Remove="DbBackups\db-1698327227.sqlite" />
<None Remove="DbBackups\db-1698327194.sqlite" />
<None Remove="DbBackups\db-1698327133.sqlite" />
<None Remove="DbBackups\db-1698327071.sqlite" />
<None Remove="DbBackups\db-1698327022.sqlite" />
<None Remove="DbBackups\db-1698326991.sqlite" />
<None Remove="DbBackups\db-1698326990.sqlite" />
<None Remove="DbBackups\db-1698326807.sqlite" />
<None Remove="DbBackups\db-1698326334.sqlite" />
<None Remove="DbBackups\db-1698326333.sqlite" />
<None Remove="DbBackups\db-1698326332.sqlite" />
<None Remove="DbBackups\db-1698326302.sqlite" />
<None Remove="DbBackups\db-1698325689.sqlite" />
<None Remove="DbBackups\db-1698325688.sqlite" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
@ -59,4 +224,10 @@
</Reference> </Reference>
</ItemGroup> </ItemGroup>
<ItemGroup>
<Folder Include="DbBackups\" />
</ItemGroup>
</Project> </Project>

View File

@ -119,6 +119,7 @@ public static class SessionMethods
&& original is not null && original is not null
&& user.HasWriteAccess && user.HasWriteAccess
&& user.HasAccessTo(installation) && user.HasAccessTo(installation)
&& installation.SetOrderNumbers()
&& installation && installation
.WithParentOf(original) // prevent moving .WithParentOf(original) // prevent moving
.Apply(Db.Update); .Apply(Db.Update);

View File

@ -101,7 +101,9 @@ function Configuration(props: ConfigurationProps) {
value={ value={
( (
(props.values.maximumDischargePower.values[0] (props.values.maximumDischargePower.values[0]
.value as number) * 48 .value as number) *
48 *
(props.values.DcDcNum.values[0].value as number)
).toString() + ' W' ).toString() + ' W'
} }
fullWidth fullWidth

View File

@ -300,6 +300,35 @@ function Installation(props: singleInstallationProps) {
{props.current_installation.name} {props.current_installation.name}
</Typography> </Typography>
</div> </div>
{currentTab == 'live' && values && (
<div style={{ display: 'flex', alignItems: 'center' }}>
<Typography
fontWeight="bold"
color="text.primary"
noWrap
sx={{
marginTop: '0px',
marginBottom: '10px',
fontSize: '14px'
}}
>
<FormattedMessage id="mode" defaultMessage="Mode:" />
</Typography>
<Typography
fontWeight="bold"
color="orange"
noWrap
sx={{
marginTop: '0px',
marginBottom: '10px',
marginLeft: '85px',
fontSize: '14px'
}}
>
{values.mode.values[0].value}
</Typography>
</div>
)}
<div style={{ display: 'flex', alignItems: 'center' }}> <div style={{ display: 'flex', alignItems: 'center' }}>
<Typography <Typography
fontWeight="bold" fontWeight="bold"
@ -317,7 +346,7 @@ function Installation(props: singleInstallationProps) {
style={{ style={{
display: 'flex', display: 'flex',
alignItems: 'center', alignItems: 'center',
marginLeft: '80px', marginLeft: '75px',
marginTop: '-10px' marginTop: '-10px'
}} }}
> >

View File

@ -67,7 +67,9 @@ export type TopologyValues = {
installedDcDcPower: BoxData; installedDcDcPower: BoxData;
gridSetPoint: BoxData; gridSetPoint: BoxData;
maximumDischargePower: BoxData; maximumDischargePower: BoxData;
DcDcNum: BoxData;
calibrationChargeForced: BoxData; calibrationChargeForced: BoxData;
mode: BoxData;
}; };
type TopologyPaths = { [key in keyof TopologyValues]: string[] }; type TopologyPaths = { [key in keyof TopologyValues]: string[] };
@ -145,7 +147,9 @@ export const topologyPaths: TopologyPaths = {
installedDcDcPower: ['/DcDc/SystemControl/NumberOfConnectedSlaves'], installedDcDcPower: ['/DcDc/SystemControl/NumberOfConnectedSlaves'],
gridSetPoint: ['/Config/GridSetPoint'], gridSetPoint: ['/Config/GridSetPoint'],
maximumDischargePower: ['/Config/MaxBatteryDischargingCurrent'], maximumDischargePower: ['/Config/MaxBatteryDischargingCurrent'],
calibrationChargeForced: ['/Config/ForceCalibrationCharge'] DcDcNum: ['/DcDc/SystemControl/NumberOfConnectedSlaves'],
calibrationChargeForced: ['/Config/ForceCalibrationCharge'],
mode: ['/EssControl/Mode']
}; };
export const extractValues = ( export const extractValues = (