File

sub-assets/sub-assets-grid.component.ts

Implements

OnInit OnDestroy GridConfigContextProvider

Metadata

Index

Properties
Methods
Inputs
Outputs
Accessors

Constructor

constructor(subAssetsGridService: SubAssetsService, bsModalService: BsModalService, smartGroupsService: SmartGroupsService, deviceListExtensionService: DeviceListExtensionService, assetNodeService: AssetNodeService)
Parameters :
Name Type Optional
subAssetsGridService SubAssetsService No
bsModalService BsModalService No
smartGroupsService SmartGroupsService No
deviceListExtensionService DeviceListExtensionService No
assetNodeService AssetNodeService No

Inputs

actionControls
Type : ActionControl[]
baseQuery
Type : object
Default value : {}
bulkActionControls
Type : BulkActionControl[]
columns
Type : Column[]
columnsConfigKey
Type : string

The name of the key where columns configuration will be stored.

displayOptions
Type : any
emptyStateText
Type : string
Default value : gettext( 'Add your first group or assign devices using the buttons on the action bar.' )
filterable
Type : boolean
Default value : true
loadingItemsLabel
Type : string
Default value : gettext('Loading assets…')
pagination
Type : Pagination
parent-group
Type : IManagedObject
refresh
Type : EventEmitter<void>
selectable
Type : boolean
Default value : false
sortable
Type : boolean
Default value : true
title
Type : string
Default value : gettext('Subassets')

Outputs

itemsSelect
Type : EventEmitter<string[]>
onColumnsChange
Type : EventEmitter<Column[]>

Methods

getGridConfigContext
getGridConfigContext()
ngOnChanges
ngOnChanges(changes: SimpleChanges)
Parameters :
Name Type Optional
changes SimpleChanges No
Returns : void
ngOnDestroy
ngOnDestroy()
Returns : void
ngOnInit
ngOnInit()
Returns : void
Async onDataSourceModifier
onDataSourceModifier(dataSourceModifier: DataSourceModifier)
Parameters :
Name Type Optional
dataSourceModifier DataSourceModifier No
Async onDeleteAsset
onDeleteAsset(asset: IManagedObject, parentRef: IManagedObject)
Parameters :
Name Type Optional
asset IManagedObject No
parentRef IManagedObject No
Returns : any
onReload
onReload()
Returns : void
onUnassignAsset
onUnassignAsset(asset: IManagedObject, parentRef: IManagedObject)
Parameters :
Name Type Optional
asset IManagedObject No
parentRef IManagedObject No
Returns : void
setActionControls
setActionControls()
Returns : void
trackByName
trackByName(_index, column: Column)
Parameters :
Name Type Optional
_index No
column Column No
Returns : string

Properties

actionControls
Type : ActionControl[]
bulkActionControls
Type : BulkActionControl[]
Default value : this.subAssetsGridService.getDefaultBulkActionControls()
dataGrid
Type : DataGridComponent
Decorators :
@ViewChild(DataGridComponent, {static: true})
displayOptions
Type : DisplayOptions
Default value : { striped: true, bordered: false, gridHeader: true, filter: true, hover: true }
noDataMessage
Default value : gettext('No items to display.')
noResultsMessage
Default value : gettext('No matching items.')
noResultsSubtitle
Default value : gettext('Refine your search terms or check your spelling.')
pagination
Type : Pagination
Default value : this.subAssetsGridService.getDefaultPagination()
PRODUCT_EXPERIENCE
Default value : PRODUCT_EXPERIENCE_SUB_ASSETS_SHARED
serverSideDataCallback
Type : ServerSideDataCallback
showCounterWarning
Default value : false
showSearch
Default value : false
Public subAssetsGridService
Type : SubAssetsService

Accessors

columns
getcolumns()
setcolumns(value: Column[])
Parameters :
Name Type Optional
value Column[] No
Returns : void
_pagination
set_pagination(value: Pagination)
Parameters :
Name Type Optional
value Pagination No
Returns : void
_actionControls
set_actionControls(value: ActionControl[])
Parameters :
Name Type Optional
value ActionControl[] No
Returns : void
_bulkActionControls
set_bulkActionControls(value: BulkActionControl[])
Parameters :
Name Type Optional
value BulkActionControl[] No
Returns : void
isRootGroup
getisRootGroup()
getInfiniteScrollMode
getgetInfiniteScrollMode()
_displayOptions
set_displayOptions(displayOptions)
Parameters :
Name Optional
displayOptions No
Returns : void
<c8y-data-grid
  [title]="title"
  [loadingItemsLabel]="loadingItemsLabel"
  [columns]="columns"
  [pagination]="pagination"
  [actionControls]="actionControls"
  [selectable]="selectable"
  [bulkActionControls]="bulkActionControls"
  [serverSideDataCallback]="serverSideDataCallback"
  [infiniteScroll]="getInfiniteScrollMode"
  [showCounterWarning]="showCounterWarning"
  [refresh]="refresh"
  [showSearch]="showSearch"
  [displayOptions]="displayOptions"
  (itemsSelect)="itemsSelect.emit($event)"
  c8yProductExperience
  [actionName]="PRODUCT_EXPERIENCE.EVENT"
  (onReload)="onReload()"
>
  <c8y-ui-empty-state
    [icon]="'c8y-group-add'"
    [title]="stats?.size > 0 ? (noResultsMessage | translate) : (noDataMessage | translate)"
    [subtitle]="stats?.size > 0 ? (noResultsSubtitle | translate) : (emptyStateText | translate)"
    *emptyStateContext="let stats"
    [horizontal]="true"
  ></c8y-ui-empty-state>

  <ng-container *ngFor="let column of columns; trackBy: trackByName">
    <c8y-column [name]="column.name"></c8y-column>
  </ng-container>
</c8y-data-grid>

results matching ""

    No results matching ""