core/dashboard/widget-auto-refresh-context/auto-refresh-control.component.ts
OnInit
AfterViewInit
OnDestroy
ControlValueAccessor
providers |
{
provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => AutoRefreshControlComponent), multi: true
}
|
selector | c8y-auto-refresh-control |
templateUrl | ./auto-refresh-control.component.html |
Properties |
Methods |
Outputs |
loading |
Type : EventEmitter
|
ngAfterViewInit |
ngAfterViewInit()
|
Returns :
void
|
ngOnDestroy |
ngOnDestroy()
|
Returns :
void
|
ngOnInit |
ngOnInit()
|
Returns :
void
|
registerOnChange | ||||||
registerOnChange(fn: any)
|
||||||
Parameters :
Returns :
void
|
registerOnTouched | ||||||
registerOnTouched(fn: any)
|
||||||
Parameters :
Returns :
void
|
toggleIntervalRefresh |
toggleIntervalRefresh()
|
Returns :
void
|
writeValue | ||||||
writeValue(showIntervalRefresh: boolean)
|
||||||
Parameters :
Returns :
void
|
autoRefreshSeconds$ |
Type : BehaviorSubject<number>
|
countdownIntervalComponent |
Type : CountdownIntervalComponent
|
Decorators :
@ViewChild(CountdownIntervalComponent)
|
Readonly DEFAULT_INTERVAL_VALUE |
Default value : DEFAULT_INTERVAL_VALUE
|
Readonly DISABLE_AUTO_REFRESH |
Default value : gettext('Disable auto refresh')
|
Readonly ENABLE_AUTO_REFRESH |
Default value : gettext('Enable auto refresh')
|
onChange |
Type : function
|
onTouched |
Default value : () => {...}
|
showIntervalRefresh$ |
Type : BehaviorSubject<boolean>
|
<div class="input-group">
<button
class="toggle-countdown"
[attr.aria-label]="
((showIntervalRefresh$ | async) ? DISABLE_AUTO_REFRESH : ENABLE_AUTO_REFRESH) | translate
"
[tooltip]="
((showIntervalRefresh$ | async) ? DISABLE_AUTO_REFRESH : ENABLE_AUTO_REFRESH) | translate
"
placement="bottom"
(click)="toggleIntervalRefresh()"
[adaptivePosition]="false"
mode
[delay]="500"
>
<c8y-countdown-interval
[hidden]="!(showIntervalRefresh$ | async)"
[countdownInterval]="(autoRefreshSeconds$ | async) ?? DEFAULT_INTERVAL_VALUE"
></c8y-countdown-interval>
<i
c8yIcon="pause"
*ngIf="!(showIntervalRefresh$ | async)"
></i>
</button>
<span></span>
</div>