2022-02-14 17:40:29 +08:00
|
|
|
|
<template>
|
2022-02-14 22:22:31 +08:00
|
|
|
|
<div
|
|
|
|
|
|
class="entity-explorer entity-explorer--show-list"
|
|
|
|
|
|
>
|
|
|
|
|
|
<!-- 顶部工具栏,在列表页显示 -->
|
|
|
|
|
|
<div class="explorer-top-tools">
|
|
|
|
|
|
<DateTimeRange class="date-time-range" :start-time="timeFilter.startTime" :end-time="timeFilter.endTime" ref="dateTimeRange" @change="reload"/>
|
|
|
|
|
|
<TimeRefresh class="date-time-range" @change="timeRefreshChange" :end-time="timeFilter.endTime"/>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<!-- 搜索组件 -->
|
|
|
|
|
|
<detection-search
|
|
|
|
|
|
ref="search"
|
|
|
|
|
|
@search="search"
|
|
|
|
|
|
></detection-search>
|
|
|
|
|
|
<!-- 内容区 -->
|
|
|
|
|
|
<div class="explorer-container" style="height: calc(100% - 20px); flex-direction: column">
|
2022-02-17 19:28:48 +08:00
|
|
|
|
<div class="detection__event-severity-bar" id="detectionEventSeverityBar"></div>
|
2022-02-18 18:09:44 +08:00
|
|
|
|
<div style="display: flex;">
|
2022-02-14 22:22:31 +08:00
|
|
|
|
<detection-filter
|
|
|
|
|
|
:filter-data="filterData"
|
|
|
|
|
|
:q="q"
|
|
|
|
|
|
:time-filter="timeFilter"
|
|
|
|
|
|
@filter="filter"
|
|
|
|
|
|
></detection-filter>
|
2022-02-15 23:27:55 +08:00
|
|
|
|
|
2022-02-14 22:22:31 +08:00
|
|
|
|
<div class="detection__list">
|
2022-02-17 19:28:48 +08:00
|
|
|
|
<div class="detection__list-statistics">
|
2022-02-21 10:52:14 +08:00
|
|
|
|
<div class="statistics__severity">
|
|
|
|
|
|
<div class="chart-header">
|
2022-02-17 19:28:48 +08:00
|
|
|
|
<div class="chart-header__title">{{$t('detection.severity')}}</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="chart-content" id="detectionSeverityPer">
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2022-02-21 10:52:14 +08:00
|
|
|
|
<div class="statistics__category">
|
|
|
|
|
|
<div class="chart-header">
|
2022-02-17 19:28:48 +08:00
|
|
|
|
<div class="chart-header__title">{{$t('detection.categoryProportion')}}</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="chart-content" id="detectionCategoryPer">
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2022-02-21 10:52:14 +08:00
|
|
|
|
<div class="statistics__active-attack">
|
|
|
|
|
|
<div class="chart-header">
|
2022-02-17 19:28:48 +08:00
|
|
|
|
<div class="chart-header__title">{{$t('detection.activeAttacker')}}</div>
|
|
|
|
|
|
</div>
|
2022-02-18 17:54:22 +08:00
|
|
|
|
<div class="chart-content" style="" id="detectionActiveAttacker">
|
2022-02-17 19:28:48 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2022-02-14 22:22:31 +08:00
|
|
|
|
<detection-list
|
|
|
|
|
|
:list-data="listData"
|
|
|
|
|
|
:pageObj="pageObj"
|
|
|
|
|
|
:time-filter="timeFilter"
|
|
|
|
|
|
@pageSize="pageSize"
|
|
|
|
|
|
@pageNo="pageNo"
|
|
|
|
|
|
:loading="listLoading"
|
|
|
|
|
|
></detection-list>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2022-02-21 10:52:14 +08:00
|
|
|
|
<div class="entity__pagination">
|
2022-02-14 22:22:31 +08:00
|
|
|
|
<Pagination
|
|
|
|
|
|
ref="pagination"
|
|
|
|
|
|
:page-obj="pageObj"
|
|
|
|
|
|
@pageNo='pageNo'
|
|
|
|
|
|
@pageSize='pageSize'
|
|
|
|
|
|
@size-change="pageSize"
|
|
|
|
|
|
@prev-click="prev"
|
|
|
|
|
|
@next-click="next"
|
|
|
|
|
|
>
|
|
|
|
|
|
</Pagination>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2022-02-14 17:40:29 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
2022-02-14 22:22:31 +08:00
|
|
|
|
import DetectionSearch from '@/views/detections/DetectionSearch'
|
|
|
|
|
|
import DateTimeRange from '@/components/common/TimeRange/DateTimeRange'
|
|
|
|
|
|
import TimeRefresh from '@/components/common/TimeRange/TimeRefresh'
|
|
|
|
|
|
import DetectionFilter from '@/views/detections/DetectionFilter'
|
|
|
|
|
|
import DetectionList from '@/views/detections/DetectionList'
|
|
|
|
|
|
import Pagination from '@/components/common/Pagination'
|
|
|
|
|
|
import { defaultPageSize } from '@/utils/constants'
|
2022-02-21 10:52:14 +08:00
|
|
|
|
import { getNowTime, getSecond } from '@/utils/date-util'
|
2022-02-14 22:22:31 +08:00
|
|
|
|
import { ref } from 'vue'
|
2022-02-17 19:28:48 +08:00
|
|
|
|
import * as echarts from 'echarts'
|
2022-02-21 10:52:14 +08:00
|
|
|
|
import { multipleBarOption, pieForSeverity, activeAttackBar, getAttackColor, getSeverityColor } from '@/views/detections/options/detectionOptions'
|
2022-02-17 19:28:48 +08:00
|
|
|
|
import ChartEchart from '@/views/charts/charts/ChartEchart'
|
|
|
|
|
|
import { api } from '@/utils/api'
|
|
|
|
|
|
import { get } from '@/utils/http'
|
|
|
|
|
|
|
2022-02-14 17:40:29 +08:00
|
|
|
|
export default {
|
2022-02-14 22:22:31 +08:00
|
|
|
|
name: 'Index',
|
|
|
|
|
|
components: {
|
|
|
|
|
|
DetectionSearch,
|
|
|
|
|
|
DateTimeRange,
|
|
|
|
|
|
TimeRefresh,
|
|
|
|
|
|
DetectionFilter,
|
|
|
|
|
|
DetectionList,
|
2022-02-17 19:28:48 +08:00
|
|
|
|
Pagination,
|
|
|
|
|
|
ChartEchart
|
2022-02-14 22:22:31 +08:00
|
|
|
|
},
|
|
|
|
|
|
data () {
|
|
|
|
|
|
return {
|
|
|
|
|
|
pageObj: {
|
|
|
|
|
|
pageNo: 1,
|
|
|
|
|
|
pageSize: defaultPageSize,
|
|
|
|
|
|
total: 0
|
|
|
|
|
|
},
|
|
|
|
|
|
q: '',
|
2022-02-15 23:27:55 +08:00
|
|
|
|
filterData: [
|
|
|
|
|
|
{
|
|
|
|
|
|
title: this.$t('detections.eventSeverity'),
|
|
|
|
|
|
column: 'eventSeverity',
|
|
|
|
|
|
collapse: false,
|
|
|
|
|
|
value: [], // value之间是or的关系
|
2022-02-21 10:52:14 +08:00
|
|
|
|
data: [] // 从接口动态获取,本项在获得数据后需要特殊处理左边框颜色
|
2022-02-15 23:27:55 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
title: this.$t('detections.securityType'),
|
2022-02-18 18:09:44 +08:00
|
|
|
|
column: 'securityType',
|
2022-02-15 23:27:55 +08:00
|
|
|
|
collapse: false,
|
|
|
|
|
|
value: [],
|
2022-02-21 10:52:14 +08:00
|
|
|
|
data: [] // 从接口动态获取
|
2022-02-15 23:27:55 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
title: this.$t('detections.victimIp'),
|
2022-02-18 18:09:44 +08:00
|
|
|
|
column: 'victimIp',
|
2022-02-15 23:27:55 +08:00
|
|
|
|
collapse: false,
|
|
|
|
|
|
value: [],
|
2022-02-18 10:07:43 +08:00
|
|
|
|
showMore: true,
|
|
|
|
|
|
showIndex: 9,
|
2022-02-21 10:52:14 +08:00
|
|
|
|
data: [] // 从接口动态获取
|
2022-02-15 23:27:55 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
title: this.$t('detections.victimLocation'),
|
2022-02-21 10:52:14 +08:00
|
|
|
|
column: 'victimLocationCountry',
|
2022-02-15 23:27:55 +08:00
|
|
|
|
collapse: false,
|
|
|
|
|
|
value: [],
|
2022-02-18 10:07:43 +08:00
|
|
|
|
showMore: false,
|
|
|
|
|
|
showIndex: 9,
|
2022-02-15 23:27:55 +08:00
|
|
|
|
data: [
|
|
|
|
|
|
{
|
|
|
|
|
|
label: 'China',
|
|
|
|
|
|
value: 'china',
|
|
|
|
|
|
count: 50
|
|
|
|
|
|
}
|
|
|
|
|
|
] // 从接口动态获取
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
title: this.$t('detections.offenderIp'),
|
2022-02-18 18:09:44 +08:00
|
|
|
|
column: 'offenderIp',
|
2022-02-15 23:27:55 +08:00
|
|
|
|
collapse: false,
|
|
|
|
|
|
value: [],
|
2022-02-18 10:07:43 +08:00
|
|
|
|
showMore: false,
|
|
|
|
|
|
showIndex: 9,
|
2022-02-15 23:27:55 +08:00
|
|
|
|
data: [
|
|
|
|
|
|
{
|
|
|
|
|
|
label: '1.2.6.8',
|
|
|
|
|
|
value: '1.2.6.8',
|
|
|
|
|
|
count: 50
|
|
|
|
|
|
}
|
|
|
|
|
|
] // 从接口动态获取
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
title: this.$t('detections.offenderLocation'),
|
2022-02-21 10:52:14 +08:00
|
|
|
|
column: 'offenderLocationCountry',
|
2022-02-15 23:27:55 +08:00
|
|
|
|
collapse: false,
|
|
|
|
|
|
value: [],
|
2022-02-18 10:07:43 +08:00
|
|
|
|
showMore: false,
|
|
|
|
|
|
showIndex: 9,
|
2022-02-15 23:27:55 +08:00
|
|
|
|
data: [
|
|
|
|
|
|
{
|
|
|
|
|
|
label: 'China',
|
|
|
|
|
|
value: 'china',
|
|
|
|
|
|
count: 50
|
|
|
|
|
|
}
|
|
|
|
|
|
] // 从接口动态获取
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
2022-02-14 22:22:31 +08:00
|
|
|
|
listData: [],
|
2022-02-17 19:28:48 +08:00
|
|
|
|
listLoading: false,
|
|
|
|
|
|
eventSeverityOption: null,
|
2022-02-21 10:52:14 +08:00
|
|
|
|
eventSeverityData: [],
|
2022-02-17 19:28:48 +08:00
|
|
|
|
severityPerOption: null,
|
2022-02-21 10:52:14 +08:00
|
|
|
|
severityPerData: [],
|
2022-02-17 19:28:48 +08:00
|
|
|
|
categoryPerOption: null,
|
2022-02-21 10:52:14 +08:00
|
|
|
|
categoryPerData: [],
|
2022-02-17 19:28:48 +08:00
|
|
|
|
activeAttackOption: null,
|
2022-02-21 10:52:14 +08:00
|
|
|
|
activeAttackData: []
|
2022-02-14 22:22:31 +08:00
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
methods: {
|
2022-02-21 10:52:14 +08:00
|
|
|
|
initEventSeverityTrendData () {
|
|
|
|
|
|
const chartDom = document.getElementById('detectionEventSeverityBar')
|
|
|
|
|
|
const detectionChart = echarts.init(chartDom)
|
2022-02-17 19:28:48 +08:00
|
|
|
|
this.eventSeverityOption = this.$_.cloneDeep(multipleBarOption)
|
|
|
|
|
|
|
|
|
|
|
|
const queryParams = {
|
2022-02-18 18:09:44 +08:00
|
|
|
|
startTime: getSecond(this.timeFilter.startTime),
|
|
|
|
|
|
endTime: getSecond(this.timeFilter.endTime),
|
|
|
|
|
|
q: this.q
|
2022-02-17 19:28:48 +08:00
|
|
|
|
}
|
2022-02-21 10:52:14 +08:00
|
|
|
|
get(api.detectionSeverityTrend, queryParams).then(response => {
|
2022-02-17 19:28:48 +08:00
|
|
|
|
response = {
|
2022-02-21 10:52:14 +08:00
|
|
|
|
code: 200,
|
|
|
|
|
|
success: true,
|
|
|
|
|
|
msg: 'OK',
|
|
|
|
|
|
data: {
|
|
|
|
|
|
resultType: 'table',
|
|
|
|
|
|
result: [
|
|
|
|
|
|
{
|
|
|
|
|
|
eventSeverity: 'Critical',
|
|
|
|
|
|
count: 1048
|
|
|
|
|
|
}, {
|
|
|
|
|
|
eventSeverity: 'High',
|
|
|
|
|
|
count: 735
|
|
|
|
|
|
}, {
|
|
|
|
|
|
eventSeverity: 'Medium',
|
|
|
|
|
|
count: 580
|
|
|
|
|
|
}, {
|
|
|
|
|
|
eventSeverity: 'Low',
|
|
|
|
|
|
count: 484
|
|
|
|
|
|
}, {
|
|
|
|
|
|
eventSeverity: 'Info',
|
|
|
|
|
|
count: 300
|
2022-02-17 19:28:48 +08:00
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
if (response.code === 200) {
|
|
|
|
|
|
this.eventSeverityData = [
|
2022-02-21 10:52:14 +08:00
|
|
|
|
['time', '2021/11/12 12:00', '2021/11/13 12:00', '2021/11/14 12:00', '2021/11/15 12:00', '2021/11/16 12:00', '2021/11/17 12:00', '2021/11/18 12:00', '2021/11/19 12:00', '2021/11/20 12:00', '2021/11/21 12:00'],
|
|
|
|
|
|
['Critical', 5, 0, 2, 0, 0, 3, 3, 0, 4, 2],
|
|
|
|
|
|
['High', 5, 7, 3, 0, 0, 3, 3, 20, 2, 2],
|
|
|
|
|
|
['Medium', 10, 8, 20, 8, 0, 5, 5, 5, 5, 20],
|
|
|
|
|
|
['Low', 18, 6, 5, 0, 0, 2, 20, 2, 2, 2],
|
|
|
|
|
|
['Info', 16, 10, 4, 0, 7, 0, 8, 5, 15, 1]
|
2022-02-17 19:28:48 +08:00
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}).finally(() => {
|
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
|
this.eventSeverityOption.dataset.source = this.eventSeverityData
|
2022-02-21 10:52:14 +08:00
|
|
|
|
this.eventSeverityOption && detectionChart.setOption(this.eventSeverityOption)
|
2022-02-17 19:28:48 +08:00
|
|
|
|
})
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
2022-02-21 10:52:14 +08:00
|
|
|
|
initSeverityPerData () {
|
|
|
|
|
|
const chartDom = document.getElementById('detectionSeverityPer')
|
|
|
|
|
|
const detectionChart = echarts.init(chartDom)
|
2022-02-17 19:28:48 +08:00
|
|
|
|
this.severityPerOption = this.$_.cloneDeep(pieForSeverity)
|
|
|
|
|
|
|
|
|
|
|
|
const queryParams = {
|
2022-02-18 18:09:44 +08:00
|
|
|
|
startTime: getSecond(this.timeFilter.startTime),
|
|
|
|
|
|
endTime: getSecond(this.timeFilter.endTime),
|
|
|
|
|
|
q: this.q
|
2022-02-17 19:28:48 +08:00
|
|
|
|
}
|
2022-02-18 18:09:44 +08:00
|
|
|
|
get(api.detectionEventSeverity, queryParams).then(response => {
|
2022-02-17 19:28:48 +08:00
|
|
|
|
response = {
|
2022-02-21 10:52:14 +08:00
|
|
|
|
code: 200,
|
|
|
|
|
|
success: true,
|
|
|
|
|
|
msg: 'OK',
|
|
|
|
|
|
data: {
|
|
|
|
|
|
resultType: 'table',
|
|
|
|
|
|
result: [
|
|
|
|
|
|
{
|
|
|
|
|
|
eventSeverity: 'Critical',
|
|
|
|
|
|
count: 1048
|
|
|
|
|
|
}, {
|
|
|
|
|
|
eventSeverity: 'High',
|
|
|
|
|
|
count: 735
|
|
|
|
|
|
}, {
|
|
|
|
|
|
eventSeverity: 'Medium',
|
|
|
|
|
|
count: 580
|
|
|
|
|
|
}, {
|
|
|
|
|
|
eventSeverity: 'Low',
|
|
|
|
|
|
count: 484
|
|
|
|
|
|
}, {
|
|
|
|
|
|
eventSeverity: 'Info',
|
|
|
|
|
|
count: 300
|
2022-02-17 19:28:48 +08:00
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
if (response.code === 200) {
|
2022-02-18 18:09:44 +08:00
|
|
|
|
this.filterData[0].data = response.data.result.map(r => ({ label: r.eventSeverity, value: r.eventSeverity, count: r.count }))
|
2022-02-17 19:28:48 +08:00
|
|
|
|
this.severityPerData = response.data.result.map(d => {
|
2022-02-21 10:52:14 +08:00
|
|
|
|
return { value: d.count, name: d.eventSeverity, itemStyle: { color: getSeverityColor(d.eventSeverity) } }
|
2022-02-17 19:28:48 +08:00
|
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
}).finally(() => {
|
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
|
this.severityPerOption.series[0].data = this.severityPerData
|
2022-02-21 10:52:14 +08:00
|
|
|
|
this.severityPerOption && detectionChart.setOption(this.severityPerOption)
|
2022-02-17 19:28:48 +08:00
|
|
|
|
})
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
2022-02-21 10:52:14 +08:00
|
|
|
|
initCategoryPerData () {
|
|
|
|
|
|
const chartDom = document.getElementById('detectionCategoryPer')
|
|
|
|
|
|
const detectionChart = echarts.init(chartDom)
|
2022-02-17 19:28:48 +08:00
|
|
|
|
this.categoryPerOption = this.$_.cloneDeep(pieForSeverity)
|
|
|
|
|
|
|
|
|
|
|
|
const queryParams = {
|
2022-02-18 18:09:44 +08:00
|
|
|
|
startTime: getSecond(this.timeFilter.startTime),
|
|
|
|
|
|
endTime: getSecond(this.timeFilter.endTime),
|
|
|
|
|
|
q: this.q
|
2022-02-17 19:28:48 +08:00
|
|
|
|
}
|
|
|
|
|
|
get(api.detectionAttackType, queryParams).then(response => {
|
|
|
|
|
|
response = {
|
2022-02-21 10:52:14 +08:00
|
|
|
|
code: 200,
|
|
|
|
|
|
success: true,
|
|
|
|
|
|
msg: 'OK',
|
|
|
|
|
|
data: {
|
|
|
|
|
|
resultType: 'table',
|
|
|
|
|
|
result: [
|
|
|
|
|
|
{
|
|
|
|
|
|
attackType: 'Command and control',
|
|
|
|
|
|
count: 1048
|
|
|
|
|
|
}, {
|
|
|
|
|
|
attackType: 'Payload_delivery',
|
|
|
|
|
|
count: 735
|
|
|
|
|
|
}, {
|
|
|
|
|
|
attackType: 'Cryptomining',
|
|
|
|
|
|
count: 580
|
|
|
|
|
|
}, {
|
|
|
|
|
|
attackType: 'phishing',
|
|
|
|
|
|
count: 484
|
|
|
|
|
|
}, {
|
|
|
|
|
|
attackType: 'dga',
|
|
|
|
|
|
count: 300
|
|
|
|
|
|
}, {
|
|
|
|
|
|
attackType: 'ddos',
|
|
|
|
|
|
count: 50
|
|
|
|
|
|
}
|
2022-02-17 19:28:48 +08:00
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
if (response.code === 200) {
|
2022-02-21 10:52:14 +08:00
|
|
|
|
this.filterData[1].data = response.data.result.map(r => ({ label: r.attackType, value: r.attackType, count: r.count }))
|
2022-02-17 19:28:48 +08:00
|
|
|
|
this.categoryPerData = response.data.result.map(d => {
|
2022-02-21 10:52:14 +08:00
|
|
|
|
return { value: d.count, name: d.attackType, itemStyle: { color: getAttackColor(d.attackType) } }
|
2022-02-17 19:28:48 +08:00
|
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
}).finally(() => {
|
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
|
this.categoryPerOption.series[0].data = this.categoryPerData
|
2022-02-21 10:52:14 +08:00
|
|
|
|
this.categoryPerOption && detectionChart.setOption(this.categoryPerOption)
|
2022-02-17 19:28:48 +08:00
|
|
|
|
})
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
2022-02-21 10:52:14 +08:00
|
|
|
|
initActiveAttackData () {
|
|
|
|
|
|
const chartDom = document.getElementById('detectionActiveAttacker')
|
|
|
|
|
|
const detectionChart = echarts.init(chartDom)
|
2022-02-17 19:28:48 +08:00
|
|
|
|
this.activeAttackOption = this.$_.cloneDeep(activeAttackBar)
|
|
|
|
|
|
|
|
|
|
|
|
const queryParams = {
|
2022-02-18 18:09:44 +08:00
|
|
|
|
startTime: getSecond(this.timeFilter.startTime),
|
|
|
|
|
|
endTime: getSecond(this.timeFilter.endTime),
|
|
|
|
|
|
q: this.q
|
2022-02-17 19:28:48 +08:00
|
|
|
|
}
|
|
|
|
|
|
get(api.detectionOffenderIp, queryParams).then(response => {
|
|
|
|
|
|
response = {
|
2022-02-21 10:52:14 +08:00
|
|
|
|
code: 200,
|
|
|
|
|
|
success: true,
|
|
|
|
|
|
msg: 'OK',
|
|
|
|
|
|
data: {
|
|
|
|
|
|
resultType: 'table',
|
|
|
|
|
|
result: [
|
|
|
|
|
|
{
|
|
|
|
|
|
offenderIp: '192.168.12.21',
|
|
|
|
|
|
count: 99999
|
|
|
|
|
|
}, {
|
|
|
|
|
|
offenderIp: '192.168.22.21',
|
|
|
|
|
|
count: 88888
|
|
|
|
|
|
}, {
|
|
|
|
|
|
offenderIp: '192.168.32.21',
|
|
|
|
|
|
count: 77777
|
|
|
|
|
|
}, {
|
|
|
|
|
|
offenderIp: '192.168.42.21',
|
|
|
|
|
|
count: 66666
|
|
|
|
|
|
}, {
|
|
|
|
|
|
offenderIp: '192.168.52.21',
|
|
|
|
|
|
count: 55555
|
2022-02-17 19:28:48 +08:00
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
if (response.code === 200) {
|
2022-02-18 18:09:44 +08:00
|
|
|
|
this.filterData[4].data = response.data.result.map(r => ({ label: r.offenderIp, value: r.offenderIp, count: r.count }))
|
2022-02-21 10:52:14 +08:00
|
|
|
|
const { showMore, showIndex } = this.computeFilterPage(this.filterData[4].data)
|
|
|
|
|
|
this.filterData[4].showMore = showMore
|
|
|
|
|
|
this.filterData[4].showIndex = showIndex
|
2022-02-17 19:28:48 +08:00
|
|
|
|
this.activeAttackData = response.data.result.map(d => {
|
2022-02-21 10:52:14 +08:00
|
|
|
|
return [d.count, d.offenderIp]
|
2022-02-17 19:28:48 +08:00
|
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
}).finally(() => {
|
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
|
this.activeAttackOption.series[0].data = this.activeAttackData.reverse()
|
2022-02-21 10:52:14 +08:00
|
|
|
|
this.activeAttackOption && detectionChart.setOption(this.activeAttackOption)
|
2022-02-17 19:28:48 +08:00
|
|
|
|
})
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
2022-02-18 18:09:44 +08:00
|
|
|
|
initVictimIp () {
|
|
|
|
|
|
const queryParams = {
|
|
|
|
|
|
startTime: getSecond(this.timeFilter.startTime),
|
|
|
|
|
|
endTime: getSecond(this.timeFilter.endTime),
|
|
|
|
|
|
q: this.q
|
|
|
|
|
|
}
|
|
|
|
|
|
get(api.detectionVictimIp, queryParams).then(response => {
|
2022-02-21 10:52:14 +08:00
|
|
|
|
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
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2022-02-18 18:09:44 +08:00
|
|
|
|
if (response.data && response.data.result) {
|
|
|
|
|
|
this.filterData[2].data = response.data.result.map(r => ({ label: r.victimIp, value: r.victimIp, count: r.count }))
|
2022-02-21 10:52:14 +08:00
|
|
|
|
const { showMore, showIndex } = this.computeFilterPage(this.filterData[2].data)
|
|
|
|
|
|
this.filterData[2].showMore = showMore
|
|
|
|
|
|
this.filterData[2].showIndex = showIndex
|
2022-02-18 18:09:44 +08:00
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
initVictimLocation () {
|
|
|
|
|
|
const queryParams = {
|
|
|
|
|
|
startTime: getSecond(this.timeFilter.startTime),
|
|
|
|
|
|
endTime: getSecond(this.timeFilter.endTime),
|
|
|
|
|
|
q: this.q
|
|
|
|
|
|
}
|
|
|
|
|
|
get(api.detectionVictimLocation, queryParams).then(response => {
|
2022-02-21 10:52:14 +08:00
|
|
|
|
response = {
|
|
|
|
|
|
code: 200,
|
|
|
|
|
|
success: true,
|
|
|
|
|
|
msg: 'OK',
|
|
|
|
|
|
data: {
|
|
|
|
|
|
resultType: 'table',
|
|
|
|
|
|
result: [
|
|
|
|
|
|
{
|
|
|
|
|
|
victimLocationCountry: 'china',
|
|
|
|
|
|
count: 50
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2022-02-18 18:09:44 +08:00
|
|
|
|
if (response.data && response.data.result) {
|
|
|
|
|
|
this.filterData[3].data = response.data.result.map(r => ({ label: r.victimLocationCountry, value: r.victimLocationCountry, count: r.count }))
|
2022-02-21 10:52:14 +08:00
|
|
|
|
const { showMore, showIndex } = this.computeFilterPage(this.filterData[3].data)
|
|
|
|
|
|
this.filterData[3].showMore = showMore
|
|
|
|
|
|
this.filterData[3].showIndex = showIndex
|
2022-02-18 18:09:44 +08:00
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
initOffenderLocation () {
|
|
|
|
|
|
const queryParams = {
|
|
|
|
|
|
startTime: getSecond(this.timeFilter.startTime),
|
|
|
|
|
|
endTime: getSecond(this.timeFilter.endTime),
|
|
|
|
|
|
q: this.q
|
|
|
|
|
|
}
|
|
|
|
|
|
get(api.detectionOffenderLocation, queryParams).then(response => {
|
2022-02-21 10:52:14 +08:00
|
|
|
|
response = {
|
|
|
|
|
|
code: 200,
|
|
|
|
|
|
success: true,
|
|
|
|
|
|
msg: 'OK',
|
|
|
|
|
|
data: {
|
|
|
|
|
|
resultType: 'table',
|
|
|
|
|
|
result: [
|
|
|
|
|
|
{
|
|
|
|
|
|
offenderLocationCountry: 'china',
|
|
|
|
|
|
count: 50
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2022-02-18 18:09:44 +08:00
|
|
|
|
if (response.data && response.data.result) {
|
2022-02-21 10:52:14 +08:00
|
|
|
|
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
|
2022-02-18 18:09:44 +08:00
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
2022-02-21 10:52:14 +08:00
|
|
|
|
computeFilterPage (data) {
|
|
|
|
|
|
return {
|
|
|
|
|
|
showMore: data.length > 10,
|
|
|
|
|
|
showIndex: 9
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
queryList () {
|
2022-02-18 17:54:22 +08:00
|
|
|
|
const queryParams = {
|
|
|
|
|
|
...this.timeFilter,
|
2022-02-21 10:52:14 +08:00
|
|
|
|
q: this.q
|
2022-02-18 17:54:22 +08:00
|
|
|
|
}
|
|
|
|
|
|
get(api.detectionListBasic, queryParams).then(response => {
|
|
|
|
|
|
response = {
|
2022-02-21 10:52:14 +08:00
|
|
|
|
code: 200,
|
|
|
|
|
|
success: true,
|
|
|
|
|
|
msg: 'OK',
|
|
|
|
|
|
data: {
|
|
|
|
|
|
resultType: 'table',
|
|
|
|
|
|
result: [
|
|
|
|
|
|
{
|
|
|
|
|
|
eventId: 1212,
|
|
|
|
|
|
securityType: 'ddos',
|
|
|
|
|
|
offenderIp: '1.1.1.1',
|
|
|
|
|
|
victimIp: '2.2.2.2',
|
|
|
|
|
|
eventSecurity: 'critical',
|
|
|
|
|
|
malwareName: 'the great wall',
|
|
|
|
|
|
cryptominingPool: 'a',
|
|
|
|
|
|
startTime: 978456923589
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
eventId: 1212,
|
|
|
|
|
|
securityType: 'ddos',
|
|
|
|
|
|
offenderIp: '1.1.1.1',
|
|
|
|
|
|
victimIp: '2.2.2.2',
|
|
|
|
|
|
eventSecurity: 'high',
|
|
|
|
|
|
cryptominingPool: 'a',
|
|
|
|
|
|
startTime: 1111111111
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
eventId: 1212,
|
|
|
|
|
|
securityType: 'ddos',
|
|
|
|
|
|
offenderIp: '1.1.1.1',
|
|
|
|
|
|
victimIp: '2.2.2.2',
|
|
|
|
|
|
eventSecurity: 'low',
|
|
|
|
|
|
malwareName: 'the great wall',
|
|
|
|
|
|
startTime: 1111111111
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
eventId: 1212,
|
|
|
|
|
|
securityType: 'ddos',
|
|
|
|
|
|
offenderIp: '1.1.1.1',
|
|
|
|
|
|
victimIp: '2.2.2.2',
|
|
|
|
|
|
eventSecurity: 'medium',
|
|
|
|
|
|
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
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
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
|
2022-02-18 17:54:22 +08:00
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (response.code === 200) {
|
|
|
|
|
|
this.listData = response.data.result
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
2022-02-14 22:22:31 +08:00
|
|
|
|
timeRefreshChange () {
|
|
|
|
|
|
if (!this.$refs.dateTimeRange.isCustom) {
|
|
|
|
|
|
const value = this.timeFilter.dateRangeValue
|
|
|
|
|
|
this.$refs.dateTimeRange.quickChange(value)
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
reload (s, e, v) {
|
|
|
|
|
|
this.dateTimeRangeChange(s, e, v)
|
|
|
|
|
|
},
|
|
|
|
|
|
// methods
|
|
|
|
|
|
dateTimeRangeChange (s, e, v) {
|
|
|
|
|
|
this.timeFilter = { startTime: s, endTime: e, dateRangeValue: v }
|
|
|
|
|
|
},
|
2022-02-18 18:09:44 +08:00
|
|
|
|
search (metaList, formatSql) {
|
|
|
|
|
|
if (formatSql) {
|
|
|
|
|
|
this.q = formatSql
|
|
|
|
|
|
this.metaList = metaList
|
|
|
|
|
|
} else {
|
|
|
|
|
|
this.q = ''
|
|
|
|
|
|
this.metaList = []
|
|
|
|
|
|
}
|
|
|
|
|
|
this.queryFilter()
|
|
|
|
|
|
this.queryList()
|
|
|
|
|
|
this.queryListTotal()
|
|
|
|
|
|
},
|
|
|
|
|
|
queryFilter () {
|
2022-02-21 10:52:14 +08:00
|
|
|
|
this.initEventSeverityTrendData()
|
2022-02-18 18:09:44 +08:00
|
|
|
|
this.initSeverityPerData()
|
|
|
|
|
|
this.initCategoryPerData()
|
|
|
|
|
|
this.initActiveAttackData()
|
|
|
|
|
|
this.initOffenderLocation()
|
|
|
|
|
|
this.initVictimIp()
|
|
|
|
|
|
this.initVictimLocation()
|
|
|
|
|
|
},
|
|
|
|
|
|
queryListTotal () {
|
2022-02-14 17:40:29 +08:00
|
|
|
|
|
2022-02-14 22:22:31 +08:00
|
|
|
|
},
|
2022-02-18 10:07:43 +08:00
|
|
|
|
filter (filterColumn) {
|
|
|
|
|
|
const params = {}
|
|
|
|
|
|
params[filterColumn] = this.filterData.find(f => {
|
|
|
|
|
|
return f.column === filterColumn
|
|
|
|
|
|
}).value
|
|
|
|
|
|
this.$refs.search.changeParams(params)
|
2022-02-14 22:22:31 +08:00
|
|
|
|
},
|
|
|
|
|
|
pageSize (val) {
|
|
|
|
|
|
this.pageObj.pageSize = val
|
|
|
|
|
|
this.search(this.metaList, this.q)
|
|
|
|
|
|
},
|
|
|
|
|
|
pageNo (val) {
|
|
|
|
|
|
this.pageObj.pageNo = val
|
|
|
|
|
|
this.search(this.metaList, this.q)
|
|
|
|
|
|
},
|
|
|
|
|
|
// 点击上一页箭头
|
|
|
|
|
|
prev () {
|
|
|
|
|
|
this.scrollbarToTop()
|
|
|
|
|
|
},
|
|
|
|
|
|
// 点击下一页箭头
|
|
|
|
|
|
next () {
|
|
|
|
|
|
this.scrollbarToTop()
|
|
|
|
|
|
},
|
|
|
|
|
|
// currentPage 改变时会触发
|
|
|
|
|
|
current (val) {
|
|
|
|
|
|
this.$emit('pageNo', val)
|
|
|
|
|
|
this.scrollbarToTop()
|
|
|
|
|
|
},
|
|
|
|
|
|
scrollbarToTop () {
|
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
|
const wraps = document.querySelector('#detectionList')
|
|
|
|
|
|
wraps.scrollTop = 0
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2022-02-17 19:28:48 +08:00
|
|
|
|
mounted () {
|
2022-02-21 10:52:14 +08:00
|
|
|
|
this.queryFilter()
|
|
|
|
|
|
this.queryList()
|
2022-02-17 19:28:48 +08:00
|
|
|
|
},
|
2022-02-14 22:22:31 +08:00
|
|
|
|
watch: {
|
|
|
|
|
|
timeFilter (n) {
|
|
|
|
|
|
this.search(this.metaList, this.q)
|
2022-02-18 10:07:43 +08:00
|
|
|
|
},
|
|
|
|
|
|
'filterData.0.value': {
|
|
|
|
|
|
deep: true,
|
|
|
|
|
|
handler (n, o) {
|
|
|
|
|
|
this.$refs.search.changeParams({ column: this.filterData[0].column, oldValue: o, newValue: n })
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
'filterData.1.value': {
|
|
|
|
|
|
deep: true,
|
|
|
|
|
|
handler (n, o) {
|
|
|
|
|
|
this.$refs.search.changeParams({ column: this.filterData[1].column, oldValue: o, newValue: n })
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
'filterData.2.value': {
|
|
|
|
|
|
deep: true,
|
|
|
|
|
|
handler (n, o) {
|
|
|
|
|
|
this.$refs.search.changeParams({ column: this.filterData[2].column, oldValue: o, newValue: n })
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
'filterData.3.value': {
|
|
|
|
|
|
deep: true,
|
|
|
|
|
|
handler (n, o) {
|
|
|
|
|
|
this.$refs.search.changeParams({ column: this.filterData[3].column, oldValue: o, newValue: n })
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
'filterData.4.value': {
|
|
|
|
|
|
deep: true,
|
|
|
|
|
|
handler (n, o) {
|
|
|
|
|
|
this.$refs.search.changeParams({ column: this.filterData[4].column, oldValue: o, newValue: n })
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
'filterData.5.value': {
|
|
|
|
|
|
deep: true,
|
|
|
|
|
|
handler (n, o) {
|
|
|
|
|
|
this.$refs.search.changeParams({ column: this.filterData[5].column, oldValue: o, newValue: n })
|
|
|
|
|
|
}
|
2022-02-14 22:22:31 +08:00
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
setup () {
|
|
|
|
|
|
const dateRangeValue = 60
|
|
|
|
|
|
const { startTime, endTime } = getNowTime(dateRangeValue)
|
|
|
|
|
|
const timeFilter = ref({ startTime, endTime, dateRangeValue })
|
|
|
|
|
|
return {
|
2022-02-17 19:28:48 +08:00
|
|
|
|
timeFilter,
|
|
|
|
|
|
severityPerChart: {
|
|
|
|
|
|
params: {
|
|
|
|
|
|
url: '/interface/entity/detail/ip/trafficMap?startTime={{startTime}}&endTime={{endTime}}&country={{country}}&ip={{ip}}',
|
|
|
|
|
|
unitType: 'number'
|
|
|
|
|
|
},
|
|
|
|
|
|
id: 'detectionSeverityPer',
|
|
|
|
|
|
type: 32
|
|
|
|
|
|
},
|
|
|
|
|
|
categoryPerChart: {
|
|
|
|
|
|
params: {
|
|
|
|
|
|
url: '/interface/entity/detail/ip/trafficMap?startTime={{startTime}}&endTime={{endTime}}&country={{country}}&ip={{ip}}',
|
|
|
|
|
|
unitType: 'number'
|
|
|
|
|
|
},
|
|
|
|
|
|
id: 'detectionCategoryPer',
|
|
|
|
|
|
type: 32
|
|
|
|
|
|
}
|
2022-02-14 22:22:31 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
</script>
|