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 2020/12/01 12:28:26 UTC

[skywalking-rocketbot-ui] branch master updated: fix: auto reload (#388)

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 8f9f88f  fix: auto reload (#388)
8f9f88f is described below

commit 8f9f88f7ebbfbaa7aa15c665bf474ca55ddb6498
Author: Qiuxia Fan <fi...@outlook.com>
AuthorDate: Tue Dec 1 20:28:15 2020 +0800

    fix: auto reload (#388)
---
 src/assets/lang/en.ts        |  1 +
 src/assets/lang/zh.ts        |  1 +
 src/components/rk-header.vue | 13 ++++++++++++-
 3 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/src/assets/lang/en.ts b/src/assets/lang/en.ts
index d49d5cb..a4868a9 100644
--- a/src/assets/lang/en.ts
+++ b/src/assets/lang/en.ts
@@ -163,6 +163,7 @@ const m = {
   logCategory: 'Log Category',
   errorCatalog: 'Error Catalog',
   logDetail: 'Log Detail ',
+  timeReload: 'The time interval must be greater than 0',
   errorInfo: 'Error Info',
   stack: 'Stack',
   serviceVersion: 'Service Version',
diff --git a/src/assets/lang/zh.ts b/src/assets/lang/zh.ts
index 40b8e6a..9207e85 100644
--- a/src/assets/lang/zh.ts
+++ b/src/assets/lang/zh.ts
@@ -162,6 +162,7 @@ const m = {
   logCategory: '日志类别',
   errorCatalog: '错误类目',
   logDetail: '日志详情',
+  timeReload: '时间间隔必须大于0',
   errorInfo: '错误信息',
   stack: '堆栈',
   serviceVersion: '服务版本',
diff --git a/src/components/rk-header.vue b/src/components/rk-header.vue
index 2159139..476c347 100644
--- a/src/components/rk-header.vue
+++ b/src/components/rk-header.vue
@@ -57,7 +57,12 @@ limitations under the License. -->
       </router-link>
     </div>
     <div class="flex-h">
-      <a class="rk-btn mr-5 sm" :class="auto ? 'blue' : 'ghost'" @click="handleAuto">
+      <a
+        class="rk-btn mr-5 sm"
+        :class="auto ? 'blue' : 'ghost'"
+        @click="handleAuto"
+        v-tooltip:bottom="{ content: this.$t('timeReload') }"
+      >
         <span class="vm">{{ this.$t('auto') }}</span>
       </a>
       <div class="auto-time">
@@ -96,6 +101,9 @@ limitations under the License. -->
       this.SET_DURATION(timeFormat(time));
     }
     private handleAuto() {
+      if (this.autoTime < 1) {
+        return;
+      }
       this.auto = !this.auto;
       if (this.auto) {
         this.handleReload();
@@ -115,6 +123,9 @@ limitations under the License. -->
       this.$router.push('/login');
     }
     private changeAutoTime() {
+      if (this.autoTime < 1) {
+        return;
+      }
       clearInterval(this.timer);
       if (this.auto) {
         this.handleReload();