Groups StatusComment EOS; return; } function insertGroupTableFooter() { echo ""; return; } /** * @param String nodeGroupName The name of the node group. */ function getToggleString($nodeGroupName) { global $TOPDIR; //$colTxt = "Click to collapse section"; $exTxt = "Click to expand section"; //$bulgif = "$TOPDIR/images/h3bg_new.gif"; //$minusgif = "$TOPDIR/images/minus-sign.gif"; $plusgif = "$TOPDIR/images/plus-sign.gif"; $html = << EOS; return $html; } /** * @param String nodeGroup The group. */ function insertGroupTableRow($nodeGroupName, $status) { $img_string = getStatusImage(mapStatus($status)); //echo ''; echo ''; echo GroupNodeTable::getToggleString($nodeGroupName); echo <<$nodeGroupName   EOE; return; } // This is used by nodes_by_group.php /** * @param An array of node groups, each of which contains an array of attr/value pairs * returns the table that contains all the nodes information of that group */ function getNodeGroupSection($group, $nodes) { global $TOPDIR; $imagedir = "$TOPDIR/images"; $right_arrow_gif = $imagedir . "/grey_arrow_r.gif"; $left_arrow_gif = $imagedir . "/grey_arrow_l.gif"; $html = "\n"; $html .= "\n"; foreach($nodes as $nodeName => $attrs) { $html .= GroupNodeTable::getNodeTableRow($nodeName, $attrs); } $html .= "\n"; $html .= "
Node NameArchOSProfileStatusPower MethodComment
Previous page    Next page  
\n"; return $html; } /** * @param The node for which we want to generate the html. */ function getNodeTableRow($nodeName, $attrs) { $html = "\n" . "$nodeName\n" . "" . (array_key_exists('nodetype.arch',$attrs)?$attrs['nodetype.arch']:'') . "\n" . "" . (array_key_exists('nodetype.os',$attrs)?$attrs['nodetype.os']:'') . "\n" . "" . (array_key_exists('nodetype.profile',$attrs)?$attrs['nodetype.profile']:'') . "\n"; $stat = 'unknown'; //todo: implement when nodels nodelist.status works $img_string = ''; $powerstr = array_key_exists('nodehm.power',$attrs) ? $attrs['nodehm.power'] : NULL; if (empty($powerstr)) { $powerstr = array_key_exists('nodehm.mgt',$attrs)?$attrs['nodehm.mgt']:''; } $html .= "" . $img_string . "". "" . $powerstr . "". "" . (array_key_exists('nodelist.comments',$attrs)?$attrs['nodelist.comments']:'') . ""; return $html; } } // end the class ?>