From c55747fefca0e76e76715d88593eb8968b4c6639 Mon Sep 17 00:00:00 2001 From: chenjinsong <523037378@qq.com> Date: Wed, 22 Sep 2021 09:08:21 +0800 Subject: [PATCH] =?UTF-8?q?CN-146=20feat:=20ip=E5=9F=BA=E6=9C=AC=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/charts/chart-options.js | 30 +- src/components/entities/EntityList.vue | 6 +- src/utils/tools.js | 2 +- src/views/charts/Chart.vue | 552 ++++++++++++++++++------- 4 files changed, 436 insertions(+), 154 deletions(-) diff --git a/src/components/charts/chart-options.js b/src/components/charts/chart-options.js index 56051358..de2f5f60 100644 --- a/src/components/charts/chart-options.js +++ b/src/components/charts/chart-options.js @@ -305,7 +305,7 @@ const relationShip = { } ] } -const sankeyShip = { +const sankey = { tooltip: { trigger: 'item', triggerOn: 'mousemove' @@ -345,13 +345,39 @@ const sankeyShip = { } ] } +const ipOpenPortBar = { + xAxis: { + type: 'category', + axisTick: { show: false }, + axisLine: { show: false } + }, + grid: { + top: 30, + left: 60, + right: 50, + bottom: 50 + }, + yAxis: { + type: 'value', + show: false + }, + series: [{ + barWidth: 38, + data: [], + type: 'bar', + label: { show: true, position: 'top' }, + barCategoryGap: '10%' + }] +} const typeOptionMappings = [ { value: 11, option: line }, // 常规折线图 { value: 12, option: lineWithStatistics }, // 带统计表格的折线图 { value: 13, option: lineStack }, // 折线堆叠图 + { value: 22, option: ipOpenPortBar }, // ip详情--开放端口的柱状图 { value: 31, option: pieWithTable }, // 常规折线图 + { value: 33, option: ipOpenPortBar }, // ip详情--域名 { value: 42, option: relationShip }, // 关系图 - { value: 43, option: sankeyShip }, // 桑基图 + { value: 43, option: sankey }, // 桑基图 { value: 52, option: singleValueLine } ] const typeCategory = { diff --git a/src/components/entities/EntityList.vue b/src/components/entities/EntityList.vue index fa69f8af..467d1979 100644 --- a/src/components/entities/EntityList.vue +++ b/src/components/entities/EntityList.vue @@ -35,7 +35,7 @@
{{d.asn || '-'}}
{{$t('overall.detail')}}>
+ @click="entityDetail({ip: d.ip, type: 4})">{{$t('overall.detail')}}> diff --git a/src/utils/tools.js b/src/utils/tools.js index 6300b357..b34f8bf1 100644 --- a/src/utils/tools.js +++ b/src/utils/tools.js @@ -350,7 +350,7 @@ export const noData = { updated (el, binding) { if (el) { if (binding.value) { - el.innerHTML = '
No data
' + el.innerHTML = '
No data
' } } } diff --git a/src/views/charts/Chart.vue b/src/views/charts/Chart.vue index 49e243e7..16e31a62 100644 --- a/src/views/charts/Chart.vue +++ b/src/views/charts/Chart.vue @@ -49,16 +49,16 @@