get_array
[plewww.git] / plekit / php / columns.php
index 0ef58a9..bd46551 100644 (file)
@@ -9,7 +9,7 @@ drupal_set_html_head('
 class PlekitColumns {
 
 var $column_configuration = "";
-var $reference_node = "";
+var $reference_nodes = array();
 var $first_time = false;
 
 var $all_headers = array();
@@ -22,42 +22,34 @@ var $extra_columns = array();
 
 var $comon_live_data = "";
 var $tophat_live_data = "";
-var $live_data = array();
+var $ComonData = array();
+var $TopHatData = array();
+var $TopHatAgents = array();
 
 var $table_ids;
 
 var $HopCount = array();
+var $RTT = array();
 
-  function PlekitColumns ($column_configuration, $fix_columns, $tag_columns, $extra_columns=NULL, $this_table_headers=NULL) {
+function __construct ($column_configuration, $fix_columns, $tag_columns, $extra_columns=NULL, $this_table_headers=NULL) {
 
        if ($column_configuration != NULL) {
        $this->fix_columns = $fix_columns;
        $this->tag_columns = $tag_columns;
        $this->extra_columns = $extra_columns;
 
-       //print("<p>FIX<p>");
-       //print_r($this->fix_columns);
-       //print("<p>TAG<p>");
-       //print_r($this->tag_columns);
-       //print("<p>EXTRA<p>");
-       //print_r($this->extra_columns);
-
        $this->prepare_headers();
        $this->parse_configuration($column_configuration);
 
        $this->visible_headers = $this->get_visible();
        }
-
-       //print("<p>VISIBLE<p>");
-       //print_r($this->visible_headers);
-
 }
 
 
 
 /*
 
-INFO
+INFO/HEADERS
 
 */
 
@@ -86,9 +78,10 @@ else
 $tmp_headers[$headerId]=array('header'=>$headerId,'type'=>$column['type'],'tagname'=>$column['tagname'],'title'=>$column['title'], 'description'=>$column['title'], 'label'=>$column['header'],'visible'=>false, 'source'=>'myplc');
 }
 
-usort ($tmp_headers, create_function('$col1,$col2','return strcmp($col1["label"],$col2["label"]);'));
+usort ($tmp_headers,
+          function($col1, $col2) {return strcmp($col1["label"], $col2["label"]);});
 
-foreach ($tmp_headers as $t) 
+foreach ($tmp_headers as $t)
 $this->all_headers[$t['header']] = $t;
 
 //$this->all_headers = array_merge($this->all_headers, $tmp_headers);
@@ -102,31 +95,31 @@ return $this->all_headers;
 
 function get_headers() {
 
-return $this->all_headers;
+       return $this->all_headers;
 
 }
 
 function get_selected_period($label) {
 
-if ($this->all_headers[$label."w"]['visible'])
+       if (get_array2($this->all_headers, $label."w", 'visible'))
        return "w";
-else if ($this->all_headers[$label."m"]['visible'])
+       else if (get_array2($this->all_headers, $label."m", 'visible'))
        return "m";
-else if ($this->all_headers[$label."y"]['visible'])
+       else if (get_array2($this->all_headers, $label."y", 'visible'))
        return "y";
-else if ($this->all_headers[$label]['visible'])
-       return "";
-       
-return "";
+       else return "";
 }
 
 function node_tags() {
 
-       $fetched_tags = array('node_id','hostname');    
+       $fetched_tags = array('node_id','hostname');
 
        foreach ($this->all_headers as $h)
        {
-               if ($h['visible'] == true && $h['tagname'] != "" && !$h['fetched'] && $h['source']=="myplc")
+               if ($h['visible'] == true
+                && $h['tagname'] != ""
+                && !get_array($h, 'fetched')
+                && $h['source']=="myplc")
                        $fetched_tags[] = $h['tagname'];
        }
 
@@ -135,7 +128,7 @@ function node_tags() {
 
 function print_headers() {
 
-       $headers = "";  
+       $headers = "";
 
        foreach ($this->all_headers as $l => $h)
        {
@@ -146,7 +139,7 @@ function print_headers() {
 
 function get_visible() {
 
-       $visibleHeaders = array();      
+       $visibleHeaders = array();
 
        foreach ($this->all_headers as $h)
        {
@@ -180,10 +173,6 @@ CONFIGURATION
 function parse_configuration($column_configuration) {
 
        $this->column_configuration = $column_configuration;
-       //$this->default_configuration = $default_configuration;
-
-       //print($this->print_headers());
-
        $columns_conf = explode("|", $column_configuration);
 
 
@@ -203,45 +192,13 @@ function parse_configuration($column_configuration) {
                        $this->comon_live_data.=",".$this->all_headers[$conf[0]]['tagname'];
 
                if ($this->all_headers[$conf[0]]['source'] == "tophat")
-               {
-                       $this->reference_node = $conf[1];
-                       print ("ref node in configuration = ".$conf[1]);
-                       $this->reference_node = "planetlab-europe-07.ipv6.lip6.fr";
-                       $this->all_headers[$conf[0]]['refnode']=$this->reference_node;
-                       //$threshold = explode(",",$conf[1]);
-                       //$this->all_headers[$conf[0]]['threshold']=$threshold;
-               }
-
-               //print("<p>-".$conf[0]."-should be visible now - ".$this->all_headers[$conf[0]]['visible']);
-               //print_r($this->all_headers[$conf[0]]);
-
-/*
-               if ($conf[1] == "f")
-                       continue;
-
-               else if ($this->inTypeC($conf[0]))
-               {
-                       $this->all_headers[$conf[0]]['duration']= substr($conf[0], strlen($conf[0])-1, strlen($conf[0]));
-                       $threshold = explode(",",$conf[1]);
-                       $this->all_headers[$conf[0]]['threshold']=$threshold;
-               }
-               else if ($this->inTypeA($conf[0]))
-               {
-                       $exclude_list = explode(",",$conf[1]);
-                       $this->all_headers[$conf[0]]['exclude_list']=$exclude_list;
-               }
-               else
-               {
-                       $threshold = explode(",",$conf[1]);
-                       $this->all_headers[$conf[0]]['threshold']=$threshold;
-               }
-*/
+                       $this->tophat_live_data.=",".$this->all_headers[$conf[0]]['tagname'];
        }
 
 }
 
 
-               
+
 
 
 /*
@@ -252,49 +209,123 @@ CELLS
 
 function convert_data($value, $data_type) {
 
+       //print "converting ".$value." as ".$data_type;
+
        if ($value == "" || $value == null || $value == "n/a" || $value == "None")
                return "n/a";
 
        if ($data_type == "string")
                return $value;
 
-       if ($data_type == "date") 
+       if ($data_type == "date")
                return date("Y-m-d", $value);
 
-       if ($data_type == "uptime") 
+       if ($data_type == "uptime")
                return (int)((int) $value / 86400);
-       
-       return ((int) ($value * 10))/10;
 
+       if (is_numeric($value))
+               return ((int) ($value * 10))/10;
+
+       return $value;
+
+}
+
+function getTopHatAgents() {
+
+       $tophat_auth = array( 'AuthMethod' => 'password', 'Username' => 'guest@top-hat.info', 'AuthString' => 'guest');
+       $tophat_api = new TopHatAPI($tophat_auth);
+
+       //print ("Requesting tophat agents...");
+       //print_r($r);
+
+       $values = $tophat_api->Get('agents', 'latest', array('colocated.platform_name' => array('SONoMA', 'DIMES', 'ETOMIC', 'TDMI'), 'platform_name'=> 'TDMI'), array('hostname', 'colocated.peer_name', 'colocated.platform_name'));
+
+       $result = array();
+
+       if ($values) foreach ($values as $t) {
+               //print_r($t);
+               //print("<hr>");
+               $result[$t['hostname']] = "";
+               foreach ($t['colocated'] as $ll) {
+
+                       if (strpos($result[$t['hostname']]['all'],$ll['platform_name']) === false) {
+                               if ($result[$t['hostname']]['all'] != "")
+                                       $result[$t['hostname']]['all'] .= ",";
+                               $result[$t['hostname']]['all'] .= $ll['platform_name'];
+                       }
+
+                       if ($ll['platform_name'] == 'SONoMA') {
+                       if (strpos($result[$t['hostname']]['sonoma'],$ll['peer_name']) === false) {
+                                       if ($result[$t['hostname']]['sonoma'] != "")
+                                               $result[$t['hostname']]['sonoma'] .= ",";
+                                       $result[$t['hostname']]['sonoma'] .= $ll['peer_name'];
+                       }
+                       }
+
+                       if ($ll['platform_name'] == 'TDMI') {
+                       if (strpos($result[$t['hostname']]['tdmi'],$ll['peer_name']) === false) {
+                               if ($result[$t['hostname']]['tdmi'] != "")
+                                       $result[$t['hostname']]['tdmi'] .= ",";
+                               $result[$t['hostname']]['tdmi'] .= $ll['peer_name'];
+                       }
+                       }
+               }
+       }
+
+       $this->TopHatAgents = $result;
+
+       //print_r($this->TopHatAgents);
+
+       return $result;
 }
 
-function getHopCount($ref_node, $planetlab_nodes) {
+function getTopHatData($data, $planetlab_nodes) {
 
-       $tophat_auth = array( 'AuthMethod' => 'password', 'Username' => 'guest', 'AuthString' => 'guest');
+       $tophat_auth = array( 'AuthMethod' => 'password', 'Username' => 'guest@top-hat.info', 'AuthString' => 'guest');
        $tophat_api = new TopHatAPI($tophat_auth);
 
-       $traceroute = $tophat_api->Get('traceroute', 'latest', array('src_hostname' => $ref_node, 'dst_hostname' => $planetlab_nodes), array('dst_hostname', 'hop_count') );
+       $requested_data = explode(",", $data);
+
+       $r = array ('hostname');
+
+       foreach ($requested_data as $rd)
+               if ($rd) $r[] = $rd;
+
+       //print ("Requesting data from TopHat ...");
+       //print_r($r);
 
-       $hopcount = array();
+       $values = $tophat_api->Get('ips', 'latest', array('hostname' => $planetlab_nodes), $r );
 
-       if ($traceroute) foreach ($traceroute as $t)
-               $hopcount[$t['dst_hostname']]=$t['hop_count'];
+       $result = array();
 
-       return $hopcount;
+       if ($values) foreach ($values as $t)
+               foreach ($requested_data as $rd)
+                       if ($rd) $result[$t['hostname']][$rd] = $t[$rd];
+
+       //print_r($result);
+
+       return $result;
 }
 
+
 function comon_query_nodes($requested_data) {
-       //$base_url = 'http://comon.cs.princeton.edu/status/tabulator.cgi?forma=nameonly&';
-       $base_url = "http://comon.cs.princeton.edu/status/tabulator.cgi?table=table_nodeviewshort&format=formatcsv&dumpcols='name";
 
-       $url = $base_url.$requested_data."'";
+       $comon_url = "http://comon.cs.princeton.edu";
+       $comon_api_url = "status/tabulator.cgi?table=table_nodeviewshort&format=formatcsv&dumpcols='name";
 
-       //print ("retriecing comon data for url ".$url);
+       if (MYSLICE_COMON_URL != "")
+               $comon_url = MYSLICE_COMON_URL;
+
+       $url = $comon_url."/".$comon_api_url.$requested_data."'";
+
+       //print ("Retrieving comon data for url ".$url);
 
        $sPattern = '\', \'';
        $sReplace = '|';
 
-       if( false == ($str=file_get_contents($url)))
+       $str=@file_get_contents($url);
+
+       if ($str === false)
                        return '';
 
        $result=preg_replace( $sPattern, $sReplace, $str );
@@ -332,129 +363,70 @@ function fetch_live_data($all_nodes) {
 
 //comon data
        if ($this->comon_live_data != "") {
-       
+
                //print ("live data to be fetched =".$this->comon_live_data);
-               $this->live_data = $this->comon_query_nodes($this->comon_live_data);
-               //print_r($this->live_data);
+               $this->ComonData= $this->comon_query_nodes($this->comon_live_data);
+               //print_r($this->ComonData);
        }
 
-
-//TopHat pairwise data
-       //if ($this->tophat_live_data != "")
-       if ($this->reference_node != "")
+//TopHat per_node data
+       if ($this->tophat_live_data != "")
        {
                $dd = array();
 
                if ($all_nodes) foreach ($all_nodes as $n)
                        $dd[] = $n['hostname'];
 
-               print("Calling tophat api for reference node = ".$this->reference_node);
+               //print("Calling tophat api for ".$this->tophat_live_data);
                $st = time() + microtime();
-               $HopCount = $this->getHopCount($this->reference_node, $dd);
-               printf(" (%.2f ms)<br/>", (time() + microtime()-$st)*100);
-               print_r($HopCount);
+               $this->TopHatData = $this->getTopHatData($this->tophat_live_data, $dd);
+               //printf(" (%.2f ms)<br/>", (time() + microtime()-$st)*100);
+               //print_r($this->TopHatData);
        }
-}
-
-
-function excludeItems($value, $exclude_list, $hh) {
-
-        if ($value == "")
-                $value = "n/a";
-
-        if ($exclude_list)
-        if (in_array($value, $exclude_list))
-                return array($value, array('name'=>$hh, 'display'=>'table-cell'));
-        else
-                return array($value, array('name'=>$hh, 'display'=>'table-cell'));
-
-        return array($value, array('name'=>$hh, 'display'=>'table-cell'));
-}
-
-
-function checkThreshold($value, $threshold, $hh) {
-
-        if ($value == "")
-                return array("n/a", array('name'=>$hh, 'display'=>'table-cell'));
 
-        if ($threshold)
-        if ((float) $value >= (float) $threshold[0] && (float) $value <= (float) $threshold[1])
-                return array(round($value,1), array('name'=>$hh, 'display'=>'table-cell'));
-        else
-                return array(round($value,1), array('name'=>$hh, 'display'=>'table-cell'));
-
-        return array(round($value,1), array('name'=>$hh, 'display'=>'table-cell'));
 }
 
 
 function cells($table, $node) {
 
-foreach ($this->all_headers as $h)
-{
-if (!$h['fixed']) { 
 
-if ($h['visible'] != "")
-{
-
-/*
-if ($this->inTypeC($h['header']))
-{
-        $tagname = $h['tagname'];
-        $value = $node[$tagname];
-        $v = $this->checkThreshold($value, $h['threshold'], $h['header']);
-        $table->cell($v[0],$v[1]);
-}
-else if ($this->inTypeB($h['header']))
-{
-        $value = $node[$h['tagname']];
-        $v = $this->checkThreshold($value, $h['threshold'], $h['header']);
-        $table->cell($v[0],$v[1]);
-}
-else if ($this->inTypeD($h['header']))
-{
-        $value = $this->HopCount[$node['hostname']];
-        $v = $this->excludeItems($value, $h['threshold'], $h['header']);
-        $table->cell($v[0],$v[1]);
-}
-else if ($this->inTypeA($h['header']))
-{
-        $value = $node[$h['tagname']];
-        $v = $this->excludeItems($value, $h['exclude_list'], $h['header']);
-        $table->cell($v[0],$v[1]);
-}
-*/
-if ($h['type'] == "date")
-{
-        $value = $this->convert_data($node[$h['tagname']], $h['type']);
-        $table->cell($value,array('name'=>$h['header'], 'display'=>'table-cell'));
-}
-else if ($h['source'] == "comon")
-{
-       //print("<br>Searching for ".$h['tagname']."at ".$node);
-        $value = $this->convert_data($this->live_data[$node['hostname']][$h['tagname']], $h['tagname']);
-
-        $table->cell($value,array('name'=>$h['header'], 'display'=>'table-cell'));
-}
-else
-{
-        //$value = $node[$h['tagname']];
-        $value = $this->convert_data($node[$h['tagname']], $h['type']);
-        $table->cell($value,array('name'=>$h['header'], 'display'=>'table-cell'));
-}
-}
-else 
-       if ($node[$h['tagname']])
-       {
-               $value = $this->convert_data($node[$h['tagname']], $h['type']);
-               $table->cell($value, array('name'=>$h['header'], 'display'=>'none'));
+       foreach ($this->all_headers as $h) {
+
+               if (! get_array($h, 'fixed')) {
+
+                       if ($h['visible'] != "") {
+
+                               if ($h['source'] == "comon") {
+                                               //print("<br>Searching for ".$h['tagname']."at ".$node);
+                                               if ($this->ComonData != "")
+                                                               $value = $this->convert_data($this->ComonData[$node['hostname']][$h['tagname']], $h['tagname']);
+                                               else
+                                                       $value = "n/a";
+
+                                                       $table->cell($value,array('name'=>$h['header'], 'display'=>'table-cell'));
+                                               //$node_string.= "\"".$value."\",";
+                               } else if ($h['source'] == "tophat") {
+                                       if ($this->TopHatData != "")
+                                                       $value = $this->convert_data($this->TopHatData[$node['hostname']][$h['tagname']], $h['type']);
+                                       else
+                                               $value = "n/a";
+
+                                       $table->cell($value,array('name'=>$h['header'], 'display'=>'table-cell'));
+                                       //$node_string.= "\"".$value."\",";
+                               } else {
+                                       //$value = $node[$h['tagname']];
+                                       $value = $this->convert_data($node[$h['tagname']], $h['type']);
+                                       $table->cell($value,array('name'=>$h['header'], 'display'=>'table-cell'));
+                               //$node_string.= "\"".$value."\",";
+                               }
+                       } else if (get_array($node, $h['tagname'])) {
+                               $value = $this->convert_data($node[$h['tagname']], $h['type']);
+                               $table->cell($value, array('name'=>$h['header'], 'display'=>'none'));
+                       } else {
+                               $table->cell("n/a", array('name'=>$h['header'], 'display'=>'none'));
+                       }
+               }
        }
-       else
-               if ($node[$h['fetched']])
-                       $table->cell("n/a", array('name'=>$h['header'], 'display'=>'none'));
-               else
-                       $table->cell("??", array('name'=>$h['header'], 'display'=>'none'));
-}
-}
 
 }
 
@@ -468,22 +440,16 @@ HTML
 
 function javascript_init() {
 
-print("<input type='hidden' id='selected_reference_node' value='".$this->reference_node."' />");
-
-print("<script type='text/javascript'>");
-print("highlightOption('AU');");
-print("overrideTitles();");
-print("</script>");
+       print("<script type='text/javascript'>");
+       print("highlightOption('AU');");
+       print("overrideTitles();");
+       print("</script>");
 
 }
 
 function quickselect_html() {
 
-//return '<p>This link uses the onclick event handler.<br><a href="#" onclick="setVisible(\'quicklist\');return false" target="_self">Open popup</a></p>';
-
-
 $quickselection = "<select id='quicklist' onChange=changeSelectStatus(this.value)><option value='0'>Short column descriptions and quick add/remove</option>";
-//$quickselection = "<select id='quicklist'><option value='0'>Short column descriptions and quick add/remove</option>";
 $prev_label="";
 $optionclass = "out";
 foreach ($this->all_headers as $h)
@@ -497,27 +463,19 @@ foreach ($this->all_headers as $h)
                $disabled = "";
 
         if ($this->headerIsVisible($h['label']))
-       {
                        $optionclass = "in";
-               //$selected = "selected=selected";
-       }
        else
-       {
                        $optionclass = "out";
-               //$selected = "";
-       }
 
        if ($prev_label == $h['label'])
                continue;
 
        $prev_label = $h['label'];
 
+       $quickselection.="<option id='option'".$h['label']." class='".$optionclass."' value='".$h['label']."'><span class='bold'>".$h['label']."</span>:&nbsp;".$h['title']."</option>";
 
-//$quickselection.="<option onclick=\"debugfilter('here2');removeSelectHandler(this);\" id='option'".$h['label']." class='".$optionclass."' value='".$h['label']."'><b>".$h['label']."</b>:&nbsp;".$h['title']."</option>";
-$quickselection.="<option id='option'".$h['label']." class='".$optionclass."' value='".$h['label']."'><b>".$h['label']."</b>:&nbsp;".$h['title']."</option>";
 }
 
-
 $quickselection.="</select>";
 
 return $quickselection;
@@ -532,24 +490,23 @@ if ($showDescription)
 else
        $table_width = 350;
 
-print("<table align=center cellpadding=10 width=".$table_width.">");
-print("<tr><th>Add/remove columns</th>");
+print("<table class='center' width='".$table_width."px'>");
+print("<tr><th class='top'>Add/remove columns</th>");
 
 if ($showDescription)
-       print("<th>Column description and configuration</th>");
+       print("<th class='top'>Column description and configuration</th>");
 
-print("</tr><tr><td valign=top width=300>");
+       print("</tr><tr><td class='top' width='300px'>");
 
-       print('<div id="scrolldiv" style="border : solid 2px grey; padding:4px; width:300px; height:180px; overflow:auto;">');
-print ("<table>");
+       print('<div id="scrolldiv">');
+       print ("<table>");
        $prev_label="";
        $optionclass = "out";
-       foreach ($this->all_headers as $h)
-       {
+       foreach ($this->all_headers as $h) {
                if ($h['header'] == "hostname" || $h['header'] == "ID")
                        continue;
 
-               if ($h['fixed'])
+               if (get_array($h, 'fixed'))
                        $disabled = "disabled=true";
                else
                        $disabled = "";
@@ -577,18 +534,17 @@ print ("<table>");
                $prev_label = $h['label'];
                $period = $this->get_selected_period($h['label']);
 
-//<input type='hidden' id='fdesc".$h['label']."' value='".$h['description']."'></input>
                print ("<tr><td>
 <input type='hidden' id='fetched".$h['label']."' value=',".$period.",".$fetch."'></input>
 <input type='hidden' id='period".$h['label']."' value='".$period."'></input>
 <input type='hidden' id='type".$h['label']."' value='".$h['type']."'></input>
 <input type='hidden' id='source".$h['label']."' value='".$h['source']."'></input>
                <div id='".$h['label']."' name='columnlist' class='".$optionclass."' onclick='highlightOption(this.id)'>
-<table width=280 id='table".$h['label']."'><tr>
-<td bgcolor=#CAE8EA align=center width=30><b><span style='color:#3399CC'>".$h['label']."</span></b></td> 
-<td align=left>&nbsp;<span style='height:10px' id ='htitle".$h['label']."'>".$h['title']."</span>&nbsp;</td>
-<td align=right width=20>&nbsp;<span style='height:10px' id ='loading".$h['label']."'></span>&nbsp;</td>
-<td align=right width=20><input id='check".$h['label']."' name='".$h['tagname']."' type='checkbox' ".$selected." ".$disabled." autocomplete='off' value='".$h['label']."' onclick='changeCheckStatus(this.id)'></input></td>
+<table class='columnlist' id='table".$h['label']."'><tr>
+<td class='header'><span class='header'>".$h['label']."</span></td>
+<td align=left>&nbsp;<span class='short' id ='htitle".$h['label']."'>".$h['title']."</span>&nbsp;</td>
+<td class='smallright'>&nbsp;<span class='short' id ='loading".$h['label']."'></span>&nbsp;</td>
+<td class='smallright'><input id='check".$h['label']."' name='".$h['tagname']."' type='checkbox' ".$selected." ".$disabled." autocomplete='off' value='".$h['label']."' onclick='changeCheckStatus(this.id)'></input></td>
 </tr></table></div></td></tr>");
        }
 
@@ -596,18 +552,11 @@ print ("<table>");
 
 if ($showDescription)
 {
-       print("<td valign=top width=400>");
-       print("<div class='myslice' id='selectdescr'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div></td>");
+       print("<td class='top' width='400px'>");
+       print("<div id='selectdescr'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div></td>");
 }
 
 print("</tr>");
-//print("<tr><td align=center>");
-//print("<input type='button' value='Reset' onclick=resetCols('previousConf') />");
-//print("<input type='button' value='Default' onclick=saveConfiguration('defaultConf') />");
-//print("<input type='button' value='Reset table' onclick=\"resetConfiguration()\" />");
-//print("</td>");
-//print("&nbsp;<input type='button' value='Save configuration' onclick=saveConfiguration('column_configuration') />");
-//print("&nbsp;<input type='button' id='fetchbutton' onclick='fetchData()' value='Fetch data' disabled=true /> </td>");
 
 if ($showDescription)
        print("<td></td>");
@@ -636,9 +585,9 @@ EOF;
 
   function column_html ($colHeader, $colName, $colId, $fulldesc, $visible) {
 
-       if ($visible) 
+       if ($visible)
                $display = 'display:table-cell';
-       else 
+       else
                $display = 'color:red;display:none';
 
     return "
@@ -659,21 +608,6 @@ EOF;
   }
 
 
-function graph_html($colHeader) {
-
-       return "<p><img src='/planetlab/slices/graph.png' width='20' align='BOTTOM'><input type='checkbox' id='graph".$colHeader."'></input> Show details on mouse over";
-
-       }
-
-function threshold_html($colHeader) {
-
-       $updatecall = "updateColumnThreshold('".$colHeader."',window.document.getElementById('min".$colHeader."').value,window.document.getElementById('max".$colHeader."').value);";
-
-       $bubble="<b>Grey-out values between</b>  <input type='text' id='min".$colHeader."' size='2' value='5'> (low) and <input type='text' id='max".$colHeader."' size='2' value='90'> (high) <input type='submit' value='Update' onclick=".$updatecall.">&nbsp;</input>"; 
-
-       return $bublle;
-}
-
 
 /*