Browse Source

链路分析用多个api,接口映射页面显示请求方法

wlf 9 months ago
parent
commit
5c6ba41ec5

+ 37 - 37
src/views/latency/components/TopoTree.vue

@@ -1015,44 +1015,11 @@ export default {
         if(source != ''){
           this.networkQuery.parent_span_id = source;
           this.networkQuery.span_id = target;
-          // networkSpans(this.networkQuery).then(res=>{
-          //   console.log(res,'network-spans网络拓扑')
+          networkSpans(this.networkQuery).then(res=>{
+            console.log(res,'network-spans网络拓扑')
 
-          //   if(res.OPT_STATUS.length!=0){
-          //     let optList = this.handleData(res.OPT_STATUS);
-          //     let newOptList = this.buildNestedTree(optList);
-
-          //     newFirstNode.children = newOptList;
-
-
-          //     let firstList =[newFirstNode];
-
-          //     let resultList = this.addDataToTree(firstList,newLastNode)
-
-          //     topoData = resultList[0]
-
-
-          //     this.networkOpen = true;
-          //     this.flag = true;
-          //     setTimeout(()=>{
-          //       this.initGraphNetwork(topoData,'networkContainer')
-          //     },300)
-
-
-          //   }else{
-          //     this.$message('暂无数据')
-          //   }
-          // })
-          this.$http({
-              // url: 'http://df-app.cestong.com.cn/v1/stats/querier/network-spans',
-              url:'http://app.cestong.com.cn/v1/stats/querier/network-spans',
-              method: 'post',
-              data:this.networkQuery
-          }).then(res=>{
-            console.log(res.data.OPT_STATUS,'network-spans网络拓扑')
-
-            if(res.data.OPT_STATUS.length!=0){
-              let optList = this.handleData(res.data.OPT_STATUS);
+            if(res.OPT_STATUS.length!=0){
+              let optList = this.handleData(res.OPT_STATUS);
               let newOptList = this.buildNestedTree(optList);
 
               newFirstNode.children = newOptList;
@@ -1076,6 +1043,39 @@ export default {
               this.$message('暂无数据')
             }
           })
+          // this.$http({
+          //     // url: 'http://df-app.cestong.com.cn/v1/stats/querier/network-spans',
+          //     url:'http://app.cestong.com.cn/v1/stats/querier/network-spans',
+          //     method: 'post',
+          //     data:this.networkQuery
+          // }).then(res=>{
+          //   console.log(res.data.OPT_STATUS,'network-spans网络拓扑')
+
+          //   if(res.data.OPT_STATUS.length!=0){
+          //     let optList = this.handleData(res.data.OPT_STATUS);
+          //     let newOptList = this.buildNestedTree(optList);
+
+          //     newFirstNode.children = newOptList;
+
+
+          //     let firstList =[newFirstNode];
+
+          //     let resultList = this.addDataToTree(firstList,newLastNode)
+
+          //     topoData = resultList[0]
+
+
+          //     this.networkOpen = true;
+          //     this.flag = true;
+          //     setTimeout(()=>{
+          //       this.initGraphNetwork(topoData,'networkContainer')
+          //     },300)
+
+
+          //   }else{
+          //     this.$message('暂无数据')
+          //   }
+          // })
         }
       });
       // 双击节点进行跳转

+ 1 - 1
src/views/service/Interface/components/InterfaceMap.vue

@@ -380,7 +380,7 @@ export default {
       colSelect: [
         "接口名",
         "所属服务",
-        // "请求方法",
+        "请求方法",
         "URL前缀",
         // "rpm",
         "请求总数",