You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wu...@apache.org on 2021/10/19 14:51:46 UTC

[skywalking-rocketbot-ui] branch master updated: fix: Init task logs (#553)

This is an automated email from the ASF dual-hosted git repository.

wusheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/skywalking-rocketbot-ui.git


The following commit(s) were added to refs/heads/master by this push:
     new 9c97e5f  fix: Init task logs (#553)
9c97e5f is described below

commit 9c97e5fa1b2a7b6a6e8da04b9e285e12b5b3f8c6
Author: Fine0830 <fi...@outlook.com>
AuthorDate: Tue Oct 19 22:51:41 2021 +0800

    fix: Init task logs (#553)
---
 src/views/components/profile/task-list.vue | 18 ++++++++++--------
 src/views/containers/profile.vue           |  5 +----
 2 files changed, 11 insertions(+), 12 deletions(-)

diff --git a/src/views/components/profile/task-list.vue b/src/views/components/profile/task-list.vue
index 5b9b446..82abbd6 100644
--- a/src/views/components/profile/task-list.vue
+++ b/src/views/components/profile/task-list.vue
@@ -31,7 +31,7 @@ limitations under the License. -->
             >
               <div class="ell mb-5">
                 <span class="b">{{ i.endpointName }}</span>
-                <a class="profile-btn r" @click="viewTask(i)" v-tooltip:bottom="{ content: $t('taskView') }">
+                <a class="profile-btn r" @click="viewTask($event, i)" v-tooltip:bottom="{ content: $t('taskView') }">
                   <rk-icon icon="library_books" />
                 </a>
               </div>
@@ -145,6 +145,15 @@ limitations under the License. -->
 
     private selectTask(item: { id: string; serviceId: string; logs: TaskLog[] }) {
       this.selectedTask = item;
+      this.selectedTaskService =
+        this.headerSource.serviceSource.filter((service: any) => service.key === item.serviceId)[0] || {};
+      this.GET_SEGMENT_LIST({ taskID: item.id });
+    }
+
+    private viewTask(e: Event, item: any) {
+      this.viewDetail = true;
+      window.event ? (window.event.cancelBubble = true) : e.stopPropagation();
+      this.instanceLogs = {};
       for (const d of item.logs) {
         if (this.instanceLogs[d.instanceName]) {
           this.instanceLogs[d.instanceName].push({ operationType: d.operationType, operationTime: d.operationTime });
@@ -152,13 +161,6 @@ limitations under the License. -->
           this.instanceLogs[d.instanceName] = [{ operationType: d.operationType, operationTime: d.operationTime }];
         }
       }
-      this.selectedTaskService =
-        this.headerSource.serviceSource.filter((service: any) => service.key === item.serviceId)[0] || {};
-      this.GET_SEGMENT_LIST({ taskID: item.id });
-    }
-
-    private viewTask(item: any) {
-      this.viewDetail = true;
       this.selectedTask = item;
     }
 
diff --git a/src/views/containers/profile.vue b/src/views/containers/profile.vue
index 51d27d6..f33a9f0 100644
--- a/src/views/containers/profile.vue
+++ b/src/views/containers/profile.vue
@@ -57,9 +57,6 @@ limitations under the License. -->
     private interval: any;
 
     private beforeMount() {
-      this.GET_SERVICES({
-        duration: this.durationTime,
-      });
       this.SET_EVENTS([
         () => {
           this.GET_SERVICES({ duration: this.durationTime });
@@ -69,7 +66,7 @@ limitations under the License. -->
         this.GET_SERVICES({
           duration: this.durationTime,
         });
-      }, 300000);
+      }, 20000);
     }
     private beforeDestroy() {
       this.SET_EVENTS([]);