You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ea...@apache.org on 2020/03/13 15:29:35 UTC
[qpid-dispatch] branch master updated: DISPATCH-1593: Moved legend
text
This is an automated email from the ASF dual-hosted git repository.
eallen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/qpid-dispatch.git
The following commit(s) were added to refs/heads/master by this push:
new e9a7fa3 DISPATCH-1593: Moved legend text
e9a7fa3 is described below
commit e9a7fa38f913878b6467441351293767856054de
Author: Ernest Allen <ea...@redhat.com>
AuthorDate: Fri Mar 13 11:29:14 2020 -0400
DISPATCH-1593: Moved legend text
---
console/react/src/topology/legend.js | 8 +++++---
console/react/src/topology/svgUtils.js | 3 ++-
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/console/react/src/topology/legend.js b/console/react/src/topology/legend.js
index 8f3d700..056aa43 100644
--- a/console/react/src/topology/legend.js
+++ b/console/react/src/topology/legend.js
@@ -156,16 +156,18 @@ export class Legend {
return t;
});
appendCircle(legendEnter, this.urlPrefix);
- appendContent(legendEnter);
+ appendContent(legendEnter, true);
appendTitle(legendEnter);
legendEnter
- .filter(d => d.nodeType !== "_edge" && d.nodeType !== "_topo")
+ //.filter(d => d.nodeType !== "_edge" && d.nodeType !== "_topo")
.append("svg:text")
.attr("x", 35)
.attr("y", 6)
.attr("class", "label")
.text(function(d) {
- return d.key;
+ if (d.nodeType === "_topo") return "Router";
+ else if (d.nodeType === "_edge") return "Edge Router";
+ else return d.key;
});
let svgEl = document.getElementById("svglegend");
diff --git a/console/react/src/topology/svgUtils.js b/console/react/src/topology/svgUtils.js
index 66ae160..be28677 100644
--- a/console/react/src/topology/svgUtils.js
+++ b/console/react/src/topology/svgUtils.js
@@ -102,7 +102,7 @@ export function appendCircle(g) {
);
}
-export function appendContent(g) {
+export function appendContent(g, legend) {
// show node IDs
g.append("svg:text")
.attr("x", d => Nodes.textOffset(d.nodeType, d.name.length))
@@ -141,6 +141,7 @@ export function appendContent(g) {
return utils.isQpid(d);
})
.text(function(d) {
+ if (legend && (d.nodeType === "_edge" || d.nodeType === "_topo")) return null;
if (utils.isConsole(d)) {
return "\uf108"; // icon-desktop for a console
} else if (utils.isArtemis(d)) {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org