2 Commits 0a6a16f31f ... 3df6b20d20

Autore SHA1 Messaggio Data
  wlf 3df6b20d20 Merge branch 'dev' of ssh://git.cestong.com.cn:8162/cecf/observe-front into dev 9 mesi fa
  wlf e717d46dfe 链路分析页面,修改http_code,http_methods的显示 9 mesi fa
1 ha cambiato i file con 10 aggiunte e 8 eliminazioni
  1. 10 8
      src/views/latency/index.vue

+ 10 - 8
src/views/latency/index.vue

@@ -68,12 +68,12 @@
                     </div>
                     <div class='css-time-box'>
                       <span class='css-time-wrap'>
-                        <span class='css-time-value'>{{parseTime(tableDetail.timestamp)}}
+                        <span class='css-time-value' v-if="tableDetail.timestamp !='0001-01-01T00:00:00Z'">{{parseTime(tableDetail.timestamp)}}
                         </span>
                       </span>
                       <span class='css-type'>
-                        <el-tag size="mini" style='margin-right:8px'>{{tableDetail.http_method != undefined?tableDetail.http_method:http.request.method}}</el-tag>
-                         <el-tag size="mini" :type="tableDetail.http_code>300?'danger':'success'" style='margin-right:8px'>{{tableDetail.http_code!=undefined?tableDetail.http_code:http.response.status_code}}</el-tag>
+                        <el-tag size="mini" style='margin-right:8px' v-if='tableDetail.http_method !=undefined&& tableDetail.http_method !=""'>{{tableDetail.http_method != undefined?tableDetail.http_method:tableDetail.http.request.method}}</el-tag>
+                         <el-tag size="mini" :type="tableDetail.http_code>300?'danger':'success'" style='margin-right:8px' v-if="tableDetail.http_code !=undefined && tableDetail.http_code>=200">{{tableDetail.http_code!=undefined?tableDetail.http_code:tableDetail.http.response.status_code}}</el-tag>
                          <span class='css-api'>{{tableDetail.span_attributes!=undefined?tableDetail.span_attributes['http.url']:tableDetail.http_url}}</span>
                       </span>
                     </div>
@@ -369,12 +369,11 @@
                       </div>
                       <div class='css-time-box'>
                         <span class='css-time-wrap'>
-                          <span class='css-time-value'>{{parseTime(tableDetail.timestamp)}}
-                          </span>
+                          <span class='css-time-value' v-if="tableDetail.timestamp !='0001-01-01T00:00:00Z'">{{parseTime(tableDetail.timestamp)}}</span>
                         </span>
                         <span class='css-type'>
-                          <el-tag size="mini" style='margin-right:8px'>{{tableDetail.http_method}}</el-tag>
-                          <el-tag size="mini" :type="tableDetail.http_code>300?'danger':'success'" style='margin-right:8px'>{{tableDetail.http_code}}</el-tag>
+                          <el-tag size="mini" style='margin-right:8px' v-if='tableDetail.http_method !=undefined&& tableDetail.http_method !=""'>{{tableDetail.http_method}}</el-tag>
+                          <el-tag size="mini" :type="tableDetail.http_code>300?'danger':'success'" style='margin-right:8px' v-if="tableDetail.http_code !=undefined && tableDetail.http_code>=200">{{tableDetail.http_code}}</el-tag>
                           <span class='css-api'>{{tableDetail.span_attributes!=undefined?tableDetail.span_attributes['http.url']:tableDetail.http_url}}</span>
                         </span>
                       </div>
@@ -1185,13 +1184,16 @@ export default {
               // let List = this.handleDataTree(arr)
               // this.graphData=List[0];
               this.tableData=this.handlerTreeTableList(arr,this.spanID)
+
+              console.log(this.tableData,'未转化的表格数据')
               
               if(arr.length>0){
                 let List = this.handleData(arr)
+                console.log(List,'List')
                 this.graphData = List[0]
               }
 
-              console.log(this.graphData,'传给子组件')
+              
 
             }else {
               this.msgInfo('暂无数据')