From 8dbee6b591c0af2296f5ba043a3edbef448d859f Mon Sep 17 00:00:00 2001 From: DouPache Date: Wed, 23 Oct 2024 00:09:40 +0800 Subject: [PATCH] [YUNIKORN-2935] Only show children when the queueNode actually has children (#212) Closes: #212 Signed-off-by: Yu-Lin Chen --- src/app/components/queue-v2/queues-v2.component.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/app/components/queue-v2/queues-v2.component.ts b/src/app/components/queue-v2/queues-v2.component.ts index 156b3524..11f5242c 100644 --- a/src/app/components/queue-v2/queues-v2.component.ts +++ b/src/app/components/queue-v2/queues-v2.component.ts @@ -309,10 +309,13 @@ function queueVisualization(rawData : QueueInfo , componentInstance: QueueV2Comp .attr("pointer-events", "none") .style("visibility", "hidden"); - group.on("mouseover", function() { - plusCircle.style("visibility", "visible"); - plusText.style("visibility", "visible"); - }); + if (d.children) { + group.on("mouseover", function() { + plusCircle.style("visibility", "visible"); + plusText.style("visibility", "visible"); + }); + } + group.on("click", function() { if(selectedNode == this || selectedNode == null){