2022-02-25 13:33:54 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<div class="detection-detail-overview">
|
|
|
|
|
|
<div class="overview__left">
|
|
|
|
|
|
<div class="overview__title">{{$t('overall.remark')}}</div>
|
|
|
|
|
|
<div class="overview__row">
|
2022-03-14 14:53:02 +08:00
|
|
|
|
<div class="row__content">
|
|
|
|
|
|
<span
|
|
|
|
|
|
class="row__content--link"
|
|
|
|
|
|
@click="goDetail('app', detection.app_name)"
|
|
|
|
|
|
>{{ detection.app_name }}</span
|
|
|
|
|
|
>
|
|
|
|
|
|
<template v-if="detection.eventType === 'dns error'">
|
|
|
|
|
|
<span>
|
|
|
|
|
|
’s rate of DNS query errors is abnormally high.
|
|
|
|
|
|
</span>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
<template v-if="detection.eventType === 'http error'">
|
|
|
|
|
|
<span>
|
|
|
|
|
|
’s rate of HTTP query errors is abnormally high.
|
|
|
|
|
|
</span>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
<template v-if="detection.eventType === 'high dns response time'">
|
|
|
|
|
|
<span>
|
|
|
|
|
|
’s average of DNS response time is abnormally high.
|
|
|
|
|
|
</span>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</div>
|
2022-02-25 13:33:54 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
<div class="overview__title">Fields</div>
|
|
|
|
|
|
<div class="overview__row">
|
|
|
|
|
|
<div class="row__label">{{$t('entities.category')}}</div>
|
2022-03-03 23:21:33 +08:00
|
|
|
|
<div class="row__content">{{basicInfo.appCategory || '-'}}</div>
|
2022-02-25 13:33:54 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
<div class="overview__row">
|
|
|
|
|
|
<div class="row__label">{{$t('entities.subcategory')}}</div>
|
|
|
|
|
|
<div class="row__content">{{basicInfo.appSubcategory || '-'}}</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="overview__row">
|
|
|
|
|
|
<div class="row__label">{{$t('entities.riskLevel')}}</div>
|
|
|
|
|
|
<div class="row__content">
|
|
|
|
|
|
<div class="row__tag" :style="`background-color:${eventSeverityColor[basicInfo.appRisk]}`">{{basicInfo.appRisk || '-'}}</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="overview__right">
|
|
|
|
|
|
<div class="overview__title">{{$t('detections.goToEntity')}}</div>
|
|
|
|
|
|
<div class="overview__row">
|
|
|
|
|
|
<div class="row__content row__content--link">{{$t('detections.viewDetailOf', {ip: detection.appName})}}</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="overview__title">{{$t('detections.goToHunt')}}</div>
|
|
|
|
|
|
<div class="overview__row">
|
|
|
|
|
|
<div class="row__content row__content--link">{{$t('detections.viewAllRelated')}}</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
2022-03-03 23:21:33 +08:00
|
|
|
|
import { api, getData } from '@/utils/api'
|
2022-02-25 13:33:54 +08:00
|
|
|
|
import { eventSeverityColor } from '@/utils/constants'
|
|
|
|
|
|
export default {
|
|
|
|
|
|
name: 'DetectionPerformanceEventAppOverview',
|
|
|
|
|
|
props: {
|
|
|
|
|
|
detection: Object
|
|
|
|
|
|
},
|
|
|
|
|
|
data () {
|
|
|
|
|
|
return {
|
|
|
|
|
|
eventSeverityColor,
|
|
|
|
|
|
basicInfo: {}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
computed: {
|
|
|
|
|
|
computeLocation () {
|
|
|
|
|
|
return function (basicInfo) {
|
|
|
|
|
|
let result = ''
|
|
|
|
|
|
if (basicInfo.serverLocationCountry) {
|
|
|
|
|
|
result += basicInfo.serverLocationCountry
|
|
|
|
|
|
}
|
|
|
|
|
|
if (basicInfo.serverLocationProvince) {
|
|
|
|
|
|
if (result) {
|
|
|
|
|
|
result += ', '
|
|
|
|
|
|
}
|
|
|
|
|
|
result += basicInfo.serverLocationProvince
|
|
|
|
|
|
}
|
|
|
|
|
|
if (basicInfo.serverLocationRegion) {
|
|
|
|
|
|
if (result) {
|
|
|
|
|
|
result += ', '
|
|
|
|
|
|
}
|
|
|
|
|
|
result += basicInfo.serverLocationRegion
|
|
|
|
|
|
}
|
|
|
|
|
|
return result || '-'
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
|
|
|
query () {
|
2022-03-03 18:01:26 +08:00
|
|
|
|
this.queryBasic().then(responses => {
|
2022-03-03 23:21:33 +08:00
|
|
|
|
responses && (this.basicInfo = responses)
|
2022-03-03 18:01:26 +08:00
|
|
|
|
})
|
2022-02-25 13:33:54 +08:00
|
|
|
|
},
|
|
|
|
|
|
queryBasic () {
|
|
|
|
|
|
return new Promise((resolve, reject) => {
|
|
|
|
|
|
try {
|
2022-03-07 17:27:55 +08:00
|
|
|
|
getData(api.detection.performanceEvent.overviewBasic, { domain: this.detection.appName, startTime: this.detection.startTime }).then(data => {
|
2022-03-03 23:21:33 +08:00
|
|
|
|
resolve(data[0])
|
|
|
|
|
|
}).catch(error => {
|
|
|
|
|
|
reject(error)
|
2022-02-25 13:33:54 +08:00
|
|
|
|
})
|
|
|
|
|
|
} catch (e) {
|
|
|
|
|
|
reject(e)
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
2022-03-14 14:53:02 +08:00
|
|
|
|
},
|
|
|
|
|
|
goDetail(type, name) {
|
|
|
|
|
|
const { href } = this.$router.resolve({
|
|
|
|
|
|
path: '/entityDetail',
|
|
|
|
|
|
query: {
|
|
|
|
|
|
entityType: type,
|
|
|
|
|
|
name: name,
|
|
|
|
|
|
},
|
|
|
|
|
|
})
|
|
|
|
|
|
window.open(href, '_blank')
|
|
|
|
|
|
},
|
2022-02-25 13:33:54 +08:00
|
|
|
|
},
|
|
|
|
|
|
mounted () {
|
|
|
|
|
|
this.query()
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
</script>
|