/*-------------------------------------------------------------------------------------------------------------- * Copyright (c) insite-gmbh. All rights reserved. * Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------------------------*/ import { Component, OnInit, OnDestroy } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { InaxAlarmService, AlarmListChangeEvent, IHmiAlarmEntry } from '../../../../@inax/alarm'; import { InaxTranslateService } from '../../../../@inax/translate'; import { Subscription } from 'rxjs/Rx'; import { AlarmListComponent } from './alarm-list.component'; @Component({ selector: 'pending-alarm-list', templateUrl: './@inax/alarmUi/src/alarmList/alarm-list.component.html', styleUrls: ['./@inax/alarmUi/src/alarmList/alarm-list.component.css'] }) export class PendingAlarmListComponent extends AlarmListComponent { /** * */ constructor(inaxAlarm: InaxAlarmService, inaxTranslate: InaxTranslateService) { super(inaxAlarm, inaxTranslate); this.title = "Pending"; } public async updateAlarms() { this.numberOfAlarms = await this._inaxAlarm.numberOfAlarmsAsync(this._filter); if (this.numberOfAlarms > 0) { await this._inaxAlarm.alarms(this._filter, this._inaxTranslate.defaultLanguage, this._inaxTranslate.language, this.skip, this.entriesPerPage, false, this._currentSortOrder ).subscribe(a => this.alarms = a); } } }