operations/bulk-single-operations-list/single-operations-list.component.ts
selector | c8y-single-operations-list |
templateUrl | ./single-operations-list.component.html |
Properties |
Methods |
Inputs |
Outputs |
constructor(bulkOperationsService: BulkOperationsService)
|
||||||
Parameters :
|
bulkOperation |
Type : Partial<IOperationBulk>
|
readOnly |
Type : boolean
|
Default value : false
|
onRetryFailedOperations |
Type : EventEmitter<Partial<IOperationBulk>>
|
filterOperationsByType |
filterOperationsByType()
|
Returns :
void
|
getFilterTypeOfSingleOperations |
getFilterTypeOfSingleOperations()
|
Returns :
any
|
Async getOperationsByStatus | ||||||
getOperationsByStatus(filter: StatusOption[])
|
||||||
Parameters :
Returns :
any
|
Async ngAfterViewInit |
ngAfterViewInit()
|
Returns :
any
|
ngOnChanges | ||||||
ngOnChanges(changes: SimpleChanges)
|
||||||
Parameters :
Returns :
void
|
retryBulkOperation |
retryBulkOperation()
|
Returns :
void
|
OPERATION_STATUS |
Type : object
|
Default value : { ...OperationStatus, ALL: gettext('ALL') }
|
OPERATION_STATUS_LABELS |
Default value : OPERATION_STATUS_LABELS
|
OPERATION_STATUS_OPTIONS_MAP |
Type : OperationStatusOptionsMap
|
Default value : OPERATION_STATUS_OPTIONS_MAP
|
singleOperations |
Type : IResultList<IOperation>
|
statusFilter |
Type : StatusFilterComponent
|
Decorators :
@ViewChild(StatusFilterComponent, {static: false})
|
<ng-container
*ngIf="
bulkOperation.progress.failed ||
bulkOperation.progress.executing ||
bulkOperation.progress.pending ||
bulkOperation.progress.successful
"
>
<div class="legend form-block p-t-16 m-b-0" translate>Operations</div>
<div class="d-flex a-i-center">
<div class="d-flex a-i-center p-b-8">
<span class="m-r-4 text-medium" translate>Filter by status</span>
<c8y-status-filter
small
[options]="OPERATION_STATUS_OPTIONS_MAP"
(onFilterChanged)="getOperationsByStatus($event)"
></c8y-status-filter>
</div>
<div class="m-l-auto p-b-8" *ngIf="!readOnly && bulkOperation.progress.failed > 0">
<button
class="btn btn-navbar"
(click)="retryBulkOperation()"
title="{{ 'Retry failed operations' | translate }}"
>
<i c8yIcon="repeat" class="m-r-4"></i> <span translate>Retry failed operations</span>
</button>
</div>
</div>
<div class="inner-scroll">
<c8y-list-group>
<div class="d-contents" *c8yFor="let operation of singleOperations; loadMore: 'auto'">
<c8y-single-operation-item [operation]="operation" [readOnly]="readOnly" class="d-contents">
</c8y-single-operation-item>
</div>
<c8y-li *ngIf="singleOperations && singleOperations.data.length === 0">
<c8y-li-body>
<div class="c8y-empty-state text-center">
<h2 class="c8y-icon c8y-icon-energy c8y-icon-duocolor m-b-16"></h2>
<div>
<h3 translate>No single operations of the selected status to display.</h3>
<p class="m-b-16" translate>Single operations will be displayed here</p>
</div>
</div>
</c8y-li-body>
</c8y-li>
</c8y-list-group>
</div>
</ng-container>