This commit is contained in:
@changcode
2022-02-21 10:52:54 +08:00
17 changed files with 560 additions and 453 deletions

View File

@@ -2,7 +2,7 @@
display: flex; display: flex;
.cn-detection__collapse { .cn-detection__collapse {
margin-bottom: 1px; margin-bottom: 1px;
padding-top: 30px; padding-top: 18px;
width: 24px; width: 24px;
display: flex; display: flex;
justify-content: center; justify-content: center;

File diff suppressed because one or more lines are too long

View File

@@ -14,7 +14,6 @@ import '@/assets/css/main.scss' // 样式入口
import VueGridLayout from 'vue-grid-layout' import VueGridLayout from 'vue-grid-layout'
import ElementPlus from 'element-plus' import ElementPlus from 'element-plus'
import bus from 'tiny-emitter' import bus from 'tiny-emitter'
const emitter = new bus()
import dayjs from 'dayjs' import dayjs from 'dayjs'
import utc from 'dayjs/plugin/utc' // dependent on utc plugin import utc from 'dayjs/plugin/utc' // dependent on utc plugin
import timezone from 'dayjs/plugin/timezone' import timezone from 'dayjs/plugin/timezone'
@@ -24,6 +23,7 @@ import weekday from 'dayjs/plugin/weekday'
import DateTimeRange from '@/components/common/TimeRange/DateTimeRange' import DateTimeRange from '@/components/common/TimeRange/DateTimeRange'
import TimeRefresh from '@/components/common/TimeRange/TimeRefresh' import TimeRefresh from '@/components/common/TimeRange/TimeRefresh'
import PanelChartList from '@/views/charts/PanelChartList' import PanelChartList from '@/views/charts/PanelChartList'
const emitter = new bus()
const _ = require('lodash') // lodash工具 const _ = require('lodash') // lodash工具

View File

@@ -1,5 +1,5 @@
import { hasButton } from '@/permission' import { hasButton } from '@/permission'
import {getMillisecond} from "@/utils/date-util"; import { getMillisecond } from '@/utils/date-util'
export default { export default {
data () { data () {
return { return {

View File

@@ -74,7 +74,7 @@ export const api = {
entityIpRelatedServerDomain: '/interface/entity/detail/overview/ip/relatedDomain', entityIpRelatedServerDomain: '/interface/entity/detail/overview/ip/relatedDomain',
entityIpRelatedServerApp: '/interface/entity/detail/overview/ip/relatedApp', entityIpRelatedServerApp: '/interface/entity/detail/overview/ip/relatedApp',
// detection // detection
detectionEventSeverity: '/interface/detection/filter/severity', detectionSeverityTrend: '/interface/detection/filter/severityTrend',
detectionAttackType: '/interface/detection/filter/attackType', detectionAttackType: '/interface/detection/filter/attackType',
detectionOffenderIp: '/interface/detection/filter/offenderIp', detectionOffenderIp: '/interface/detection/filter/offenderIp',
detectionOffenderLocation: '/interface/detection/filter/offenderLocation', detectionOffenderLocation: '/interface/detection/filter/offenderLocation',

View File

@@ -190,7 +190,8 @@ export default {
} }
const requestUrl = url || (chartParams && chartParams.url) const requestUrl = url || (chartParams && chartParams.url)
if (requestUrl) { if (requestUrl) {
get(replaceUrlPlaceholder(requestUrl, this.queryParams)).then(response => {1 get(replaceUrlPlaceholder(requestUrl, this.queryParams)).then(response => {
1
// if (this.chartInfo.type === 23 && testData) { // if (this.chartInfo.type === 23 && testData) {
// response = testData.data // response = testData.data
// } else if (this.chartInfo.type === 24 && testData) { // } else if (this.chartInfo.type === 24 && testData) {

View File

@@ -52,7 +52,7 @@
import { unitTypes } from '@/utils/constants' import { unitTypes } from '@/utils/constants'
import unitConvert from '@/utils/unit-convert' import unitConvert from '@/utils/unit-convert'
export default { export default {
name: "ChartActiveIpTable", name: 'ChartActiveIpTable',
props: { props: {
chartInfo: Object, chartInfo: Object,
chartData: [Array, Object], chartData: [Array, Object],

View File

@@ -56,7 +56,7 @@
<script> <script>
export default { export default {
name: "ChartAppBasicInfo", name: 'ChartAppBasicInfo',
props: { props: {
chartInfo: Object, chartInfo: Object,
chartData: [Array, Object], chartData: [Array, Object],

View File

@@ -24,7 +24,7 @@
<script> <script>
export default { export default {
name: "ChartCryptocurrencyEventList", name: 'ChartCryptocurrencyEventList',
props: { props: {
chartInfo: Object, chartInfo: Object,
chartData: [Array, Object], chartData: [Array, Object],

View File

@@ -23,7 +23,7 @@
<script> <script>
export default { export default {
name: "ChartDomainDnsRecord", name: 'ChartDomainDnsRecord',
props: { props: {
chartInfo: Object, chartInfo: Object,
chartData: [Array, Object], chartData: [Array, Object],

View File

@@ -33,7 +33,7 @@
<script> <script>
export default { export default {
name: "ChartDomainWhois", name: 'ChartDomainWhois',
props: { props: {
chartInfo: Object, chartInfo: Object,
chartData: [Array, Object], chartData: [Array, Object],

View File

@@ -67,10 +67,9 @@ export default {
}, },
getTargetPageData (pageNum, pageSize, tableData) { getTargetPageData (pageNum, pageSize, tableData) {
return this.$_.slice(tableData, (pageNum - 1) * pageSize, pageNum * pageSize) return this.$_.slice(tableData, (pageNum - 1) * pageSize, pageNum * pageSize)
}, }
}, },
mounted () { mounted () {
} }
} }
</script> </script>

View File

@@ -114,46 +114,14 @@ export default {
column: 'eventSeverity', column: 'eventSeverity',
collapse: false, collapse: false,
value: [], // value之间是or的关系 value: [], // value之间是or的关系
data: [ data: [] // 从接口动态获取,本项在获得数据后需要特殊处理左边框颜色
{
label: 'Critical',
value: 'critical',
count: 50
},
{
label: 'High',
value: 'high',
count: 50
},
{
label: 'Medium',
value: 'medium',
count: 50
},
{
label: 'Low',
value: 'low',
count: 50
},
{
label: 'Info',
value: 'info',
count: 50
}
] // 从接口动态获取,本项在获得数据后需要特殊处理左边框颜色
}, },
{ {
title: this.$t('detections.securityType'), title: this.$t('detections.securityType'),
column: 'securityType', column: 'securityType',
collapse: false, collapse: false,
value: [], value: [],
data: [ data: [] // 从接口动态获取
{
label: 'Command and control',
value: 'command and control',
count: 50
}
] // 从接口动态获取
}, },
{ {
title: this.$t('detections.victimIp'), title: this.$t('detections.victimIp'),
@@ -162,117 +130,11 @@ export default {
value: [], value: [],
showMore: true, showMore: true,
showIndex: 9, showIndex: 9,
data: [ data: [] // 从接口动态获取
{
label: '1.2.6.8',
value: '1.2.6.8',
count: 50
},
{
label: '1.2.6.9',
value: '1.2.6.9',
count: 50
},
{
label: '1.2.6.0',
value: '1.2.6.0',
count: 50
},
{
label: '1.2.6.1',
value: '1.2.6.1',
count: 50
},
{
label: '1.2.6.2',
value: '1.2.6.2',
count: 50
},
{
label: '1.2.6.3',
value: '1.2.6.3',
count: 50
},
{
label: '1.2.6.4',
value: '1.2.6.4',
count: 50
},
{
label: '1.2.6.5',
value: '1.2.6.5',
count: 50
},
{
label: '1.2.6.6',
value: '1.2.6.6',
count: 50
},
{
label: '1.2.6.7',
value: '1.2.6.7',
count: 50
},
{
label: '1.2.7.8',
value: '1.2.7.8',
count: 50
},
{
label: '1.2.8.8',
value: '1.2.8.8',
count: 50
},
{
label: '1.2.9.8',
value: '1.2.9.8',
count: 50
},
{
label: '1.2.6.18',
value: '1.2.6.18',
count: 50
},
{
label: '1.2.6.28',
value: '1.2.6.28',
count: 50
},
{
label: '1.2.6.38',
value: '1.2.6.38',
count: 50
},
{
label: '1.2.6.48',
value: '1.2.6.48',
count: 50
},
{
label: '1.2.6.58',
value: '1.2.6.58',
count: 50
},
{
label: '1.2.6.68',
value: '1.2.6.68',
count: 50
},
{
label: '1.2.6.78',
value: '1.2.6.78',
count: 50
},
{
label: '1.2.6.88',
value: '1.2.6.88',
count: 50
}
] // 从接口动态获取
}, },
{ {
title: this.$t('detections.victimLocation'), title: this.$t('detections.victimLocation'),
column: 'victimLocation', column: 'victimLocationCountry',
collapse: false, collapse: false,
value: [], value: [],
showMore: false, showMore: false,
@@ -302,7 +164,7 @@ export default {
}, },
{ {
title: this.$t('detections.offenderLocation'), title: this.$t('detections.offenderLocation'),
column: 'offenderLocation', column: 'offenderLocationCountry',
collapse: false, collapse: false,
value: [], value: [],
showMore: false, showMore: false,
@@ -325,13 +187,13 @@ export default {
categoryPerOption: null, categoryPerOption: null,
categoryPerData: [], categoryPerData: [],
activeAttackOption: null, activeAttackOption: null,
activeAttackData:[], activeAttackData: []
} }
}, },
methods: { methods: {
initEventSeverityData(){ initEventSeverityTrendData () {
const chartDom = document.getElementById('detectionEventSeverityBar'); const chartDom = document.getElementById('detectionEventSeverityBar')
const detectionChart = echarts.init(chartDom); const detectionChart = echarts.init(chartDom)
this.eventSeverityOption = this.$_.cloneDeep(multipleBarOption) this.eventSeverityOption = this.$_.cloneDeep(multipleBarOption)
const queryParams = { const queryParams = {
@@ -339,29 +201,29 @@ export default {
endTime: getSecond(this.timeFilter.endTime), endTime: getSecond(this.timeFilter.endTime),
q: this.q q: this.q
} }
get(api.detectionEventSeverity, queryParams).then(response => { get(api.detectionSeverityTrend, queryParams).then(response => {
response = { response = {
"code": 200, code: 200,
"success": true, success: true,
"msg": "OK", msg: 'OK',
"data": { data: {
"resultType": "table", resultType: 'table',
"result": [ result: [
{ {
"eventSeverity": "Critical", eventSeverity: 'Critical',
"count": 1048 count: 1048
}, { }, {
"eventSeverity": "High", eventSeverity: 'High',
"count": 735 count: 735
}, { }, {
"eventSeverity": "Medium", eventSeverity: 'Medium',
"count": 580 count: 580
}, { }, {
"eventSeverity": "Low", eventSeverity: 'Low',
"count": 484 count: 484
}, { }, {
"eventSeverity": "Info", eventSeverity: 'Info',
"count": 300 count: 300
} }
] ]
} }
@@ -379,13 +241,13 @@ export default {
}).finally(() => { }).finally(() => {
this.$nextTick(() => { this.$nextTick(() => {
this.eventSeverityOption.dataset.source = this.eventSeverityData this.eventSeverityOption.dataset.source = this.eventSeverityData
this.eventSeverityOption && detectionChart.setOption(this.eventSeverityOption); this.eventSeverityOption && detectionChart.setOption(this.eventSeverityOption)
}) })
}) })
}, },
initSeverityPerData () { initSeverityPerData () {
const chartDom = document.getElementById('detectionSeverityPer'); const chartDom = document.getElementById('detectionSeverityPer')
const detectionChart = echarts.init(chartDom); const detectionChart = echarts.init(chartDom)
this.severityPerOption = this.$_.cloneDeep(pieForSeverity) this.severityPerOption = this.$_.cloneDeep(pieForSeverity)
const queryParams = { const queryParams = {
@@ -395,27 +257,27 @@ export default {
} }
get(api.detectionEventSeverity, queryParams).then(response => { get(api.detectionEventSeverity, queryParams).then(response => {
response = { response = {
"code": 200, code: 200,
"success": true, success: true,
"msg": "OK", msg: 'OK',
"data": { data: {
"resultType": "table", resultType: 'table',
"result": [ result: [
{ {
"eventSeverity": "Critical", eventSeverity: 'Critical',
"count": 1048 count: 1048
}, { }, {
"eventSeverity": "High", eventSeverity: 'High',
"count": 735 count: 735
}, { }, {
"eventSeverity": "Medium", eventSeverity: 'Medium',
"count": 580 count: 580
}, { }, {
"eventSeverity": "Low", eventSeverity: 'Low',
"count": 484 count: 484
}, { }, {
"eventSeverity": "Info", eventSeverity: 'Info',
"count": 300 count: 300
} }
] ]
} }
@@ -429,13 +291,13 @@ export default {
}).finally(() => { }).finally(() => {
this.$nextTick(() => { this.$nextTick(() => {
this.severityPerOption.series[0].data = this.severityPerData this.severityPerOption.series[0].data = this.severityPerData
this.severityPerOption && detectionChart.setOption(this.severityPerOption); this.severityPerOption && detectionChart.setOption(this.severityPerOption)
}) })
}) })
}, },
initCategoryPerData () { initCategoryPerData () {
const chartDom = document.getElementById('detectionCategoryPer'); const chartDom = document.getElementById('detectionCategoryPer')
const detectionChart = echarts.init(chartDom); const detectionChart = echarts.init(chartDom)
this.categoryPerOption = this.$_.cloneDeep(pieForSeverity) this.categoryPerOption = this.$_.cloneDeep(pieForSeverity)
const queryParams = { const queryParams = {
@@ -445,35 +307,36 @@ export default {
} }
get(api.detectionAttackType, queryParams).then(response => { get(api.detectionAttackType, queryParams).then(response => {
response = { response = {
"code": 200, code: 200,
"success": true, success: true,
"msg": "OK", msg: 'OK',
"data": { data: {
"resultType": "table", resultType: 'table',
"result": [ result: [
{ {
"attackType": "Command and control", attackType: 'Command and control',
"count": 1048 count: 1048
}, { }, {
"attackType": "Payload_delivery", attackType: 'Payload_delivery',
"count": 735 count: 735
}, { }, {
"attackType": "Cryptomining", attackType: 'Cryptomining',
"count": 580 count: 580
}, { }, {
"attackType": "phishing", attackType: 'phishing',
"count": 484 count: 484
}, { }, {
"attackType": "dga", attackType: 'dga',
"count": 300 count: 300
}, { }, {
"attackType": "ddos", attackType: 'ddos',
"count": 50 count: 50
}, }
] ]
} }
} }
if (response.code === 200) { if (response.code === 200) {
this.filterData[1].data = response.data.result.map(r => ({ label: r.attackType, value: r.attackType, count: r.count }))
this.categoryPerData = response.data.result.map(d => { this.categoryPerData = response.data.result.map(d => {
return { value: d.count, name: d.attackType, itemStyle: { color: getAttackColor(d.attackType) } } return { value: d.count, name: d.attackType, itemStyle: { color: getAttackColor(d.attackType) } }
}) })
@@ -481,14 +344,13 @@ export default {
}).finally(() => { }).finally(() => {
this.$nextTick(() => { this.$nextTick(() => {
this.categoryPerOption.series[0].data = this.categoryPerData this.categoryPerOption.series[0].data = this.categoryPerData
this.categoryPerOption && detectionChart.setOption(this.categoryPerOption); this.categoryPerOption && detectionChart.setOption(this.categoryPerOption)
}) })
}) })
}, },
initActiveAttackData () { initActiveAttackData () {
const chartDom = document.getElementById('detectionActiveAttacker'); const chartDom = document.getElementById('detectionActiveAttacker')
const detectionChart = echarts.init(chartDom); const detectionChart = echarts.init(chartDom)
this.activeAttackOption = this.$_.cloneDeep(activeAttackBar) this.activeAttackOption = this.$_.cloneDeep(activeAttackBar)
const queryParams = { const queryParams = {
@@ -498,33 +360,36 @@ export default {
} }
get(api.detectionOffenderIp, queryParams).then(response => { get(api.detectionOffenderIp, queryParams).then(response => {
response = { response = {
"code": 200, code: 200,
"success": true, success: true,
"msg": "OK", msg: 'OK',
"data": { data: {
"resultType": "table", resultType: 'table',
"result": [ result: [
{ {
"offenderIp": "192.168.12.21", offenderIp: '192.168.12.21',
"count": 99999 count: 99999
}, { }, {
"offenderIp": "192.168.22.21", offenderIp: '192.168.22.21',
"count": 88888 count: 88888
}, { }, {
"offenderIp": "192.168.32.21", offenderIp: '192.168.32.21',
"count": 77777 count: 77777
}, { }, {
"offenderIp": "192.168.42.21", offenderIp: '192.168.42.21',
"count": 66666 count: 66666
}, { }, {
"offenderIp": "192.168.52.21", offenderIp: '192.168.52.21',
"count": 55555 count: 55555
} }
] ]
} }
} }
if (response.code === 200) { if (response.code === 200) {
this.filterData[4].data = response.data.result.map(r => ({ label: r.offenderIp, value: r.offenderIp, count: r.count })) this.filterData[4].data = response.data.result.map(r => ({ label: r.offenderIp, value: r.offenderIp, count: r.count }))
const { showMore, showIndex } = this.computeFilterPage(this.filterData[4].data)
this.filterData[4].showMore = showMore
this.filterData[4].showIndex = showIndex
this.activeAttackData = response.data.result.map(d => { this.activeAttackData = response.data.result.map(d => {
return [d.count, d.offenderIp] return [d.count, d.offenderIp]
}) })
@@ -532,7 +397,7 @@ export default {
}).finally(() => { }).finally(() => {
this.$nextTick(() => { this.$nextTick(() => {
this.activeAttackOption.series[0].data = this.activeAttackData.reverse() this.activeAttackOption.series[0].data = this.activeAttackData.reverse()
this.activeAttackOption && detectionChart.setOption(this.activeAttackOption); this.activeAttackOption && detectionChart.setOption(this.activeAttackOption)
}) })
}) })
}, },
@@ -543,8 +408,105 @@ export default {
q: this.q q: this.q
} }
get(api.detectionVictimIp, queryParams).then(response => { get(api.detectionVictimIp, queryParams).then(response => {
response = {
code: 200,
success: true,
msg: 'OK',
data: {
resultType: 'table',
result: [
{
victimIp: '1.2.6.8',
count: 50
},
{
victimIp: '1.2.6.9',
count: 50
},
{
victimIp: '1.2.6.0',
count: 50
},
{
victimIp: '1.2.6.1',
count: 50
},
{
victimIp: '1.2.6.2',
count: 50
},
{
victimIp: '1.2.6.3',
count: 50
},
{
victimIp: '1.2.6.4',
count: 50
},
{
victimIp: '1.2.6.5',
count: 50
},
{
victimIp: '1.2.6.6',
count: 50
},
{
victimIp: '1.2.6.7',
count: 50
},
{
victimIp: '1.2.7.8',
count: 50
},
{
victimIp: '1.2.8.8',
count: 50
},
{
victimIp: '1.2.9.8',
count: 50
},
{
victimIp: '1.2.6.18',
count: 50
},
{
victimIp: '1.2.6.28',
count: 50
},
{
victimIp: '1.2.6.38',
count: 50
},
{
victimIp: '1.2.6.48',
count: 50
},
{
victimIp: '1.2.6.58',
count: 50
},
{
victimIp: '1.2.6.68',
count: 50
},
{
victimIp: '1.2.6.78',
count: 50
},
{
victimIp: '1.2.6.88',
count: 50
}
]
}
}
if (response.data && response.data.result) { if (response.data && response.data.result) {
this.filterData[2].data = response.data.result.map(r => ({ label: r.victimIp, value: r.victimIp, count: r.count })) this.filterData[2].data = response.data.result.map(r => ({ label: r.victimIp, value: r.victimIp, count: r.count }))
const { showMore, showIndex } = this.computeFilterPage(this.filterData[2].data)
this.filterData[2].showMore = showMore
this.filterData[2].showIndex = showIndex
} }
}) })
}, },
@@ -555,8 +517,25 @@ export default {
q: this.q q: this.q
} }
get(api.detectionVictimLocation, queryParams).then(response => { get(api.detectionVictimLocation, queryParams).then(response => {
response = {
code: 200,
success: true,
msg: 'OK',
data: {
resultType: 'table',
result: [
{
victimLocationCountry: 'china',
count: 50
}
]
}
}
if (response.data && response.data.result) { if (response.data && response.data.result) {
this.filterData[3].data = response.data.result.map(r => ({ label: r.victimLocationCountry, value: r.victimLocationCountry, count: r.count })) this.filterData[3].data = response.data.result.map(r => ({ label: r.victimLocationCountry, value: r.victimLocationCountry, count: r.count }))
const { showMore, showIndex } = this.computeFilterPage(this.filterData[3].data)
this.filterData[3].showMore = showMore
this.filterData[3].showIndex = showIndex
} }
}) })
}, },
@@ -567,71 +546,204 @@ export default {
q: this.q q: this.q
} }
get(api.detectionOffenderLocation, queryParams).then(response => { get(api.detectionOffenderLocation, queryParams).then(response => {
response = {
code: 200,
success: true,
msg: 'OK',
data: {
resultType: 'table',
result: [
{
offenderLocationCountry: 'china',
count: 50
}
]
}
}
if (response.data && response.data.result) { if (response.data && response.data.result) {
this.filterData[5].data = response.data.result.map(r => ({ label: r.victimLocationCountry, value: r.victimLocationCountry, count: r.count })) this.filterData[5].data = response.data.result.map(r => ({ label: r.offenderLocationCountry, value: r.offenderLocationCountry, count: r.count }))
const { showMore, showIndex } = this.computeFilterPage(this.filterData[5].data)
this.filterData[5].showMore = showMore
this.filterData[5].showIndex = showIndex
} }
}) })
}, },
initListData(){ computeFilterPage (data) {
return {
showMore: data.length > 10,
showIndex: 9
}
},
queryList () {
const queryParams = { const queryParams = {
...this.timeFilter, ...this.timeFilter,
q:this.q, q: this.q
} }
get(api.detectionListBasic, queryParams).then(response => { get(api.detectionListBasic, queryParams).then(response => {
response = { response = {
"code": 200, code: 200,
"success": true, success: true,
"msg": "OK", msg: 'OK',
"data": { data: {
"resultType": "table", resultType: 'table',
"result": [ result: [
{ {
"eventId": 1212, eventId: 1212,
"securityType": "ddos", securityType: 'ddos',
"offenderIp": "1.1.1.1", offenderIp: '1.1.1.1',
"victimIp": "2.2.2.2", victimIp: '2.2.2.2',
"eventSecurity": "critical", eventSecurity: 'critical',
"malwareName": "the great wall", malwareName: 'the great wall',
"cryptominingPool": "a", cryptominingPool: 'a',
"startTime": 978456923589 startTime: 978456923589
}, },
{ {
"eventId": 1212, eventId: 1212,
"securityType": "ddos", securityType: 'ddos',
"offenderIp": "1.1.1.1", offenderIp: '1.1.1.1',
"victimIp": "2.2.2.2", victimIp: '2.2.2.2',
"eventSecurity": "high", eventSecurity: 'high',
"cryptominingPool": "a", cryptominingPool: 'a',
"startTime": 1111111111 startTime: 1111111111
}, },
{ {
"eventId": 1212, eventId: 1212,
"securityType": "ddos", securityType: 'ddos',
"offenderIp": "1.1.1.1", offenderIp: '1.1.1.1',
"victimIp": "2.2.2.2", victimIp: '2.2.2.2',
"eventSecurity": "low", eventSecurity: 'low',
"malwareName": "the great wall", malwareName: 'the great wall',
"startTime": 1111111111 startTime: 1111111111
}, },
{ {
"eventId": 1212, eventId: 1212,
"securityType": "ddos", securityType: 'ddos',
"offenderIp": "1.1.1.1", offenderIp: '1.1.1.1',
"victimIp": "2.2.2.2", victimIp: '2.2.2.2',
"eventSecurity": "medium", eventSecurity: 'medium',
"malwareName": "the great wall", malwareName: 'the great wall',
"cryptominingPool": "a", cryptominingPool: 'a',
"startTime": 1111111111 startTime: 1111111111
}, },
{ {
"eventId": 1212, eventId: 1212,
"securityType": "ddos", securityType: 'ddos',
"offenderIp": "1.1.1.1", offenderIp: '1.1.1.1',
"victimIp": "2.2.2.2", victimIp: '2.2.2.2',
"eventSecurity": "info", eventSecurity: 'info',
"malwareName": "the great wall", malwareName: 'the great wall',
"cryptominingPool": "a", cryptominingPool: 'a',
"startTime": 1111111111 startTime: 1111111111
},
{
eventId: 1212,
securityType: 'ddos',
offenderIp: '1.1.1.1',
victimIp: '2.2.2.2',
eventSecurity: 'info',
malwareName: 'the great wall',
cryptominingPool: 'a',
startTime: 1111111111
},
{
eventId: 1212,
securityType: 'ddos',
offenderIp: '1.1.1.1',
victimIp: '2.2.2.2',
eventSecurity: 'info',
malwareName: 'the great wall',
cryptominingPool: 'a',
startTime: 1111111111
},
{
eventId: 1212,
securityType: 'ddos',
offenderIp: '1.1.1.1',
victimIp: '2.2.2.2',
eventSecurity: 'info',
malwareName: 'the great wall',
cryptominingPool: 'a',
startTime: 1111111111
},
{
eventId: 1212,
securityType: 'ddos',
offenderIp: '1.1.1.1',
victimIp: '2.2.2.2',
eventSecurity: 'info',
malwareName: 'the great wall',
cryptominingPool: 'a',
startTime: 1111111111
},
{
eventId: 1212,
securityType: 'ddos',
offenderIp: '1.1.1.1',
victimIp: '2.2.2.2',
eventSecurity: 'info',
malwareName: 'the great wall',
cryptominingPool: 'a',
startTime: 1111111111
},
{
eventId: 1212,
securityType: 'ddos',
offenderIp: '1.1.1.1',
victimIp: '2.2.2.2',
eventSecurity: 'info',
malwareName: 'the great wall',
cryptominingPool: 'a',
startTime: 1111111111
},
{
eventId: 1212,
securityType: 'ddos',
offenderIp: '1.1.1.1',
victimIp: '2.2.2.2',
eventSecurity: 'info',
malwareName: 'the great wall',
cryptominingPool: 'a',
startTime: 1111111111
},
{
eventId: 1212,
securityType: 'ddos',
offenderIp: '1.1.1.1',
victimIp: '2.2.2.2',
eventSecurity: 'info',
malwareName: 'the great wall',
cryptominingPool: 'a',
startTime: 1111111111
},
{
eventId: 1212,
securityType: 'ddos',
offenderIp: '1.1.1.1',
victimIp: '2.2.2.2',
eventSecurity: 'info',
malwareName: 'the great wall',
cryptominingPool: 'a',
startTime: 1111111111
},
{
eventId: 1212,
securityType: 'ddos',
offenderIp: '1.1.1.1',
victimIp: '2.2.2.2',
eventSecurity: 'info',
malwareName: 'the great wall',
cryptominingPool: 'a',
startTime: 1111111111
},
{
eventId: 1212,
securityType: 'ddos',
offenderIp: '1.1.1.1',
victimIp: '2.2.2.2',
eventSecurity: 'info',
malwareName: 'the great wall',
cryptominingPool: 'a',
startTime: 1111111111
} }
] ]
} }
@@ -668,15 +780,13 @@ export default {
this.queryListTotal() this.queryListTotal()
}, },
queryFilter () { queryFilter () {
this.initEventSeverityTrendData()
this.initSeverityPerData() this.initSeverityPerData()
this.initCategoryPerData() this.initCategoryPerData()
this.initActiveAttackData() this.initActiveAttackData()
this.initOffenderLocation() this.initOffenderLocation()
this.initVictimIp() this.initVictimIp()
this.initVictimLocation() this.initVictimLocation()
},
queryList () {
}, },
queryListTotal () { queryListTotal () {
@@ -717,11 +827,8 @@ export default {
} }
}, },
mounted () { mounted () {
this.initEventSeverityData() this.queryFilter()
this.initSeverityPerData() this.queryList()
this.initCategoryPerData()
this.initActiveAttackData()
this.initListData()
}, },
watch: { watch: {
timeFilter (n) { timeFilter (n) {

View File

@@ -38,7 +38,7 @@ export const multipleBarOption = {
top: 10, top: 10,
right: 10, right: 10,
itemWidth: 10, // 设置宽度 itemWidth: 10, // 设置宽度
itemHeight: 10, // 设置高度 itemHeight: 10 // 设置高度
}, },
tooltip: {}, tooltip: {},
dataset: { dataset: {
@@ -60,7 +60,7 @@ export const multipleBarOption = {
}, },
splitLine: { splitLine: {
show: false show: false
}, }
}, },
yAxis: { yAxis: {
axisTick: { show: false }, axisTick: { show: false },
@@ -130,9 +130,9 @@ export const multipleBarOption = {
itemStyle: { itemStyle: {
color: '#d7c668' color: '#d7c668'
} }
}, }
] ]
}; }
export const pieForSeverity = { export const pieForSeverity = {
tooltip: { tooltip: {
appendToBody: true appendToBody: true
@@ -204,7 +204,7 @@ export const activeAttackBar = {
}, },
splitLine: { splitLine: {
show: false show: false
}, }
}, },
grid: { grid: {
top: 20, top: 20,
@@ -221,7 +221,7 @@ export const activeAttackBar = {
}, },
splitLine: { splitLine: {
show: false show: false
}, }
}, },
series: [{ series: [{
barWidth: 5, barWidth: 5,
@@ -229,7 +229,7 @@ export const activeAttackBar = {
itemStyle: { itemStyle: {
normal: { normal: {
color: function (params) { color: function (params) {
const colorList = ['#d1bd50','#c9d150','#fddd52','#ffb65a','#fe845d']; const colorList = ['#d1bd50', '#c9d150', '#fddd52', '#ffb65a', '#fe845d']
return colorList[params.dataIndex] return colorList[params.dataIndex]
} }
} }
@@ -242,7 +242,7 @@ export const activeAttackBar = {
valueAnimation: true, valueAnimation: true,
formatter: function (param, index, callback) { formatter: function (param, index, callback) {
return `${unitConvert(param.value[0], 'number').join(' ')}` return `${unitConvert(param.value[0], 'number').join(' ')}`
}, }
}, },
barCategoryGap: '10%' barCategoryGap: '10%'
}] }]

View File

@@ -52,7 +52,7 @@ import dataListMixin from '@/mixins/data-list'
import rolesTable from '@/components/table/settings/RoleTable' import rolesTable from '@/components/table/settings/RoleTable'
import roleBox from '@/components/rightBox/settings/RoleBox' import roleBox from '@/components/rightBox/settings/RoleBox'
import { api } from '@/utils/api' import { api } from '@/utils/api'
import {get} from "@/utils/http"; import { get } from '@/utils/http'
export default { export default {
name: 'roles', name: 'roles',