Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEMS-Backports 2024-08 #2740

Merged
merged 10 commits into from
Aug 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ public synchronized int calculateCurrentLimit(Battery battery) {

// Get the minimum limit of all limits in Ampere
var limit = TypeUtils.min(TypeUtils.toDouble(bpBms), minCellVoltageLimit, maxCellVoltageLimit,
minCellTemperatureLimit, maxCellTemperatureLimit, maxIncreaseAmpereLimit, forceCurrent);
minCellTemperatureLimit, maxCellTemperatureLimit, maxSocLimit, maxIncreaseAmpereLimit, forceCurrent);

// Set '0' to block charge/discharge?
if (
Expand Down
3,232 changes: 3,148 additions & 84 deletions ui/package-lock.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"chart.js": "^4.4.3",
"chartjs-adapter-date-fns": "^3.0.0",
"chartjs-plugin-annotation": "^3.0.1",
"chartjs-plugin-datalabels": "^2.2.0",
"chartjs-plugin-zoom": "^2.0.1",
"classlist.js": "^1.1.20150312",
"compare-versions": "^6.1.1",
Expand Down
9 changes: 6 additions & 3 deletions ui/src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ import { EdgeComponent } from './edge/edge.component';
import { OverviewComponent as AutarchyChartOverviewComponent } from './edge/history/common/autarchy/overview/overview';
import { DetailsOverviewComponent as ConsumptionDetailsOverviewComponent } from './edge/history/common/consumption/details/details.overview';
import { OverviewComponent as ConsumptionChartOverviewComponent } from './edge/history/common/consumption/overview/overview';
import { DetailsOverviewComponent as GridDetailsOverviewComponent } from './edge/history/common/grid/details/details.overview';
import { OverviewComponent as GridChartOverviewComponent } from './edge/history/common/grid/overview/overview';
import { DetailsOverviewComponent } from './edge/history/common/production/details/details.overview';
import { OverviewComponent as ProductionChartOverviewComponent } from './edge/history/common/production/overview/overview';
import { OverviewComponent as SelfconsumptionChartOverviewComponent } from './edge/history/common/selfconsumption/overview/overview';
import { OverviewComponent as ChannelthresholdChartOverviewComponent } from './edge/history/Controller/ChannelThreshold/overview/overview';
import { OverviewComponent as TimeOfUseTariffOverviewComponent } from './edge/history/Controller/Ess/TimeOfUseTariff/overview/overview';
import { OverviewComponent as GridOptimizedChargeChartOverviewComponent } from './edge/history/Controller/Ess/GridoptimizedCharge/overview/overview';
import { OverviewComponent as TimeOfUseTariffOverviewComponent } from './edge/history/Controller/Ess/TimeOfUseTariff/overview/overview';
import { DelayedSellToGridChartOverviewComponent } from './edge/history/delayedselltogrid/symmetricpeakshavingchartoverview/delayedselltogridchartoverview.component';
import { FixDigitalOutputChartOverviewComponent } from './edge/history/fixdigitaloutput/fixdigitaloutputchartoverview/fixdigitaloutputchartoverview.component';
import { HeatingelementChartOverviewComponent } from './edge/history/heatingelement/heatingelementchartoverview/heatingelementchartoverview.component';
Expand Down Expand Up @@ -50,11 +51,11 @@ import { SystemLogComponent as EdgeSettingsSystemLogComponent } from './edge/set
import { LoginComponent } from './index/login.component';
import { OverViewComponent } from './index/overview/overview.component';
import { LoadingScreenComponent } from './index/shared/loading-screen';
import { CurrentAndVoltageOverviewComponent } from './shared/components/edge/meter/currentVoltage/currentVoltage.overview';
import { DataService } from './shared/components/shared/dataservice';
import { UserComponent } from './user/user.component';
import { CurrentAndVoltageOverviewComponent } from './shared/components/edge/meter/currentVoltage/currentVoltage.overview';

const routes: Routes = [
export const routes: Routes = [

// TODO should be removed in the future
{ path: '', redirectTo: 'index', pathMatch: 'full' },
Expand Down Expand Up @@ -98,6 +99,8 @@ const routes: Routes = [
{ path: 'consumptionchart/:componentId', component: ConsumptionDetailsOverviewComponent },
{ path: 'consumptionchart/:componentId/currentVoltage', component: CurrentAndVoltageOverviewComponent },
{ path: 'gridchart', component: GridChartOverviewComponent },
{ path: 'gridchart/:componentId', component: GridDetailsOverviewComponent },
{ path: 'gridchart/:componentId/currentVoltage', component: CurrentAndVoltageOverviewComponent },
{ path: 'productionchart', component: ProductionChartOverviewComponent },
{ path: 'productionchart/:componentId', component: DetailsOverviewComponent },
{ path: 'productionchart/:componentId/currentVoltage', component: CurrentAndVoltageOverviewComponent },
Expand Down
7 changes: 5 additions & 2 deletions ui/src/app/edge/history/abstracthistorychart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { DateUtils } from 'src/app/shared/utils/date/dateutils';
import { DateTimeUtils } from 'src/app/shared/utils/datetime/datetime-utils';

import { calculateResolution, ChronoUnit, DEFAULT_TIME_CHART_OPTIONS, EMPTY_DATASET, Resolution, setLabelVisible } from './shared';
import { ChartConstants } from 'src/app/shared/components/chart/chart.constants';
import { ChartConstants, XAxisType } from 'src/app/shared/components/chart/chart.constants';

// NOTE: Auto-refresh of widgets is currently disabled to reduce server load
export abstract class AbstractHistoryChart {
Expand Down Expand Up @@ -41,6 +41,8 @@ export abstract class AbstractHistoryChart {
protected unit: YAxisTitle = YAxisTitle.ENERGY;
/** @deprecated*/
protected formatNumber: string = '1.0-2';
/** @deprecated*/
protected xAxisType: XAxisType = XAxisType.TIMESERIES;

// Colors for Phase 1-3
protected phase1Color = {
Expand Down Expand Up @@ -129,7 +131,8 @@ export abstract class AbstractHistoryChart {
const colors = this.colors;
const translate = this.translate;
this.service.getConfig().then((conf) => {
options.datasets.line.borderWidth = 2;

options = NewAbstractHistoryChart.getDefaultOptions(this.xAxisType, this.service, this.labels);

/** Hide default displayed yAxis */
options.scales['y'] = {
Expand Down
14 changes: 10 additions & 4 deletions ui/src/app/edge/history/common/consumption/Consumption.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ import { BrowserModule } from '@angular/platform-browser';
import { FooterNavigationModule } from 'src/app/shared/components/footer/subnavigation/footerNavigation.module';
import { SharedModule } from 'src/app/shared/shared.module';

import { CurrentVoltageModule } from 'src/app/shared/components/edge/meter/currentVoltage/currentVoltageModule';
import { ChartComponent } from './chart/chart';
import { ChartComponent as DetailsChartComponent } from './details/chart/chart';
import { ConsumptionMeterChartDetailsComponent } from './details/chart/consumptionMeter';
import { EvcsChartDetailsComponent } from './details/chart/evcs';
import { SumChartDetailsComponent } from './details/chart/sum';
import { DetailsOverviewComponent } from './details/details.overview';
import { FlatComponent } from './flat/flat';
import { OverviewComponent } from './overview/overview';
import { CurrentVoltageModule } from 'src/app/shared/components/edge/meter/currentVoltage/currentVoltageModule';

@NgModule({
imports: [
Expand All @@ -25,7 +27,9 @@ import { CurrentVoltageModule } from 'src/app/shared/components/edge/meter/curre

// consumptionChart:componentId
DetailsOverviewComponent,
DetailsChartComponent,
ConsumptionMeterChartDetailsComponent,
EvcsChartDetailsComponent,
SumChartDetailsComponent,
],
exports: [
// consumptionChart
Expand All @@ -35,7 +39,9 @@ import { CurrentVoltageModule } from 'src/app/shared/components/edge/meter/curre

// consumptionChart:componentId
DetailsOverviewComponent,
DetailsChartComponent,
ConsumptionMeterChartDetailsComponent,
EvcsChartDetailsComponent,
SumChartDetailsComponent,
],
})
export class Common_Consumption { }
Loading