sub-assets/sub-assets-grid.component.ts
OnInit
OnDestroy
GridConfigContextProvider
| providers |
{
provide: UserPreferencesConfigurationStrategy, useClass: UserPreferencesConfigurationStrategy
}
{
provide: SmartGroupGridConfigurationStrategy, useClass: SmartGroupGridConfigurationStrategy
}
{
provide: DATA_GRID_CONFIGURATION_STRATEGY, useClass: SubAssetsGridConfigurationStrategy
}
{
provide: DATA_GRID_CONFIGURATION_CONTEXT_PROVIDER, useExisting: SubAssetsGridComponent
}
|
| selector | c8y-sub-assets-grid |
| imports |
DataGridComponent
ProductExperienceDirective
EmptyStateContextDirective
EmptyStateComponent
NgFor
ColumnDirective
C8yTranslatePipe
|
| templateUrl | ./sub-assets-grid.component.html |
Properties |
Methods |
Inputs |
Outputs |
Accessors |
constructor(subAssetsGridService: SubAssetsService, bsModalService: BsModalService, smartGroupsService: SmartGroupsService, deviceListExtensionService: DeviceListExtensionService, assetNodeService: AssetNodeService)
|
||||||||||||||||||
|
Parameters :
|
| actionControls |
Type : ActionControl[]
|
| baseQuery |
Type : object
|
Default value : {}
|
| bulkActionControls |
Type : BulkActionControl[]
|
| columns |
Type : Column[]
|
| columnsConfigKey |
Type : string
|
|
The name of the key where columns configuration will be stored. |
| 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 |
Type : Pagination
|
| parent-group |
Type : IManagedObject
|
| refresh |
Type : EventEmitter<void>
|
| 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<Column[]>
|
| getGridConfigContext |
getGridConfigContext()
|
|
Returns :
SubAssetsGridConfigContext
|
| ngOnChanges | ||||||
ngOnChanges(changes: SimpleChanges)
|
||||||
|
Parameters :
Returns :
void
|
| ngOnDestroy |
ngOnDestroy()
|
|
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
|
| onReload |
onReload()
|
|
Returns :
void
|
| onUnassignAsset | |||||||||
onUnassignAsset(asset: IManagedObject, parentRef: IManagedObject)
|
|||||||||
|
Parameters :
Returns :
void
|
| setActionControls |
setActionControls()
|
|
Returns :
void
|
| trackByName | |||||||||
trackByName(_index, column: Column)
|
|||||||||
|
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,
hover: true
}
|
| noDataMessage |
Default value : gettext('No items to display.')
|
| noResultsMessage |
Default value : gettext('No matching items.')
|
| noResultsSubtitle |
Default value : gettext('Refine your search terms or check your spelling.')
|
| pagination |
Type : Pagination
|
Default value : this.subAssetsGridService.getDefaultPagination()
|
| PRODUCT_EXPERIENCE |
Default value : PRODUCT_EXPERIENCE_SUB_ASSETS_SHARED
|
| serverSideDataCallback |
Type : ServerSideDataCallback
|
| showCounterWarning |
Default value : false
|
| showSearch |
Default value : false
|
| Public subAssetsGridService |
Type : SubAssetsService
|
| columns | ||||||
getcolumns()
|
||||||
setcolumns(value: Column[])
|
||||||
|
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"
[showCounterWarning]="showCounterWarning"
[refresh]="refresh"
[showSearch]="showSearch"
[displayOptions]="displayOptions"
(itemsSelect)="itemsSelect.emit($event)"
c8yProductExperience
[actionName]="PRODUCT_EXPERIENCE.EVENT"
(onReload)="onReload()"
>
<c8y-ui-empty-state
[icon]="'c8y-group-add'"
[title]="stats?.size > 0 ? (noResultsMessage | translate) : (noDataMessage | translate)"
[subtitle]="stats?.size > 0 ? (noResultsSubtitle | translate) : (emptyStateText | translate)"
*emptyStateContext="let stats"
[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>