|
@@ -186,7 +186,18 @@ export default { |
|
@@ -186,7 +186,18 @@ export default { |
186
|
alarmLevel:[]
|
186
|
alarmLevel:[]
|
187
|
})
|
187
|
})
|
188
|
}
|
188
|
}
|
|
|
189
|
+ //模块数据
|
|
|
190
|
+ let modelData=[
|
|
|
191
|
+ {type:'gz',targetId:''},
|
|
|
192
|
+ {type:'netlink',targetId:''},
|
|
|
193
|
+ {type:'npm',targetId:''},
|
|
|
194
|
+ {type:'base',targetId:''},
|
|
|
195
|
+ {type:'apm',targetId:''},
|
|
|
196
|
+ {type:'log',targetId:''},
|
|
|
197
|
+ {type:'report',targetId:''},
|
|
|
198
|
+ ]
|
189
|
return{
|
199
|
return{
|
|
|
200
|
+ modelData,
|
190
|
faultDefinitionRadio,
|
201
|
faultDefinitionRadio,
|
191
|
faultStateRadio,
|
202
|
faultStateRadio,
|
192
|
faultApplicationRadio,
|
203
|
faultApplicationRadio,
|
|
@@ -238,6 +249,9 @@ export default { |
|
@@ -238,6 +249,9 @@ export default { |
238
|
},
|
249
|
},
|
239
|
//打开网络监测卡片
|
250
|
//打开网络监测卡片
|
240
|
clickNetworkMonitorFunc(index){
|
251
|
clickNetworkMonitorFunc(index){
|
|
|
252
|
+ if(!this.isSaveModel()){
|
|
|
253
|
+ return;
|
|
|
254
|
+ }
|
241
|
this.hiddenAll();
|
255
|
this.hiddenAll();
|
242
|
this.networkMonitorHide = true;
|
256
|
this.networkMonitorHide = true;
|
243
|
this.isActiveIndex=index;
|
257
|
this.isActiveIndex=index;
|
|
@@ -250,6 +264,9 @@ export default { |
|
@@ -250,6 +264,9 @@ export default { |
250
|
},
|
264
|
},
|
251
|
//打开应用监测卡片
|
265
|
//打开应用监测卡片
|
252
|
applicationMonitorFunc(index){
|
266
|
applicationMonitorFunc(index){
|
|
|
267
|
+ if(!this.isSaveModel()){
|
|
|
268
|
+ return;
|
|
|
269
|
+ }
|
253
|
this.hiddenAll();
|
270
|
this.hiddenAll();
|
254
|
this.applicationMonitorHide = true;
|
271
|
this.applicationMonitorHide = true;
|
255
|
this.isActiveIndex=index;
|
272
|
this.isActiveIndex=index;
|
|
@@ -261,6 +278,9 @@ export default { |
|
@@ -261,6 +278,9 @@ export default { |
261
|
},
|
278
|
},
|
262
|
//打开基础环境卡片
|
279
|
//打开基础环境卡片
|
263
|
basicEnvironmentFunc(index){
|
280
|
basicEnvironmentFunc(index){
|
|
|
281
|
+ if(!this.isSaveModel()){
|
|
|
282
|
+ return;
|
|
|
283
|
+ }
|
264
|
this.postPropsData('base',index);
|
284
|
this.postPropsData('base',index);
|
265
|
/*if(this.busTypeArr){
|
285
|
/*if(this.busTypeArr){
|
266
|
this.hiddenAll();
|
286
|
this.hiddenAll();
|
|
@@ -275,6 +295,9 @@ export default { |
|
@@ -275,6 +295,9 @@ export default { |
275
|
},
|
295
|
},
|
276
|
//APM
|
296
|
//APM
|
277
|
apmMonitorFunc(index){
|
297
|
apmMonitorFunc(index){
|
|
|
298
|
+ if(!this.isSaveModel()){
|
|
|
299
|
+ return;
|
|
|
300
|
+ }
|
278
|
this.hiddenAll();
|
301
|
this.hiddenAll();
|
279
|
this.apmMonitorHide = true;
|
302
|
this.apmMonitorHide = true;
|
280
|
this.isActiveIndex=index;
|
303
|
this.isActiveIndex=index;
|
|
@@ -285,6 +308,9 @@ export default { |
|
@@ -285,6 +308,9 @@ export default { |
285
|
},
|
308
|
},
|
286
|
//日志检测
|
309
|
//日志检测
|
287
|
logDetectionFunc(index){
|
310
|
logDetectionFunc(index){
|
|
|
311
|
+ if(!this.isSaveModel()){
|
|
|
312
|
+ return;
|
|
|
313
|
+ }
|
288
|
this.$global.showMsg('敬请期待...','warning');
|
314
|
this.$global.showMsg('敬请期待...','warning');
|
289
|
return;
|
315
|
return;
|
290
|
this.hiddenAll();
|
316
|
this.hiddenAll();
|
|
@@ -297,6 +323,9 @@ export default { |
|
@@ -297,6 +323,9 @@ export default { |
297
|
},
|
323
|
},
|
298
|
//报告订阅
|
324
|
//报告订阅
|
299
|
subscriptionReportFunc(index){
|
325
|
subscriptionReportFunc(index){
|
|
|
326
|
+ if(!this.isSaveModel()){
|
|
|
327
|
+ return;
|
|
|
328
|
+ }
|
300
|
this.$global.showMsg('敬请期待...','warning');
|
329
|
this.$global.showMsg('敬请期待...','warning');
|
301
|
return;
|
330
|
return;
|
302
|
this.hiddenAll();
|
331
|
this.hiddenAll();
|
|
@@ -390,9 +419,13 @@ export default { |
|
@@ -390,9 +419,13 @@ export default { |
390
|
setDetailConfig(typeVal){
|
419
|
setDetailConfig(typeVal){
|
391
|
let that=this;
|
420
|
let that=this;
|
392
|
if(this.configData){
|
421
|
if(this.configData){
|
|
|
422
|
+ console.log("configData",this.configData,typeVal)
|
393
|
this.configData.map((item,index)=>{
|
423
|
this.configData.map((item,index)=>{
|
394
|
if(item.type==typeVal){
|
424
|
if(item.type==typeVal){
|
395
|
- that.targetId=item.targetId;
|
425
|
+ // that.targetId=item.targetId;
|
|
|
426
|
+ that.setTargetId(item.targetId);
|
|
|
427
|
+ that.faultConfId=item.faultConfId;
|
|
|
428
|
+
|
396
|
}
|
429
|
}
|
397
|
})
|
430
|
})
|
398
|
}
|
431
|
}
|
|
@@ -400,7 +433,8 @@ export default { |
|
@@ -400,7 +433,8 @@ export default { |
400
|
this.propsData={
|
433
|
this.propsData={
|
401
|
bizId:this.busTypeArr,
|
434
|
bizId:this.busTypeArr,
|
402
|
docId:this.docId,
|
435
|
docId:this.docId,
|
403
|
- targetId:this.targetId
|
436
|
+ targetId:this.targetId,
|
|
|
437
|
+ faultConfId:this.faultConfId
|
404
|
}
|
438
|
}
|
405
|
},
|
439
|
},
|
406
|
|
440
|
|
|
@@ -425,7 +459,26 @@ export default { |
|
@@ -425,7 +459,26 @@ export default { |
425
|
getNetworkMonitorList(itemData){
|
459
|
getNetworkMonitorList(itemData){
|
426
|
console.log("itemdata",itemData)
|
460
|
console.log("itemdata",itemData)
|
427
|
this.networkMonitorVisible=false;
|
461
|
this.networkMonitorVisible=false;
|
428
|
- this.networkMonitorList=itemData;
|
462
|
+ this.networkMonitorList=itemData.networkMonitorList;
|
|
|
463
|
+ this.setTargetId(itemData.targetId);
|
|
|
464
|
+ // this.targetId=itemData.targetId;
|
|
|
465
|
+ },
|
|
|
466
|
+ //给每个模块设置targetId
|
|
|
467
|
+ setTargetId(val){
|
|
|
468
|
+ this.modelData.map((item,index)=>{
|
|
|
469
|
+ if(this.type==item.type){
|
|
|
470
|
+ item.targetId=val;
|
|
|
471
|
+ }
|
|
|
472
|
+ })
|
|
|
473
|
+ },
|
|
|
474
|
+ //获取模块对应的targetId
|
|
|
475
|
+ getTargetId(type){
|
|
|
476
|
+ let that=this;
|
|
|
477
|
+ this.modelData.map(item=>{
|
|
|
478
|
+ if(item.type==type){
|
|
|
479
|
+ that.targetId=item.targetId;
|
|
|
480
|
+ }
|
|
|
481
|
+ })
|
429
|
},
|
482
|
},
|
430
|
//点击添加应用检测
|
483
|
//点击添加应用检测
|
431
|
addApplicationMonitor(){
|
484
|
addApplicationMonitor(){
|
|
@@ -434,13 +487,15 @@ export default { |
|
@@ -434,13 +487,15 @@ export default { |
434
|
//关闭应用监测添加弹框
|
487
|
//关闭应用监测添加弹框
|
435
|
getApplicationMoniList(itemData){
|
488
|
getApplicationMoniList(itemData){
|
436
|
this.applicationMonitorVisible=false;
|
489
|
this.applicationMonitorVisible=false;
|
437
|
- this.targetId=itemData;
|
490
|
+ this.setTargetId(itemData);
|
|
|
491
|
+ // this.targetId=itemData;
|
438
|
// this.applicationMonitorList=itemData;
|
492
|
// this.applicationMonitorList=itemData;
|
439
|
this.getAppList();
|
493
|
this.getAppList();
|
440
|
},
|
494
|
},
|
441
|
//获取应用列表数据
|
495
|
//获取应用列表数据
|
442
|
getAppList(){
|
496
|
getAppList(){
|
443
|
let that=this;
|
497
|
let that=this;
|
|
|
498
|
+ this.getTargetId('npm')
|
444
|
let params={
|
499
|
let params={
|
445
|
targetId:this.targetId,
|
500
|
targetId:this.targetId,
|
446
|
bizId:this.busTypeArr
|
501
|
bizId:this.busTypeArr
|
|
@@ -464,12 +519,14 @@ export default { |
|
@@ -464,12 +519,14 @@ export default { |
464
|
getAPMList(itemData){
|
519
|
getAPMList(itemData){
|
465
|
this.APMVisible=false;
|
520
|
this.APMVisible=false;
|
466
|
// this.apmMonitorList=itemData;
|
521
|
// this.apmMonitorList=itemData;
|
467
|
- this.targetId=itemData;
|
522
|
+ this.setTargetId(itemData);
|
|
|
523
|
+ // this.targetId=itemData;
|
468
|
this.getApmListInfo();
|
524
|
this.getApmListInfo();
|
469
|
},
|
525
|
},
|
470
|
//获取apm列表数据
|
526
|
//获取apm列表数据
|
471
|
getApmListInfo(){
|
527
|
getApmListInfo(){
|
472
|
let that=this;
|
528
|
let that=this;
|
|
|
529
|
+ this.getTargetId('apm')
|
473
|
let params={
|
530
|
let params={
|
474
|
targetId:this.targetId,
|
531
|
targetId:this.targetId,
|
475
|
bizId:this.busTypeArr
|
532
|
bizId:this.busTypeArr
|
|
@@ -506,14 +563,16 @@ export default { |
|
@@ -506,14 +563,16 @@ export default { |
506
|
deleteEnvironment(obj){
|
563
|
deleteEnvironment(obj){
|
507
|
this.deleteItem(obj.id,obj.list)
|
564
|
this.deleteItem(obj.id,obj.list)
|
508
|
},
|
565
|
},
|
509
|
- //根据诊断文档id获取配置详情
|
566
|
+ //根据诊断文档列表的id获取配置详情
|
510
|
getDetailByid(){
|
567
|
getDetailByid(){
|
511
|
let that=this;
|
568
|
let that=this;
|
512
|
if(this.docId){
|
569
|
if(this.docId){
|
513
|
let params={}
|
570
|
let params={}
|
514
|
- this.$http.get('/api-web/fault/conf/detail/'+this.docId,params,function (res){
|
|
|
515
|
- if(res){
|
|
|
516
|
- that.configData=res.data;
|
571
|
+ this.$http.get('/api-web/fault/conf/'+this.docId,params,function (res){
|
|
|
572
|
+ if(res && res.object){
|
|
|
573
|
+ that.configData=res.object.confDetailList;
|
|
|
574
|
+ that.faultConfId=that.configData[0].faultConfId;
|
|
|
575
|
+ that.name=res.object.name;
|
517
|
|
576
|
|
518
|
}
|
577
|
}
|
519
|
|
578
|
|
|
@@ -578,6 +637,7 @@ export default { |
|
@@ -578,6 +637,7 @@ export default { |
578
|
let that=this;
|
637
|
let that=this;
|
579
|
let params={
|
638
|
let params={
|
580
|
type:this.type,
|
639
|
type:this.type,
|
|
|
640
|
+ targetId:this.targetId,
|
581
|
state:this.state,
|
641
|
state:this.state,
|
582
|
faultConfig:{
|
642
|
faultConfig:{
|
583
|
id:this.faultConfId,
|
643
|
id:this.faultConfId,
|
|
@@ -588,7 +648,8 @@ export default { |
|
@@ -588,7 +648,8 @@ export default { |
588
|
}
|
648
|
}
|
589
|
this.$http.post('/api-web/fault/conf/detail/saveConfigDetail',params,function (res){
|
649
|
this.$http.post('/api-web/fault/conf/detail/saveConfigDetail',params,function (res){
|
590
|
if(res && res.success){
|
650
|
if(res && res.success){
|
591
|
- that.targetId=res.str;
|
651
|
+ that.targetId=res.map.configDetail.targetId;
|
|
|
652
|
+ that.faultConfId=res.map.configDetail.faultConfId;
|
592
|
|
653
|
|
593
|
that.$global.showMsg('保存成功','success')
|
654
|
that.$global.showMsg('保存成功','success')
|
594
|
that.switchModel();
|
655
|
that.switchModel();
|
|
@@ -609,6 +670,7 @@ export default { |
|
@@ -609,6 +670,7 @@ export default { |
609
|
break;
|
670
|
break;
|
610
|
case "npm":
|
671
|
case "npm":
|
611
|
//应用检测
|
672
|
//应用检测
|
|
|
673
|
+ this.getAppList();
|
612
|
break;
|
674
|
break;
|
613
|
case "base":
|
675
|
case "base":
|
614
|
//基础环境
|
676
|
//基础环境
|
|
@@ -616,6 +678,7 @@ export default { |
|
@@ -616,6 +678,7 @@ export default { |
616
|
break;
|
678
|
break;
|
617
|
case "apm":
|
679
|
case "apm":
|
618
|
//APM
|
680
|
//APM
|
|
|
681
|
+ this.getApmListInfo();
|
619
|
break;
|
682
|
break;
|
620
|
case "log":
|
683
|
case "log":
|
621
|
//日志检测
|
684
|
//日志检测
|
|
@@ -630,6 +693,7 @@ export default { |
|
@@ -630,6 +693,7 @@ export default { |
630
|
//获取网络监测链路信息列表
|
693
|
//获取网络监测链路信息列表
|
631
|
getNetLinkList(){
|
694
|
getNetLinkList(){
|
632
|
let that=this;
|
695
|
let that=this;
|
|
|
696
|
+ this.getTargetId('netlink')
|
633
|
let params={
|
697
|
let params={
|
634
|
targetId:this.targetId
|
698
|
targetId:this.targetId
|
635
|
|
699
|
|
|
@@ -649,6 +713,7 @@ export default { |
|
@@ -649,6 +713,7 @@ export default { |
649
|
this.$http.get('/api-web/fault/base/config/queryKpiInfo',{},function (res){
|
713
|
this.$http.get('/api-web/fault/base/config/queryKpiInfo',{},function (res){
|
650
|
if(res && res.data){
|
714
|
if(res && res.data){
|
651
|
that.alarmList=res.data;
|
715
|
that.alarmList=res.data;
|
|
|
716
|
+ that.kpiId=that.alarmList[0].kpiId;
|
652
|
}
|
717
|
}
|
653
|
|
718
|
|
654
|
})
|
719
|
})
|
|
@@ -673,6 +738,8 @@ export default { |
|
@@ -673,6 +738,8 @@ export default { |
673
|
}
|
738
|
}
|
674
|
this.$http.post('/api-web/fault/conf/rule/saveOrUpdate',params,function (res){
|
739
|
this.$http.post('/api-web/fault/conf/rule/saveOrUpdate',params,function (res){
|
675
|
if(res && res.success){
|
740
|
if(res && res.success){
|
|
|
741
|
+ that.targetId=res.map.bFaultRule.targetId;
|
|
|
742
|
+ that.faultConfId=res.map.bFaultRule.faultConfId;
|
676
|
that.$global.showMsg('保存成功')
|
743
|
that.$global.showMsg('保存成功')
|
677
|
// that.alarmList=res.data;
|
744
|
// that.alarmList=res.data;
|
678
|
}else{
|
745
|
}else{
|
|
@@ -708,6 +775,19 @@ export default { |
|
@@ -708,6 +775,19 @@ export default { |
708
|
if(this.type=='npm'){
|
775
|
if(this.type=='npm'){
|
709
|
this.getAppList();
|
776
|
this.getAppList();
|
710
|
}
|
777
|
}
|
|
|
778
|
+ },
|
|
|
779
|
+ //返回首页
|
|
|
780
|
+ goBackIndex(){
|
|
|
781
|
+ this.$emit('backIndex','back')
|
|
|
782
|
+ },
|
|
|
783
|
+ //判断是否保存了模块
|
|
|
784
|
+ isSaveModel(){
|
|
|
785
|
+ if(!this.faultConfId){
|
|
|
786
|
+ this.$global.showMsg('请先保存模块','warning');
|
|
|
787
|
+ return false;
|
|
|
788
|
+ }else{
|
|
|
789
|
+ return true;
|
|
|
790
|
+ }
|
711
|
}
|
791
|
}
|
712
|
|
792
|
|
713
|
|
793
|
|