Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ca23f23

Browse files
[fix]ISVJ-6815 数据源和数据集节点标签不显示 review by qiw
1 parent 58c5d24 commit ca23f23

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

src/common/overlay/knowledge-graph/format.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,8 @@ function getNodeLabel(entity, captionField) {
159159
const { name, entityTypes, entityIds } = data[i];
160160
const ids = JSON.parse(entityIds || '[]');
161161
const types = JSON.parse(entityTypes || '[]');
162-
if (ids.includes(id) || types.includes(labels[0])) {
162+
const labelStr = labels && labels.join('&');
163+
if (ids.includes(id) || types.includes(labelStr)) {
163164
return properties[name] || '';
164165
}
165166
}

test/common/iServer/KnowledgeGraphServiceSpec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ describe('KnowledgeGraphService', () => {
4949
expect(res).not.toBeNull();
5050
expect(res.type).toBe('processCompleted');
5151
expect(res.result).not.toBeNull();
52-
expect(res.result.length).toEqual(5);
52+
expect(res.result.length).toEqual(6);
5353
knowledgeGraphService.destroy();
5454
done();
5555
} catch (exception) {

test/resources/knowledgeGraphService.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)