Browse Source

feat(trance 接口-- 参数)

liujing 2 weeks ago
parent
commit
fb365ccddd
1 changed files with 9 additions and 6 deletions
  1. 9 6
      src/views/latency/index.vue

+ 9 - 6
src/views/latency/index.vue

@@ -37,8 +37,8 @@
               @keyup.enter.native="handleQuery"
             />
           </el-form-item>
-          <el-form-item prop="failed">
-            <el-checkbox v-model="queryTrace.failed">仅请求异常</el-checkbox>
+          <el-form-item prop="error">
+            <el-checkbox v-model="queryTrace.error">仅请求异常</el-checkbox>
           </el-form-item>
           <el-form-item>
             <el-button
@@ -912,7 +912,10 @@ export default {
         pageSize: 20,
         trace_id: '',
         app_alias: '',
-        failed: false
+        error: false,
+        span_name: '',
+        span_kind: '',
+        service_name: ''
       },
       // 查询参数
       queryParams: {
@@ -989,8 +992,8 @@ export default {
     this.appsItem = storage.get('appsItem')
     const param = this.parseQueryString(strr)
     if (param.datetime != undefined || param.datetime != null || param.datetime != 'NaN') {
-      this.queryTrace.start_time = param.datetime
-      this.queryTrace.end_time = param.datetime
+      this.queryTrace.start_time = Number(param.datetime) - 600
+      this.queryTrace.end_time = Number(param.datetime) + 600
     }
     if (param.traceId != undefined || param.id != undefined) {
       this.queryTrace.trace_id = param.traceId || param.id // 此处兼容traceId传递不统一的问题
@@ -1012,7 +1015,7 @@ export default {
       this.queryTrace.max_duration = param.max_duration
       this.queryTrace.app_alias = param.app_alias || storage.get('appsItem').alias // 此处兼容应用名字未传递的情景
       if (param.failed != undefined) {
-        this.queryTrace.failed = JSON.parse(param.failed)
+        this.queryTrace.error = JSON.parse(param.failed)
       }
       this.queryTrace.pageIndex = 1
       this.queryTrace.pageSize = 20