File

core/dashboard/wiget-time-context/realtime-control/realtime-control.component.ts

Implements

ControlValueAccessor

Metadata

Index

Properties
Methods

Methods

markAsTouched
markAsTouched()
Returns : void
registerOnChange
registerOnChange(fn: any)
Parameters :
Name Type Optional
fn any No
Returns : void
registerOnTouched
registerOnTouched(onTouched: any)
Parameters :
Name Type Optional
onTouched any No
Returns : void
setDisabledState
setDisabledState(disabled: boolean)
Parameters :
Name Type Optional
disabled boolean No
Returns : void
writeValue
writeValue(value: boolean)
Parameters :
Name Type Optional
value boolean No
Returns : void

Properties

disabled
Default value : false
Readonly disableRealtimeLabel
Default value : gettext('Disable realtime')
Readonly enableRealtimeLabel
Default value : gettext('Enable realtime')
onChange
Default value : () => {...}
onTouched
Default value : () => {...}
touched
Default value : false
value
Type : boolean
 <button
  class="btn btn-icon c8y-realtime"
  [attr.aria-label]="(value ? disableRealtimeLabel : enableRealtimeLabel) | translate"
  tooltip="{{ (value ? disableRealtimeLabel : enableRealtimeLabel) | translate }}"
  placement="top"
  container="body"
  type="button"
  (click)="onChange(!value)"
  [adaptivePosition]="false"
  [delay]="500"
  [disabled]="disabled"
>
  <span
    class="c8y-pulse m-0"
    [ngClass]="{ active: value, inactive: !value }"
  ></span>
</button>

results matching ""

    No results matching ""