From 3afe4647c20cbd67a84536b0c7fb6f959e0e4a12 Mon Sep 17 00:00:00 2001
From: chenjinsong <523037378@qq.com>
Date: Mon, 28 Oct 2024 14:09:35 +0800
Subject: [PATCH] =?UTF-8?q?CN-1713=20feat:=20=E5=A2=9E=E5=8A=A0subscriber?=
=?UTF-8?q?=20tag=E7=9A=84=E5=A4=84=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/utils/constants.js | 5 +++++
src/views/entityExplorer/entityGraph/GraphEntityDetail.vue | 1 +
src/views/entityExplorer/entityGraph/node.js | 6 +++---
src/views/entityExplorer/entityList/Row.vue | 2 +-
src/views/tag/TagForm.vue | 4 ++--
5 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/src/utils/constants.js b/src/utils/constants.js
index 751defe5..88b4660a 100644
--- a/src/utils/constants.js
+++ b/src/utils/constants.js
@@ -498,6 +498,11 @@ export const tagType = [
label: 'Domain',
value: 'Domain',
name: 'domain'
+ },
+ {
+ label: 'overall.subscriber',
+ value: 'Subscriber',
+ name: 'subscriber'
}
]
diff --git a/src/views/entityExplorer/entityGraph/GraphEntityDetail.vue b/src/views/entityExplorer/entityGraph/GraphEntityDetail.vue
index 43642359..f2242439 100644
--- a/src/views/entityExplorer/entityGraph/GraphEntityDetail.vue
+++ b/src/views/entityExplorer/entityGraph/GraphEntityDetail.vue
@@ -186,6 +186,7 @@ export default {
}
},
mounted () {
+ console.info(this.node)
this.handleDetailData(this.node)
},
setup (props) {
diff --git a/src/views/entityExplorer/entityGraph/node.js b/src/views/entityExplorer/entityGraph/node.js
index bf50982e..d0391c4e 100644
--- a/src/views/entityExplorer/entityGraph/node.js
+++ b/src/views/entityExplorer/entityGraph/node.js
@@ -1,5 +1,5 @@
import _ from 'lodash'
-import { entityDefaultColor, entityType } from '@/utils/constants'
+import {entityDefaultColor, entityType, intentColor } from '@/utils/constants'
import { formatTags } from '@/utils/tools'
import { generateLabel, builtTooltip, queryEntityBasicInfo, queryTags, queryRelatedEntityCount } from '@/views/entityExplorer/entityGraph/utils'
import { api } from '@/utils/api'
@@ -57,8 +57,8 @@ export default class Node {
const tags = await queryTags(entityType, entityName)
let _tags = []
formatTags(tags, entityType, _tags)
- if (_.isArray(tags.userDefinedTags)) {
- _tags = _.concat(_tags, tags.userDefinedTags.map(tag => ({ value: tag.tagValue, color: tag.knowledgeBase ? tag.knowledgeBase.color : entityDefaultColor })))
+ if (_.isArray(tags.tags)) {
+ _tags = _.concat(_tags, tags.tags.map(tag => ({ value: tag.name, color: intentColor[tag.intent] || entityDefaultColor })))
}
this.data.tags = _tags
diff --git a/src/views/entityExplorer/entityList/Row.vue b/src/views/entityExplorer/entityList/Row.vue
index e2c5ac77..aaf167b8 100644
--- a/src/views/entityExplorer/entityList/Row.vue
+++ b/src/views/entityExplorer/entityList/Row.vue
@@ -300,7 +300,7 @@ export default {
break
}
}
- if (this.entity.entityType === 'domain' || this.entity.entityType === 'ip') {
+ if (this.entity.entityType === 'domain' || this.entity.entityType === 'ip' || this.entity.entityType === 'subscriber') {
axios.get(`${url}?resource=${this.entity.entityValue}`).then(responese => {
const res = responese.data
if (responese.status === 200) {
diff --git a/src/views/tag/TagForm.vue b/src/views/tag/TagForm.vue
index f330c2da..b255f39d 100644
--- a/src/views/tag/TagForm.vue
+++ b/src/views/tag/TagForm.vue
@@ -39,7 +39,7 @@
:disabled="!!editObject.id || (uploaded && !importedDataNoData)"
>
-
+
@@ -167,7 +167,7 @@
@blur="onBlurTagItem(i)"
>
-
+