diff options
author | GuangrongFu <fu.guangrong@zte.com.cn> | 2018-09-18 17:30:18 +0800 |
---|---|---|
committer | GuangrongFu <fu.guangrong@zte.com.cn> | 2018-09-18 18:47:02 +0800 |
commit | 19a11640b3ed8d770fd1cb6f296c4c0e793cdb2a (patch) | |
tree | b061b02d7c6414f7a588bbea186b40e882a1a429 /rulemgt-frontend/src/app/correlation-ruleList/alarmRule.component.ts | |
parent | 68642487bb04f73bb4784bb60a965e26d8f8016a (diff) |
Changed the Style of GUI
Change-Id: Ie30363f6358639c660f49585aa03d243b560e444
Issue-ID: HOLMES-148
Signed-off-by: GuangrongFu <fu.guangrong@zte.com.cn>
Diffstat (limited to 'rulemgt-frontend/src/app/correlation-ruleList/alarmRule.component.ts')
-rw-r--r-- | rulemgt-frontend/src/app/correlation-ruleList/alarmRule.component.ts | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/rulemgt-frontend/src/app/correlation-ruleList/alarmRule.component.ts b/rulemgt-frontend/src/app/correlation-ruleList/alarmRule.component.ts index cb413b5..d3897fe 100644 --- a/rulemgt-frontend/src/app/correlation-ruleList/alarmRule.component.ts +++ b/rulemgt-frontend/src/app/correlation-ruleList/alarmRule.component.ts @@ -13,12 +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'; +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', @@ -41,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 { @@ -155,5 +156,12 @@ export class AlarmRule implements OnInit { 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'; + }); } } |