Quellcode durchsuchen

ffix:动态拓扑----慢业务+慢接口跳转参数问题

liujing vor 11 Monaten
Ursprung
Commit
30834d819c

+ 7 - 7
src/views/business-analysis/analysisDetail/index.vue

@@ -179,7 +179,7 @@
                       <el-table-column label="服务名称" prop="service_name" :show-overflow-tooltip="true"/> -->
                       <el-table-column label="Method" prop="method" :show-overflow-tooltip="true"/>
                       <el-table-column label="Code" prop="code" :show-overflow-tooltip="true"/>
-                      <el-table-column label="Duration(ms)" prop="duration" :show-overflow-tooltip="true"/>
+                      <el-table-column label="Duration(ms)" sortable="custom" prop="duration" :show-overflow-tooltip="true"/>
                       <!-- <el-table-column label="状态">
                         <template slot-scope="scope">
                           <el-switch
@@ -382,12 +382,12 @@ export default {
   methods:{
     gotoPathService(path,service_name){
       let href = this.$router.resolve({
-            path:path,
-            query:{
-              service_name:service_name
-            }
-          })
-          window.open(window.location.origin+"/"+href.href,"_blank")
+        path:path,
+        query:{
+          service_name:service_name
+        }
+      })
+      window.open(window.location.origin+"/"+href.href,"_blank")
     },
     gotoPath(path,row){
       storage.set('row',row);

+ 24 - 11
src/views/business-analysis/topology/index.vue

@@ -165,8 +165,8 @@
                               @row-click="handleRowClickBusiness" 
                             >
                               <el-table-column header-align="left" label="业务名称" prop="biz_name" align="left" :show-overflow-tooltip="true"/>
-                              <el-table-column header-align="left" label="错误率" prop="error_rate" align="left" :show-overflow-tooltip="true">
-                                <template slot-scope="scope">{{scope.row.error_rate.toFixed(2) }}</template>
+                              <el-table-column header-align="left" label="错误率(%)" prop="error_rate" align="left" :show-overflow-tooltip="true">
+                                <template slot-scope="scope">{{(scope.row.error_rate*100).toFixed(2) }}%</template>
                               </el-table-column>
                               <el-table-column header-align="left" label="平均延迟(ms)" prop="duration" align="left">
                                 <template slot-scope="scope">
@@ -324,7 +324,7 @@
 import storage from '@/utils/storage'
 import NoData from "@/views/NoData/nodata"
 import {serviceBar} from "@/api/service"
-import { slowTopUrlMapping, getSlowInterfaceData } from "@/api/mapping"
+import { slowTopUrlMapping, getSlowInterfaceData, listBizStats } from "@/api/mapping"
 import {dbslowtop} from '@/api/trace'
 import { appsScore } from '@/api/apps'
 export default {
@@ -592,14 +592,27 @@ export default {
       })
       window.open(window.location.origin+"/"+href.href,"_blank")
     },
-    handleRowClickBusiness(row){
-      this.$router.push({
-        path:'/business-analysis/analysisDetail/index',
-        query:{
-          id:row.biz_id,
-          name:row.biz_name,
-        }
-      })
+    async handleRowClickBusiness(row){
+      row.name = row.biz_name
+      row.id = row.biz_id
+      let obj = {
+        biz_id: row.biz_id,
+        start_time: this.appItem.start_time,
+        end_time: this.appItem.end_time
+      }
+      const res = await listBizStats(obj)
+      if (res.code == 200){
+        row.quantiles = res.data.quantiles
+        storage.set('detailObj',row);
+        this.$router.push({
+          path:'/business-analysis/analysisDetail/index',
+          query:{
+            id:row.biz_id,
+            name:row.biz_name,
+          }
+        })
+      }
+      
     },
     goPath(path){
       this.$router.push({

+ 4 - 2
src/views/service/InterfaceDetail/components/LineCharts.vue

@@ -18,7 +18,8 @@ export default {
             myChartScale3: null,
             subListQuery:{
                 start_time: 0,
-                end_time: 0
+                end_time: 0,
+                app_alias: ''
             },
             loading1: false,
             loading2: false,
@@ -41,6 +42,7 @@ export default {
         if(JSON.stringify(appItem) !="{}"){
             this.subListQuery.start_time = appItem.start_time;
             this.subListQuery.end_time = appItem.end_time
+            this.subListQuery.app_alias = appItem.alias
         }
     },
     mounted() {
@@ -61,7 +63,7 @@ export default {
                 let par = {
                     start_time:this.subListQuery.start_time,    // 开始时间
                     end_time:this.subListQuery.end_time,    // 结束时间
-                    app_alias:rowItem.app_alias,       // 应用别名
+                    app_alias:this.subListQuery.app_alias,       // 应用别名
                     type:obj[i],           // 类型,request_trend(默认)、status_trend、latency
                     service_name:rowItem.service_name,        // 服务名
                     method:rowItem.method,                      // 请求方法