mirror of
https://github.com/ansible/awx.git
synced 2026-02-20 12:40:06 -03:30
Remove placeholder label text.
This commit is contained in:
@@ -19,8 +19,8 @@ function MeshGraph({ showLegend }) {
|
|||||||
max = Math.floor(max);
|
max = Math.floor(max);
|
||||||
return Math.floor(Math.random() * (max - min + 1)) + min;
|
return Math.floor(Math.random() * (max - min + 1)) + min;
|
||||||
}
|
}
|
||||||
let nodes = [];
|
const nodes = [];
|
||||||
let links = [];
|
const links = [];
|
||||||
const generateLinks = (n, r) => {
|
const generateLinks = (n, r) => {
|
||||||
for (let i = 0; i < r; i++) {
|
for (let i = 0; i < r; i++) {
|
||||||
const link = {
|
const link = {
|
||||||
@@ -175,6 +175,7 @@ function MeshGraph({ showLegend }) {
|
|||||||
hostNames
|
hostNames
|
||||||
.append('text')
|
.append('text')
|
||||||
.text((d) => renderLabelText(d.node_state, d.hostname))
|
.text((d) => renderLabelText(d.node_state, d.hostname))
|
||||||
|
.attr('class', 'placeholder')
|
||||||
.attr('fill', defaultNodeLabelColor)
|
.attr('fill', defaultNodeLabelColor)
|
||||||
.attr('text-anchor', 'middle')
|
.attr('text-anchor', 'middle')
|
||||||
.attr('y', 40)
|
.attr('y', 40)
|
||||||
@@ -192,7 +193,7 @@ function MeshGraph({ showLegend }) {
|
|||||||
.attr('ry', 8)
|
.attr('ry', 8)
|
||||||
.style('fill', (d) => renderStateColor(d.node_state));
|
.style('fill', (d) => renderStateColor(d.node_state));
|
||||||
});
|
});
|
||||||
|
svg.selectAll('text.placeholder').remove();
|
||||||
hostNames
|
hostNames
|
||||||
.append('text')
|
.append('text')
|
||||||
.text((d) => renderLabelText(d.node_state, d.hostname))
|
.text((d) => renderLabelText(d.node_state, d.hostname))
|
||||||
|
|||||||
Reference in New Issue
Block a user