CN-1063: 人工测试--实体详情流量折线图和底下3个tab
This commit is contained in:
@@ -76,7 +76,7 @@ if (openMock) {
|
|||||||
victimIp: '116.178.217.92',
|
victimIp: '116.178.217.92',
|
||||||
offenderDomain: 'baidu.com',
|
offenderDomain: 'baidu.com',
|
||||||
victimDomain: 'mi.com',
|
victimDomain: 'mi.com',
|
||||||
eventSeverity: 'Critical',
|
eventSeverity: 'critical',
|
||||||
malwareName: 'NetWire RC',
|
malwareName: 'NetWire RC',
|
||||||
cryptominingPool: null,
|
cryptominingPool: null,
|
||||||
startTime: 1683186600,
|
startTime: 1683186600,
|
||||||
@@ -91,7 +91,7 @@ if (openMock) {
|
|||||||
victimIp: '116.178.217.93',
|
victimIp: '116.178.217.93',
|
||||||
offenderDomain: 'baidu.com',
|
offenderDomain: 'baidu.com',
|
||||||
victimDomain: 'mi.com',
|
victimDomain: 'mi.com',
|
||||||
eventSeverity: 'Low',
|
eventSeverity: 'low',
|
||||||
malwareName: 'NetWire RC',
|
malwareName: 'NetWire RC',
|
||||||
cryptominingPool: null,
|
cryptominingPool: null,
|
||||||
startTime: 1683186600,
|
startTime: 1683186600,
|
||||||
@@ -106,7 +106,7 @@ if (openMock) {
|
|||||||
victimIp: '116.178.217.93',
|
victimIp: '116.178.217.93',
|
||||||
offenderDomain: 'baidu.com',
|
offenderDomain: 'baidu.com',
|
||||||
victimDomain: 'mi.com',
|
victimDomain: 'mi.com',
|
||||||
eventSeverity: 'Low',
|
eventSeverity: 'low',
|
||||||
malwareName: 'NetWire RC',
|
malwareName: 'NetWire RC',
|
||||||
cryptominingPool: null,
|
cryptominingPool: null,
|
||||||
startTime: 1683186600,
|
startTime: 1683186600,
|
||||||
@@ -121,7 +121,7 @@ if (openMock) {
|
|||||||
victimIp: '116.178.217.93',
|
victimIp: '116.178.217.93',
|
||||||
offenderDomain: 'baidu.com',
|
offenderDomain: 'baidu.com',
|
||||||
victimDomain: 'mi.com',
|
victimDomain: 'mi.com',
|
||||||
eventSeverity: 'Low',
|
eventSeverity: 'low',
|
||||||
malwareName: 'NetWire RC',
|
malwareName: 'NetWire RC',
|
||||||
cryptominingPool: null,
|
cryptominingPool: null,
|
||||||
startTime: 1683186600,
|
startTime: 1683186600,
|
||||||
@@ -136,7 +136,7 @@ if (openMock) {
|
|||||||
victimIp: '116.178.217.93',
|
victimIp: '116.178.217.93',
|
||||||
offenderDomain: 'baidu.com',
|
offenderDomain: 'baidu.com',
|
||||||
victimDomain: 'mi.com',
|
victimDomain: 'mi.com',
|
||||||
eventSeverity: 'Low',
|
eventSeverity: 'low',
|
||||||
malwareName: 'NetWire RC',
|
malwareName: 'NetWire RC',
|
||||||
cryptominingPool: null,
|
cryptominingPool: null,
|
||||||
startTime: 1683186600,
|
startTime: 1683186600,
|
||||||
@@ -151,7 +151,7 @@ if (openMock) {
|
|||||||
victimIp: '116.178.217.93',
|
victimIp: '116.178.217.93',
|
||||||
offenderDomain: 'baidu.com',
|
offenderDomain: 'baidu.com',
|
||||||
victimDomain: 'mi.com',
|
victimDomain: 'mi.com',
|
||||||
eventSeverity: 'Low',
|
eventSeverity: 'low',
|
||||||
malwareName: 'NetWire RC',
|
malwareName: 'NetWire RC',
|
||||||
cryptominingPool: null,
|
cryptominingPool: null,
|
||||||
startTime: 1683186600,
|
startTime: 1683186600,
|
||||||
@@ -166,7 +166,7 @@ if (openMock) {
|
|||||||
victimIp: '116.178.217.93',
|
victimIp: '116.178.217.93',
|
||||||
offenderDomain: 'baidu.com',
|
offenderDomain: 'baidu.com',
|
||||||
victimDomain: 'mi.com',
|
victimDomain: 'mi.com',
|
||||||
eventSeverity: 'Low',
|
eventSeverity: 'low',
|
||||||
malwareName: 'NetWire RC',
|
malwareName: 'NetWire RC',
|
||||||
cryptominingPool: null,
|
cryptominingPool: null,
|
||||||
startTime: 1683186600,
|
startTime: 1683186600,
|
||||||
@@ -191,7 +191,7 @@ if (openMock) {
|
|||||||
serverIp: '116.178.78.180',
|
serverIp: '116.178.78.180',
|
||||||
domain: null,
|
domain: null,
|
||||||
appName: null,
|
appName: null,
|
||||||
eventSeverity: 'Critical',
|
eventSeverity: 'critical',
|
||||||
eventType: 'Http error',
|
eventType: 'Http error',
|
||||||
startTime: 1683250500,
|
startTime: 1683250500,
|
||||||
durationMs: 900000,
|
durationMs: 900000,
|
||||||
@@ -203,7 +203,7 @@ if (openMock) {
|
|||||||
serverIp: '116.178.78.180',
|
serverIp: '116.178.78.180',
|
||||||
domain: null,
|
domain: null,
|
||||||
appName: null,
|
appName: null,
|
||||||
eventSeverity: 'Info',
|
eventSeverity: 'info',
|
||||||
eventType: 'Http error',
|
eventType: 'Http error',
|
||||||
startTime: 1683250500,
|
startTime: 1683250500,
|
||||||
durationMs: 900000,
|
durationMs: 900000,
|
||||||
@@ -289,7 +289,7 @@ if (openMock) {
|
|||||||
data: result
|
data: result
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
Mock.mock(new RegExp(`${BASE_CONFIG.baseUrl}${BASE_CONFIG.apiVersion}/entity/kb/intelligence/list.*`), 'get', function (requestObj) {
|
Mock.mock(new RegExp(`${BASE_CONFIG.baseUrl}${BASE_CONFIG.apiVersion}/entity/detail/kb/intelligence/list.*`), 'get', function (requestObj) {
|
||||||
const result = [
|
const result = [
|
||||||
{
|
{
|
||||||
location: {
|
location: {
|
||||||
|
|||||||
@@ -241,7 +241,7 @@ export const api = {
|
|||||||
openPort: '',
|
openPort: '',
|
||||||
basicInfo: BASE_CONFIG.apiVersion + '/entity/detail/basic',
|
basicInfo: BASE_CONFIG.apiVersion + '/entity/detail/basic',
|
||||||
tags: BASE_CONFIG.apiVersion + '/entity/detail/kb/intelligence/tag',
|
tags: BASE_CONFIG.apiVersion + '/entity/detail/kb/intelligence/tag',
|
||||||
informationAggregation: BASE_CONFIG.apiVersion + '/entity/kb/intelligence/list'
|
informationAggregation: BASE_CONFIG.apiVersion + '/entity/detail/kb/intelligence/list'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1271,3 +1271,15 @@ export function copySelectionText () {
|
|||||||
}
|
}
|
||||||
return copySuccess
|
return copySuccess
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 字符串首字母转大写
|
||||||
|
* @param str
|
||||||
|
* @returns {*}
|
||||||
|
*/
|
||||||
|
export function toUpperCaseByString (str) {
|
||||||
|
if (str) {
|
||||||
|
str = str.slice(0, 1).toUpperCase() + str.slice(1).toLowerCase()
|
||||||
|
}
|
||||||
|
return str
|
||||||
|
}
|
||||||
|
|||||||
@@ -76,10 +76,10 @@
|
|||||||
>
|
>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<div v-if="scope.row.status === 1" class="information-aggregation__valid">
|
<div v-if="scope.row.status === 1" class="information-aggregation__valid">
|
||||||
valid
|
{{ $t("entity.detail.valid") }}
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="scope.row.status === 0" class="information-aggregation__invalid">
|
<div v-else-if="scope.row.status === 0" class="information-aggregation__invalid">
|
||||||
invalid
|
{{ $t("entity.detail.invalid") }}
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -94,6 +94,7 @@ import axios from 'axios'
|
|||||||
import { api } from '@/utils/api'
|
import { api } from '@/utils/api'
|
||||||
import { entityDetailTags } from '@/utils/constants'
|
import { entityDetailTags } from '@/utils/constants'
|
||||||
import { dateFormatByAppearance } from '@/utils/date-util'
|
import { dateFormatByAppearance } from '@/utils/date-util'
|
||||||
|
import chartNoData from '@/views/charts/charts/ChartNoData'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'InformationAggregation',
|
name: 'InformationAggregation',
|
||||||
@@ -103,6 +104,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mixins: [chartMixin],
|
mixins: [chartMixin],
|
||||||
|
components: { chartNoData },
|
||||||
methods: {
|
methods: {
|
||||||
dateFormatByAppearance,
|
dateFormatByAppearance,
|
||||||
intelligenceContentClass ({ row, column, rowIndex, columnIndex }) {
|
intelligenceContentClass ({ row, column, rowIndex, columnIndex }) {
|
||||||
@@ -116,6 +118,8 @@ export default {
|
|||||||
axios.get(`${api.entity.informationAggregation}/${this.entity.entityType}?resource=${this.entity.entityName}&pageSize=100&pageNo=1`).then(response => {
|
axios.get(`${api.entity.informationAggregation}/${this.entity.entityType}?resource=${this.entity.entityName}&pageSize=100&pageNo=1`).then(response => {
|
||||||
const res = response.data
|
const res = response.data
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
|
this.isNoData = res.data.result.length === 0
|
||||||
|
this.showError = false
|
||||||
res.data.result.forEach(r => {
|
res.data.result.forEach(r => {
|
||||||
Object.keys(r).forEach(k => {
|
Object.keys(r).forEach(k => {
|
||||||
const aggregation = {
|
const aggregation = {
|
||||||
@@ -141,11 +145,13 @@ export default {
|
|||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
this.showError = true
|
this.showError = true
|
||||||
|
this.isNoData = false
|
||||||
this.errorMsg = this.errorMsgHandler(res)
|
this.errorMsg = this.errorMsgHandler(res)
|
||||||
}
|
}
|
||||||
}).catch(e => {
|
}).catch(e => {
|
||||||
console.error(e)
|
console.error(e)
|
||||||
this.showError = true
|
this.showError = true
|
||||||
|
this.isNoData = false
|
||||||
this.errorMsg = this.errorMsgHandler(e)
|
this.errorMsg = this.errorMsgHandler(e)
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
this.toggleLoading(false)
|
this.toggleLoading(false)
|
||||||
|
|||||||
@@ -9,15 +9,15 @@
|
|||||||
:key="item.eventId">
|
:key="item.eventId">
|
||||||
<div class="cn-detection--list">
|
<div class="cn-detection--list">
|
||||||
<div class="cn-detection__case entity-detail-performance">
|
<div class="cn-detection__case entity-detail-performance">
|
||||||
<div class="cn-detection__icon" :style="`background-color: ${eventSeverityColor1[item.eventSecurity]}`"></div>
|
<div class="cn-detection__icon" :style="`background-color: ${eventSeverityColor[item.eventSecurity]}`"></div>
|
||||||
<div class="cn-detection__row">
|
<div class="cn-detection__row">
|
||||||
<div class="cn-detection__header">
|
<div class="cn-detection__header">
|
||||||
<span
|
<span
|
||||||
class="detection-event-severity-color-block"
|
class="detection-event-severity-color-block"
|
||||||
:style="`background-color: ${eventSeverityColor1[item.eventSeverity]}`">
|
:style="`background-color: ${eventSeverityColor[item.eventSeverity]}`">
|
||||||
</span>
|
</span>
|
||||||
<span class="detection-event-severity-block" style="margin-right: 30px">
|
<span class="detection-event-severity-block" style="margin-right: 30px">
|
||||||
{{ item.eventType || '-' }}
|
{{ toUpperCaseByString(item.eventType) || '-' }}
|
||||||
</span>
|
</span>
|
||||||
<div class="cn-detection__body">
|
<div class="cn-detection__body">
|
||||||
<div class="body__basic-info">
|
<div class="body__basic-info">
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
<div class="basic-info__item" v-if="item.eventSeverity">
|
<div class="basic-info__item" v-if="item.eventSeverity">
|
||||||
<i class="cn-icon cn-icon-severity-level"></i>
|
<i class="cn-icon cn-icon-severity-level"></i>
|
||||||
<span>{{ $t('network.severity') }} : </span>
|
<span>{{ $t('network.severity') }} : </span>
|
||||||
<span>{{ item.eventSeverity || '-' }}</span>
|
<span>{{ toUpperCaseByString(item.eventSeverity) || '-' }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="basic-info__item">
|
<div class="basic-info__item">
|
||||||
<i class="cn-icon cn-icon-time2"></i>
|
<i class="cn-icon cn-icon-time2"></i>
|
||||||
@@ -49,24 +49,26 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getSecond } from '@/utils/date-util'
|
import { getSecond, dateFormatByAppearance } from '@/utils/date-util'
|
||||||
import { eventSeverityColor1 } from '@/utils/constants'
|
import { eventSeverityColor } from '@/utils/constants'
|
||||||
import unitConvert from '@/utils/unit-convert'
|
import unitConvert from '@/utils/unit-convert'
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
import { api } from '@/utils/api'
|
import { api } from '@/utils/api'
|
||||||
import { useRoute } from 'vue-router'
|
import { useRoute } from 'vue-router'
|
||||||
import chartMixin from '@/views/charts2/chart-mixin'
|
import chartMixin from '@/views/charts2/chart-mixin'
|
||||||
import ChartError from '@/components/common/Error'
|
import ChartError from '@/components/common/Error'
|
||||||
|
import { toUpperCaseByString } from '@/utils/tools'
|
||||||
|
import ChartNoData from '@/views/charts/charts/ChartNoData'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'PerformanceEvent',
|
name: 'PerformanceEvent',
|
||||||
components: { ChartError },
|
components: { ChartError, ChartNoData },
|
||||||
mixins: [chartMixin],
|
mixins: [chartMixin],
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
eventList: [],
|
eventList: [],
|
||||||
showError: false,
|
showError: false,
|
||||||
eventSeverityColor1,
|
eventSeverityColor,
|
||||||
errorMsg: ''
|
errorMsg: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -85,6 +87,8 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
unitConvert,
|
unitConvert,
|
||||||
|
toUpperCaseByString,
|
||||||
|
dateFormatByAppearance,
|
||||||
initData () {
|
initData () {
|
||||||
const params = {
|
const params = {
|
||||||
resource: this.entityName,
|
resource: this.entityName,
|
||||||
|
|||||||
@@ -9,14 +9,14 @@
|
|||||||
:key="item.eventId">
|
:key="item.eventId">
|
||||||
<div class="cn-detection--list">
|
<div class="cn-detection--list">
|
||||||
<div class="cn-detection__case entity-detail-security">
|
<div class="cn-detection__case entity-detail-security">
|
||||||
<div class="cn-detection__icon" :style="`background-color: ${eventSeverityColor1[item.eventSecurity]}`"></div>
|
<div class="cn-detection__icon" :style="`background-color: ${eventSeverityColor[item.eventSecurity]}`"></div>
|
||||||
<div class="cn-detection__row">
|
<div class="cn-detection__row">
|
||||||
<div class="cn-detection__header">
|
<div class="cn-detection__header">
|
||||||
<span
|
<span
|
||||||
class="detection-event-severity-color-block"
|
class="detection-event-severity-color-block"
|
||||||
:style="`background-color: ${eventSeverityColor1[item.eventSeverity]}`">
|
:style="`background-color: ${eventSeverityColor[item.eventSeverity]}`">
|
||||||
</span>
|
</span>
|
||||||
<span class="detection-event-severity-block">{{ item.securityType || '-' }}</span>
|
<span class="detection-event-severity-block">{{ toUpperCaseByString(item.securityType) || '-' }}</span>
|
||||||
<i class="cn-icon cn-icon-attacker"></i>{{ item.offenderIp || '-' }}
|
<i class="cn-icon cn-icon-attacker"></i>{{ item.offenderIp || '-' }}
|
||||||
<div class="domain">{{ item.offenderDomain }}</div>
|
<div class="domain">{{ item.offenderDomain }}</div>
|
||||||
<span class="line">-------</span>
|
<span class="line">-------</span>
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
<div class="basic-info__item" v-if="item.eventSeverity">
|
<div class="basic-info__item" v-if="item.eventSeverity">
|
||||||
<i class="cn-icon cn-icon-severity-level"></i>
|
<i class="cn-icon cn-icon-severity-level"></i>
|
||||||
<span>{{ $t('network.severity') }} : </span>
|
<span>{{ $t('network.severity') }} : </span>
|
||||||
<span>{{ item.eventSeverity || '-' }}</span>
|
<span>{{ toUpperCaseByString(item.eventSeverity) || '-' }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="basic-info__item" v-if="item.eventType">
|
<div class="basic-info__item" v-if="item.eventType">
|
||||||
<i class="cn-icon cn-icon-event-type"></i>
|
<i class="cn-icon cn-icon-event-type"></i>
|
||||||
@@ -74,12 +74,14 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getSecond } from '@/utils/date-util'
|
import { getSecond } from '@/utils/date-util'
|
||||||
import { eventSeverityColor1 } from '@/utils/constants'
|
import { eventSeverityColor } from '@/utils/constants'
|
||||||
import unitConvert from '@/utils/unit-convert'
|
import unitConvert from '@/utils/unit-convert'
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
import { api } from '@/utils/api'
|
import { api } from '@/utils/api'
|
||||||
import { useRoute } from 'vue-router'
|
import { useRoute } from 'vue-router'
|
||||||
import chartMixin from '@/views/charts2/chart-mixin'
|
import chartMixin from '@/views/charts2/chart-mixin'
|
||||||
|
import { toUpperCaseByString } from '@/utils/tools'
|
||||||
|
import chartNoData from '@/views/charts/charts/ChartNoData'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SecurityEvent',
|
name: 'SecurityEvent',
|
||||||
@@ -88,10 +90,11 @@ export default {
|
|||||||
return {
|
return {
|
||||||
eventList: [],
|
eventList: [],
|
||||||
showError: false,
|
showError: false,
|
||||||
eventSeverityColor1,
|
eventSeverityColor,
|
||||||
errorMsg: ''
|
errorMsg: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
components: { chartNoData },
|
||||||
setup () {
|
setup () {
|
||||||
const { query } = useRoute()
|
const { query } = useRoute()
|
||||||
const entityType = query.entityType
|
const entityType = query.entityType
|
||||||
@@ -107,6 +110,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
unitConvert,
|
unitConvert,
|
||||||
|
toUpperCaseByString,
|
||||||
initData () {
|
initData () {
|
||||||
const params = {
|
const params = {
|
||||||
resource: this.entityName,
|
resource: this.entityName,
|
||||||
|
|||||||
Reference in New Issue
Block a user