|
|
|
@ -106,6 +106,7 @@ export class WidgetSubscription implements IWidgetSubscription { |
|
|
|
caulculateLegendData: boolean; |
|
|
|
displayLegend: boolean; |
|
|
|
stateData: boolean; |
|
|
|
datasourcesOptional: boolean; |
|
|
|
decimals: number; |
|
|
|
units: string; |
|
|
|
comparisonEnabled: boolean; |
|
|
|
@ -181,6 +182,7 @@ export class WidgetSubscription implements IWidgetSubscription { |
|
|
|
this.callbacks.dataLoading = this.callbacks.dataLoading || (() => {}); |
|
|
|
this.callbacks.timeWindowUpdated = this.callbacks.timeWindowUpdated || (() => {}); |
|
|
|
this.alarmSource = options.alarmSource; |
|
|
|
this.datasourcesOptional = options.datasourcesOptional; |
|
|
|
this.alarmDataListener = null; |
|
|
|
this.alarms = emptyPageData(); |
|
|
|
this.originalTimewindow = null; |
|
|
|
@ -212,6 +214,7 @@ export class WidgetSubscription implements IWidgetSubscription { |
|
|
|
this.callbacks.timeWindowUpdated = this.callbacks.timeWindowUpdated || (() => {}); |
|
|
|
|
|
|
|
this.configuredDatasources = this.ctx.utils.validateDatasources(options.datasources); |
|
|
|
this.datasourcesOptional = options.datasourcesOptional; |
|
|
|
this.entityDataListeners = []; |
|
|
|
this.hasDataPageLink = options.hasDataPageLink; |
|
|
|
this.singleEntity = options.singleEntity; |
|
|
|
@ -448,7 +451,7 @@ export class WidgetSubscription implements IWidgetSubscription { |
|
|
|
} |
|
|
|
}); |
|
|
|
this.configureLoadedData(); |
|
|
|
this.hasResolvedData = this.datasources.length > 0; |
|
|
|
this.hasResolvedData = this.datasources.length > 0 || this.datasourcesOptional; |
|
|
|
this.updateDataTimewindow(); |
|
|
|
this.notifyDataLoaded(); |
|
|
|
this.onDataUpdated(true); |
|
|
|
|