-If an xCAT install has a total numebr of groups that exceed the total number of nodes, make sure the root level still renders
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4141 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
23a52ec995
commit
502cdedf8b
@ -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);
|
||||
?>
|
||||
|
Loading…
Reference in New Issue
Block a user