X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=rulemgt-frontend%2Fsrc%2Fapp%2Fcorrelation-ruleList%2FalarmRule.component.ts;h=05f36ca48736860f3d9b3caebdad62684fa6f646;hb=6ebc6d22c0654cbdfde1329d5ea7a2f23df5988d;hp=fa69e3cb9117162d7316f50993b65e34a1ead539;hpb=66f6f24d89479acb0545847e48ef62dcc860d1e2;p=holmes%2Frule-management.git diff --git a/rulemgt-frontend/src/app/correlation-ruleList/alarmRule.component.ts b/rulemgt-frontend/src/app/correlation-ruleList/alarmRule.component.ts index fa69e3c..05f36ca 100644 --- a/rulemgt-frontend/src/app/correlation-ruleList/alarmRule.component.ts +++ b/rulemgt-frontend/src/app/correlation-ruleList/alarmRule.component.ts @@ -13,14 +13,13 @@ See the License for the specific language governing permissions and limitations under the License. */ -import {Component, OnInit} from '@angular/core'; -import {ModalService} from '../correlation-modal/modal.service'; -import {RuleModel} from './alarmRule'; -import {RuleRequest} from './ruleRequest'; -import {Router} from '@angular/router'; -import {AlarmRuleService} from './alarmRule.service'; - -declare var jQuery: any; +import { Component, OnInit, ElementRef } from '@angular/core'; +import { ModalService } from '../correlation-modal/modal.service'; +import { RuleModel } from './alarmRule'; +import { RuleRequest } from './ruleRequest'; +import { Router } from '@angular/router'; +import { AlarmRuleService } from './alarmRule.service'; +import { Observable } from 'rxjs'; @Component({ selector: 'alarmRule', @@ -43,7 +42,7 @@ export class AlarmRule implements OnInit { activeStatus = ["option_all", "common_enabled", "common_disabled"]; constructor(public _alarmRuleService: AlarmRuleService, private modalService: ModalService, - private router: Router) { + private router: Router, private ele: ElementRef) { } switch(select: string): void { @@ -53,8 +52,7 @@ export class AlarmRule implements OnInit { } else if (select == "common_disabled") { this.ruleModel.enabled = 0; } else { - - this.ruleModel.enabled = null; + this.ruleModel.enabled = 2; } this.setActiveText(); } @@ -69,7 +67,7 @@ export class AlarmRule implements OnInit { this.ruleRequest.enabled = 0; } else { this.activeText = "option_all"; - this.ruleRequest.enabled = null; + this.ruleRequest.enabled = 2; } } @@ -117,7 +115,7 @@ export class AlarmRule implements OnInit { public reset(): void { this.ruleModel.ruleName = null; this.activeText = 'option_all'; - this.ruleModel.enabled = null; + this.ruleModel.enabled = 2; this.getRules(); } @@ -145,7 +143,7 @@ export class AlarmRule implements OnInit { creator: null, updateTime: null, modifier: null, - enabled: 0, + enabled: 2, loopControlName: '' }; this.ruleRequest = { @@ -153,9 +151,16 @@ export class AlarmRule implements OnInit { ruleName: null, creator: null, modifier: null, - enabled: null, + enabled: 2, loopControlName: '' }; this.getRules(); + + this.ele.nativeElement.querySelector('.container-fluid').style.height = window.innerHeight + 'px'; + Observable.fromEvent(window, 'resize') + .debounceTime(100) +   .subscribe(() => { + this.ele.nativeElement.querySelector('.container-fluid').style.height = window.innerHeight + 'px'; +   }); } }