sub-assets/sub-assets-grid.component.ts
selector | c8y-sub-assets-grid |
templateUrl | ./sub-assets-grid.component.html |
Properties |
Methods |
Inputs |
Outputs |
Accessors |
constructor(subAssetsGridService: SubAssetsService, bsModalService: BsModalService, smartGroupsService: SmartGroupsService)
|
||||||||||||
Parameters :
|
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')
|
itemsSelect |
Type : EventEmitter<string[]>
|
onColumnsChange |
Type : EventEmitter<DeviceGridColumn[]>
|
configChange | ||||
configChange(config)
|
||||
Parameters :
Returns :
void
|
ngOnChanges | ||||||
ngOnChanges(changes: SimpleChanges)
|
||||||
Parameters :
Returns :
void
|
ngOnInit |
ngOnInit()
|
Returns :
void
|
Async onDataSourceModifier | ||||||
onDataSourceModifier(dataSourceModifier: DataSourceModifier)
|
||||||
Parameters :
Returns :
Promise<ServerSideDataResult>
|
Async onDeleteAsset | |||||||||
onDeleteAsset(asset: IManagedObject, parentRef: IManagedObject)
|
|||||||||
Parameters :
Returns :
any
|
onUnassignAsset | |||||||||
onUnassignAsset(asset: IManagedObject, parentRef: IManagedObject)
|
|||||||||
Parameters :
Returns :
void
|
Async setActionControls |
setActionControls()
|
Returns :
any
|
trackByName | |||||||||
trackByName(_index, column: DeviceGridColumn)
|
|||||||||
Parameters :
Returns :
string
|
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
|
columns | ||||||
getcolumns()
|
||||||
setcolumns(value: DeviceGridColumn[])
|
||||||
Parameters :
Returns :
void
|
_pagination | ||||||
set_pagination(value: Pagination)
|
||||||
Parameters :
Returns :
void
|
_actionControls | ||||||
set_actionControls(value: ActionControl[])
|
||||||
Parameters :
Returns :
void
|
_bulkActionControls | ||||||
set_bulkActionControls(value: BulkActionControl[])
|
||||||
Parameters :
Returns :
void
|
isRootGroup |
getisRootGroup()
|
getInfiniteScrollMode |
getgetInfiniteScrollMode()
|
_displayOptions | ||||
set_displayOptions(displayOptions)
|
||||
Parameters :
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>