Commit 91f02d33 authored by wangqinghua's avatar wangqinghua

update

parent a8f602b7
......@@ -26,7 +26,7 @@
<tr>
<th nzShowSort>名称</th>
<th>类型</th>
<th>用于告警</th>
<th>用于告警推送</th>
<th>状态</th>
<th nzWidth="15%">细节</th>
<th style="text-align: center">操作</th>
......
......@@ -142,40 +142,42 @@
<nz-form-item>
<nz-form-label [nzSpan]="4" nzFor="serviceid">生成事件</nz-form-label>
<nz-form-control [nzSpan]="14">
<nz-radio-group>
<nz-radio-group [(ngModel)]="isEvent">
<label nz-radio nzValue="1"></label>
<label nz-radio nzValue="2"></label>
</nz-radio-group>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSpan]="4" nzFor="serviceid">事件分类</nz-form-label>
<nz-form-control [nzSpan]="14">
<nz-select name="serviceid" nzPlaceHolder="事件分类" [(ngModel)]="validateForm.event.eventTypeId">
<ng-container *ngFor="let item of eventTypeList">
<nz-option [nzLabel]="item.name" [nzValue]="item.id"></nz-option>
</ng-container>
</nz-select>
</nz-form-control>
</nz-form-item>
<ng-container *ngIf="isEvent == '1'">
<nz-form-item>
<nz-form-label [nzSpan]="4" nzFor="serviceid">事件分类</nz-form-label>
<nz-form-control [nzSpan]="14">
<nz-select name="serviceid" nzPlaceHolder="事件分类" [(ngModel)]="validateForm.event.eventTypeId">
<ng-container *ngFor="let item of eventTypeList">
<nz-option [nzLabel]="item.name" [nzValue]="item.id"></nz-option>
</ng-container>
</nz-select>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSpan]="4" nzFor="serviceid">事件负责人</nz-form-label>
<nz-form-control [nzSpan]="14">
<button (click)="selectPerson()" nz-button><span>选择</span></button>
<ng-container *ngFor="let item of operatorList;let i = index;">
<span>{{item.username}}</span><span (click)="delete(i)">X</span>
</ng-container>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSpan]="4" nzFor="serviceid">事件负责人</nz-form-label>
<nz-form-control [nzSpan]="14">
<button (click)="selectPerson()" nz-button><span>选择</span></button>
<ng-container *ngFor="let item of operatorList;let i = index;">
<span style="margin-left: 10px">{{item.username}}</span><span class="main-color" style="margin-left: 5px" (click)="deleteOperator(i)">X</span>
</ng-container>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSpan]="4" nzRequired nzFor="serviceid">详细描述</nz-form-label>
<nz-form-control [nzSpan]="14">
<textarea nz-input nzPlaceholder="事件描述" [nzAutosize]="{ minRows: 4, maxRows: 4 }" [(ngModel)]="validateForm.event.description"></textarea>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSpan]="4" nzRequired nzFor="serviceid">详细描述</nz-form-label>
<nz-form-control [nzSpan]="14">
<textarea nz-input nzPlaceholder="事件描述" [nzAutosize]="{ minRows: 4, maxRows: 4 }" [(ngModel)]="validateForm.event.description"></textarea>
</nz-form-control>
</nz-form-item>
</ng-container>
</div>
<div class="modal-footer-btn">
<button nz-button (click)="handleEditCancel()" nzType="primary">取消</button>
......
......@@ -32,6 +32,7 @@ export class AlarmModalComponent implements OnInit {
nodes;
nodeList;
actionid; //告警Id
isEvent = "2";
groupList;
sendOption = [];
......@@ -62,13 +63,19 @@ export class AlarmModalComponent implements OnInit {
initForm() {
this.tabNum = 0;
this.selectTreeList = [];
this.sendInfoList = [];
this.operatorList = []; //负责人列表
this.validateForm = {
name: null,
alertGroupId: null,
warn:0,
serious:0,
mediaTypeIds:[],
def_longdata:null,
def_longdata:"问题 {TRIGGER.NAME} 开始于: {EVENT.TIME} {EVENT.DATE}\n" +
"主机: {HOST.NAME}\n" +
"严重程度: {TRIGGER.SEVERITY}\n" +
"\n" +
"原始问题ID: {EVENT.ID}",
r_longdata:'' +
'问题 {TRIGGER.NAME} 恢复于: {EVENT.TIME} {EVENT.DATE} \n' +
'主机: {HOST.NAME}\n' +
......@@ -261,6 +268,10 @@ export class AlarmModalComponent implements OnInit {
this.operatorList = arr;
}
deleteOperator(index){
this.operatorList.splice(index,1);
}
//保存
handEditleOk() {
......
......@@ -104,12 +104,12 @@
<nz-collapse>
<nz-collapse-panel [nzHeader]="panel3.name" [nzActive]="panel3.active"
[nzDisabled]="panel3.disabled">
<div nz-col nzSpan="16">
<div nz-col nzSpan="20">
<div echarts [options]="secondOptionLeft" class="demo-chart"></div>
</div>
<div nz-col nzSpan="8">
<!--<div nz-col nzSpan="8">-->
<!--<div echarts [options]="secondOptionRight" class="demo-chart"></div>-->
</div>
<!--</div>-->
</nz-collapse-panel>
</nz-collapse>
</div>
......
......@@ -445,6 +445,12 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
(res) => {
if (res.errCode == 10000) {
this.secondOptionLeft = {
grid: {
left: '8%',
right: '0',
bottom: '1%',
containLabel: true
},
tooltip: {
trigger: 'axis',
},
......@@ -453,6 +459,14 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
show: false,
},
yAxis: {
axisLabel:{
interval:0,
margin:95,
textStyle: {
align:'left',
baseline:'middle'
}
},
type: 'category',
axisTick: {
show: false
......@@ -467,7 +481,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
data: res.data.disks.map((item) => {
const line = item.name.split('/');
return '/' + line[line.length - 1];
})
}),
},
color: ['#ed7a7b', '#f2f2f2'],
series: [
......
......@@ -100,7 +100,7 @@
<ng-container *ngIf="item.level">
<td nzShowCheckbox [nzIndeterminate]="indeterminate"
(nzCheckedChange)="selectChecked($event,item)" [(nzChecked)]="item.checked"></td>
<td class="cursor" [nzIndentSize]="item.level*20">
<td class="cursor main-color" [nzIndentSize]="item.level*20">
<span (click)="goDetail(item)">{{item.name}}</span>
</td>
</ng-container>
......
......@@ -81,7 +81,7 @@
<ng-container *ngFor="let item of dataSet">
<tr>
<td nzShowCheckbox (nzCheckedChange)="selectChecked($event,item)"></td>
<td class="cursor">
<td class="cursor main-color">
<span (click)="goDetail(item)">{{item.name}}</span>
</td>
<td>
......
......@@ -100,7 +100,8 @@ export class DiscoveryListComponent implements OnInit {
goToCheck(data){
this.router.navigate(['app/main/checkList'],{
queryParams:{
id:data.itemid,
hostId:this.templateid,
discoveryids:data.itemid,
name:data.name,
tempName : this.tempName
}
......
......@@ -4,7 +4,7 @@
<nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="name">用户姓名</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24">
<input nz-input formControlName="name" id="userName">
<nz-form-explain *ngIf="validateForm.get('name').dirty && validateForm.get('name').errors">用户姓名不能为空!</nz-form-explain>
<nz-form-explain *ngIf="validateForm.get('name').dirty && validateForm.get('name').errors">用户姓名为6到16个字符!</nz-form-explain>
</nz-form-control>
</nz-form-item>
<nz-form-item>
......
......@@ -33,7 +33,7 @@ export class UserComponent implements OnInit {
initForm(){
this.validateForm = this.fb.group({
name:[null,[Validators.required,Validators.maxLength(10)]],
name:[null,[Validators.required,Validators.minLength(6),Validators.maxLength(16)]],
phoneNumber:[null,[Validators.required,Validators.minLength(11),Validators.maxLength(11)]],
gender:[null,[Validators.required]],
email:[null,],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment