File

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

Implements

ControlValueAccessor

Metadata

Index

Properties
Methods

Methods

onIntervalChange
onIntervalChange(autoRefreshSeconds: number)
Parameters :
Name Type Optional
autoRefreshSeconds number No
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
writeValue
writeValue(autoRefreshSeconds: number)
Parameters :
Name Type Optional
autoRefreshSeconds number No
Returns : void

Properties

autoRefreshSeconds
Type : number
Readonly DEFAULT_INTERVAL_VALUES
Default value : DEFAULT_INTERVAL_VALUES
onChange
Type : function
onTouched
Default value : () => {...}
Readonly SECONDS_UNTIL_REFRESH
Default value : gettext('{{ seconds }} s`until refresh`')
Readonly START_INTERVAL_VALUE
Default value : DEFAULT_INTERVAL_VALUE
<div class="c8y-select-wrapper">
  <select
    class="form-control text-12"
    [attr.aria-label]="'Refresh interval in seconds' | translate"
    [tooltip]="'Refresh interval in seconds' | translate"
    placement="bottom"
    [adaptivePosition]="false"
    [delay]="500"
    [container]="'body'"
    mode
    [(ngModel)]="autoRefreshSeconds"
    (ngModelChange)="onIntervalChange($event)"
    [ngModelOptions]="{ standalone: true }"
  >
    <option
      *ngFor="let refreshInterval of DEFAULT_INTERVAL_VALUES"
      [ngValue]="refreshInterval"
      [attr.selected]="refreshInterval === START_INTERVAL_VALUE ? '' : null"
    >
      {{ SECONDS_UNTIL_REFRESH | translate: { seconds: refreshInterval / 1000 } }}
    </option>
  </select>
  <span></span>
</div>

results matching ""

    No results matching ""