File

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

Implements

OnInit

Metadata

Index

Properties
Methods
Inputs
Outputs
Accessors

Constructor

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

Inputs

actionControls
Type : []
baseQuery
Type : any
Default value : {}
bulkActionControls
Type : []
columns
Type : []
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
parent-group
Type : IManagedObject
refresh
Type : EventEmitter<any>
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<DeviceGridColumn[]>

Methods

configChange
configChange(config)
Parameters :
Name Optional
config No
Returns : void
ngOnChanges
ngOnChanges(changes: SimpleChanges)
Parameters :
Name Type Optional
changes SimpleChanges No
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
onUnassignAsset
onUnassignAsset(asset: IManagedObject, parentRef: IManagedObject)
Parameters :
Name Type Optional
asset IManagedObject No
parentRef IManagedObject No
Returns : void
Async setActionControls
setActionControls()
Returns : any
trackByName
trackByName(_index, column: DeviceGridColumn)
Parameters :
Name Type Optional
_index No
column DeviceGridColumn 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 }
pagination
Type : Pagination
Default value : this.subAssetsGridService.getDefaultPagination()
serverSideDataCallback
Type : any
Public subAssetsGridService
Type : SubAssetsService

Accessors

columns
getcolumns()
setcolumns(value: DeviceGridColumn[])
Parameters :
Name Type Optional
value DeviceGridColumn[] 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"
  [refresh]="refresh"
  [displayOptions]="displayOptions"
  (onConfigChange)="configChange($event)"
  (itemsSelect)="itemsSelect.emit($event)"
>
  <c8y-ui-empty-state
    [icon]="'c8y-group-add'"
    [title]="'No items to display.' | translate"
    [subtitle]="emptyStateText | translate"
    [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 ""