File

core/dashboard/widget-auto-refresh-context/auto-refresh-control.component.ts

Implements

OnInit AfterViewInit OnDestroy ControlValueAccessor

Metadata

Index

Properties
Methods
Outputs

Outputs

loading
Type : EventEmitter

Methods

ngAfterViewInit
ngAfterViewInit()
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
toggleIntervalRefresh
toggleIntervalRefresh()
Returns : void
writeValue
writeValue(showIntervalRefresh: boolean)
Parameters :
Name Type Optional
showIntervalRefresh boolean No
Returns : void

Properties

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>

results matching ""

    No results matching ""