|
|
|
@ -169,8 +169,8 @@ export class WidgetConfigComponent extends PageComponent implements OnInit, Cont |
|
|
|
public layoutSettings: FormGroup; |
|
|
|
public advancedSettings: FormGroup; |
|
|
|
public actionsSettings: FormGroup; |
|
|
|
|
|
|
|
public dataError = ''; |
|
|
|
public openExtensionPanel = true; |
|
|
|
public timeseriesKeyError = false; |
|
|
|
|
|
|
|
public datasourceError: string[] = []; |
|
|
|
|
|
|
|
@ -230,6 +230,7 @@ export class WidgetConfigComponent extends PageComponent implements OnInit, Cont |
|
|
|
this.widgetSettings.get('titleTooltip').disable({emitEvent: false}); |
|
|
|
this.widgetSettings.get('showTitleIcon').patchValue(false); |
|
|
|
this.widgetSettings.get('showTitleIcon').disable({emitEvent: false}); |
|
|
|
this.widgetSettings.get('showTitleIcon').disable({emitEvent: false}); |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
@ -920,7 +921,7 @@ export class WidgetConfigComponent extends PageComponent implements OnInit, Cont |
|
|
|
} |
|
|
|
|
|
|
|
public validate(c: FormControl) { |
|
|
|
this.dataError = ''; |
|
|
|
this.timeseriesKeyError = false; |
|
|
|
this.datasourceError = []; |
|
|
|
if (!this.dataSettings.valid) { |
|
|
|
return { |
|
|
|
@ -975,7 +976,7 @@ export class WidgetConfigComponent extends PageComponent implements OnInit, Cont |
|
|
|
if (this.widgetType === widgetType.timeseries && this.modelValue?.typeParameters?.hasAdditionalLatestDataKeys) { |
|
|
|
let valid = config.datasources.filter(datasource => datasource?.dataKeys?.length).length > 0; |
|
|
|
if (!valid) { |
|
|
|
this.dataError = 'At least one timeseries data key should be specified'; |
|
|
|
this.timeseriesKeyError = true; |
|
|
|
return { |
|
|
|
timeseriesDataKeys: { |
|
|
|
valid: false |
|
|
|
@ -1003,4 +1004,7 @@ export class WidgetConfigComponent extends PageComponent implements OnInit, Cont |
|
|
|
return null; |
|
|
|
} |
|
|
|
|
|
|
|
public extensionPanelIsOpen(value) { |
|
|
|
this.openExtensionPanel = value; |
|
|
|
} |
|
|
|
} |
|
|
|
|