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 | |
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')
4 files changed, 58 insertions, 89 deletions
diff --git a/rulemgt-frontend/src/app/correlation-ruleInfo/ruleInfo.component.html b/rulemgt-frontend/src/app/correlation-ruleInfo/ruleInfo.component.html index 2211a83..8407b39 100644 --- a/rulemgt-frontend/src/app/correlation-ruleInfo/ruleInfo.component.html +++ b/rulemgt-frontend/src/app/correlation-ruleInfo/ruleInfo.component.html @@ -15,7 +15,7 @@ --> <div class="container-fluid" style="padding: 40px 55px 0 55px"> <form #ruleForm="ngForm" class="form-group row" (submit)="onSubmit(ruleName)"> - <div class="form-body"> + <div class="form-body col-xs-10"> <div class="row form-group"> <label for="userName" class="col-xs-2 col-sm-1 col-form-label labelstyle"> <span>{{"field_rule_name_Add_Page"|translate}}</span> @@ -52,74 +52,37 @@ <label class="col-xs-2 col-sm-1 col-form-label labelstyle"> <span>{{"common_status"|translate}}</span> </label> - <div class="col-xs-10 col-sm-11"> - <div class="row"> - <div *ngIf="queryRule.enabled == 0"> - <div class="col-xs-4 col-sm-2 col-md-1"> - <input class="magic-radio" type="radio" name="radio" [(ngModel)]="queryRule.enabled" value='0'> - <label for="radio1">{{"common_off"|translate}}</label> - </div> - <div class="col-xs-4 col-sm-2 col-md-1"> - <input class="magic-radio" type="radio" name="radio" [(ngModel)]="queryRule.enabled" value='1'> - <label for="radio1" (click)="switch()">{{"common_on"|translate}}</label> + <div class="row" style="margin-left:-30px"> + <div *ngIf="queryRule.enabled == 1" class="col-xs-12"> + <div class="row"> + <div class="col-xs-4 col-sm-2 col-md-1"> + <input class="magic-radio" type="radio" name="radio" [(ngModel)]="queryRule.enabled" value='1'> + <label for="radio1">{{"common_on"|translate}}</label> + </div> + <div class="col-xs-4 col-sm-2 col-md-1"> + <input class="magic-radio" type="radio" name="radio" [(ngModel)]="queryRule.enabled" value='0'> + <label for="radio1" (click)="switch()">{{"common_off"|translate}}</label> + </div> </div> </div> - <div *ngIf="queryRule.enabled == 1"> - <div class="col-xs-4 col-sm-2 col-md-1"> - <input class="magic-radio" type="radio" name="radio" [(ngModel)]="queryRule.enabled" value='0'> - <label for="radio1" (click)="switch()">{{"common_off"|translate}}</label> - </div> - <div class="col-xs-4 col-sm-2 col-md-1"> - <input class="magic-radio" type="radio" name="radio" [(ngModel)]="queryRule.enabled" value='1'> - <label for="radio1">{{"common_on"|translate}}</label> + <div *ngIf="queryRule.enabled == 0" class="col-xs-12"> + <div class="row"> + <div class="col-xs-4 col-sm-2 col-md-1"> + <input class="magic-radio" type="radio" name="radio" [(ngModel)]="queryRule.enabled" value='1'> + <label for="radio1" (click)="switch()">{{"common_on"|translate}}</label> + </div> + <div class="col-xs-4 col-sm-2 col-md-1"> + <input class="magic-radio" type="radio" name="radio" [(ngModel)]="queryRule.enabled" value='0'> + <label for="radio1">{{"common_off"|translate}}</label> + </div> + </div> </div> - </div> - </div> - </div> - <!--<div class="row form-group"> - <label for="" class="col-xs-2 col-sm-1 col-form-label labelstyle"> - <span>{{"common_file"|translate}}</span> - </label> - <div class="col-xs-6 col-sm-7"> - <div class="btn-group btn-group-circle"> - <span class="importDivArea mmlBatchBtnBar"> - <button class="btn btn-info" id="importBtn" disabled="{{addBottonStatus}}"> - <span class="ict-import"></span> - <span>{{"import"|translate}}</span> - </button> - <div id="importDiv" class="container upload"> - <form id="fileupload" #fileForm="ngForm" role="form" enctype="multipart/form-data"> - <div class="file-preview"> - <div id="dropzone" class="file-drop-zone"> - <div class="file-drop-zone-title"> - <span>{{"file_import"|translate}}</span> - </div> - </div> - </div> - - <div class="input-group fileupload-btn"> - <div id="fileName" class="form-control file-caption">task2.zip</div> - <span class="input-group-btn" id="btnGroup"> - <span class="btn btn-primary fileinput-button white radius_s blue1-active" id="browse" data-placement="bottom" data-toggle="tooltip"> - <span class="importBtnFontSize">{{"common_browse"|translate}}</span> - <input type="file" name="file" title=" " accept=".txt" multiple=""> - </span> - <button id="fileremove" class="btn btn-default" type="button"> - <span class="importBtnFontSize">{{"common_remove"|translate}}</span> - </button> - <button id="filesubmit" class="btn btn-default" type="button">{{"common_confirm"|translate}}</button> - </span> - </div> - - </form> - </div> - </span> </div> </div> - </div>--> + </div> <div class="row form-group"> <label for="" class="col-xs-2 col-sm-1 col-form-label labelstyle"> @@ -129,7 +92,7 @@ <div class="col-xs-9 col-sm-10"> <div class="form-group"> <textarea id="cmds" class="form-control" readonly="{{addBottonStatus}}" [(ngModel)]="queryRule.content" name="content" rows="12" - cols="80" required placeholder="package example;"> + cols="80" required placeholder="package org.onap.holmes.rule;"> </textarea> </div> </div> @@ -138,19 +101,19 @@ <div class="row form-group"> <div class="col-xs-8 col-xs-offset-2 col-sm-offset-1"> <label class="myclass" id="checkLabel"> - <button type="button" (click)="checkContent('check')" disabled="{{addBottonStatus}}" class="btn btn-info">{{"common_check"|translate}}</button> + <button type="button" (click)="checkContent('check')" disabled="{{addBottonStatus}}" class="btn btn-small">{{"common_check"|translate}}</button> </label> <label class="myclass" id="updateLabel"> - <button type="button" disabled="{{addBottonStatus}}" class="btn btn-info" (click)="update()">{{"common_update"|translate}}</button> + <button type="button" disabled="{{addBottonStatus}}" class="btn btn-primary btn-small" (click)="update()">{{"common_update"|translate}}</button> </label> <label class="myclass" id="saveLabel"> - <button type="submit" disabled="{{addBottonStatus}}" class="btn btn-info">{{"common_save"|translate}}</button> + <button type="submit" disabled="{{addBottonStatus}}" class="btn btn-primary btn-small">{{"common_save"|translate}}</button> </label> <label class="myclass" id="cancelLabel"> - <button type="button" routerLink='/alarmRule' class="btn btn-info">{{"common_cancel"|translate}}</button> + <button type="button" routerLink='/alarmRule' class="btn btn-small">{{"common_cancel"|translate}}</button> </label> </div> </div> </div> </form> -</div> +</div>
\ No newline at end of file diff --git a/rulemgt-frontend/src/app/correlation-ruleInfo/ruleInfo.component.ts b/rulemgt-frontend/src/app/correlation-ruleInfo/ruleInfo.component.ts index dfb75b4..4610a63 100644 --- a/rulemgt-frontend/src/app/correlation-ruleInfo/ruleInfo.component.ts +++ b/rulemgt-frontend/src/app/correlation-ruleInfo/ruleInfo.component.ts @@ -62,7 +62,7 @@ export class RuleInfo implements OnInit { creator: null, updateTime: null, modifier: null, - enabled: 0, + enabled: 1, loopControlName: '' }; diff --git a/rulemgt-frontend/src/app/correlation-ruleList/alarmRule.component.html b/rulemgt-frontend/src/app/correlation-ruleList/alarmRule.component.html index 7678395..f909940 100644 --- a/rulemgt-frontend/src/app/correlation-ruleList/alarmRule.component.html +++ b/rulemgt-frontend/src/app/correlation-ruleList/alarmRule.component.html @@ -46,13 +46,11 @@ </div> <div class="fmrule_btn_group display_table col-xs-4"> - <div class="inline row"> - <button id="batchDeleteButton" class="btn btn-primary" (click)="searchRules()"> - <span class="glyphicon glyphicon-search" style="padding-top: 2px"></span> + <div class="row"> + <button id="batchDeleteButton" class="btn btn-primary btn-small" (click)="searchRules()"> <span>{{"common_query"|translate}}</span> </button> - <button class="btn btn-secondary" (click)="reset()" style="margin-left: 10px"> - <span class="glyphicon glyphicon-refresh"></span> + <button class="btn btn-small" (click)="reset()" style="margin-left: 10px"> <span>{{"common_reset"|translate}}</span> </button> </div> @@ -61,8 +59,7 @@ <div class="row form-group" style="margin-top: 10px"> <div class="inline col-xs-12"> - <button type="button" routerLink='/ruleInfo' class="btn btn-info"> - <span class="glyphicon glyphicon-plus"></span> + <button type="button" routerLink='/ruleInfo' class="btn btn-small"> <span>{{"common_add"|translate}}</span> </button> </div> @@ -70,19 +67,20 @@ </div> </form> + <div> <div class="row form-group col-xs-12" style="margin-top: 20px"> {{"common_total1"|translate}}{{totalcount}}{{"common_total2"|translate}} </div> - <table class="table table-bordered table-striped customtable table-hover"> + <table> <thead class="nf_thead"> <tr class="heading"> - <td>{{"field_rule_name_Add_Page"|translate}}</td> - <td>{{"common_status"|translate}}</td> - <td>{{"field_create_time"|translate}}</td> - <td>{{"field_creator"|translate}}</td> - <td>{{"field_update_time"|translate}}</td> - <td>{{"common_operator"|translate}}</td> + <th>{{"field_rule_name_Add_Page"|translate}}</th> + <th>{{"common_status"|translate}}</th> + <th>{{"field_create_time"|translate}}</th> + <th>{{"field_creator"|translate}}</th> + <th>{{"field_update_time"|translate}}</th> + <th>{{"common_operator"|translate}}</th> </tr> </thead> <tbody> 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'; + }); } } |