Browse Source

Merge pull request #3196 from ChantsovaEkaterina/bug/flot-attributes-usage-in-labels

[3.0] Flot: attributes usage in labels. Fix error on subscribing on attributes, that will be used in labels
pull/3230/head
VoBa 6 years ago
committed by GitHub
parent
commit
6603d6f1a4
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      ui-ngx/src/app/modules/home/components/widget/lib/flot-widget.models.ts
  2. 3
      ui-ngx/src/app/modules/home/components/widget/lib/flot-widget.ts

1
ui-ngx/src/app/modules/home/components/widget/lib/flot-widget.models.ts

@ -158,6 +158,7 @@ export interface TbFlotCustomLegendSettings {
export interface TbFlotLabelPatternSettings {
name: string;
type: DataKeyType;
settings?: any;
}
export interface TbFlotGraphSettings extends TbFlotBaseSettings, TbFlotThresholdsSettings, TbFlotComparisonSettings, TbFlotCustomLegendSettings {

3
ui-ngx/src/app/modules/home/components/widget/lib/flot-widget.ts

@ -383,6 +383,9 @@ export class TbFlot {
if (this.settings.customLegendEnabled) {
this.labelPatternsSourcesData = [];
const labelPatternsDatasources: Datasource[] = [];
this.settings.dataKeysListForLabels.forEach((item) => {
item.settings = {};
});
subscription.datasources.forEach((item) => {
let datasource: Datasource = {
type: item.type,

Loading…
Cancel
Save