File

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

Implements

ControlValueAccessor Validator OnInit OnDestroy

Metadata

Index

Properties
Methods
Inputs
Accessors

Constructor

constructor(formBuilder: FormBuilder)
Parameters :
Name Type Optional
formBuilder FormBuilder No

Inputs

delayConfig
Type : literal type
minutesAhead
Type : number

Methods

convertDelayHandler
convertDelayHandler(unit: string)
Parameters :
Name Type Optional
unit string No
Returns : void
emitData
emitData(data: literal type)
Parameters :
Name Type Optional
data literal type No
Returns : void
markAsTouched
markAsTouched()
Returns : void
ngOnDestroy
ngOnDestroy()
Returns : void
ngOnInit
ngOnInit()
Returns : void
registerOnChange
registerOnChange(fn: any)
Parameters :
Name Type Optional
fn any No
Returns : void
registerOnTouched
registerOnTouched(fn: any)
Parameters :
Name Type Optional
fn any No
Returns : void
registerOnValidatorChange
registerOnValidatorChange(fn: any)
Parameters :
Name Type Optional
fn any No
Returns : void
Optional setDisabledState
setDisabledState(isDisabled: boolean)
Parameters :
Name Type Optional
isDisabled boolean No
Returns : void
validate
validate()
Returns : ValidationErrors
writeValue
writeValue(value: OperationSchedule)
Parameters :
Name Type Optional
value OperationSchedule No
Returns : void

Properties

delayErrors
Type : ValidationErrors
Default value : null
fgOperationScheduler
Type : FormGroup
minDate
Type : Date
minDelay
Type : number
pickerErrors
Type : ValidationErrors
Default value : null
placeholder
Type : string
Default value : gettext('Start date')

Accessors

_minutesAhead
set_minutesAhead(minutes: number)
Parameters :
Name Type Optional
minutes number No
Returns : void
_delayConfig
set_delayConfig(config: literal type)
Parameters :
Name Type Optional
config literal type No
Returns : void
<div [formGroup]="fgOperationScheduler">
  <div class="form-group m-0">
    <label translate>Start date</label>
    <div class="datetime-picker">
      <c8y-form-group class="datepicker">
        <input
          formControlName="picker"
          class="form-control"
          placeholder="{{ placeholder | translate }}"
          [bsConfig]="{ customTodayClass: 'today' }"
          [minDate]="minDate"
          bsDatepicker
          required
          (blur)="markAsTouched()"
        />
        <c8y-messages *ngIf="pickerErrors">
          <c8y-message *ngIf="pickerErrors.required" translate>
            This field is required.
          </c8y-message>
          <c8y-message *ngIf="pickerErrors.dateValidation && !pickerErrors.required" translate>
            Select time in the future.
          </c8y-message>
        </c8y-messages>
      </c8y-form-group>
      <timepicker
        class="form-group"
        [showSpinners]="false"
        [showMeridian]="false"
        formControlName="time"
        (blur)="markAsTouched()"
      ></timepicker>
    </div>
  </div>
  <div class="form-group m-0">
    <c8y-form-group [hasError]="delayErrors">
      <label translate>Delay</label>
      <div class="input-group">
        <input
          formControlName="delay"
          type="number"
          class="form-control"
          placeholder="{{ 'e.g.' | translate }} 15"
          required
          (blur)="markAsTouched()"
        />
        <div class="input-group-btn">
          <div class="c8y-select-wrapper">
            <select formControlName="unit" class="form-control" (blur)="markAsTouched()">
              <option value="seconds" translate>Seconds</option>
              <option value="milliseconds" translate>Milliseconds</option>
            </select>
            <span></span>
          </div>
        </div>
      </div>
      <c8y-messages *ngIf="delayErrors">
        <c8y-message *ngIf="delayErrors.required" translate>
          This field is required.
        </c8y-message>
        <c8y-message
          *ngIf="delayErrors.min && !delayErrors.required"
          translate
          ngNonBindable
          [translateParams]="{ delay: minDelay }"
        >
          Minimum value is {{ delay }}.
        </c8y-message>
      </c8y-messages>
    </c8y-form-group>
  </div>
</div>

results matching ""

    No results matching ""