Commit f97789e1 authored by wangqinghua's avatar wangqinghua

update

parent 777c6977
......@@ -48,6 +48,12 @@ export class AnalysisDealComponent implements OnInit {
setEcharts(){
this.chartOption = {
tooltip: {
trigger: 'axis',
axisPointer: { // 坐标轴指示器,坐标轴触发有效
type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
}
},
xAxis: {
type: 'category',
data: this.dealList.map(e=>{
......
......@@ -48,6 +48,12 @@ export class AnalysisEventComponent implements OnInit {
setEcharts(){
this.chartOption = {
tooltip: {
trigger: 'axis',
axisPointer: { // 坐标轴指示器,坐标轴触发有效
type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
}
},
xAxis: {
type: 'category',
data: this.eventList.map(e=>{
......
......@@ -48,6 +48,12 @@ export class AnalysisStatusComponent implements OnInit {
setEcharts(){
this.chartOption = {
tooltip: {
trigger: 'axis',
axisPointer: { // 坐标轴指示器,坐标轴触发有效
type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
}
},
xAxis: {
type: 'category',
data: this.statusList.map(e=>{
......
......@@ -27,7 +27,7 @@
</nz-select>
</div>
<div nz-col nzSpan="3" >
<nz-select style="width: 100%;" nzPlaceHolder="所有告警" [(ngModel)]="obj.priorityName">
<nz-select nzAllowClear style="width: 100%;" nzPlaceHolder="所有告警" [(ngModel)]="obj.priorityName">
<nz-option nzLabel="告警" nzValue="告警"></nz-option>
<nz-option nzLabel="严重" nzValue="严重"></nz-option>
</nz-select>
......
......@@ -97,6 +97,12 @@ export class ResourceAlarmComponent implements OnInit {
title: {
text: '告警总数TOP 10'
},
tooltip : {
trigger: 'axis',
axisPointer : { // 坐标轴指示器,坐标轴触发有效
type : 'shadow' // 默认为直线,可选为:'line' | 'shadow'
}
},
xAxis: {
type: 'category',
data: data.map(e=>{
......@@ -114,6 +120,7 @@ export class ResourceAlarmComponent implements OnInit {
boundaryGap : [ 0, 0.1 ],
},
series: [{
name: '告警总数TOP10',
data: data.map(e=>{
return e.size;
}),
......
......@@ -81,6 +81,12 @@ export class ResourceUsabilComponent implements OnInit {
title: {
text: '可用性TOP 10'
},
tooltip : {
trigger: 'axis',
axisPointer : { // 坐标轴指示器,坐标轴触发有效
type : 'shadow' // 默认为直线,可选为:'line' | 'shadow'
}
},
xAxis: {
type: 'category',
data: this.topList.map(e=>{
......@@ -97,8 +103,9 @@ export class ResourceUsabilComponent implements OnInit {
},
},
series: [{
name: '可用性TOP 10',
data: this.topList.map(e=>{
return e.value *100;
return (e.value).toFixed(2) *100;
}),
type: 'bar'
}]
......@@ -126,6 +133,12 @@ export class ResourceUsabilComponent implements OnInit {
title: {
text: '可用性LAST 10'
},
tooltip : {
trigger: 'axis',
axisPointer : { // 坐标轴指示器,坐标轴触发有效
type : 'shadow' // 默认为直线,可选为:'line' | 'shadow'
}
},
xAxis: {
type: 'category',
data: this.lastList.map(e=>{
......@@ -141,8 +154,9 @@ export class ResourceUsabilComponent implements OnInit {
},
},
series: [{
name: '可用性LAST 10',
data: this.lastList.map(e=>{
return e.value *100;
return (e.value).toFixed(2) *100;
}),
type: 'bar'
}]
......
......@@ -7,19 +7,19 @@
<nz-form-explain *ngIf="validateForm.get('name').dirty && validateForm.get('name').errors">请输入拓扑图名称</nz-form-explain>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSpan]="7" nzRequired nzFor="refreshRete">刷新频率</nz-form-label>
<nz-form-control [nzSpan]="12">
<input style="width: 100px;margin-right: 10px" type="text" nz-input formControlName="refreshRete" placeholder="名称" >分钟
<nz-form-explain *ngIf="validateForm.get('refreshRete').dirty && validateForm.get('refreshRete').errors">请输入刷新频率</nz-form-explain>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSpan]="7" nzRequired nzFor="json">共享角色</nz-form-label>
<nz-form-control [nzSpan]="12">
<input type="text" nz-input name="json" formControlName="json" placeholder="名称" >
<nz-form-explain *ngIf="validateForm.get('json').dirty && validateForm.get('json').errors">请输入分组名称</nz-form-explain>
</nz-form-control>
</nz-form-item>
<!--<nz-form-item>-->
<!--<nz-form-label [nzSpan]="7" nzRequired nzFor="refreshRete">刷新频率</nz-form-label>-->
<!--<nz-form-control [nzSpan]="12">-->
<!--<input style="width: 100px;margin-right: 10px" type="text" nz-input formControlName="refreshRete" placeholder="名称" >分钟-->
<!--<nz-form-explain *ngIf="validateForm.get('refreshRete').dirty && validateForm.get('refreshRete').errors">请输入刷新频率</nz-form-explain>-->
<!--</nz-form-control>-->
<!--</nz-form-item>-->
<!--<nz-form-item>-->
<!--<nz-form-label [nzSpan]="7" nzRequired nzFor="json">共享角色</nz-form-label>-->
<!--<nz-form-control [nzSpan]="12">-->
<!--<input type="text" nz-input name="json" formControlName="json" placeholder="名称" >-->
<!--<nz-form-explain *ngIf="validateForm.get('json').dirty && validateForm.get('json').errors">请输入分组名称</nz-form-explain>-->
<!--</nz-form-control>-->
<!--</nz-form-item>-->
</form>
</nz-modal>
......@@ -31,7 +31,7 @@ export class TopologyComponent implements OnInit {
this.validateForm = this.fb.group(
{
name:['',[Validators.required]],
refreshRete:['',[Validators.required]],
refreshRete:[''],
json:[''],
users:[[]],
userGroups:[[]]
......
......@@ -72,7 +72,7 @@
<tr>
<th [nzChecked]="allChecked"></th>
<th>名称</th>
<th>告警</th>
<th>状态</th>
<th>关联资产</th>
<!--<th nzWidth="20%">主机启用状态</th>-->
<th>可用性</th>
......
......@@ -324,6 +324,11 @@ export class OverAllService {
return this.http.post(SERVER_API_URL + '/templates/update',data);
}
//克隆模板
cloneTemplates(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/templates/clone',data);
}
//删除模板(支持批量删除)
deleteTemplates(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/templates/delete',data);
......
......@@ -92,6 +92,7 @@
<span (click)="showDeleteGroupConfirm(item)">删除</span>
</ng-container>
<ng-container *ngIf="item.level">
<span (click)="cloneTemp(item)">克隆</span>
<span (click)="showTempEditModal(item)">编辑</span>
<span (click)="showDeleteConfirm(item)">删除</span>
</ng-container>
......
......@@ -400,4 +400,31 @@ export class TemplateComponent implements OnInit {
nzOnCancel: () => console.log('Cancel')
});
}
//删除单个模版
cloneTemp(item) {
this.modalService.confirm({
nzTitle: '克隆',
nzContent: '<b style="color: red;">确认克隆该模版吗?</b>',
nzOkText: '确定',
nzOkType: 'danger',
nzOnOk: () => {
const data = {
templateid: Number(item.templateid)
};
this.overAllSer.cloneTemplates(data).subscribe(
(res) => {
if (res.errCode == 10000) {
this.message.info('克隆成功');
this.getTemplateGroup();
} else {
this.message.info(res.errMsg);
}
}
);
},
nzCancelText: '取消',
nzOnCancel: () => console.log('Cancel')
});
}
}
......@@ -78,7 +78,7 @@
<span *ngIf="data.cycleType == '4'">每季度</span>
<span *ngIf="data.cycleType == '5'">每半年</span>
<span *ngIf="data.cycleType == '6'"></span>
/{{data.cycleNum}}
/{{data.cycleNum}}
</td>
<!--<td>{{data.workload}}</td>-->
<td>{{data.startTime | date:"yyyy-MM-dd HH:mm:ss"}}</td>
......
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