File

widgets/implementations/alarms/alarm-list-widget-view/alarm-list-widget.component.ts

Description

To ensure backward compatibility, legacy widgets will be converted to the new implementation.

Implements

OnInit AfterViewInit OnDestroy DynamicComponent

Metadata

Index

Properties
Methods
Inputs

Constructor

constructor(alarmWidgetService: AlarmWidgetService, alarmRealtimeService: AlarmRealtimeService, alarmService: AlarmService, alarmsViewService: AlarmsViewService, alarmWithChildrenRealtimeService: AlarmWithChildrenRealtimeService, dashboardChild: DashboardChildComponent, alertService: AlertService, widgetGlobalAutoRefresh: WidgetGlobalAutoRefreshService)
Parameters :
Name Type Optional
alarmWidgetService AlarmWidgetService No
alarmRealtimeService AlarmRealtimeService No
alarmService AlarmService No
alarmsViewService AlarmsViewService No
alarmWithChildrenRealtimeService AlarmWithChildrenRealtimeService No
dashboardChild DashboardChildComponent No
alertService AlertService No
widgetGlobalAutoRefresh WidgetGlobalAutoRefreshService No

Inputs

config
Type : AlarmListWidgetConfig

Alarm widget config.

Methods

Async fetchAlarms
fetchAlarms()
Returns : Promise<void>
handleRealTimeToggleChange
handleRealTimeToggleChange(isRealtimeToggleOn: boolean)
Parameters :
Name Type Optional
isRealtimeToggleOn boolean No
Returns : void
ngAfterViewInit
ngAfterViewInit()
Returns : void
ngOnChanges
ngOnChanges(changes: SimpleChanges)
Parameters :
Name Type Optional
changes SimpleChanges No
Returns : void
ngOnDestroy
ngOnDestroy()
Returns : void
Async ngOnInit
ngOnInit()
Returns : Promise<void>
Async onDateFilterChange
onDateFilterChange(event: literal type)
Parameters :
Name Type Optional
event literal type No
Returns : Promise<void>

Properties

alarms$
Type : BehaviorSubject<IResultList | null>
Default value : new BehaviorSubject(null)

Represents current alarms.

alarmWidgetAlarmsReloadComp
Type : AlarmWidgetAlarmsReloadComponent
Decorators :
@ViewChild(AlarmWidgetAlarmsReloadComponent)
alerts
Type : DynamicComponentAlertAggregator
isDisabled
Default value : false
isIntervalRefresh
Type : boolean

State of this boolean depends on an Application Options "alarmsRefreshType" setting.

isLoading$
Type : BehaviorSubject<boolean>
Default value : new BehaviorSubject(true)

Current isLoading state. Based on it next countdown cycle is being started.

refreshInterval
Type : number

Current refresh interval set in a widget config.

<c8y-alarms-list
  #list
  [alarms]="alarms$ | async"
  [navigationOptions]="{
    alwaysNavigateToAllAlarms: !config.device,
    allowNavigationToAlarmsView: true,
    includeClearedQueryParams: true,
    queryParamsHandling: ''
  }"
  [isInitialLoading]="isLoading$ | async"
  [hasPermissions]="!isDisabled"
>
  <c8y-alarms-date-filter
    *ngIf="config.displayDateSelection"
    [updateQueryParams]="false"
    [date]="this.config.dateFilter"
    [DEFAULT_INTERVAL]="config.interval || 'none'"
    (dateFilterChange)="onDateFilterChange($event)"
  ></c8y-alarms-date-filter>
  <c8y-alarm-widget-alarms-reload
    class="d-contents"
    [isIntervalRefresh]="isIntervalRefresh"
    [refreshInterval]="refreshInterval"
    [config]="config"
    [isLoading]="isLoading$"
    [isScrolling]="list.isScrolling"
    [isDisabled]="isDisabled"
    (onCountdownEnded)="fetchAlarms()"
    (onRealTimeToggleChanged)="handleRealTimeToggleChange($event)"
  ></c8y-alarm-widget-alarms-reload>
</c8y-alarms-list>

results matching ""

    No results matching ""