diff --git a/xCAT-UI/noderangesource.php b/xCAT-UI/noderangesource.php index 0de0dea14..b9d80feab 100644 --- a/xCAT-UI/noderangesource.php +++ b/xCAT-UI/noderangesource.php @@ -28,7 +28,7 @@ require_once "js/jsonwrapper.php"; $numsubgroups=count($rvals->xcatresponse->intersectinggroups); $numnodes=count($rvals->xcatresponse->node); $jdata=array(); - if ($numnodes >= $numsubgroups) { #If there are few enough subgroups to be helpful filters, add them in + if ($numnodes >= $numsubgroups || $root==1) { #If there are few enough subgroups to be helpful filters, add them in foreach ($rvals->xcatresponse->intersectinggroups as $group) { if (! in_array("$group",$parents)) { $jdata[]= array("data"=>"$group", @@ -39,13 +39,11 @@ require_once "js/jsonwrapper.php"; } } #If there were more groups than nodes, leave the signal to noise ratio down - if ($root==0) { foreach ($rvals->xcatresponse->node as $node) { $jdata[] = array("data"=>"$node", "attributes"=>array("id"=>",$node", "rel"=>'node')); } - } # header('Content-type: text/html'); echo json_encode($jdata); ?>