From 8a0eb23e2debaabc2c766ec0a635a0baa00095d2 Mon Sep 17 00:00:00 2001
From: chenjinsong <523037378@qq.com>
Date: Wed, 14 Jul 2021 15:40:05 +0800
Subject: [PATCH] =?UTF-8?q?CN-53=20perf:=20cn-53=E7=AC=AC=E4=B8=89?=
=?UTF-8?q?=E6=9D=A1=EF=BC=8Ccolumn=E5=92=8Clegend=E5=9B=BD=E9=99=85?=
=?UTF-8?q?=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/charts/EchartsFrame.vue | 13 +-
src/components/charts/PieTable.vue | 204 ++++++++++--------
src/components/charts/chartTableTitle.js | 63 +++---
src/components/charts/panel.scss | 5 +-
.../common/TimeRange/DateTimeRange.vue | 4 +-
src/utils/tools.js | 12 +-
src/views/charts/Chart.vue | 30 +--
7 files changed, 183 insertions(+), 148 deletions(-)
diff --git a/src/components/charts/EchartsFrame.vue b/src/components/charts/EchartsFrame.vue
index d4b06d26..0137ab9d 100644
--- a/src/components/charts/EchartsFrame.vue
+++ b/src/components/charts/EchartsFrame.vue
@@ -37,9 +37,14 @@ export default {
}
-
diff --git a/src/components/charts/PieTable.vue b/src/components/charts/PieTable.vue
index e09366f9..29ec1c65 100644
--- a/src/components/charts/PieTable.vue
+++ b/src/components/charts/PieTable.vue
@@ -1,72 +1,77 @@
-
+
+
+
-
-
-
-
-
-
+
+
+
- {{nameColumn === 'fqdnCategoryName' ? row['fqdnCategoryName'] : row['reputationLevel'] }}
+ {{ nameColumn === 'fqdnCategoryName' ? row['fqdnCategoryName'] : row['reputationLevel'] }}
-
- {{shortFormatter(row[item.prop])}}
-
-
- {{row[item.prop]}}
-
-
-
-
-
-
-
- {{nameColumn === 'fqdnCategoryName' ? row['categoryName'] : row['reputationLevel'] }}
-
-
- {{shortFormatter(row[item.prop])}}
+
+ {{ shortFormatter(row[item.prop]) }}
- {{row[item.prop]}}
+ {{ row[item.prop] }}
-
-
+
+
+
+
+
+
+ {{ nameColumn === 'fqdnCategoryName' ? row['categoryName'] : row['reputationLevel'] }}
+
+
+ {{ shortFormatter(row[item.prop]) }}
+
+
+ {{ row[item.prop] }}
+
+
+
diff --git a/src/components/charts/chartTableTitle.js b/src/components/charts/chartTableTitle.js
index bedc1c64..b64a1084 100644
--- a/src/components/charts/chartTableTitle.js
+++ b/src/components/charts/chartTableTitle.js
@@ -1,74 +1,81 @@
+import i18n from '@/i18n'
export const allTableTitle = {
tableTitles10: [
{
- label: 'clientIp',
+ label: i18n.global.t('common.clientIp'),
prop: 'clientIp'
},
{
- label: 'bytes',
+ label: i18n.global.t('common.sessions'),
+ prop: 'sessions'
+ },
+ {
+ label: i18n.global.t('common.bytes'),
prop: 'bytes'
},
{
- label: 'packets',
+ label: i18n.global.t('common.packets'),
prop: 'packets'
- },
- {
- label: 'sessions',
- prop: 'sessions'
}
],
tableTitles13: [
{
- label: 'serverIp',
+ label: i18n.global.t('common.serverIp'),
prop: 'serverIp'
},
{
- label: 'bytes',
+ label: i18n.global.t('common.sessions'),
+ prop: 'sessions'
+ },
+ {
+ label: i18n.global.t('common.bytes'),
prop: 'bytes'
},
{
- label: 'packets',
+ label: i18n.global.t('common.packets'),
prop: 'packets'
- },
- {
- label: 'sessions',
- prop: 'sessions'
}
],
tableTitles14: [
{
- label: 'domain',
+ label: i18n.global.t('common.domain'),
prop: 'domain'
},
{
- label: 'bytes',
+ label: i18n.global.t('common.sessions'),
+ prop: 'sessions'
+ },
+ {
+ label: i18n.global.t('common.bytes'),
prop: 'bytes'
},
{
- label: 'packets',
+ label: i18n.global.t('common.packets'),
prop: 'packets'
- },
- {
- label: 'sessions',
- prop: 'sessions'
}
],
tableTitles15: [
{
- label: 'appName',
+ label: i18n.global.t('common.appName'),
prop: 'appName'
},
{
- label: 'bytes',
+ label: i18n.global.t('common.sessions'),
+ prop: 'sessions'
+ },
+ {
+ label: i18n.global.t('common.bytes'),
prop: 'bytes'
},
{
- label: 'packets',
+ label: i18n.global.t('common.packets'),
prop: 'packets'
- },
- {
- label: 'sessions',
- prop: 'sessions'
}
]
}
+export const legendMapping = {
+ bytes_received_rate: 'Bytes Received Rate',
+ bytes_sent_rate: 'Bytes Sent Rate',
+ bytes_rate: 'Bytes Rate',
+ session_rate: 'Session Rate'
+}
diff --git a/src/components/charts/panel.scss b/src/components/charts/panel.scss
index 87ac02f4..993e75f8 100644
--- a/src/components/charts/panel.scss
+++ b/src/components/charts/panel.scss
@@ -297,7 +297,7 @@
justify-content: end;
align-items: center;
- .header__operation.header__operation--table {
+ .header__operation.header__operation--echarts {
display: flex;
align-items: center;
height: 22px;
@@ -352,7 +352,7 @@
}
.option__select.select-column {
.el-input__inner {
- width: 120px;
+ width: 86px;
padding-left: 8px;
}
}
@@ -368,7 +368,6 @@
}
}
.cn-chart__body {
- flex: auto;
overflow-y: auto;
.el-table {
diff --git a/src/components/common/TimeRange/DateTimeRange.vue b/src/components/common/TimeRange/DateTimeRange.vue
index 81b91d7b..ace441e7 100644
--- a/src/components/common/TimeRange/DateTimeRange.vue
+++ b/src/components/common/TimeRange/DateTimeRange.vue
@@ -78,7 +78,7 @@