From 753258c1ba52aeba89d2ce5357c53a9c9a2fbcf6 Mon Sep 17 00:00:00 2001 From: deaflynx Date: Thu, 20 Jul 2023 13:03:24 +0300 Subject: [PATCH] AlarmsTableWidgetComponent, TimeseriesTableWidgetComponent - show pointer cursor if widget has rowClick action --- .../components/widget/lib/alarms-table-widget.component.html | 3 ++- .../components/widget/lib/alarms-table-widget.component.ts | 2 ++ .../widget/lib/timeseries-table-widget.component.html | 3 ++- .../components/widget/lib/timeseries-table-widget.component.ts | 2 ++ 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/alarms-table-widget.component.html b/ui-ngx/src/app/modules/home/components/widget/lib/alarms-table-widget.component.html index 9a23e86bf8..1c03a37bbd 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/alarms-table-widget.component.html +++ b/ui-ngx/src/app/modules/home/components/widget/lib/alarms-table-widget.component.html @@ -160,7 +160,8 @@ 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 db2d04ea88..5612499c64 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 @@ -180,6 +180,7 @@ export class AlarmsTableWidgetComponent extends PageComponent implements OnInit, public displayedColumns: string[] = []; public alarmsDatasource: AlarmsDatasource; public noDataDisplayMessageText: string; + public hasRowAction: boolean; private setCellButtonAction: boolean; private cellContentCache: Array = []; @@ -493,6 +494,7 @@ export class AlarmsTableWidgetComponent extends PageComponent implements OnInit, } this.setCellButtonAction = !!(actionCellDescriptors.length + this.ctx.actionsApi.getActionDescriptors('actionCellButton').length); + this.hasRowAction = !!this.ctx.actionsApi.getActionDescriptors('rowClick').length; if (this.setCellButtonAction) { this.displayedColumns.push('actions'); 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 d0ca2f23d1..65c4fbe0ee 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 @@ -99,7 +99,8 @@ - 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 78f6203b1b..e6c3bc7e24 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 @@ -161,6 +161,7 @@ export class TimeseriesTableWidgetComponent extends PageComponent implements OnI public sources: TimeseriesTableSource[]; public sourceIndex: number; public noDataDisplayMessageText: string; + public hasRowAction: boolean; private setCellButtonAction: boolean; private cellContentCache: Array = []; @@ -300,6 +301,7 @@ export class TimeseriesTableWidgetComponent extends PageComponent implements OnI this.ctx.widgetActions = [this.searchAction, this.columnDisplayAction]; this.setCellButtonAction = !!this.ctx.actionsApi.getActionDescriptors('actionCellButton').length; + this.hasRowAction = !!this.ctx.actionsApi.getActionDescriptors('rowClick').length; this.searchAction.show = isDefined(this.settings.enableSearch) ? this.settings.enableSearch : true; this.columnDisplayAction.show = isDefined(this.settings.enableSelectColumnDisplay) ? this.settings.enableSelectColumnDisplay : true;