...
|
...
|
@@ -186,7 +186,18 @@ export default { |
|
|
alarmLevel:[]
|
|
|
})
|
|
|
}
|
|
|
//模块数据
|
|
|
let modelData=[
|
|
|
{type:'gz',targetId:''},
|
|
|
{type:'netlink',targetId:''},
|
|
|
{type:'npm',targetId:''},
|
|
|
{type:'base',targetId:''},
|
|
|
{type:'apm',targetId:''},
|
|
|
{type:'log',targetId:''},
|
|
|
{type:'report',targetId:''},
|
|
|
]
|
|
|
return{
|
|
|
modelData,
|
|
|
faultDefinitionRadio,
|
|
|
faultStateRadio,
|
|
|
faultApplicationRadio,
|
...
|
...
|
@@ -238,6 +249,9 @@ export default { |
|
|
},
|
|
|
//打开网络监测卡片
|
|
|
clickNetworkMonitorFunc(index){
|
|
|
if(!this.isSaveModel()){
|
|
|
return;
|
|
|
}
|
|
|
this.hiddenAll();
|
|
|
this.networkMonitorHide = true;
|
|
|
this.isActiveIndex=index;
|
...
|
...
|
@@ -250,6 +264,9 @@ export default { |
|
|
},
|
|
|
//打开应用监测卡片
|
|
|
applicationMonitorFunc(index){
|
|
|
if(!this.isSaveModel()){
|
|
|
return;
|
|
|
}
|
|
|
this.hiddenAll();
|
|
|
this.applicationMonitorHide = true;
|
|
|
this.isActiveIndex=index;
|
...
|
...
|
@@ -261,6 +278,9 @@ export default { |
|
|
},
|
|
|
//打开基础环境卡片
|
|
|
basicEnvironmentFunc(index){
|
|
|
if(!this.isSaveModel()){
|
|
|
return;
|
|
|
}
|
|
|
this.postPropsData('base',index);
|
|
|
/*if(this.busTypeArr){
|
|
|
this.hiddenAll();
|
...
|
...
|
@@ -275,6 +295,9 @@ export default { |
|
|
},
|
|
|
//APM
|
|
|
apmMonitorFunc(index){
|
|
|
if(!this.isSaveModel()){
|
|
|
return;
|
|
|
}
|
|
|
this.hiddenAll();
|
|
|
this.apmMonitorHide = true;
|
|
|
this.isActiveIndex=index;
|
...
|
...
|
@@ -285,6 +308,9 @@ export default { |
|
|
},
|
|
|
//日志检测
|
|
|
logDetectionFunc(index){
|
|
|
if(!this.isSaveModel()){
|
|
|
return;
|
|
|
}
|
|
|
this.$global.showMsg('敬请期待...','warning');
|
|
|
return;
|
|
|
this.hiddenAll();
|
...
|
...
|
@@ -297,6 +323,9 @@ export default { |
|
|
},
|
|
|
//报告订阅
|
|
|
subscriptionReportFunc(index){
|
|
|
if(!this.isSaveModel()){
|
|
|
return;
|
|
|
}
|
|
|
this.$global.showMsg('敬请期待...','warning');
|
|
|
return;
|
|
|
this.hiddenAll();
|
...
|
...
|
@@ -390,9 +419,13 @@ export default { |
|
|
setDetailConfig(typeVal){
|
|
|
let that=this;
|
|
|
if(this.configData){
|
|
|
console.log("configData",this.configData,typeVal)
|
|
|
this.configData.map((item,index)=>{
|
|
|
if(item.type==typeVal){
|
|
|
that.targetId=item.targetId;
|
|
|
// that.targetId=item.targetId;
|
|
|
that.setTargetId(item.targetId);
|
|
|
that.faultConfId=item.faultConfId;
|
|
|
|
|
|
}
|
|
|
})
|
|
|
}
|
...
|
...
|
@@ -400,7 +433,8 @@ export default { |
|
|
this.propsData={
|
|
|
bizId:this.busTypeArr,
|
|
|
docId:this.docId,
|
|
|
targetId:this.targetId
|
|
|
targetId:this.targetId,
|
|
|
faultConfId:this.faultConfId
|
|
|
}
|
|
|
},
|
|
|
|
...
|
...
|
@@ -425,7 +459,26 @@ export default { |
|
|
getNetworkMonitorList(itemData){
|
|
|
console.log("itemdata",itemData)
|
|
|
this.networkMonitorVisible=false;
|
|
|
this.networkMonitorList=itemData;
|
|
|
this.networkMonitorList=itemData.networkMonitorList;
|
|
|
this.setTargetId(itemData.targetId);
|
|
|
// this.targetId=itemData.targetId;
|
|
|
},
|
|
|
//给每个模块设置targetId
|
|
|
setTargetId(val){
|
|
|
this.modelData.map((item,index)=>{
|
|
|
if(this.type==item.type){
|
|
|
item.targetId=val;
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
//获取模块对应的targetId
|
|
|
getTargetId(type){
|
|
|
let that=this;
|
|
|
this.modelData.map(item=>{
|
|
|
if(item.type==type){
|
|
|
that.targetId=item.targetId;
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
//点击添加应用检测
|
|
|
addApplicationMonitor(){
|
...
|
...
|
@@ -434,13 +487,15 @@ export default { |
|
|
//关闭应用监测添加弹框
|
|
|
getApplicationMoniList(itemData){
|
|
|
this.applicationMonitorVisible=false;
|
|
|
this.targetId=itemData;
|
|
|
this.setTargetId(itemData);
|
|
|
// this.targetId=itemData;
|
|
|
// this.applicationMonitorList=itemData;
|
|
|
this.getAppList();
|
|
|
},
|
|
|
//获取应用列表数据
|
|
|
getAppList(){
|
|
|
let that=this;
|
|
|
this.getTargetId('npm')
|
|
|
let params={
|
|
|
targetId:this.targetId,
|
|
|
bizId:this.busTypeArr
|
...
|
...
|
@@ -464,12 +519,14 @@ export default { |
|
|
getAPMList(itemData){
|
|
|
this.APMVisible=false;
|
|
|
// this.apmMonitorList=itemData;
|
|
|
this.targetId=itemData;
|
|
|
this.setTargetId(itemData);
|
|
|
// this.targetId=itemData;
|
|
|
this.getApmListInfo();
|
|
|
},
|
|
|
//获取apm列表数据
|
|
|
getApmListInfo(){
|
|
|
let that=this;
|
|
|
this.getTargetId('apm')
|
|
|
let params={
|
|
|
targetId:this.targetId,
|
|
|
bizId:this.busTypeArr
|
...
|
...
|
@@ -506,14 +563,16 @@ export default { |
|
|
deleteEnvironment(obj){
|
|
|
this.deleteItem(obj.id,obj.list)
|
|
|
},
|
|
|
//根据诊断文档id获取配置详情
|
|
|
//根据诊断文档列表的id获取配置详情
|
|
|
getDetailByid(){
|
|
|
let that=this;
|
|
|
if(this.docId){
|
|
|
let params={}
|
|
|
this.$http.get('/api-web/fault/conf/detail/'+this.docId,params,function (res){
|
|
|
if(res){
|
|
|
that.configData=res.data;
|
|
|
this.$http.get('/api-web/fault/conf/'+this.docId,params,function (res){
|
|
|
if(res && res.object){
|
|
|
that.configData=res.object.confDetailList;
|
|
|
that.faultConfId=that.configData[0].faultConfId;
|
|
|
that.name=res.object.name;
|
|
|
|
|
|
}
|
|
|
|
...
|
...
|
@@ -578,6 +637,7 @@ export default { |
|
|
let that=this;
|
|
|
let params={
|
|
|
type:this.type,
|
|
|
targetId:this.targetId,
|
|
|
state:this.state,
|
|
|
faultConfig:{
|
|
|
id:this.faultConfId,
|
...
|
...
|
@@ -588,7 +648,8 @@ export default { |
|
|
}
|
|
|
this.$http.post('/api-web/fault/conf/detail/saveConfigDetail',params,function (res){
|
|
|
if(res && res.success){
|
|
|
that.targetId=res.str;
|
|
|
that.targetId=res.map.configDetail.targetId;
|
|
|
that.faultConfId=res.map.configDetail.faultConfId;
|
|
|
|
|
|
that.$global.showMsg('保存成功','success')
|
|
|
that.switchModel();
|
...
|
...
|
@@ -609,6 +670,7 @@ export default { |
|
|
break;
|
|
|
case "npm":
|
|
|
//应用检测
|
|
|
this.getAppList();
|
|
|
break;
|
|
|
case "base":
|
|
|
//基础环境
|
...
|
...
|
@@ -616,6 +678,7 @@ export default { |
|
|
break;
|
|
|
case "apm":
|
|
|
//APM
|
|
|
this.getApmListInfo();
|
|
|
break;
|
|
|
case "log":
|
|
|
//日志检测
|
...
|
...
|
@@ -630,6 +693,7 @@ export default { |
|
|
//获取网络监测链路信息列表
|
|
|
getNetLinkList(){
|
|
|
let that=this;
|
|
|
this.getTargetId('netlink')
|
|
|
let params={
|
|
|
targetId:this.targetId
|
|
|
|
...
|
...
|
@@ -649,6 +713,7 @@ export default { |
|
|
this.$http.get('/api-web/fault/base/config/queryKpiInfo',{},function (res){
|
|
|
if(res && res.data){
|
|
|
that.alarmList=res.data;
|
|
|
that.kpiId=that.alarmList[0].kpiId;
|
|
|
}
|
|
|
|
|
|
})
|
...
|
...
|
@@ -673,6 +738,8 @@ export default { |
|
|
}
|
|
|
this.$http.post('/api-web/fault/conf/rule/saveOrUpdate',params,function (res){
|
|
|
if(res && res.success){
|
|
|
that.targetId=res.map.bFaultRule.targetId;
|
|
|
that.faultConfId=res.map.bFaultRule.faultConfId;
|
|
|
that.$global.showMsg('保存成功')
|
|
|
// that.alarmList=res.data;
|
|
|
}else{
|
...
|
...
|
@@ -708,6 +775,19 @@ export default { |
|
|
if(this.type=='npm'){
|
|
|
this.getAppList();
|
|
|
}
|
|
|
},
|
|
|
//返回首页
|
|
|
goBackIndex(){
|
|
|
this.$emit('backIndex','back')
|
|
|
},
|
|
|
//判断是否保存了模块
|
|
|
isSaveModel(){
|
|
|
if(!this.faultConfId){
|
|
|
this.$global.showMsg('请先保存模块','warning');
|
|
|
return false;
|
|
|
}else{
|
|
|
return true;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
...
|
...
|
|