From 72aa085034ae6f462a25f2db41bab6664e3a0d0e Mon Sep 17 00:00:00 2001 From: witx98 Date: Wed, 27 Nov 2024 12:21:04 +0100 Subject: [PATCH 1/3] Subtitle tag fix --- .../dev/logchange/hofund/graph/node/HofundNodeMeter.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/hofund-core/src/main/java/dev/logchange/hofund/graph/node/HofundNodeMeter.java b/hofund-core/src/main/java/dev/logchange/hofund/graph/node/HofundNodeMeter.java index ee5442f..eb85a13 100644 --- a/hofund-core/src/main/java/dev/logchange/hofund/graph/node/HofundNodeMeter.java +++ b/hofund-core/src/main/java/dev/logchange/hofund/graph/node/HofundNodeMeter.java @@ -11,6 +11,7 @@ import java.util.Collection; import java.util.LinkedList; import java.util.List; +import java.util.Objects; import java.util.concurrent.atomic.AtomicInteger; import java.util.stream.Collectors; @@ -64,7 +65,12 @@ private List tagsForConnection(HofundConnection connection) { List tags = new LinkedList<>(); tags.add(Tag.of("id", connection.toTargetTag())); tags.add(Tag.of("title", connection.getTarget() + "_" + connection.getType())); - tags.add(Tag.of("subtitle", connection.getType().toString() + " (" + connection.getDescription() + ")")); + + String subtitle = Objects.equals(connection.getDescription(), "") ? + connection.getTarget() + : String.format("%s (%s)", connection.getType(), connection.getDescription()); + + tags.add(Tag.of("subtitle", subtitle)); tags.add(Tag.of("type", connection.getType().toString())); return tags; } From 295fbe7bd861a890482017df8e92e02babd715d7 Mon Sep 17 00:00:00 2001 From: witx98 Date: Wed, 27 Nov 2024 12:27:13 +0100 Subject: [PATCH 2/3] Subtitle tag fix --- .../java/dev/logchange/hofund/graph/node/HofundNodeMeter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hofund-core/src/main/java/dev/logchange/hofund/graph/node/HofundNodeMeter.java b/hofund-core/src/main/java/dev/logchange/hofund/graph/node/HofundNodeMeter.java index eb85a13..3380f63 100644 --- a/hofund-core/src/main/java/dev/logchange/hofund/graph/node/HofundNodeMeter.java +++ b/hofund-core/src/main/java/dev/logchange/hofund/graph/node/HofundNodeMeter.java @@ -67,7 +67,7 @@ private List tagsForConnection(HofundConnection connection) { tags.add(Tag.of("title", connection.getTarget() + "_" + connection.getType())); String subtitle = Objects.equals(connection.getDescription(), "") ? - connection.getTarget() + connection.getType().toString() : String.format("%s (%s)", connection.getType(), connection.getDescription()); tags.add(Tag.of("subtitle", subtitle)); From 9828d00b4bbe947fb26d68a3f65bd60c6043c551 Mon Sep 17 00:00:00 2001 From: witx98 Date: Wed, 27 Nov 2024 12:27:40 +0100 Subject: [PATCH 3/3] Changelog update --- changelog/unreleased/000057-connection-tags-fix.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/changelog/unreleased/000057-connection-tags-fix.yml b/changelog/unreleased/000057-connection-tags-fix.yml index c53faa8..25652a1 100644 --- a/changelog/unreleased/000057-connection-tags-fix.yml +++ b/changelog/unreleased/000057-connection-tags-fix.yml @@ -7,4 +7,5 @@ type: fixed #[added/changed/deprecated/removed/fixed/security/other] issues: - 57 merge_requests: - - 58 \ No newline at end of file + - 58 + - 59 \ No newline at end of file