diff --git a/typescript/frontend-marios2/src/content/dashboards/Installations/index.tsx b/typescript/frontend-marios2/src/content/dashboards/Installations/index.tsx
index 42f8ba4ac..376a2d256 100644
--- a/typescript/frontend-marios2/src/content/dashboards/Installations/index.tsx
+++ b/typescript/frontend-marios2/src/content/dashboards/Installations/index.tsx
@@ -104,7 +104,10 @@ function InstallationTabs() {
value: 'live',
label:
},
-
+ {
+ value: 'overview',
+ label:
+ },
{
value: 'batteryview',
label: (
@@ -148,12 +151,7 @@ function InstallationTabs() {
value: 'overview',
label:
},
- {
- value: 'batteryview',
- label: (
-
- )
- },
+
{
value: 'log',
label:
diff --git a/typescript/frontend-marios2/src/content/dashboards/Log/Log.tsx b/typescript/frontend-marios2/src/content/dashboards/Log/Log.tsx
index cd9823a17..559c9debc 100644
--- a/typescript/frontend-marios2/src/content/dashboards/Log/Log.tsx
+++ b/typescript/frontend-marios2/src/content/dashboards/Log/Log.tsx
@@ -29,10 +29,17 @@ interface LogProps {
function Log(props: LogProps) {
const theme = useTheme();
+ const searchParams = new URLSearchParams(location.search);
+ const openModal = searchParams.get('open');
+
const [warnings, setWarnings] = useState([]);
const [errors, setErrors] = useState([]);
- const [errorButtonPressed, setErrorButtonPressed] = useState(false);
- const [warningButtonPressed, setWarningButtonPressed] = useState(false);
+ const [errorButtonPressed, setErrorButtonPressed] = useState(
+ openModal === 'error' ? true : false
+ );
+ const [warningButtonPressed, setWarningButtonPressed] = useState(
+ openModal === 'warning' ? true : false
+ );
const [updateCount, setUpdateCount] = useState(0);
const navigate = useNavigate();
const tokencontext = useContext(TokenContext);
diff --git a/typescript/frontend-marios2/src/content/dashboards/Overview/chartOptions.tsx b/typescript/frontend-marios2/src/content/dashboards/Overview/chartOptions.tsx
index ccb93510b..037f835b8 100644
--- a/typescript/frontend-marios2/src/content/dashboards/Overview/chartOptions.tsx
+++ b/typescript/frontend-marios2/src/content/dashboards/Overview/chartOptions.tsx
@@ -306,6 +306,17 @@ export const getChartOptions = (
}
}
},
+ annotations: {
+ yaxis: [
+ {
+ y: 0,
+ strokeDashArray: 0,
+ borderColor: '#d3d3d3',
+ borderWidth: 1,
+ yAxisIndex: 0
+ }
+ ]
+ },
tooltip: {
y: {
formatter: function (val) {
diff --git a/typescript/frontend-marios2/src/content/dashboards/Overview/overview.tsx b/typescript/frontend-marios2/src/content/dashboards/Overview/overview.tsx
index 4f5061b72..39a5af4d5 100644
--- a/typescript/frontend-marios2/src/content/dashboards/Overview/overview.tsx
+++ b/typescript/frontend-marios2/src/content/dashboards/Overview/overview.tsx
@@ -444,20 +444,20 @@ function Overview(props: OverviewProps) {
>
-
+ {/**/}
{dailyData && (
<>
)}
- {weeklyData && (
+ {weeklyData && currentUser.hasWriteAccess && (
)}
- {monthlyData && (
+ {weeklyData && !currentUser.hasWriteAccess && (
+
+ )}
+
+ {monthlyData && currentUser.hasWriteAccess && (
+ )}
+
+ {monthlyData && !currentUser.hasWriteAccess && (
+
)}
- {currentUser.hasWriteAccess && (
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
+ >
+
- {dailyData && (
-
- )}
-
- {weeklyData && (
-
- )}
-
- {monthlyData && (
-
- )}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {dailyData && (
-
- )}
- {weeklyData && (
-
+ )}
- {
- ...weeklyDataArray.chartData.gridExportPower,
- color: '#ff3333'
- }
- ]}
- type="bar"
- height={400}
- />
- )}
+ {weeklyData && (
+
+ )}
- {monthlyData && (
-
- )}
-
-
+ {monthlyData && (
+
+ )}
+
- )}
+
+
+
+
+
+
+
+
+
+
+
+
+ {dailyData && (
+
+ )}
+ {weeklyData && (
+
+ )}
+
+ {monthlyData && (
+
+ )}
+
+
+
)}
diff --git a/typescript/frontend-marios2/src/interfaces/Chart.tsx b/typescript/frontend-marios2/src/interfaces/Chart.tsx
index 63abacf73..cc4b4a63a 100644
--- a/typescript/frontend-marios2/src/interfaces/Chart.tsx
+++ b/typescript/frontend-marios2/src/interfaces/Chart.tsx
@@ -11,6 +11,7 @@ export interface overviewInterface {
soc: chartInfoInterface;
temperature: chartInfoInterface;
dcPower: chartInfoInterface;
+ dcPowerWithoutHeating: chartInfoInterface;
gridPower: chartInfoInterface;
pvProduction: chartInfoInterface;
dcBusVoltage: chartInfoInterface;
@@ -78,6 +79,7 @@ export const transformInputToDailyData = async (
soc: { magnitude: 0, unit: '', min: 0, max: 0 },
temperature: { magnitude: 0, unit: '', min: 0, max: 0 },
dcPower: { magnitude: 0, unit: '', min: 0, max: 0 },
+ dcPowerWithoutHeating: { magnitude: 0, unit: '', min: 0, max: 0 },
gridPower: { magnitude: 0, unit: '', min: 0, max: 0 },
pvProduction: { magnitude: 0, unit: '', min: 0, max: 0 },
dcBusVoltage: { magnitude: 0, unit: '', min: 0, max: 0 },
@@ -280,7 +282,7 @@ export const transformInputToAggregatedData = async (
maxsoc: { name: 'max SOC', data: [] },
pvProduction: { name: 'Pv Energy', data: [] },
dcChargingPower: { name: 'Charging Battery Energy', data: [] },
- heatingPower: { name: 'Heating Power', data: [] },
+ heatingPower: { name: 'Heating Energy', data: [] },
dcDischargingPower: { name: 'Discharging Battery Energy', data: [] },
gridImportPower: { name: 'Grid Import Energy', data: [] },
gridExportPower: { name: 'Grid Export Energy', data: [] }
@@ -290,6 +292,7 @@ export const transformInputToAggregatedData = async (
soc: { magnitude: 0, unit: '', min: 0, max: 0 },
temperature: { magnitude: 0, unit: '', min: 0, max: 0 },
dcPower: { magnitude: 0, unit: '', min: 0, max: 0 },
+ dcPowerWithoutHeating: { magnitude: 0, unit: '', min: 0, max: 0 },
gridPower: { magnitude: 0, unit: '', min: 0, max: 0 },
pvProduction: { magnitude: 0, unit: '', min: 0, max: 0 },
dcBusVoltage: { magnitude: 0, unit: '', min: 0, max: 0 },
@@ -329,6 +332,9 @@ export const transformInputToAggregatedData = async (
dateList.push(currentDay.format('DD-MM'));
pathsToSearch.forEach((path) => {
if (result[path]) {
+ if (path === '/GridExportPower') {
+ result[path].value = -result[path].value;
+ }
if (result[path].value < overviewData[path].min) {
overviewData[path].min = result[path].value;
}
@@ -336,9 +342,9 @@ export const transformInputToAggregatedData = async (
if (result[path].value > overviewData[path].max) {
overviewData[path].max = result[path].value;
}
- if (path === '/GridExportPower' && result[path].value < 0.1) {
- result[path].value = 0.3;
- }
+ // if (path === '/GridExportPower' && Math.abs(result[path].value) < 0.1) {
+ // result[path].value = -0.3;
+ // }
data[path].push(result[path].value as number);
}
});
@@ -395,6 +401,16 @@ export const transformInputToAggregatedData = async (
path = '/HeatingPower';
chartAggregatedData.heatingPower.data = data[path];
+ chartOverview.dcPowerWithoutHeating = {
+ magnitude: Math.max(
+ overviewData['/ChargingBatteryPower'].magnitude,
+ overviewData['/DischargingBatteryPower'].magnitude
+ ),
+ unit: '(kWh)',
+ min: overviewData['/DischargingBatteryPower'].min,
+ max: overviewData['/ChargingBatteryPower'].max
+ };
+
chartOverview.dcPower = {
magnitude: Math.max(
overviewData['/ChargingBatteryPower'].magnitude,