repository/configuration/list/configuration-list.component.ts
OnInit
selector | c8y-configuration-list |
templateUrl | ./configuration-list.component.html |
Properties |
Methods |
|
constructor(alert: AlertService, gridService: DataGridService, repositoryService: RepositoryService, bsModalService: BsModalService, modalService: ModalService, translateService: TranslateService, inventoryBinaryService: InventoryBinaryService)
|
||||||||||||||||||||||||
Parameters :
|
Async add |
add()
|
Returns :
any
|
Async delete | ||||||
delete(configuration: IManagedObject)
|
||||||
Parameters :
Returns :
any
|
Async download | ||||||
download(configuration: IManagedObject)
|
||||||
Parameters :
Returns :
any
|
Async edit | ||||||
edit(configuration: IManagedObject)
|
||||||
Parameters :
Returns :
any
|
isBinaryFile | ||||||
isBinaryFile(configuration: IManagedObject)
|
||||||
Parameters :
Returns :
boolean
|
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 : []
|
columns |
Type : Column[]
|
Default value : [
new RepositoryItemNameGridColumn({
filterLabel: gettext('Filter configurations by name'),
placeholder: gettext('SSH'),
callback: this.edit.bind(this)
}),
new DescriptionGridColumn({
filterLabel: gettext('Filter configurations by description'),
placeholder: gettext('SSH configuration')
}),
new FileGridColumn(),
new DeviceTypeGridColumn({
path: 'deviceType',
filterLabel: gettext('Filter configurations by device type')
}),
new TypeGridColumn({
header: gettext('Configuration type'),
filterLabel: gettext('Filter by configuration type'),
example: 'ssh',
path: 'configurationType',
repositoryType: RepositoryType.CONFIGURATION
})
]
|
filter |
Type : FilterInputComponent
|
Decorators :
@ViewChild(FilterInputComponent, {static: false})
|
noDataMessage |
Default value : gettext('There are no configuration snapshots defined.')
|
noDataSubtitle |
Default value : gettext('Add a configuration snapshot first.')
|
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 : ServerSideDataCallback
|
size$ |
Type : Promise<number>
|
sizeRequestDone |
Default value : false
|
<c8y-title>
<span
class="m-r-4"
translate
>
Configuration repository
</span>
<small>
{{ size$ | async }}
<span translate>snapshots</span>
</small>
</c8y-title>
<c8y-breadcrumb>
<c8y-breadcrumb-item
icon="c8y-management"
label="{{ 'Management' | translate }}"
></c8y-breadcrumb-item>
<c8y-breadcrumb-item
icon="gears"
label="{{ 'Configuration repository' | translate }}"
></c8y-breadcrumb-item>
</c8y-breadcrumb>
<c8y-action-bar-item [placement]="'right'">
<button
class="btn btn-link"
title="{{ 'Add configuration snapshot' | translate }}"
type="button"
(click)="add()"
>
<i c8yIcon="plus-circle"></i>
{{ 'Add configuration snapshot' | translate }}
</button>
</c8y-action-bar-item>
<c8y-help
src="/docs/device-management-application/managing-device-data/#managing-configurations"
></c8y-help>
<div class="content-fullpage border-top border-bottom">
<c8y-data-grid
[title]="'Configurations' | translate"
[refresh]="refresh$"
[pagination]="pagination"
[columns]="columns"
[actionControls]="actionControls"
[infiniteScroll]="'auto'"
[serverSideDataCallback]="serverSideDataCallback"
>
<c8y-ui-empty-state
[icon]="stats?.size > 0 ? 'search' : 'gears'"
[title]="stats?.size > 0 ? (noResultsMessage | translate) : (noDataMessage | translate)"
[subtitle]="stats?.size > 0 ? (noResultsSubtitle | translate) : (noDataSubtitle | translate)"
*emptyStateContext="let stats"
[horizontal]="stats?.size > 0"
>
<ng-container *ngIf="stats?.size === 0">
<p>
<button
class="btn btn-primary"
title="{{ 'Add configuration snapshot' | translate }}"
type="button"
(click)="add()"
>
{{ 'Add configuration snapshot' | translate }}
</button>
</p>
<p c8y-guide-docs>
<small
translate
ngNonBindable
>
Find out more in the
<a
c8y-guide-href="/docs/device-management-application/managing-device-data/#managing-configurations"
>
user documentation
</a>
.
</small>
</p>
</ng-container>
</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>