context-dashboard/dashboard-manager/type-dashboard-target-assets-grid/type-dashboard-target-assets-grid.component.ts
OnInit
selector | c8y-type-dashboard-target-assets-grid |
templateUrl | ./type-dashboard-target-assets-grid.component.html |
Properties |
Methods |
Inputs |
Outputs |
constructor(router: Router, assetsGridService: TypeDashboardAssetsGridService, contextDashboardService: ContextDashboardService)
|
||||||||||||
Parameters :
|
dashboard |
Type : ContextDashboardManagedObject
|
onNavigateToAsset |
Type : EventEmitter<void>
|
navigateToDevice | ||||||
navigateToDevice(val: IManagedObject)
|
||||||
Parameters :
Returns :
void
|
ngOnInit |
ngOnInit()
|
Returns :
void
|
Async onDataSourceModifier | ||||||
onDataSourceModifier(dataSourceModifier: DataSourceModifier)
|
||||||
Parameters :
Returns :
Promise<ServerSideDataResult>
|
trackByName | |||||||||
trackByName(_index, column: Column)
|
|||||||||
Parameters :
Returns :
string
|
actionControls |
Type : ActionControl[]
|
Default value : [
{
type: 'navigateToInstance',
text: gettext('Open instance`dashboard`'),
callback: item => this.navigateToDevice(item as IManagedObject),
icon: 'file-create'
}
]
|
columns |
Type : Column[]
|
labels |
Type : ModalLabels
|
Default value : { cancel: gettext('Cancel') }
|
loadingItemsLabel |
Type : string
|
Default value : gettext('Loading assets…')
|
loadMoreItemsLabel |
Default value : gettext('Load more assets')
|
pagination |
Type : object
|
Default value : {
pageSize: 25,
currentPage: 1
}
|
serverSideDataCallback |
Type : ServerSideDataCallback
|
<c8y-data-grid
[title]="''"
[loadMoreItemsLabel]="loadMoreItemsLabel"
[loadingItemsLabel]="loadingItemsLabel"
[columns]="columns"
[pagination]="pagination"
[infiniteScroll]="'auto'"
[actionControls]="actionControls"
[serverSideDataCallback]="serverSideDataCallback"
[showSearch]="true"
>
<c8y-ui-empty-state
[icon]="'search'"
[title]="'No results to display.' | translate"
[subtitle]="'Refine your search terms.' | 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>