fix: 1.新增报告时间范围添加国际化;2.detection跳转实体详情缺少参数

This commit is contained in:
刘洪洪
2024-01-10 15:49:41 +08:00
parent a8ecdd48bd
commit a3ab4530b7
3 changed files with 21 additions and 19 deletions

View File

@@ -25,7 +25,7 @@
@change="timeConfigTypeChange"
>
<template v-for="time in timeRuleList" :key="time.value">
<el-option :label="time.name" :value="time.value"></el-option>
<el-option :label="$t(time.name)" :value="time.value"></el-option>
</template>
</el-select>
<template v-if="editObject.config.timeConfig.type === 'this'">
@@ -38,7 +38,7 @@
size="small"
@change="()=>{ this.$forceUpdate() }">
<template v-for="time in timeUnitList" :key="time.value">
<el-option :label="time.name" :value="time.value"></el-option>
<el-option :label="$t(time.name)" :value="time.value"></el-option>
</template>
</el-select>
</template>
@@ -56,7 +56,7 @@
size="small"
@change="()=>{ this.$forceUpdate() }">
<template v-for="time in timeUnitList" :key="time.value">
<el-option :label="time.name" :value="time.value"></el-option>
<el-option :label="$t(time.name)" :value="time.value"></el-option>
</template>
</el-select>
</div>

View File

@@ -2470,20 +2470,20 @@ export const reg = {
export const report = {
timeRuleList: [
{ name: 'today', value: 'today' },
{ name: 'yesterday', value: 'yesterday' },
{ name: 'this', value: 'this' },
{ name: 'last', value: 'last' },
{ name: 'previous', value: 'previous' },
{ name: 'customize', value: 'customize' }
{ name: 'overall.today', value: 'today' },
{ name: 'overall.yesterday', value: 'yesterday' },
{ name: 'overall.this', value: 'this' },
{ name: 'overall.last', value: 'last' },
{ name: 'overall.previous', value: 'previous' },
{ name: 'overall.customize', value: 'customize' }
],
timeUnitList: [
{ name: 'minute', value: 'minute' },
{ name: 'hour', value: 'hour' },
{ name: 'day', value: 'day' },
{ name: 'week', value: 'week' },
{ name: 'month', value: 'month' },
{ name: 'year', value: 'year' }
{ name: 'overall.minute', value: 'minute' },
{ name: 'overall.hour', value: 'hour' },
{ name: 'overall.day', value: 'day' },
{ name: 'overall.week', value: 'week' },
{ name: 'overall.month', value: 'month' },
{ name: 'overall.year', value: 'year' }
],
scheduleTypeList: [
{ name: 'report.daily', value: 'day' },

View File

@@ -4,10 +4,10 @@
<div class="overview__title">{{ $t('overall.remark') }}</div>
<div class="overview__row">
<div class="row__content1" v-if="detection.eventType === 'Command and Control' && detection.isBuiltin == 1">
<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 {{detection.eventName}} activity, {{$_.get(detection, 'eventInfoObj.ioc_value', '') || ''}}.
<span>{{detection.victimIp}}</span>&nbsp;&nbsp;communicated with&nbsp;<span>{{detection.offenderIp}}</span>&nbsp;&nbsp;that was associated with the indicator of {{detection.eventName}} activity, {{$_.get(detection, 'eventInfoObj.ioc_value', '') || ''}}.
</div>
<div class="row__content1" v-else-if="detection.eventType === 'Anonymity' && detection.isBuiltin == 1">
<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 {{detection.eventName}}.
<span>{{detection.victimIp}}</span>&nbsp;&nbsp;communicated with&nbsp;<span>{{detection.offenderIp}}</span>&nbsp;&nbsp;that was associated with the indicator of {{detection.eventName}}.
</div>
<div class="row__content1" v-else>
{{ $_.get(basicInfo, 'ruleInfo.description', '-') || '-' }}
@@ -364,7 +364,8 @@ import { changeI18nOfSeverity } from '@/utils/tools'
export default {
name: 'DetectionOverview',
props: {
detection: Object
detection: Object,
timeFilter: Object
},
data () {
return {
@@ -504,7 +505,8 @@ export default {
path: '/entity/detail',
query: {
entityType: type,
entityName: name
entityName: name,
range: this.timeFilter.dateRangeValue
}
})
window.open(href, '_blank')