widgets/implementations/alarms/alarm-list-widget-view/alarm-list-widget.component.ts
To ensure backward compatibility, legacy widgets will be converted to the new implementation.
                OnInit
                AfterViewInit
                OnDestroy
                    DynamicComponent
    
| providers | 
                                AlarmRealtimeService
                                AlarmWithChildrenRealtimeService
                 | 
            
| selector | c8y-alarm-list-widget | 
            
| imports | 
                                AlarmsListComponent
                            NgIf
                                AlarmsDateFilterComponent
                                AlarmWidgetAlarmsReloadComponent
                            AsyncPipe
                 | 
            
| templateUrl | ./alarm-list-widget.component.html | 
            
                        Properties | 
                
                        Methods | 
                
                        Inputs | 
                
constructor(alarmWidgetService: AlarmWidgetService, alarmRealtimeService: AlarmRealtimeService, alarmService: AlarmService, alarmsViewService: AlarmsViewService, alarmWithChildrenRealtimeService: AlarmWithChildrenRealtimeService, dashboardChild: DashboardChildComponent, alertService: AlertService, widgetGlobalAutoRefresh: WidgetGlobalAutoRefreshService)
                     | 
                |||||||||||||||||||||||||||
| 
                             
                                    Parameters :
                                     
                    
  | 
                
| config | 
                        Type :         AlarmListWidgetConfig
                     | 
                
| 
                         Alarm widget config.  | 
                
| Async fetchAlarms | 
                        
                    fetchAlarms()
                 | 
            
| 
                         
                            Returns :      
                Promise<void>
                         | 
            
| handleRealTimeToggleChange | ||||||
handleRealTimeToggleChange(isRealtimeToggleOn: boolean)
                 | 
            ||||||
| 
                             
                                Parameters :
                                
                                 
                        
 
                            Returns :          
                            void
                         | 
            
| ngAfterViewInit | 
ngAfterViewInit()
                 | 
            
| 
                         
                            Returns :          
                void
                         | 
            
| ngOnChanges | ||||||
ngOnChanges(changes: SimpleChanges)
                 | 
            ||||||
| 
                             
                                Parameters :
                                
                                 
                        
 
                            Returns :          
                            void
                         | 
            
| ngOnDestroy | 
ngOnDestroy()
                 | 
            
| 
                         
                            Returns :          
                void
                         | 
            
| Async ngOnInit | 
                        
                    ngOnInit()
                 | 
            
| 
                         
                            Returns :      
                Promise<void>
                         | 
            
| Async onDateFilterChange | ||||||
                        
                    onDateFilterChange(event: literal type)
                 | 
            ||||||
| 
                             
                                Parameters :
                                
                                 
                        
 
                            Returns :      
                            Promise<void>
                         | 
            
| 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"
    [isRefreshDisabled]="isDisabled"
    (onCountdownEnded)="fetchAlarms()"
    (onRealTimeToggleChanged)="handleRealTimeToggleChange($event)"
  ></c8y-alarm-widget-alarms-reload>
</c8y-alarms-list>