Changeset 123 for trunk/web

Show
Ignore:
Timestamp:
08/06/10 16:38:36 (12 years ago)
Author:
andreu
Message:

add TIPs in matrix

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/web/data/datamatrix.php

    r122 r123  
    4343foreach ($IDR_hash as $keyIDR => $valueIDR) { 
    4444  if ($keyIDR) { 
    45     $MATRIX_TABLE_INBUILT.= " <th> $keyIDR </th>\n"; 
     45    $MATRIX_TABLE_INBUILT.= " <th>_$keyIDR _</th>\n"; 
    4646  } 
    4747} 
     
    5151foreach ($IDR_hash as $keyIDR => $valueIDR) { 
    5252  if ($keyIDR) { 
    53     $MATRIX_TABLE_INBUILT.= " <tr>  <th> $keyIDR </th> "; 
     53    $MATRIX_TABLE_INBUILT.= " <tr>  <th>_$keyIDR _</th> "; 
    5454    foreach ($IDR_hash2 as $keyIDR2 => $valueIDR2) { 
    5555      ## get rrd file value 
    5656      if ($keyIDR2) { 
    57         $rrdfilename = $rrdmatrixpath.$CONF_MATRIX_RRD_LOCATION.$keyIDR."_".$keyIDR2.".rrd"; 
    58         $res = `rrdtool fetch $rrdfilename -s -600 AVERAGE | grep -v nan | grep ":" `; 
    59         $ressplit = split(" ", $res); 
    60         ## FIXME *10 
    61         $bytes = number_format($ressplit[2]*10*8/300/1000000,0," "," "); 
    62         $MATRIX_TABLE_INBUILT.= " <td> $bytes </td> "; 
     57          $rrdfilename = $rrdmatrixpath.$CONF_MATRIX_RRD_LOCATION.$keyIDR."_".$keyIDR2.".rrd"; 
     58          $res = `rrdtool fetch $rrdfilename -s -600 AVERAGE | grep -v nan | grep ":" `; 
     59          $ressplit = split(" ", $res); 
     60          ## FIXME *10 
     61          $bytes = number_format($ressplit[2]*10*8/300/1000000,0," "," "); 
     62          $MATRIX_TABLE_INBUILT.= " <td> "; 
     63        if ($keyIDR2 == $keyIDR) { 
     64          $MATRIX_TABLE_INBUILT.= " - "; 
     65        } else { 
     66          $MATRIX_TABLE_INBUILT.= "  <div id=\"tipbox\"> \n"; 
     67          $MATRIX_TABLE_INBUILT.= "<a href=\"\"> $bytes </a>\n"; 
     68          $MATRIX_TABLE_INBUILT.= "<div>\n"; 
     69          $tmp2 = $CONFrouter_name[$keyIDR]; 
     70          $tmp3 = $CONFrouter_name[$keyIDR2]; 
     71          $MATRIX_TABLE_INBUILT.= " $tmp2 -> $tmp3 "; 
     72          $MATRIX_TABLE_INBUILT.= "</div>\n"; 
     73          $MATRIX_TABLE_INBUILT.= "</div>\n"; 
     74        } 
     75          $MATRIX_TABLE_INBUILT.= "</td> "; 
    6376      } 
    6477    }