CN-984 fix: 增加赛风tag
This commit is contained in:
@@ -268,6 +268,9 @@ if (openMock) {
|
||||
darkweb: {
|
||||
nodeType: 'nodeType'
|
||||
},
|
||||
psiphon3Ip: {
|
||||
type: 1
|
||||
},
|
||||
userDefinedTags: [
|
||||
{
|
||||
id: 1,
|
||||
@@ -317,6 +320,11 @@ if (openMock) {
|
||||
isValid: 1
|
||||
}
|
||||
},
|
||||
{
|
||||
psiphon3Ip: {
|
||||
type: 1
|
||||
}
|
||||
},
|
||||
{
|
||||
userDefinedTag: {
|
||||
id: 1,
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -50,7 +50,7 @@
|
||||
<script>
|
||||
import chartMixin from '@/views/charts2/chart-mixin'
|
||||
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 { ref } from 'vue'
|
||||
import i18n from '@/i18n'
|
||||
@@ -76,6 +76,17 @@ export default {
|
||||
}
|
||||
},
|
||||
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 () {
|
||||
this.toggleLoading(true)
|
||||
this.showError = false
|
||||
@@ -95,7 +106,7 @@ export default {
|
||||
Object.keys(res.data[k]).forEach(k2 => {
|
||||
const find = entityDetailTags[this.entity.entityType].find(t => t.name === k2)
|
||||
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 })
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
import chartMixin from '@/views/charts2/chart-mixin'
|
||||
import axios from 'axios'
|
||||
import { api } from '@/utils/api'
|
||||
import { entityDetailTags } from '@/utils/constants'
|
||||
import {entityDetailTags, psiphon3IpType} from '@/utils/constants'
|
||||
import { dateFormatByAppearance } from '@/utils/date-util'
|
||||
import chartNoData from '@/views/charts/charts/ChartNoData'
|
||||
|
||||
@@ -112,6 +112,17 @@ export default {
|
||||
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 () {
|
||||
this.toggleLoading(true)
|
||||
this.informationAggregationList = []
|
||||
@@ -135,7 +146,7 @@ export default {
|
||||
Object.keys(r[k]).forEach(k2 => {
|
||||
const find = entityDetailTags[this.entity.entityType].find(t => t.name === k2)
|
||||
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 })
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user