diff --git a/public/template3.html b/public/template3.html deleted file mode 100644 index 614d45d8..00000000 --- a/public/template3.html +++ /dev/null @@ -1,2734 +0,0 @@ - - - - - Title - - - - -
网络服务质量监测报告 (精简版)
-
一.整体流量概况
-
1.流量规模
-
-
表1 整体流量概况
- - - - - - - - - - - - - - - - - - - - - -
速率均值速率谷值速率分位值速率峰值速率均值环比总流量总流量环比
451.24 Gbps83.98 Gbps -
-
-
-
-
-
P50
-
-
-
9.31 Gbps
-
-
-
-
-
-
P90
-
-
-
7856.09 Gbps
-
-
-
-
-
-
P99
-
-
-
902.70 Gbps
-
-
-
1.02 Tbps0.05%1.02 Tbps0.05%
- - -
-
-
- - -
图1 当日流量变化曲线
-
-
- -
2.域内地市流量构成
-
-
表2 域内用户访问域外服务TOP10客户端地区流量分布
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
客户端所在域内地区速率峰值速率均值速率分位值总流量总流量占比总流量环比
HTTP1.57 PB36.30 -
-
-
-
-
-
P50
-
-
-
499.31 Gbps
-
-
-
-
-
-
P90
-
-
-
786.09 Gbps
-
-
-
-
-
-
P99
-
-
-
902.70 Gbps
-
-
-
902.42 PB36.30%8.14%
HTTP1.57 PB36.30 -
-
-
-
-
-
P50
-
-
-
499.31 Gbps
-
-
-
-
-
-
P90
-
-
-
786.09 Gbps
-
-
-
-
-
-
P99
-
-
-
902.70 Gbps
-
-
-
902.42 PB36.30%8.14%
-
- -
3.服务质量概况
-
-
表3 域内访问域外流量的服务质量
- - - - - - - - - - - - - - - - - - - - - - - - -
服务质量指标分位值峰值均值均值环比
TCP会话创建延迟(ms) -
-
-
-
-
-
P50
-
-
-
499.31 Gbps
-
-
-
-
-
-
P90
-
-
-
786.09 Gbps
-
-
-
-
-
-
P99
-
-
-
902.70 Gbps
-
-
-
902.42 PB36.30 PB8.14%
缺包率 -
-
-
-
-
-
P50
-
-
-
499.31 Gbps
-
-
-
-
-
-
P90
-
-
-
786.09 Gbps
-
-
-
-
-
-
P99
-
-
-
902.70 Gbps
-
-
-
902.42 PB36.30 PB8.14%
-
-
-
表4 域外访问域内流量的服务质量
- - - - - - - - - - - - - - - - - - - - - - - - -
服务质量指标分位值峰值均值均值环比
TCP会话创建延迟(ms) -
-
-
-
-
-
P50
-
-
-
499.31 Gbps
-
-
-
-
-
-
P90
-
-
-
786.09 Gbps
-
-
-
-
-
-
P99
-
-
-
902.70 Gbps
-
-
-
902.42 PB36.30 PB8.14%
缺包率 -
-
-
-
-
-
P50
-
-
-
499.31 Gbps
-
-
-
-
-
-
P90
-
-
-
786.09 Gbps
-
-
-
-
-
-
P99
-
-
-
902.70 Gbps
-
-
-
902.42 PB36.30 PB8.14%
-
- -
二.业务排名表
-
1.整体业务排名
- -
-
-
-
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
APP流量速率douyinwechartaeraweraecccdouyin2douyin3douyin4douyin5douyin6douyin7
P5055.63 Gbps27.60 Gbps27.60 Gbps55.63 Gbps27.60 Gbps55.63 Gbps27.60 Gbps55.63 Gbps27.60 Gbps55.63 Gbps
P9055.63 Gbps27.60 Gbps55.63 Gbps27.60 Gbps55.63 Gbps27.60 Gbps27.60 Gbps55.63 Gbps27.60 Gbps55.63 Gbps
P9955.63 Gbps27.60 Gbps55.63 Gbps27.60 Gbps55.63 Gbps27.60 Gbps55.63 Gbps27.60 Gbps27.60 Gbps55.63 Gbps
峰值55.63 Gbps27.60 Gbps55.63 Gbps27.60 Gbps55.63 Gbps55.63 Gbps27.60 Gbps55.63 Gbps27.60 Gbps55.63 Gbps
均值55.63 Gbps27.60 Gbps55.63 Gbps27.60 Gbps27.60 Gbps55.63 Gbps27.60 Gbps55.63 Gbps27.60 Gbps55.63 Gbps
-
图2 活跃APP流量情况
-
- -
2.省内外业务排名
-
-
-
-
图3 域内用户访问域外服务的APP流量占比
-
-
-
-
图4 域外用户访问域内服端的APP流量占比
-
-
- -
三.业务质量排名表
-
-
表5 活跃APP流量情况
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
APP流量占比TCP会话延迟(ms)缺包率
P50 P90 P99均值均值环比P50 P90 P99均值均值环比
douyin6.12% -
-
-
-
-
-
P50
-
-
-
124
-
-
-
-
-
-
P90
-
-
-
143
-
-
-
-
-
-
P99
-
-
-
15
-
-
-
27.602.10% -
-
-
-
-
-
P50
-
-
-
0.01%
-
-
-
-
-
-
P90
-
-
-
0.01%
-
-
-
-
-
-
P99
-
-
-
0.02%
-
-
-
0.05%-0.05%
-
- -
四.链路方向流量构成
-
-
-
-
图5 域内用户访问域外服务流量流向图
-
-
-
- - - - - - - - - - - - - - - - - - - - - -
西宁太原西安
下行链路 -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
上行链路 -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
图6 域内用户访问域外服务各链路TOP5APP流量占比
-
- - - - - - - - - - - - - - - - - - - - - -
西宁太原西安
下行链路 -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
上行链路 -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
图7 域内用户访问域外服务各链路访问的服务端所在Top5省份流量
- - - - diff --git a/public/template6.html b/public/template6.html deleted file mode 100644 index 8e016994..00000000 --- a/public/template6.html +++ /dev/null @@ -1,4881 +0,0 @@ - - - - - 网络服务质量监测报告(IDC精简版) - - - - -
网络服务质量监测报告(IDC精简版)
-
一.整体流量概况
-
1.流量规模概况
-
-
表1 整体流量概况
- - - - - - - - - - - - - - - - - - - - - -
速率均值速率谷值速率分位值速率峰值速率均值环比总流量总流量环比
451.24 Gbps83.98 Gbps -
-
-
-
-
-
P50
-
-
-
9.31 Gbps
-
-
-
-
-
-
P90
-
-
-
7856.09 Gbps
-
-
-
-
-
-
P99
-
-
-
902.70 Gbps
-
-
-
1.02 Tbps0.05%1.02 Tbps0.05%
- - -
-
-
- - -
图1 当日流量变化曲线
-
-
- -
2.服务质量概况
-
-
表2 域内访问域外流量的服务质量
- - - - - - - - - - - - - - - - - - - - - - - - -
服务质量指标分位值峰值均值均值环比
TCP会话创建延迟 -
-
-
-
-
-
P50
-
-
-
499.31 ms
-
-
-
-
-
-
P90
-
-
-
786.09 ms
-
-
-
-
-
-
P99
-
-
-
902.70 ms
-
-
-
902.42 ms36.30 ms8.14%
缺包率 -
-
-
-
-
-
P50
-
-
-
3%
-
-
-
-
-
-
P90
-
-
-
4%
-
-
-
-
-
-
P99
-
-
-
5%
-
-
-
902.42 %36.30 %8.14%
-
-
-
表3 域外访问域内流量的服务质量
- - - - - - - - - - - - - - - - - - - - - - - - -
服务质量指标分位值峰值均值均值环比
TCP会话创建延迟 -
-
-
-
-
-
P50
-
-
-
499.31 ms
-
-
-
-
-
-
P90
-
-
-
786.09 ms
-
-
-
-
-
-
P99
-
-
-
902.70 ms
-
-
-
902.42 ms36.30 ms8.14%
缺包率 -
-
-
-
-
-
P50
-
-
-
499.31%
-
-
-
-
-
-
P90
-
-
-
786.09%
-
-
-
-
-
-
P99
-
-
-
902.70%
-
-
-
902.42%36.30%8.14%
-
- -
二.业务流量排名
-
-
- - -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
APP流量速率douyinwechartaeraweraecccdouyin2douyin3douyin4douyin5douyin6douyin7
P5055.63 Gbps27.60 Gbps27.60 Gbps55.63 Gbps27.60 Gbps55.63 Gbps27.60 Gbps55.63 Gbps27.60 Gbps55.63 Gbps
P9055.63 Gbps27.60 Gbps55.63 Gbps27.60 Gbps55.63 Gbps27.60 Gbps27.60 Gbps55.63 Gbps27.60 Gbps55.63 Gbps
P9955.63 Gbps27.60 Gbps55.63 Gbps27.60 Gbps55.63 Gbps27.60 Gbps55.63 Gbps27.60 Gbps27.60 Gbps55.63 Gbps
峰值55.63 Gbps27.60 Gbps55.63 Gbps27.60 Gbps55.63 Gbps55.63 Gbps27.60 Gbps55.63 Gbps27.60 Gbps55.63 Gbps
均值55.63 Gbps27.60 Gbps55.63 Gbps27.60 Gbps27.60 Gbps55.63 Gbps27.60 Gbps55.63 Gbps27.60 Gbps55.63 Gbps
-
图2 TOP10 APP流量情况
-
- -
三.业务质量概况
-
-
表4 TOP10 APP服务质量情况
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
APP流量占比TCP会话延迟(ms)缺包率
P50 P90 P99均值均值环比P50 P90 P99均值均值环比
douyin6.12% -
-
-
-
-
-
P50
-
-
-
124 ms
-
-
-
-
-
-
P90
-
-
-
143 ms
-
-
-
-
-
-
P99
-
-
-
15 ms
-
-
-
27.60 ms2.10% -
-
-
-
-
-
P50
-
-
-
0.01%
-
-
-
-
-
-
P90
-
-
-
0.01%
-
-
-
-
-
-
P99
-
-
-
0.02%
-
-
-
0.05%-0.05%
-
- -
四.地理位置分布
-
1.各省份流量分布
- -
-
- - -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
APP流量速率北京四川重庆广西台湾日本海南内蒙古河北安徽
P5055.63 Gbps27.60 Gbps27.60 Gbps55.63 Gbps27.60 Gbps55.63 Gbps27.60 Gbps55.63 Gbps27.60 Gbps55.63 Gbps
P9055.63 Gbps27.60 Gbps55.63 Gbps27.60 Gbps55.63 Gbps27.60 Gbps27.60 Gbps55.63 Gbps27.60 Gbps55.63 Gbps
P9955.63 Gbps27.60 Gbps55.63 Gbps27.60 Gbps55.63 Gbps27.60 Gbps55.63 Gbps27.60 Gbps27.60 Gbps55.63 Gbps
峰值55.63 Gbps27.60 Gbps55.63 Gbps27.60 Gbps55.63 Gbps55.63 Gbps27.60 Gbps55.63 Gbps27.60 Gbps55.63 Gbps
均值55.63 Gbps27.60 Gbps55.63 Gbps27.60 Gbps27.60 Gbps55.63 Gbps27.60 Gbps55.63 Gbps27.60 Gbps55.63 Gbps
-
图3 TOP10省份访问流量分布
-
-
- - - - - - - - - - - - - -
西宁太原西安
-
-
- - -
-
-
-
-
- - -
-
-
-
-
- - -
-
-
-
-
图4 TOP3省份访问的主要APP的流量占比
- -
- - - - - - - - - - - - - -
douyinwechataaaa
-
-
- - -
-
-
-
-
- - -
-
-
-
-
- - -
-
-
-
-
图5 访问TOP3 APP的各省份流量占比
- -
2.省内各地区流量分布
- -
-
- - -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
APP流量速率北京四川重庆广西台湾日本海南内蒙古河北安徽
P5055.63 Gbps27.60 Gbps27.60 Gbps55.63 Gbps27.60 Gbps55.63 Gbps27.60 Gbps55.63 Gbps27.60 Gbps55.63 Gbps
P9055.63 Gbps27.60 Gbps55.63 Gbps27.60 Gbps55.63 Gbps27.60 Gbps27.60 Gbps55.63 Gbps27.60 Gbps55.63 Gbps
P9955.63 Gbps27.60 Gbps55.63 Gbps27.60 Gbps55.63 Gbps27.60 Gbps55.63 Gbps27.60 Gbps27.60 Gbps55.63 Gbps
峰值55.63 Gbps27.60 Gbps55.63 Gbps27.60 Gbps55.63 Gbps55.63 Gbps27.60 Gbps55.63 Gbps27.60 Gbps55.63 Gbps
均值55.63 Gbps27.60 Gbps55.63 Gbps27.60 Gbps27.60 Gbps55.63 Gbps27.60 Gbps55.63 Gbps27.60 Gbps55.63 Gbps
-
图6 TOP10省内各地区流量分布
-
- -
- - - - - - - - - - - - - -
西宁太原西安
-
-
- - -
-
-
-
-
- - -
-
-
-
-
- - -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
图7 TOP3省内各地区访问的主要APP的流量分布
- -
- - - - - - - - - - - - - -
douyinwechataaaa
-
-
- - -
-
-
-
-
- - -
-
-
-
-
- - -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
图8 访问TOP3 APP的省内各地区流量占比
- - - - diff --git a/src/assets/css/font/iconfont.css b/src/assets/css/font/iconfont.css index be29b1c9..49b652c4 100644 --- a/src/assets/css/font/iconfont.css +++ b/src/assets/css/font/iconfont.css @@ -1,8 +1,8 @@ @font-face { font-family: "cn-icon"; /* Project id 2614877 */ - src: url('iconfont.woff2?t=1649728125883') format('woff2'), - url('iconfont.woff?t=1649728125883') format('woff'), - url('iconfont.ttf?t=1649728125883') format('truetype'); + src: url('iconfont.woff2?t=1652249170229') format('woff2'), + url('iconfont.woff?t=1652249170229') format('woff'), + url('iconfont.ttf?t=1652249170229') format('truetype'); } .cn-icon { @@ -13,6 +13,22 @@ -moz-osx-font-smoothing: grayscale; } +.cn-icon-org:before { + content: "\e770"; +} + +.cn-icon-role:before { + content: "\e771"; +} + +.cn-icon-os:before { + content: "\e772"; +} + +.cn-icon-software:before { + content: "\e773"; +} + .cn-icon-report:before { content: "\e76f"; } diff --git a/src/assets/css/font/iconfont.js b/src/assets/css/font/iconfont.js index 36218dae..51310d6c 100644 --- a/src/assets/css/font/iconfont.js +++ b/src/assets/css/font/iconfont.js @@ -1 +1 @@ -!function(c){var a,l,h,o,i,m='',z=(z=document.getElementsByTagName("script"))[z.length-1].getAttribute("data-injectcss"),v=function(c,a){a.parentNode.insertBefore(c,a)};if(z&&!c.__iconfont__svg__cssinject__){c.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(c){console&&console.log(c)}}function t(){i||(i=!0,h())}function n(){try{o.documentElement.doScroll("left")}catch(c){return void setTimeout(n,50)}t()}a=function(){var c,a=document.createElement("div");a.innerHTML=m,m=null,(a=a.getElementsByTagName("svg")[0])&&(a.setAttribute("aria-hidden","true"),a.style.position="absolute",a.style.width=0,a.style.height=0,a.style.overflow="hidden",a=a,(c=document.body).firstChild?v(a,c.firstChild):c.appendChild(a))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(a,0):(l=function(){document.removeEventListener("DOMContentLoaded",l,!1),a()},document.addEventListener("DOMContentLoaded",l,!1)):document.attachEvent&&(h=a,o=c.document,i=!1,n(),o.onreadystatechange=function(){"complete"==o.readyState&&(o.onreadystatechange=null,t())})}(window); \ No newline at end of file +!function(c){var a,l,h,o,i,m='',v=(v=document.getElementsByTagName("script"))[v.length-1].getAttribute("data-injectcss"),z=function(c,a){a.parentNode.insertBefore(c,a)};if(v&&!c.__iconfont__svg__cssinject__){c.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(c){console&&console.log(c)}}function t(){i||(i=!0,h())}function s(){try{o.documentElement.doScroll("left")}catch(c){return void setTimeout(s,50)}t()}a=function(){var c,a=document.createElement("div");a.innerHTML=m,m=null,(a=a.getElementsByTagName("svg")[0])&&(a.setAttribute("aria-hidden","true"),a.style.position="absolute",a.style.width=0,a.style.height=0,a.style.overflow="hidden",a=a,(c=document.body).firstChild?z(a,c.firstChild):c.appendChild(a))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(a,0):(l=function(){document.removeEventListener("DOMContentLoaded",l,!1),a()},document.addEventListener("DOMContentLoaded",l,!1)):document.attachEvent&&(h=a,o=c.document,i=!1,s(),o.onreadystatechange=function(){"complete"==o.readyState&&(o.onreadystatechange=null,t())})}(window); \ No newline at end of file diff --git a/src/assets/css/font/iconfont.ttf b/src/assets/css/font/iconfont.ttf index 0bb93b55..217a802a 100644 Binary files a/src/assets/css/font/iconfont.ttf and b/src/assets/css/font/iconfont.ttf differ diff --git a/src/assets/css/font/iconfont.woff b/src/assets/css/font/iconfont.woff index 781f8eab..cd88693b 100644 Binary files a/src/assets/css/font/iconfont.woff and b/src/assets/css/font/iconfont.woff differ diff --git a/src/assets/css/font/iconfont.woff2 b/src/assets/css/font/iconfont.woff2 index 2bd641ea..c1e9980f 100644 Binary files a/src/assets/css/font/iconfont.woff2 and b/src/assets/css/font/iconfont.woff2 differ diff --git a/src/components/table/report/builtinReportTable.vue b/src/components/table/report/builtinReportTable.vue index b52cc939..62a81a55 100644 --- a/src/components/table/report/builtinReportTable.vue +++ b/src/components/table/report/builtinReportTable.vue @@ -34,14 +34,14 @@ @@ -56,18 +56,24 @@ @@ -101,11 +107,11 @@ export default { prop: 'name', show: true, sortable: 'custom' - }, { + }, /* { label: this.$t('config.chart.remark'), prop: 'remark', show: true - }, { + }, */{ label: this.$t('overall.type'), prop: 'type', show: true, @@ -115,6 +121,10 @@ export default { prop: 'dataRange', show: true, minWidth: 110 + }, { + label: this.$t('overall.completionTime'), + prop: 'finishTime', + show: true }, { label: this.$t('overall.status'), prop: 'state', @@ -135,11 +145,11 @@ export default { } }, methods: { - getJobStatus (state) { - if (state === 0) { - return this.$t('overall.inProgress') - } else if (state === 1) { + getJobStatus (report) { + if (report.state === 1 && report.upload === 1) { return this.$t('overall.completed') + } else { + return this.$t('overall.inProgress') } }, selectionChange (objs) { diff --git a/src/utils/constants.js b/src/utils/constants.js index d408b792..470e8fea 100644 --- a/src/utils/constants.js +++ b/src/utils/constants.js @@ -77,65 +77,6 @@ export const echartsFontSize = { labelThirdFontSize: 14// >=2560 } -export const entityFilterType = { - ip: [ - { - column: 'country_distinct_count', - labelI18nCode: 'overall.country', - icon: 'cn-icon cn-icon-country' - }, - { - column: 'province_distinct_count', - labelI18nCode: 'overall.province', - icon: 'cn-icon cn-icon-position' - }, - { - column: 'city_distinct_count', - labelI18nCode: 'overall.city', - icon: 'cn-icon cn-icon-city' - }, - { - column: 'asn_distinct_count', - labelI18nCode: 'entities.asn', - icon: 'cn-icon cn-icon-cloud' - } - ], - domain: [ - { - column: 'categoryGroupDistinctCount', - labelI18nCode: 'entities.domainDetail.categoryGroup', - icon: 'cn-icon cn-icon-category' - }, - { - column: 'categoryDistinctCount', - labelI18nCode: 'entities.category', - icon: 'cn-icon cn-icon-sub-category' - }, - { - column: 'categoryGroupDistinctCount', - labelI18nCode: 'entities.reputationLevel', - icon: 'cn-icon cn-icon-credit' - } - ], - app: [ - { - column: 'categoryDistinctCount', - labelI18nCode: 'entities.category', - icon: 'cn-icon cn-icon-category' - }, - { - column: 'subcategoryDistinctCount', - labelI18nCode: 'entities.subcategory', - icon: 'cn-icon cn-icon-sub-category' - }, - { - column: 'riskDistinctCount', - labelI18nCode: 'entities.risk', - icon: 'cn-icon cn-icon-risk' - } - ] -} - export const unitTypes = { time: 'time', number: 'number', diff --git a/src/views/detections/DetectionSearch.vue b/src/views/detections/DetectionSearch.vue index 8ef18365..05c85803 100644 --- a/src/views/detections/DetectionSearch.vue +++ b/src/views/detections/DetectionSearch.vue @@ -4,7 +4,7 @@
import AdvancedSearch from '@/components/advancedSearch/Index' import { humpToLine } from '@/utils/tools' +import {columnType} from "@/components/advancedSearch/meta/meta"; +import SqlParser from "@/components/advancedSearch/meta/sql-parser"; export default { name: 'DetectionSearch', + props: { + pageType: String + }, components: { AdvancedSearch }, data () { return { - columnList: [ - { - name: 'event_severity', - type: 'string', - label: 'Event severity' - }, - { - name: 'security_type', - type: 'string', - label: 'Security type' - }, - { - name: 'event_type', - type: 'string', - label: 'Event type' - }, - { - name: 'victim_ip', - type: 'string', - label: 'Victim IP' - }, - { - name: 'victim_location_country', - type: 'string', - label: 'Victim location' - }, - { - name: 'offender_ip', - type: 'string', - label: 'Offender IP' - }, - { - name: 'offender_location_country', - type: 'string', - label: 'Offender location' - } - ], + columnList: { + securityEvent: [ + { + name: 'event_severity', + type: 'string', + label: 'Event severity' + }, + { + name: 'security_type', + type: 'string', + label: 'Security type' + }, + { + name: 'victim_ip', + type: 'string', + label: 'Victim IP' + }, + { + name: 'victim_location_country', + type: 'string', + label: 'Victim location' + }, + { + name: 'offender_ip', + type: 'string', + label: 'Offender IP' + }, + { + name: 'offender_location_country', + type: 'string', + label: 'Offender location' + } + ], + performanceEvent: [ + { + name: 'event_severity', + type: 'string', + label: 'Event severity' + }, + { + name: 'event_type', + type: 'string', + label: 'Event type' + }, + { + name: 'app_name', + type: 'string', + label: 'APP name' + }, + { + name: 'domain', + type: 'string', + label: 'Domain' + }, + { + name: 'server_ip', + type: 'string', + label: 'IP' + } + ] + }, operatorList: ['=', '!=', '>', '<', '>=', '<=', 'IN', 'NOT IN', 'LIKE', 'NOT LIKE'], connectionList: [ { @@ -81,7 +110,18 @@ export default { }, methods: { search (metaList, formatSql) { - this.$emit('search', metaList, formatSql) + let sql = formatSql + // 全文搜索处理 + if (metaList && this.$_.isArray(metaList)) { + const hasFullText = metaList.some(meta => { + return meta.column && meta.column.type === columnType.fullText + }) + if (hasFullText) { + const parser = new SqlParser(metaList, this.columnList[this.pageType]) + sql = parser.parseMetaToSql(metaList, true) + } + } + this.$emit('search', metaList, sql) }, changeParams (params) { // params: { column: columnName, oldValue: [...], newValue: [...] } // 向下传递时需要再转换一次param格式为[{column, operator, value}, ...] diff --git a/src/views/detections/Index.vue b/src/views/detections/Index.vue index 7d958297..44c1249e 100644 --- a/src/views/detections/Index.vue +++ b/src/views/detections/Index.vue @@ -10,6 +10,7 @@ @@ -230,7 +231,9 @@ export default { isStatisticsSeverityNoData: false, isStatisticsCategoryNoData: false, isStatisticsActiveAttackNoData: false, - loading: false + loading: false, + + oldActiveEntitySearchValue: '' } }, methods: { @@ -462,7 +465,7 @@ export default { data.sort(reverseSortBy('count')) data = data.slice(0, 5) option.series[0].data = data.map(d => { - return [d.count, d.name] + return [d.count, d.name, d.entityType] }).reverse() detectionChart.setOption(option) extensionEchartY(detectionChart)// y轴标签过长时,鼠标悬浮,显示所有内容 @@ -470,7 +473,41 @@ export default { const vm = this detectionChart.off('click') detectionChart.on('click', e => { - vm.filterData.performanceEvent[0].value = vm.triggerFilterDataValue(vm.filterData.performanceEvent[0].value, e.data[1]) + const entityType = e.data[2] + let column = '' + if (entityType) { + switch (entityType) { + case 'app': { + column = 'app_name' + break + } + case 'domain': { + column = 'domain' + break + } + case 'ip': { + column = 'server_ip' + break + } + default: { + break + } + } + if (column) { + // 点击的name和上次的name一致,则清空该项条件 + if (vm.oldActiveEntitySearchValue === e.data[1]) { + vm.$refs.search.changeParams({ column: column, oldValue: [vm.oldActiveEntitySearchValue], newValue: [] }) + vm.$nextTick(() => { + vm.oldActiveEntitySearchValue = '' + }) + } else { + vm.$refs.search.changeParams({ column: column, oldValue: vm.oldActiveEntitySearchValue ? [vm.oldActiveEntitySearchValue] : [], newValue: [e.data[1]] }) + vm.$nextTick(() => { + vm.oldActiveEntitySearchValue = e.data[1] + }) + } + } + } }) } }).catch(error => { diff --git a/src/views/entityExplorer/EntityExplorer.vue b/src/views/entityExplorer/EntityExplorer.vue index 876e2a90..e09a5570 100644 --- a/src/views/entityExplorer/EntityExplorer.vue +++ b/src/views/entityExplorer/EntityExplorer.vue @@ -149,7 +149,7 @@ import DateTimeRange from '@/components/common/TimeRange/DateTimeRange' import TimeRefresh from '@/components/common/TimeRange/TimeRefresh' import EntityFilter from '@/views/entityExplorer/EntityFilter' import EntityList from '@/views/entityExplorer/entityList/EntityList' -import { entityType, entityFilterType, defaultPageSize, riskLevelMapping } from '@/utils/constants' +import { entityType, defaultPageSize, riskLevelMapping } from '@/utils/constants' import { get } from '@/utils/http' import { api } from '@/utils/api' import { getNowTime, getSecond } from '@/utils/date-util' @@ -202,28 +202,28 @@ export default { label: this.$t('overall.country'), column: 'countryDistinctCount', topColumn: 'ip_location_country', // top弹框查询字段 - icon: entityFilterType.ip[0].icon, + icon: 'cn-icon cn-icon-country', value: 0 }, { label: this.$t('overall.province'), column: 'provinceDistinctCount', topColumn: 'ip_location_province', // top弹框查询字段 - icon: entityFilterType.ip[1].icon, + icon: 'cn-icon cn-icon-position', value: 0 }, { label: this.$t('overall.city'), column: 'cityDistinctCount', topColumn: 'ip_location_city', // top弹框查询字段 - icon: entityFilterType.ip[2].icon, + icon: 'cn-icon cn-icon-city', value: 0 }, { label: this.$t('entities.asn'), column: 'asnDistinctCount', topColumn: 'ip_asn', // top弹框查询字段 - icon: entityFilterType.ip[3].icon, + icon: 'cn-icon cn-icon-cloud', value: 0 } ] @@ -237,21 +237,21 @@ export default { label: this.$t('entities.category'), column: 'categoryDistinctCount', topColumn: 'app_category', // top弹框查询字段 - icon: entityFilterType.app[0].icon, + icon: 'cn-icon cn-icon-category', value: 0 }, { label: this.$t('entities.subcategory'), column: 'subcategoryDistinctCount', topColumn: 'app_subcategory', // top弹框查询字段 - icon: entityFilterType.app[1].icon, + icon: 'cn-icon cn-icon-sub-category', value: 0 }, { label: this.$t('entities.risk'), column: 'riskDistinctCount', topColumn: 'app_risk', // top弹框查询字段 - icon: entityFilterType.app[2].icon, + icon: 'cn-icon cn-icon-risk', value: 0 } ] @@ -265,21 +265,56 @@ export default { label: this.$t('entities.domainDetail.categoryGroup'), column: 'categoryGroupDistinctCount', topColumn: 'domain_category_group', // top弹框查询字段 - icon: entityFilterType.domain[0].icon, + icon: 'cn-icon cn-icon-category', value: 0 }, { label: this.$t('entities.category'), column: 'categoryDistinctCount', topColumn: 'domain_category', // top弹框查询字段 - icon: entityFilterType.domain[1].icon, + icon: 'cn-icon cn-icon-sub-category', value: 0 }, { label: this.$t('entities.reputationLevel'), column: 'reputationLevelDistinctCount', topColumn: 'domain_reputation_level', // top弹框查询字段 - icon: entityFilterType.domain[2].icon, + icon: 'cn-icon cn-icon-credit', + value: 0 + } + ] + }, + { + type: 'dns', + title: 'DNS', + totalCount: 0, + data: [ + { + label: this.$t('overall.dnsServerInfo.role'), + column: 'dnsServerRoleCount', + topColumn: 'dns_server_role', + icon: 'cn-icon cn-icon-role', + value: 0 + }, + { + label: this.$t('dns.managementOrganization'), + column: 'dnsServerOrgCount', + topColumn: 'dns_server_org', + icon: 'cn-icon cn-icon-org', + value: 0 + }, + { + label: this.$t('overall.dnsServerInfo.software'), + column: 'dnsServerSoftwareCount', + topColumn: 'dns_server_software', + icon: 'cn-icon cn-icon-software', + value: 0 + }, + { + label: this.$t('overall.dnsServerInfo.system'), + column: 'dnsServerOsCount', + topColumn: 'dns_server_os', + icon: 'cn-icon cn-icon-os', value: 0 } ]