fix: 修复关系图有时节点label不对的问题
This commit is contained in:
@@ -629,7 +629,7 @@ export default {
|
|||||||
width = 24
|
width = 24
|
||||||
height = 24
|
height = 24
|
||||||
if (node.data.type === 'app') {
|
if (node.data.type === 'app') {
|
||||||
label = this.$t('entities.relatedDomain')
|
label = this.$t('entities.graph.relatedDomain')
|
||||||
} else if (node.data.type === 'ip') {
|
} else if (node.data.type === 'ip') {
|
||||||
label = this.$t('entities.graph.resolvedDomain')
|
label = this.$t('entities.graph.resolvedDomain')
|
||||||
}
|
}
|
||||||
@@ -696,7 +696,7 @@ export default {
|
|||||||
const ipNode = this.generatePrimaryNode({
|
const ipNode = this.generatePrimaryNode({
|
||||||
id: 'ip-1',
|
id: 'ip-1',
|
||||||
parentId: rootNode.id,
|
parentId: rootNode.id,
|
||||||
label: this.$t('entities.graph.resolveIp'),
|
label: this.$t(rootNode.data.type === 'app' ? 'entities.tab.relatedIp' : 'entities.graph.resolveIp'),
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 300,
|
y: 300,
|
||||||
data: {
|
data: {
|
||||||
@@ -708,7 +708,7 @@ export default {
|
|||||||
const domainNode = this.generatePrimaryNode({
|
const domainNode = this.generatePrimaryNode({
|
||||||
id: 'domain-1',
|
id: 'domain-1',
|
||||||
parentId: rootNode.id,
|
parentId: rootNode.id,
|
||||||
label: this.$t('entity.graph.resolveDomain'),
|
label: this.$t(rootNode.data.type === 'app' ? 'entities.graph.relatedDomain' : 'entity.graph.resolveDomain'),
|
||||||
x: 260,
|
x: 260,
|
||||||
y: -150,
|
y: -150,
|
||||||
data: {
|
data: {
|
||||||
@@ -1269,7 +1269,7 @@ export default {
|
|||||||
switch (expandType) {
|
switch (expandType) {
|
||||||
case 'ip': {
|
case 'ip': {
|
||||||
count = _.get(currentNode.data, 'relatedEntityCount.ip.total', 0)
|
count = _.get(currentNode.data, 'relatedEntityCount.ip.total', 0)
|
||||||
label = `${this.$t('entities.graph.resolveIp')}(${count})`
|
label = `${this.$t(currentNode.data.type === 'app' ? 'entities.tab.relatedIp' : 'entities.graph.resolveIp')}(${count})`
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
case 'domain': {
|
case 'domain': {
|
||||||
@@ -1279,7 +1279,7 @@ export default {
|
|||||||
isSubdomain = true
|
isSubdomain = true
|
||||||
} else {
|
} else {
|
||||||
count = _.get(currentNode.data, 'relatedEntityCount.domain.total', 0)
|
count = _.get(currentNode.data, 'relatedEntityCount.domain.total', 0)
|
||||||
label = `${this.$t('entity.graph.resolveDomain')}(${count})`
|
label = `${this.$t(currentNode.data.type === 'app' ? 'entities.graph.relatedDomain' : 'entity.graph.resolveDomain')}(${count})`
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -480,7 +480,7 @@ export default {
|
|||||||
{
|
{
|
||||||
icon: 'cn-icon cn-icon-subdomain',
|
icon: 'cn-icon cn-icon-subdomain',
|
||||||
name: 'domain',
|
name: 'domain',
|
||||||
label: this.$t('entities.relatedDomain'),
|
label: this.$t('entities.graph.relatedDomain'),
|
||||||
value: _.get(n.relatedEntityCount, 'domain.current', '0') || 0,
|
value: _.get(n.relatedEntityCount, 'domain.current', '0') || 0,
|
||||||
total: _.get(n.relatedEntityCount, 'domain.total', '0') || 0
|
total: _.get(n.relatedEntityCount, 'domain.total', '0') || 0
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user