operations/bulk-operation-scheduler/operation-scheduler.component.ts
ControlValueAccessor
Validator
OnInit
OnDestroy
providers |
{
provide: NG_VALUE_ACCESSOR, multi: true, useExisting: forwardRef(() => OperationSchedulerComponent)
}
{
provide: NG_VALIDATORS, multi: true, useExisting: forwardRef(() => OperationSchedulerComponent)
}
|
selector | c8y-operation-scheduler |
templateUrl | operation-scheduler.component.html |
Properties |
Methods |
Inputs |
Accessors |
constructor(formBuilder: FormBuilder, options: OptionsService)
|
|||||||||
Parameters :
|
minutesAhead |
Type : number
|
convertDelayHandler | ||||||
convertDelayHandler(unit: string)
|
||||||
Parameters :
Returns :
void
|
emitData | ||||||
emitData(data: literal type)
|
||||||
Parameters :
Returns :
void
|
markAsTouched |
markAsTouched()
|
Returns :
void
|
ngOnDestroy |
ngOnDestroy()
|
Returns :
void
|
ngOnInit |
ngOnInit()
|
Returns :
void
|
registerOnChange | ||||||
registerOnChange(fn: any)
|
||||||
Parameters :
Returns :
void
|
registerOnTouched | ||||||
registerOnTouched(fn: any)
|
||||||
Parameters :
Returns :
void
|
registerOnValidatorChange | ||||||
registerOnValidatorChange(fn: any)
|
||||||
Parameters :
Returns :
void
|
Optional setDisabledState | ||||||
setDisabledState(isDisabled: boolean)
|
||||||
Parameters :
Returns :
void
|
validate |
validate()
|
Returns :
ValidationErrors
|
writeValue | ||||||
writeValue(value: OperationSchedule)
|
||||||
Parameters :
Returns :
void
|
delayErrors |
Type : ValidationErrors
|
Default value : null
|
fgOperationScheduler |
Type : FormGroup
|
maxDelay |
Type : number
|
minDate |
Type : Date
|
minDelay |
Type : number
|
pickerErrors |
Type : ValidationErrors
|
Default value : null
|
placeholder |
Type : string
|
Default value : gettext('Start date')
|
_minutesAhead | ||||||
set_minutesAhead(minutes: number)
|
||||||
Parameters :
Returns :
void
|
<div [formGroup]="fgOperationScheduler">
<div class="form-group">
<label translate>Start date</label>
<div class="datetime-picker">
<c8y-form-group class="datepicker">
<input
class="form-control"
placeholder="{{ placeholder | translate }}"
required
formControlName="picker"
[bsConfig]="{ customTodayClass: 'today' }"
[minDate]="minDate"
bsDatepicker
(blur)="markAsTouched()"
/>
<c8y-messages>
<c8y-message
[name]="'dateValidation'"
[text]="'Select time in the future.' | translate"
></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">
<c8y-form-group [hasError]="delayErrors">
<label translate>Delay</label>
<div class="input-group">
<input
class="form-control"
placeholder="{{ 'e.g.' | translate }} 15"
type="number"
required
formControlName="delay"
(blur)="markAsTouched()"
/>
<div class="input-group-btn">
<div class="c8y-select-wrapper">
<select
class="form-control m-r-sm-32 m-r-xs-56"
[attr.aria-label]="'Delay units' | translate"
formControlName="unit"
(blur)="markAsTouched()"
>
<option
value="seconds"
translate
>
Seconds
</option>
<option
value="milliseconds"
translate
>
Milliseconds
</option>
</select>
<span></span>
</div>
</div>
</div>
</c8y-form-group>
</div>
</div>