services/services-device-tab/services-device-tab.component.ts
selector | c8y-services-device-tab |
templateUrl | services-device-tab.component.html |
Properties |
Methods |
constructor(route: ActivatedRoute, inventoryService: InventoryService, gridService: DataGridService, statusOptionsService: StatusOptionsService)
|
|||||||||||||||
Parameters :
|
Async onDataSourceModifier | ||||||
onDataSourceModifier(dataSourceModifier: DataSourceModifier)
|
||||||
Parameters :
Returns :
Promise<ServerSideDataResult>
|
trackByName | |||||||||
trackByName(_index, column: Column)
|
|||||||||
Parameters :
Returns :
string
|
columns |
Type : Column[]
|
Default value : [
new StatusGridColumn(this.statusOptionsService),
new ServiceNameGridColumn(),
new ServiceTypeGridColumn(),
new LastUpdatedDateGridColumn()
]
|
deviceId |
Type : string | number
|
Default value : this.route.snapshot.parent.data.contextData.id
|
noDataMessage |
Default value : gettext('No services to display.')
|
noResultsMessage |
Default value : gettext('No results to display.')
|
noResultsSubtitle |
Default value : gettext('Refine your search terms or check your spelling.')
|
pagination |
Type : object
|
Default value : {
pageSize: 50,
currentPage: 1
}
|
refresh$ |
Type : EventEmitter<void>
|
Default value : new EventEmitter()
|
serverSideDataCallback |
Type : any
|
sizeRequest |
Type : Promise<number>
|
sizeRequestDone |
Default value : false
|
<div class="content-fullpage">
<c8y-data-grid
[title]="'Services' | translate"
[refresh]="refresh$"
[actionControls]="[]"
[pagination]="pagination"
[columns]="columns"
[infiniteScroll]="'auto'"
[serverSideDataCallback]="serverSideDataCallback"
>
<c8y-ui-empty-state
[icon]="stats?.size > 0 ? 'search' : 'c8y-tools'"
[title]="stats?.size > 0 ? (noResultsMessage | translate) : (noDataMessage | translate)"
[subtitle]="stats?.size > 0 ? (noResultsSubtitle | translate) : null"
*emptyStateContext="let stats; isLoading as isLoading"
[horizontal]="stats?.size > 0"
></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>
</div>