diff --git a/backend/src/main/java/io/metersphere/dto/RelationshipGraphData.java b/backend/src/main/java/io/metersphere/dto/RelationshipGraphData.java index 0e6fd4bccc..2adc97e09a 100644 --- a/backend/src/main/java/io/metersphere/dto/RelationshipGraphData.java +++ b/backend/src/main/java/io/metersphere/dto/RelationshipGraphData.java @@ -15,6 +15,11 @@ public class RelationshipGraphData { private List data; private List links; + // x 轴占用了多少单位 + private int xUnitCount; + // y 轴占用了多少单位 + private int yUnitCount; + public RelationshipGraphData() { this.data = new ArrayList<>(); this.links = new ArrayList<>(); diff --git a/backend/src/main/java/io/metersphere/service/RelationshipEdgeService.java b/backend/src/main/java/io/metersphere/service/RelationshipEdgeService.java index fc9b7ac07d..398a9bf04c 100644 --- a/backend/src/main/java/io/metersphere/service/RelationshipEdgeService.java +++ b/backend/src/main/java/io/metersphere/service/RelationshipEdgeService.java @@ -63,7 +63,7 @@ public class RelationshipEdgeService { // 去掉要删除的边 edges = edges.stream() - .filter(i -> i.getSourceId() != sourceId || i.getTargetId() != targetId) + .filter(i -> !i.getSourceId().equals(sourceId) && !i.getTargetId().equals(targetId)) .collect(Collectors.toList()); Set nodes = new HashSet<>(); @@ -114,7 +114,7 @@ public class RelationshipEdgeService { } nextLevelNodes.forEach(nextNode -> { - if (!markSet.contains(node)) { + if (!markSet.contains(nextNode)) { dfsForMark(nextNode, edges, markSet, true); dfsForMark(nextNode, edges, markSet, false); } diff --git a/backend/src/main/java/io/metersphere/xpack b/backend/src/main/java/io/metersphere/xpack index 1f86f9d47a..0405160366 160000 --- a/backend/src/main/java/io/metersphere/xpack +++ b/backend/src/main/java/io/metersphere/xpack @@ -1 +1 @@ -Subproject commit 1f86f9d47a27e67b4c1e21d94c2ccfacfccc7288 +Subproject commit 040516036651363ae9775ccfb57714ac81e7230e diff --git a/frontend/src/business/components/xpack b/frontend/src/business/components/xpack index b50fa6030e..295f852bd8 160000 --- a/frontend/src/business/components/xpack +++ b/frontend/src/business/components/xpack @@ -1 +1 @@ -Subproject commit b50fa6030ea19d01985aabed1e7d9d804737ad59 +Subproject commit 295f852bd8ae7062e769a6de6011d08a2bd6b4c4