context-dashboard/dashboard-manager/type-dashboards-list/type-dashboards-list.component.ts
selector | c8y-dashboard-manager |
templateUrl | ./type-dashboards-list.component.html |
Properties |
Methods |
|
constructor(dashboardManagerService: DashboardManagerService, bsModalService: BsModalService)
|
|||||||||
Parameters :
|
Async delete | ||||||
delete(dashboard: ContextDashboardManagedObject)
|
||||||
Parameters :
Returns :
any
|
Async onDataSourceModifier | ||||||
onDataSourceModifier(dataSourceModifier: DataSourceModifier)
|
||||||
Parameters :
Returns :
Promise<ServerSideDataResult>
|
openTargetAssetsModal | ||||||
openTargetAssetsModal(dashboard: ContextDashboardManagedObject)
|
||||||
Parameters :
Returns :
void
|
trackByName | |||||||||
trackByName(_index, column: Column)
|
|||||||||
Parameters :
Returns :
string
|
actionControls |
Type : ActionControl[]
|
Default value : [
{
type: BuiltInActionType.Edit,
text: gettext('Edit dashboard'),
callback: item => this.openTargetAssetsModal(item as ContextDashboardManagedObject)
},
{
type: BuiltInActionType.Delete,
text: gettext('Delete dashboard'),
callback: item => this.delete(item as ContextDashboardManagedObject)
}
]
|
columns |
Default value : this.dashboardManagerService.getColumns()
|
displayOptions |
Type : DisplayOptions
|
Default value : {
striped: true,
bordered: false,
gridHeader: true,
filter: true,
hover: false
}
|
loadingItemsLabel |
Type : string
|
Default value : gettext('Loading dashboards…')
|
loadMoreItemsLabel |
Default value : gettext('Load more dashboards')
|
pagination |
Default value : this.dashboardManagerService.getDefaultPagination()
|
refresh |
Default value : new EventEmitter<void>()
|
serverSideDataCallback |
Type : ServerSideDataCallback
|
title |
Default value : gettext('Type dashboards')
|
<c8y-title>
{{ 'Dashboard manager' | translate }}
</c8y-title>
<div class="content-fullpage d-flex d-col border-top border-bottom">
<c8y-data-grid
[title]="title"
[loadMoreItemsLabel]="loadMoreItemsLabel"
[loadingItemsLabel]="loadingItemsLabel"
[columns]="columns"
[pagination]="pagination"
[serverSideDataCallback]="serverSideDataCallback"
[infiniteScroll]="'auto'"
[actionControls]="actionControls"
[showSearch]="true"
[displayOptions]="displayOptions"
[refresh]="refresh"
[expandableRows]="'ASYNC'"
>
<div
*c8yExpandableRow="
let context;
let asyncRenderSuccess = asyncRenderSuccess;
let asyncRenderFail = asyncRenderFail
"
>
<c8y-type-dashboard-info
[context]="context"
[asyncRenderSuccess]="asyncRenderSuccess"
[asyncRenderFail]="asyncRenderFail"
></c8y-type-dashboard-info>
</div>
<c8y-ui-empty-state
[icon]="'search'"
[title]="'No matching dashboards.' | 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="icon">
<ng-container *c8yCellRendererDef="let context">
<i [c8yIcon]="context.value"></i>
</ng-container>
</c8y-column>
<c8y-column name="deviceTypeValue">
<ng-container *c8yCellRendererDef="let context">
<span class="label label-info">
{{ context.value }}
</span>
</ng-container>
</c8y-column>
<c8y-column [name]="column.name"></c8y-column>
</ng-container>
</c8y-data-grid>
</div>