File

widgets/implementations/datapoints-table/datapoints-table-view/datapoints-table-view.component.ts

Implements

OnInit OnDestroy

Metadata

Index

Properties
Methods
Inputs

Constructor

constructor(alertService: AlertService, datapointsTableViewService: DatapointsTableViewService, translateService: TranslateService, dashboardContextComponent: ContextDashboardComponent, widgetConfigMigrationService: WidgetConfigMigrationService)
Parameters :
Name Type Optional
alertService AlertService No
datapointsTableViewService DatapointsTableViewService No
translateService TranslateService No
dashboardContextComponent ContextDashboardComponent No
widgetConfigMigrationService WidgetConfigMigrationService No

Inputs

config
Type : DatapointsTableConfig

Data points table widget config.

isInPreviewMode
Type : boolean
Default value : false

Indicates whether the component is in widget preview mode. If true, the table will be displayed without the export selector button.

Methods

Async ngOnChanges
ngOnChanges()
Returns : Promise<void>
ngOnDestroy
ngOnDestroy()
Returns : void
Async ngOnInit
ngOnInit()
Returns : any
Async onExportModalOpen
onExportModalOpen(isOpened: boolean)
Parameters :
Name Type Optional
isOpened boolean No
Returns : Promise<void>
Async onGlobalContextChange
onGlobalContextChange(change: GlobalContextEvent)
Parameters :
Name Type Optional
change GlobalContextEvent No
Returns : Promise<void>
onScrolling
onScrolling(isScrolling: boolean)
Parameters :
Name Type Optional
isScrolling boolean No
Returns : void

Properties

activeDatapoints
Type : KPIDetails[]
Default value : []

Represents the data points where __active property is set to true.

alerts
Type : DynamicComponentAlertAggregator
containerClass
Type : string

Represents the custom CSS style for the export selector component.

datapointsTableItems
Type : GroupedDatapointTableItem[]
Default value : []

An array of GroupedDatapointTableItem objects representing the datapoints table items. Used to populate the table with data.

datapointsWithValues
Type : DatapointWithValues[]

An array of objects representing datapoints with their corresponding values. Used to populate the CSV/Excel file with data.

devicesColumnHeaders
Type : TableColumnHeader[]
exportConfig
Type : ExportConfig

Represents a configuration options used by a c8y-datapoints-export-selector.

globalContextWidgetWrapperComponent
Type : GlobalContextWidgetWrapperComponent
Decorators :
@ViewChild(GlobalContextWidgetWrapperComponent)
hasAnyActiveDatapoint
Type : boolean
hasMultipleDatapoints
Type : boolean

Indicates whether there is more than one data point. If is true, then a column 'Device' will be displayed in the table.

isInitialRequest
Type : unknown
Default value : true

Indicates whether the component is in the initial request state where data for a table structure is being prepared.

isLoading$
Type : unknown
Default value : new BehaviorSubject<boolean>(true)

Current isLoading state. Indicates whether the data is being loaded.

isRefreshDisabled
Type : unknown
Default value : false

Indicates whether refreshing should be enabled or disabled. It's 'true' when user is not allowed to view a measurements.

isScrolling
Type : unknown
Default value : signal(false)
seriesWithoutPermissionToRead
Type : literal type[]
widgetControls
Type : WidgetControlsPresetConfig
Default value : { presets: ['defaultWithAggregation'] }
<ng-container *ngIf="!isInPreviewMode">
  <div class="d-flex gap-16 p-r-16 inner-scroll h-auto min-width-0">
    <c8y-global-context-widget-wrapper
      *ngIf="widgetControls"
      [widgetControls]="widgetControls"
      [displayMode]="'inline'"
      [isLoading]="isLoading$ | async"
      [config]="config"
      (globalContextChange)="onGlobalContextChange($event)"
    ></c8y-global-context-widget-wrapper>
    <ng-container *ngIf="config.datapoints.length > 0"></ng-container>
    <c8y-datapoints-export-selector
      class="m-l-auto p-b-8"
      [containerClass]="containerClass"
      [exportConfig]="exportConfig"
      (isOpen)="onExportModalOpen($event)"
    ></c8y-datapoints-export-selector>
  </div>
</ng-container>
<ng-container *ngIf="devicesColumnHeaders">
  <c8y-datapoints-table
    [aggregationType]="config.aggregation"
    [datapointsTableItems]="datapointsTableItems"
    [decimalPlaces]="config.decimalPlaces"
    [devicesColumnHeaders]="devicesColumnHeaders"
    [hasMultipleDatapoints]="hasMultipleDatapoints"
    [isLoading]="isLoading$ | async"
    [seriesWithoutPermissionToReadCount]="seriesWithoutPermissionToRead?.length"
    (isScrolling)="onScrolling($event)"
  ></c8y-datapoints-table>
</ng-container>

results matching ""

    No results matching ""