Commit 91f02d33 authored by wangqinghua's avatar wangqinghua

update

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