CN-984 fix: 增加赛风tag

This commit is contained in:
chenjinsong
2023-06-08 17:10:58 +08:00
parent aef7387f43
commit 6b0bb332db
4 changed files with 49 additions and 4 deletions

View File

@@ -268,6 +268,9 @@ if (openMock) {
darkweb: { darkweb: {
nodeType: 'nodeType' nodeType: 'nodeType'
}, },
psiphon3Ip: {
type: 1
},
userDefinedTags: [ userDefinedTags: [
{ {
id: 1, id: 1,
@@ -317,6 +320,11 @@ if (openMock) {
isValid: 1 isValid: 1
} }
}, },
{
psiphon3Ip: {
type: 1
}
},
{ {
userDefinedTag: { userDefinedTag: {
id: 1, id: 1,

File diff suppressed because one or more lines are too long

View File

@@ -50,7 +50,7 @@
<script> <script>
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 { drillDownPanelTypeMapping, entityType, entityDetailTags } from '@/utils/constants' import { drillDownPanelTypeMapping, entityType, entityDetailTags, psiphon3IpType } from '@/utils/constants'
import { selectElementText, copySelectionText } from '@/utils/tools' import { selectElementText, copySelectionText } from '@/utils/tools'
import { ref } from 'vue' import { ref } from 'vue'
import i18n from '@/i18n' import i18n from '@/i18n'
@@ -76,6 +76,17 @@ export default {
} }
}, },
methods: { methods: {
tagValueHandler (k, k2, value) {
if (k === 'psiphon3Ip') {
if (k2 === 'type') {
const find = psiphon3IpType.find(t => t.value === value)
if (find) {
return find.name
}
}
}
return value
},
getData () { getData () {
this.toggleLoading(true) this.toggleLoading(true)
this.showError = false this.showError = false
@@ -95,7 +106,7 @@ export default {
Object.keys(res.data[k]).forEach(k2 => { Object.keys(res.data[k]).forEach(k2 => {
const find = entityDetailTags[this.entity.entityType].find(t => t.name === k2) const find = entityDetailTags[this.entity.entityType].find(t => t.name === k2)
if (find) { if (find) {
this.levelTwoTags.push({ key: k2, value: res.data[k][k2], type: find.type }) this.levelTwoTags.push({ key: k2, value: this.tagValueHandler(k, k2, res.data[k][k2]), type: find.type })
} }
}) })
} }

View File

@@ -92,7 +92,7 @@
import chartMixin from '@/views/charts2/chart-mixin' import chartMixin from '@/views/charts2/chart-mixin'
import axios from 'axios' import axios from 'axios'
import { api } from '@/utils/api' import { api } from '@/utils/api'
import { entityDetailTags } from '@/utils/constants' import {entityDetailTags, psiphon3IpType} from '@/utils/constants'
import { dateFormatByAppearance } from '@/utils/date-util' import { dateFormatByAppearance } from '@/utils/date-util'
import chartNoData from '@/views/charts/charts/ChartNoData' import chartNoData from '@/views/charts/charts/ChartNoData'
@@ -112,6 +112,17 @@ export default {
return 'padding-0' return 'padding-0'
} }
}, },
tagValueHandler (k, k2, value) {
if (k === 'psiphon3Ip') {
if (k2 === 'type') {
const find = psiphon3IpType.find(t => t.value === value)
if (find) {
return find.name
}
}
}
return value
},
getData () { getData () {
this.toggleLoading(true) this.toggleLoading(true)
this.informationAggregationList = [] this.informationAggregationList = []
@@ -135,7 +146,7 @@ export default {
Object.keys(r[k]).forEach(k2 => { Object.keys(r[k]).forEach(k2 => {
const find = entityDetailTags[this.entity.entityType].find(t => t.name === k2) const find = entityDetailTags[this.entity.entityType].find(t => t.name === k2)
if (find) { if (find) {
aggregation.intelligenceContent.push({ key: k2, value: r[k][k2], type: find.type }) aggregation.intelligenceContent.push({ key: k2, value: this.tagValueHandler(k, k2, r[k][k2]), type: find.type })
} }
}) })
} }