core/dashboard/wiget-time-context/realtime-control/realtime-control.component.ts
providers |
{
provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => RealtimeControlComponent), multi: true
}
|
selector | c8y-realtime-control |
templateUrl | ./realtime-control.component.html |
Properties |
|
Methods |
markAsTouched |
markAsTouched()
|
Returns :
void
|
registerOnChange | ||||||
registerOnChange(fn: any)
|
||||||
Parameters :
Returns :
void
|
registerOnTouched | ||||||
registerOnTouched(onTouched: any)
|
||||||
Parameters :
Returns :
void
|
setDisabledState | ||||||
setDisabledState(disabled: boolean)
|
||||||
Parameters :
Returns :
void
|
writeValue | ||||||
writeValue(value: boolean)
|
||||||
Parameters :
Returns :
void
|
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>