fix: 检测页面统一 数据为空时的国际化
This commit is contained in:
@@ -73,6 +73,9 @@ export default {
|
||||
get(api.npm.events.list, params).then(res => {
|
||||
if (res.code === 200) {
|
||||
this.showError = false
|
||||
if (res.data.result.length === 0) {
|
||||
this.chartData.forEach(d => { d.count = '-' })
|
||||
}
|
||||
res.data.result.forEach(t => {
|
||||
this.chartData.forEach(d => {
|
||||
if (d.eventSeverity === t.eventSeverity) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="detection-filter-case">
|
||||
<div class="no-data" v-if="isNoData">No data</div>
|
||||
<div class="no-data" v-if="isNoData">{{ $t('npm.noData') }}</div>
|
||||
|
||||
<div class="new-detection-filter-title">{{$t('detections.filters')}}</div>
|
||||
<template v-for="(filter, index) in filterData" :key="index">
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<loading :loading="loading"></loading>
|
||||
<div class="detection-list__content">
|
||||
<div class="detection-list--list">
|
||||
<div class="no-data" v-if="noData">No data</div>
|
||||
<div class="no-data" v-if="noData">{{ $t('npm.noData') }}</div>
|
||||
<div v-if="!isCollapse" @click="collapse" class="cn-detection__shadow new-cn-detection__shadow"></div>
|
||||
<detection-row
|
||||
style="margin-bottom: 10px"
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
<div class="chart-header__title">{{$t('detection.severity')}}</div>
|
||||
</div>
|
||||
<template v-if="isStatisticsSeverityNoData">
|
||||
<div class="no-data chart-content" >No data</div>
|
||||
<div class="no-data chart-content" >{{ $t('npm.noData') }}</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div class="chart-content" :id="`eventSeverityPie${pageType}`">
|
||||
@@ -70,7 +70,7 @@
|
||||
<div class="chart-header__title">{{$t('detection.categoryProportion')}}</div>
|
||||
</div>
|
||||
<template v-if="isStatisticsCategoryNoData">
|
||||
<div class="no-data chart-content" >No data</div>
|
||||
<div class="no-data chart-content" >{{ $t('npm.noData') }}</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div class="chart-content" :id="`detectionCategoryPer${pageType}`">
|
||||
@@ -82,7 +82,7 @@
|
||||
<div class="chart-header__title">{{pageType === detectionPageType.securityEvent ? $t('detection.activeAttacker') : $t('detections.activeEntity')}}</div>
|
||||
</div>
|
||||
<template v-if="isStatisticsActiveAttackNoData">
|
||||
<div class="no-data chart-content" >No data</div>
|
||||
<div class="no-data chart-content" >{{ $t('npm.noData') }}</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div class="chart-content" style="padding-left: 5px;" :id="`detectionActiveAttacker${pageType}`">
|
||||
|
||||
Reference in New Issue
Block a user