fix: 调整detection列表和下拉中的描述字段逻辑

This commit is contained in:
chenjinsong
2023-10-24 20:20:56 +08:00
parent 871781ab70
commit b4fcbd260b
4 changed files with 30 additions and 16 deletions

View File

@@ -16,8 +16,7 @@
class="detection-event-severity-color-block"
:style="`background-color: ${eventSeverityColor[detection.eventSeverity]}`">
</span>
<!-- <span class="detection-event-severity-block">{{ detection.securityType || '-' }}</span>-->
<span class="detection-event-severity-block">{{ detection.eventType || '-' }}</span>
<span class="detection-event-severity-block">{{ detection.eventName || '-' }}</span>
<i class="cn-icon cn-icon-attacker" ></i>{{detection.offenderIp || '-'}}
<div v-if="detection.domain" class="domain">{{detection.domain}}</div>
<span class="line">-------</span>
@@ -41,6 +40,11 @@
<span>{{$t('detections.severity')}}&nbsp;:&nbsp;&nbsp;</span>
<span>{{detection.eventSeverity || '-'}}</span>
</div>
<div class="basic-info__item" v-if="detection.eventType">
<i class="cn-icon cn-icon-event-type"></i>
<span>{{$t('detections.eventType')}}&nbsp;:&nbsp;&nbsp;</span>
<span>{{detection.eventType || '-'}}</span>
</div>
<div class="basic-info__item" v-if="detection.malware">
<i class="cn-icon cn-icon-trojan"></i>
<span>{{$t('detection.list.malwareName')}}&nbsp;:&nbsp;&nbsp;</span>

View File

@@ -3,17 +3,18 @@
<div class="overview__left">
<div class="overview__title">{{ $t('overall.remark') }}</div>
<div class="overview__row">
<div class="row__content1" v-if="detection.malware">
<span class="row__content--link">
{{ $_.get(detection, 'malware.mitreAttackDescription', '-') || '-' }}
</span>&nbsp;
<div class="row__content1" v-if="detection.eventType === 'Command and Control' && detection.eventName === 'Cobalt Strike'">
<span class="row__content--link">{{detection.victimIp}}</span>&nbsp;&nbsp;communicated with&nbsp;<span class="row__content--link">{{detection.offenderIp}}</span>&nbsp;&nbsp;that was associated with the indicator of Cobalt Strike activity, {{$_.get(detection, 'eventInfoObj.ioc_value', '') || ''}}.
</div>
<div class="row__content1" v-if="detection.darkweb">
<span class="row__content--link">
{{ $_.get(detection, 'malware.mitreAttackDescription', '-') || '-' }}
</span>&nbsp;
<div class="row__content1" v-else-if="detection.eventType === 'Command and Control' && detection.eventName === 'Mirai'">
<span class="row__content--link">{{detection.victimIp}}</span>&nbsp;&nbsp;communicated with&nbsp;<span class="row__content--link">{{detection.offenderIp}}</span>&nbsp;&nbsp;that was associated with the indicator of Mirai attacks, {{$_.get(detection, 'eventInfoObj.ioc_value', '') || ''}}.
</div>
<div class="row__content1" v-else-if="detection.eventType === 'Anonymity'">
<span class="row__content--link">{{detection.victimIp}}</span>&nbsp;&nbsp;communicated with&nbsp;<span class="row__content--link">{{detection.offenderIp}}</span>&nbsp;&nbsp;that was associated with the indicator of Tor/I2P/MTProxy/Obfs4/Snowflake/GeneralBridge, {{$_.get(detection, 'eventInfoObj.ioc_value', '') || ''}}.
</div>
<div class="row__content1" v-else>
{{basicInfo.ruleDescription || '-'}}
</div>
<span v-else>-</span>
</div>
<div class="overview__title">Fields</div>
<div class="overview__row">
@@ -456,6 +457,13 @@ export default {
}
})
}
if (this.detection.ruleId) {
axios.get(`${api.detection.detail}/${this.detection.ruleId}`).then(res => {
if (res.status === 200) {
this.basicInfo.ruleDescription = res.data.data.description
}
})
}
},
queryEvent () {
axios.get(api.detection.securityEvent.relationEvent, {