File

operations/bulk-operation-stepper/bulk-operation-stepper.component.ts

Implements

OnDestroy

Metadata

Index

Properties
Methods
Outputs

Constructor

constructor(bulkOperationService: BulkOperationsService, modal: ModalService, alert: AlertService)
Parameters :
Name Type Optional
bulkOperationService BulkOperationsService No
modal ModalService No
alert AlertService No

Outputs

selectionChange
Type : EventEmitter<StepperSelectionEvent>

Methods

cancel
cancel()
Returns : void
changeDeviceTypes
changeDeviceTypes(deviceTypes: string | string[])
Parameters :
Name Type Optional
deviceTypes string | string[] No
Returns : void
Async confirmDeviceSelection
confirmDeviceSelection($event: literal type)
Parameters :
Name Type Optional
$event literal type No
Returns : any
ngAfterViewInit
ngAfterViewInit()
Returns : void
ngOnDestroy
ngOnDestroy()
Returns : void
Async scheduleBulkOperation
scheduleBulkOperation()
Returns : any

Properties

bulkOperationType
Type : BulkOperationType
createBulkOperationDetailsComponent
Type : CreateBulkOperationDetailsComponent
Decorators :
@ViewChild(CreateBulkOperationDetailsComponent, {static: false})
customSteps
Type : QueryList<CustomStep>
Decorators :
@ContentChildren(CustomStep)
deviceQueryString
Type : string
deviceTypes$
Type : Observable<string[]>
operationDetails
Type : OperationDetails
operationDetailsForm
Type : FormGroup
pendingStatus
Type : boolean
retrieveOperationDetails
Type : function
scheduleData
Type : OperationSchedule
showButtons
Type : boolean
Default value : false
showStepper
Type : boolean
Default value : false
stepper
Type : C8yStepper
Decorators :
@ViewChild(C8yStepper, {static: false})
stepperButtonsLabels
Type : object
Default value : { custom: gettext('Schedule bulk operation') }
steps
Type : CustomStep[]
Default value : []
<div class="fit-h">
  <c8y-stepper
    class="flex-col no-align-items fit-h c8y-stepper--no-btns a-i-center"
    linear
    [disableDefaultIcons]="{ edit: true, done: false }"
    [customClasses]="['col-xs-10', 'col-sm-8', 'm-t-24', 'm-b-40', 'p-0', 'flex-no-shrink']"
    *ngIf="showStepper"
  >
    <!-- CUSTOM STEPS 1 to N-2 -->
    <cdk-step
      *ngFor="let step of steps"
      [label]="step.label | translate"
      [completed]="step.completed"
    >
      <ng-container *ngTemplateOutlet="step.templateRef"></ng-container>
      <c8y-stepper-buttons
        class="d-block card-footer p-24 separator fit-w"
        *ngIf="showButtons"
        [disabled]="step.buttonsDisabled"
        (onNext)="step.onNext($event)"
        (onCancel)="cancel()"
      ></c8y-stepper-buttons>
    </cdk-step>
    <!-- STEP N-1 - Data-grid -->
    <cdk-step [label]="'Filter target devices' | translate">
      <div class="card-block p-b-0 p-t-0 flex-no-shrink separator-bottom col-xs-12">
        <div class="flex-row j-c-center p-b-8 p-t-4">
          <div class="col-xs-12 col-sm-6">
            <h4 class="text-center text-normal m-b-16">
              {{ 'Filter target devices' | translate }}
            </h4>
          </div>
        </div>
      </div>

      <div class="col-xs-12 flex-grow no-gutter">
        <c8y-device-selector
          [deviceTypes]="deviceTypes$"
          (onDeviceQueryStringChange)="deviceQueryString = $event"
        ></c8y-device-selector>
      </div>
      <c8y-stepper-buttons
        class="d-block card-footer p-24 separator fit-w"
        *ngIf="showButtons"
        (onNext)="confirmDeviceSelection($event)"
        (onCancel)="cancel()"
      ></c8y-stepper-buttons>
    </cdk-step>

    <!-- STEP N - Scheduler -->
    <cdk-step [label]="'Confirm and schedule bulk operation' | translate">
      <div class="card-block flex-no-shrink p-b-0 p-t-0 separator-bottom col-xs-12">
        <div class="flex-row j-c-center p-b-8 p-t-4">
          <div class="col-xs-12 col-sm-6">
            <h4 class="text-center text-normal m-b-16">
              {{ 'Confirm and schedule bulk operation' | translate }}
            </h4>
          </div>
        </div>
      </div>

      <div class="col-xs-12 flex-grow no-gutter">
        <div class="card-inner-scroll fit-h">
          <div class="card-block p-b-0">
            <div class="flex-row j-c-center p-t-8 p-b-8">
              <div class="col-xs-12 col-sm-6">
                <c8y-operation-summary
                  [name]="operationDetails?.name | translate"
                  [description]="operationDetails?.description | translate"
                  [deviceQueryString]="deviceQueryString"
                ></c8y-operation-summary>
              </div>
            </div>
            <div class="flex-row j-c-center">
              <div class="col-xs-12 col-sm-6">
                <c8y-create-bulk-operation-details
                  [bulkOperationType]="bulkOperationType"
                ></c8y-create-bulk-operation-details>
              </div>
            </div>
          </div>
        </div>
      </div>
      <c8y-stepper-buttons
        class="d-block card-footer p-24 separator fit-w"
        *ngIf="showButtons"
        [labels]="stepperButtonsLabels"
        [pending]="pendingStatus"
        [disabled]="operationDetailsForm?.invalid"
        (onCancel)="cancel()"
        (onCustom)="scheduleBulkOperation()"
      >
      </c8y-stepper-buttons>
    </cdk-step>
  </c8y-stepper>
</div>

results matching ""

    No results matching ""