+
-
+
+
+
diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/alarms-table-widget.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/alarms-table-widget.component.ts
index 390559bab3..f501fd1ef2 100644
--- a/ui-ngx/src/app/modules/home/components/widget/lib/alarms-table-widget.component.ts
+++ b/ui-ngx/src/app/modules/home/components/widget/lib/alarms-table-widget.component.ts
@@ -58,6 +58,7 @@ import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
import {
CellContentInfo,
CellStyleInfo,
+ checkHasActions,
constructTableCssString,
DisplayColumn,
EntityColumn,
@@ -72,7 +73,10 @@ import {
getColumnSelectionAvailability,
getColumnWidth,
getRowStyleInfo,
+ getTableCellButtonActions,
+ prepareTableCellButtonActions,
RowStyleInfo,
+ TableCellButtonActionDescriptor,
TableWidgetDataKeySettings,
TableWidgetSettings,
widthStyle
@@ -130,7 +134,7 @@ interface AlarmsTableWidgetSettings extends TableWidgetSettings {
allowClear: boolean;
}
-interface AlarmWidgetActionDescriptor extends WidgetActionDescriptor {
+interface AlarmWidgetActionDescriptor extends TableCellButtonActionDescriptor {
details?: boolean;
acknowledge?: boolean;
clear?: boolean;
@@ -160,8 +164,8 @@ export class AlarmsTableWidgetComponent extends PageComponent implements OnInit,
public textSearchMode = false;
public columns: Array
= [];
public displayedColumns: string[] = [];
- public actionCellDescriptors: AlarmWidgetActionDescriptor[] = [];
public alarmsDatasource: AlarmsDatasource;
+ public countCellButtonAction: number;
private cellContentCache: Array = [];
private cellStyleCache: Array = [];
@@ -288,38 +292,6 @@ export class AlarmsTableWidgetComponent extends PageComponent implements OnInit,
this.allowAcknowledgment = isDefined(this.settings.allowAcknowledgment) ? this.settings.allowAcknowledgment : true;
this.allowClear = isDefined(this.settings.allowClear) ? this.settings.allowClear : true;
- if (this.displayDetails) {
- this.actionCellDescriptors.push(
- {
- displayName: this.translate.instant('alarm.details'),
- icon: 'more_horiz',
- details: true
- } as AlarmWidgetActionDescriptor
- );
- }
-
- if (this.allowAcknowledgment) {
- this.actionCellDescriptors.push(
- {
- displayName: this.translate.instant('alarm.acknowledge'),
- icon: 'done',
- acknowledge: true
- } as AlarmWidgetActionDescriptor
- );
- }
-
- if (this.allowClear) {
- this.actionCellDescriptors.push(
- {
- displayName: this.translate.instant('alarm.clear'),
- icon: 'clear',
- clear: true
- } as AlarmWidgetActionDescriptor
- );
- }
-
- this.actionCellDescriptors = this.actionCellDescriptors.concat(this.ctx.actionsApi.getActionDescriptors('actionCellButton'));
-
if (this.settings.alarmsTitle && this.settings.alarmsTitle.length) {
this.alarmsTitlePattern = this.utils.customTranslation(this.settings.alarmsTitle, this.settings.alarmsTitle);
} else {
@@ -436,11 +408,44 @@ export class AlarmsTableWidgetComponent extends PageComponent implements OnInit,
}
this.sortOrderProperty = sortColumn ? sortColumn.def : null;
- if (this.actionCellDescriptors.length) {
+ const actionCellDescriptors: AlarmWidgetActionDescriptor[] = [];
+ if (this.displayDetails) {
+ actionCellDescriptors.push(
+ {
+ displayName: this.translate.instant('alarm.details'),
+ icon: 'more_horiz',
+ details: true
+ } as AlarmWidgetActionDescriptor
+ );
+ }
+
+ if (this.allowAcknowledgment) {
+ actionCellDescriptors.push(
+ {
+ displayName: this.translate.instant('alarm.acknowledge'),
+ icon: 'done',
+ acknowledge: true
+ } as AlarmWidgetActionDescriptor
+ );
+ }
+
+ if (this.allowClear) {
+ actionCellDescriptors.push(
+ {
+ displayName: this.translate.instant('alarm.clear'),
+ icon: 'clear',
+ clear: true
+ } as AlarmWidgetActionDescriptor
+ );
+ }
+
+ this.countCellButtonAction = actionCellDescriptors.length + this.ctx.actionsApi.getActionDescriptors('actionCellButton').length;
+
+ if (this.countCellButtonAction) {
this.displayedColumns.push('actions');
}
- this.alarmsDatasource = new AlarmsDatasource(this.subscription, latestDataKeys, this.ngZone);
+ this.alarmsDatasource = new AlarmsDatasource(this.subscription, latestDataKeys, this.ngZone, this.ctx, actionCellDescriptors);
if (this.enableSelection) {
this.alarmsDatasource.selectionModeChanged$.subscribe((selectionMode) => {
const hideTitlePanel = selectionMode || this.textSearchMode;
@@ -495,7 +500,7 @@ export class AlarmsTableWidgetComponent extends PageComponent implements OnInit,
if (this.enableSelection) {
this.displayedColumns.unshift('select');
}
- if (this.actionCellDescriptors.length) {
+ if (this.countCellButtonAction) {
this.displayedColumns.push('actions');
}
this.clearCache();
@@ -986,9 +991,16 @@ class AlarmsDatasource implements DataSource {
private appliedPageLink: AlarmDataPageLink;
private appliedSortOrderLabel: string;
+ private cellButtonActions: TableCellButtonActionDescriptor[];
+ private readonly usedShowCellActionFunction: boolean;
+
constructor(private subscription: IWidgetSubscription,
private dataKeys: Array,
- private ngZone: NgZone) {
+ private ngZone: NgZone,
+ private widgetContext: WidgetContext,
+ actionCellDescriptors: AlarmWidgetActionDescriptor[]) {
+ this.cellButtonActions = actionCellDescriptors.concat(getTableCellButtonActions(widgetContext));
+ this.usedShowCellActionFunction = this.cellButtonActions.some(action => action.useShowActionCellButtonFunction);
}
connect(collectionViewer: CollectionViewer): Observable> {
@@ -1069,6 +1081,15 @@ class AlarmsDatasource implements DataSource {
}
alarm[dataKey.label] = value;
});
+ if (this.cellButtonActions.length) {
+ if (this.usedShowCellActionFunction) {
+ alarm.actionCellButtons = prepareTableCellButtonActions(this.widgetContext, this.cellButtonActions, alarm);
+ alarm.hasActions = checkHasActions(alarm.actionCellButtons);
+ } else {
+ alarm.actionCellButtons = this.cellButtonActions;
+ alarm.hasActions = true;
+ }
+ }
return alarm;
}
diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/entities-table-widget.component.html b/ui-ngx/src/app/modules/home/components/widget/lib/entities-table-widget.component.html
index ca93253ddc..ea94274b66 100644
--- a/ui-ngx/src/app/modules/home/components/widget/lib/entities-table-widget.component.html
+++ b/ui-ngx/src/app/modules/home/components/widget/lib/entities-table-widget.component.html
@@ -48,35 +48,40 @@
-
+
-
+
-
+
+
+
+
-
+
-
+
+
+
diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/entities-table-widget.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/entities-table-widget.component.ts
index 68db8a0dcc..cd597249e6 100644
--- a/ui-ngx/src/app/modules/home/components/widget/lib/entities-table-widget.component.ts
+++ b/ui-ngx/src/app/modules/home/components/widget/lib/entities-table-widget.component.ts
@@ -63,6 +63,7 @@ import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
import {
CellContentInfo,
CellStyleInfo,
+ checkHasActions,
constructTableCssString,
DisplayColumn,
EntityColumn,
@@ -78,7 +79,10 @@ import {
getColumnWidth,
getEntityValue,
getRowStyleInfo,
+ getTableCellButtonActions,
+ prepareTableCellButtonActions,
RowStyleInfo,
+ TableCellButtonActionDescriptor,
TableWidgetDataKeySettings,
TableWidgetSettings,
widthStyle
@@ -136,8 +140,8 @@ export class EntitiesTableWidgetComponent extends PageComponent implements OnIni
public textSearchMode = false;
public columns: Array
= [];
public displayedColumns: string[] = [];
- public actionCellDescriptors: WidgetActionDescriptor[];
public entityDatasource: EntityDatasource;
+ public countCellButtonAction: number;
private cellContentCache: Array = [];
private cellStyleCache: Array = [];
@@ -245,7 +249,7 @@ export class EntitiesTableWidgetComponent extends PageComponent implements OnIni
private initializeConfig() {
this.ctx.widgetActions = [this.searchAction, this.columnDisplayAction];
- this.actionCellDescriptors = this.ctx.actionsApi.getActionDescriptors('actionCellButton');
+ this.countCellButtonAction = this.ctx.actionsApi.getActionDescriptors('actionCellButton').length;
if (this.settings.entitiesTitle && this.settings.entitiesTitle.length) {
this.entitiesTitlePattern = this.utils.customTranslation(this.settings.entitiesTitle, this.settings.entitiesTitle);
@@ -426,10 +430,10 @@ export class EntitiesTableWidgetComponent extends PageComponent implements OnIni
}
this.sortOrderProperty = sortColumn ? sortColumn.def : null;
- if (this.actionCellDescriptors.length) {
+ if (this.countCellButtonAction) {
this.displayedColumns.push('actions');
}
- this.entityDatasource = new EntityDatasource(this.translate, dataKeys, this.subscription, this.ngZone);
+ this.entityDatasource = new EntityDatasource(this.translate, dataKeys, this.subscription, this.ngZone, this.ctx);
}
private editColumnsToDisplay($event: Event) {
@@ -470,7 +474,7 @@ export class EntitiesTableWidgetComponent extends PageComponent implements OnIni
columns,
columnsUpdated: (newColumns) => {
this.displayedColumns = newColumns.filter(column => column.display).map(column => column.def);
- if (this.actionCellDescriptors.length) {
+ if (this.countCellButtonAction) {
this.displayedColumns.push('actions');
}
this.clearCache();
@@ -713,12 +717,18 @@ class EntityDatasource implements DataSource {
private appliedPageLink: EntityDataPageLink;
private appliedSortOrderLabel: string;
+ private cellButtonActions: TableCellButtonActionDescriptor[];
+ private readonly usedShowCellActionFunction: boolean;
+
constructor(
private translate: TranslateService,
private dataKeys: Array,
private subscription: IWidgetSubscription,
- private ngZone: NgZone
+ private ngZone: NgZone,
+ private widgetContext: WidgetContext
) {
+ this.cellButtonActions = getTableCellButtonActions(widgetContext);
+ this.usedShowCellActionFunction = this.cellButtonActions.some(action => action.useShowActionCellButtonFunction);
}
connect(collectionViewer: CollectionViewer): Observable> {
@@ -792,6 +802,15 @@ class EntityDatasource implements DataSource {
entity[dataKey.label] = '';
}
});
+ if (this.cellButtonActions.length) {
+ if (this.usedShowCellActionFunction) {
+ entity.actionCellButtons = prepareTableCellButtonActions(this.widgetContext, this.cellButtonActions, entity);
+ entity.hasActions = checkHasActions(entity.actionCellButtons);
+ } else {
+ entity.actionCellButtons = this.cellButtonActions;
+ entity.hasActions = true;
+ }
+ }
return entity;
}
diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/maps/common-maps-utils.ts b/ui-ngx/src/app/modules/home/components/widget/lib/maps/common-maps-utils.ts
index d9b0da46d8..a0950eb53f 100644
--- a/ui-ngx/src/app/modules/home/components/widget/lib/maps/common-maps-utils.ts
+++ b/ui-ngx/src/app/modules/home/components/widget/lib/maps/common-maps-utils.ts
@@ -318,7 +318,7 @@ export const parseWithTranslation = {
}
};
-export function parseData(input: DatasourceData[]): FormattedData[] {
+export function parseData(input: DatasourceData[], dataIndex?: number): FormattedData[] {
return _(input).groupBy(el => el?.datasource.entityName + el?.datasource.entityType)
.values().value().map((entityArray, i) => {
const obj: FormattedData = {
@@ -330,12 +330,12 @@ export function parseData(input: DatasourceData[]): FormattedData[] {
deviceType: null
};
entityArray.filter(el => el.data.length).forEach(el => {
- const indexDate = el.data.length - 1;
- if (!obj.hasOwnProperty(el.dataKey.label) || el.data[indexDate][1] !== '') {
- obj[el.dataKey.label] = el.data[indexDate][1];
- obj[el.dataKey.label + '|ts'] = el.data[indexDate][0];
+ dataIndex = isDefined(dataIndex) ? dataIndex : el.data.length - 1;
+ if (!obj.hasOwnProperty(el.dataKey.label) || el.data[dataIndex][1] !== '') {
+ obj[el.dataKey.label] = el.data[dataIndex][1];
+ obj[el.dataKey.label + '|ts'] = el.data[dataIndex][0];
if (el.dataKey.label === 'type') {
- obj.deviceType = el.data[indexDate][1];
+ obj.deviceType = el.data[dataIndex][1];
}
}
});
diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/table-widget.models.ts b/ui-ngx/src/app/modules/home/components/widget/lib/table-widget.models.ts
index 10e1f376f4..e9d711eb79 100644
--- a/ui-ngx/src/app/modules/home/components/widget/lib/table-widget.models.ts
+++ b/ui-ngx/src/app/modules/home/components/widget/lib/table-widget.models.ts
@@ -15,12 +15,14 @@
///
import { EntityId } from '@shared/models/id/entity-id';
-import { DataKey, WidgetConfig } from '@shared/models/widget.models';
-import { getDescendantProp, isDefined } from '@core/utils';
+import { DataKey, WidgetActionDescriptor, WidgetConfig } from '@shared/models/widget.models';
+import { getDescendantProp, isDefined, isNotEmptyStr } from '@core/utils';
import { AlarmDataInfo, alarmFields } from '@shared/models/alarm.models';
import * as tinycolor_ from 'tinycolor2';
import { Direction, EntityDataSortOrder, EntityKey } from '@shared/models/query/query.models';
import { DataKeyType } from '@shared/models/telemetry/telemetry.models';
+import { WidgetContext } from '@home/models/widget-component.models';
+import { FormattedData } from '@home/components/widget/lib/maps/map-models';
const tinycolor = tinycolor_;
@@ -48,11 +50,20 @@ export interface TableWidgetDataKeySettings {
columnSelectionToDisplay?: ColumnSelectionOptions;
}
+export type ShowCellButtonActionFunction = (ctx: WidgetContext, data: EntityData | AlarmDataInfo | FormattedData) => boolean;
+
+export interface TableCellButtonActionDescriptor extends WidgetActionDescriptor {
+ useShowActionCellButtonFunction: boolean;
+ showActionCellButtonFunction: ShowCellButtonActionFunction;
+}
+
export interface EntityData {
id: EntityId;
entityName: string;
entityLabel?: string;
entityType?: string;
+ actionCellButtons?: TableCellButtonActionDescriptor[];
+ hasActions?: boolean;
[key: string]: any;
}
@@ -296,6 +307,45 @@ export function getColumnSelectionAvailability(keySettings: TableWidgetDataKeySe
return !(isDefined(keySettings.columnSelectionToDisplay) && keySettings.columnSelectionToDisplay === 'disabled');
}
+export function getTableCellButtonActions(widgetContext: WidgetContext): TableCellButtonActionDescriptor[] {
+ return widgetContext.actionsApi.getActionDescriptors('actionCellButton').map(descriptor => {
+ let useShowActionCellButtonFunction = descriptor.useShowWidgetActionFunction || false;
+ let showActionCellButtonFunction: ShowCellButtonActionFunction = null;
+ if (useShowActionCellButtonFunction && isNotEmptyStr(descriptor.showWidgetActionFunction)) {
+ try {
+ showActionCellButtonFunction =
+ new Function('widgetContext', 'data', descriptor.showWidgetActionFunction) as ShowCellButtonActionFunction;
+ } catch (e) {
+ useShowActionCellButtonFunction = false;
+ }
+ }
+ return {...descriptor, showActionCellButtonFunction, useShowActionCellButtonFunction};
+ });
+}
+
+export function checkHasActions(cellButtonActions: TableCellButtonActionDescriptor[]): boolean {
+ return cellButtonActions.some(action => action.icon);
+}
+
+export function prepareTableCellButtonActions(widgetContext: WidgetContext, cellButtonActions: TableCellButtonActionDescriptor[],
+ data: EntityData | AlarmDataInfo | FormattedData): TableCellButtonActionDescriptor[] {
+ return cellButtonActions.map(action =>
+ filterTableCellButtonAction(widgetContext, action, data) ? action : { id: action.id } as TableCellButtonActionDescriptor);
+}
+
+function filterTableCellButtonAction(widgetContext: WidgetContext,
+ action: TableCellButtonActionDescriptor, data: EntityData | AlarmDataInfo | FormattedData): boolean {
+ if (action.useShowActionCellButtonFunction) {
+ try {
+ return action.showActionCellButtonFunction(widgetContext, data);
+ } catch (e) {
+ console.warn('Failed to execute showActionCellButtonFunction', e);
+ return false;
+ }
+ } else {
+ return true;
+ }
+}
export function constructTableCssString(widgetConfig: WidgetConfig): string {
const origColor = widgetConfig.color || 'rgba(0, 0, 0, 0.87)';
diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/timeseries-table-widget.component.html b/ui-ngx/src/app/modules/home/components/widget/lib/timeseries-table-widget.component.html
index 4524082e5b..334e196c41 100644
--- a/ui-ngx/src/app/modules/home/components/widget/lib/timeseries-table-widget.component.html
+++ b/ui-ngx/src/app/modules/home/components/widget/lib/timeseries-table-widget.component.html
@@ -59,35 +59,40 @@
-
+
-
+
-
+
+
+
+
-
+
-
+
+
+
diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/timeseries-table-widget.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/timeseries-table-widget.component.ts
index 94efa03663..6b210fdd4a 100644
--- a/ui-ngx/src/app/modules/home/components/widget/lib/timeseries-table-widget.component.ts
+++ b/ui-ngx/src/app/modules/home/components/widget/lib/timeseries-table-widget.component.ts
@@ -53,17 +53,22 @@ import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
import {
CellContentInfo,
CellStyleInfo,
+ checkHasActions,
constructTableCssString,
getCellContentInfo,
getCellStyleInfo,
getRowStyleInfo,
+ getTableCellButtonActions,
+ prepareTableCellButtonActions,
RowStyleInfo,
+ TableCellButtonActionDescriptor,
TableWidgetDataKeySettings,
TableWidgetSettings
} from '@home/components/widget/lib/table-widget.models';
import { Overlay } from '@angular/cdk/overlay';
import { SubscriptionEntityInfo } from '@core/api/widget-api.models';
import { DatePipe } from '@angular/common';
+import { parseData } from '@home/components/widget/lib/maps/common-maps-utils';
export interface TimeseriesTableWidgetSettings extends TableWidgetSettings {
showTimestamp: boolean;
@@ -72,6 +77,8 @@ export interface TimeseriesTableWidgetSettings extends TableWidgetSettings {
}
interface TimeseriesRow {
+ actionCellButtons?: TableCellButtonActionDescriptor[];
+ hasActions?: boolean;
[col: number]: any;
formattedTs: string;
}
@@ -116,9 +123,9 @@ export class TimeseriesTableWidgetComponent extends PageComponent implements OnI
public pageSizeOptions;
public textSearchMode = false;
public textSearch: string = null;
- public actionCellDescriptors: WidgetActionDescriptor[];
public sources: TimeseriesTableSource[];
public sourceIndex: number;
+ public countCellButtonAction: number;
private cellContentCache: Array
= [];
private cellStyleCache: Array = [];
@@ -204,7 +211,7 @@ export class TimeseriesTableWidgetComponent extends PageComponent implements OnI
private initialize() {
this.ctx.widgetActions = [this.searchAction ];
- this.actionCellDescriptors = this.ctx.actionsApi.getActionDescriptors('actionCellButton');
+ this.countCellButtonAction = this.ctx.actionsApi.getActionDescriptors('actionCellButton').length;
this.searchAction.show = isDefined(this.settings.enableSearch) ? this.settings.enableSearch : true;
this.displayPagination = isDefined(this.settings.displayPagination) ? this.settings.displayPagination : true;
@@ -288,10 +295,10 @@ export class TimeseriesTableWidgetComponent extends PageComponent implements OnI
cellContentInfo.decimals = dataKey.decimals;
source.contentsInfo.push(cellContentInfo);
}
- if (this.actionCellDescriptors.length) {
+ if (this.countCellButtonAction) {
source.displayedColumns.push('actions');
}
- const tsDatasource = new TimeseriesDatasource(source, this.hideEmptyLines, this.dateFormatFilter, this.datePipe);
+ const tsDatasource = new TimeseriesDatasource(source, this.hideEmptyLines, this.dateFormatFilter, this.datePipe, this.ctx);
tsDatasource.dataUpdated(this.data);
this.sources.push(source);
}
@@ -570,12 +577,18 @@ class TimeseriesDatasource implements DataSource {
private allRowsSubject = new BehaviorSubject([]);
private allRows$: Observable> = this.allRowsSubject.asObservable();
+ private cellButtonActions: TableCellButtonActionDescriptor[];
+ private readonly usedShowCellActionFunction: boolean;
+
constructor(
private source: TimeseriesTableSource,
private hideEmptyLines: boolean,
private dateFormatFilter: string,
- private datePipe: DatePipe
+ private datePipe: DatePipe,
+ private widgetContext: WidgetContext
) {
+ this.cellButtonActions = getTableCellButtonActions(widgetContext);
+ this.usedShowCellActionFunction = this.cellButtonActions.some(action => action.useShowActionCellButtonFunction);
this.source.timeseriesDatasource = this;
}
@@ -617,13 +630,23 @@ class TimeseriesDatasource implements DataSource {
const rowsMap: {[timestamp: number]: TimeseriesRow} = {};
for (let d = 0; d < data.length; d++) {
const columnData = data[d].data;
- columnData.forEach((cellData) => {
+ columnData.forEach((cellData, index) => {
const timestamp = cellData[0];
let row = rowsMap[timestamp];
if (!row) {
row = {
formattedTs: this.datePipe.transform(timestamp, this.dateFormatFilter)
};
+ if (this.cellButtonActions.length) {
+ if (this.usedShowCellActionFunction) {
+ const parsedData = parseData(data, index);
+ row.actionCellButtons = prepareTableCellButtonActions(this.widgetContext, this.cellButtonActions, parsedData[0]);
+ row.hasActions = checkHasActions(row.actionCellButtons);
+ } else {
+ row.hasActions = true;
+ row.actionCellButtons = this.cellButtonActions;
+ }
+ }
row[0] = timestamp;
for (let c = 0; c < data.length; c++) {
row[c + 1] = undefined;
diff --git a/ui-ngx/src/app/shared/models/alarm.models.ts b/ui-ngx/src/app/shared/models/alarm.models.ts
index e629e1c574..51e86af8fb 100644
--- a/ui-ngx/src/app/shared/models/alarm.models.ts
+++ b/ui-ngx/src/app/shared/models/alarm.models.ts
@@ -22,6 +22,7 @@ import { TimePageLink } from '@shared/models/page/page-link';
import { NULL_UUID } from '@shared/models/id/has-uuid';
import { EntityType } from '@shared/models/entity-type.models';
import { CustomerId } from '@shared/models/id/customer-id';
+import { TableCellButtonActionDescriptor } from '@home/components/widget/lib/table-widget.models';
export enum AlarmSeverity {
CRITICAL = 'CRITICAL',
@@ -105,6 +106,8 @@ export interface AlarmInfo extends Alarm {
}
export interface AlarmDataInfo extends AlarmInfo {
+ actionCellButtons?: TableCellButtonActionDescriptor[];
+ hasActions?: boolean;
[key: string]: any;
}
diff --git a/ui-ngx/src/app/shared/models/widget.models.ts b/ui-ngx/src/app/shared/models/widget.models.ts
index 9f58f5e264..d7347df88e 100644
--- a/ui-ngx/src/app/shared/models/widget.models.ts
+++ b/ui-ngx/src/app/shared/models/widget.models.ts
@@ -121,6 +121,7 @@ export interface WidgetActionSource {
name: string;
value: string;
multiple: boolean;
+ hasShowCondition?: boolean;
}
export const widgetActionSources: {[acionSourceId: string]: WidgetActionSource} = {
@@ -129,6 +130,7 @@ export const widgetActionSources: {[acionSourceId: string]: WidgetActionSource}
name: 'widget-action.header-button',
value: 'headerButton',
multiple: true,
+ hasShowCondition: true
}
};