- Improved GetStoredBytesByInterval function returning day (dd/mm) and 0 if no value returned from SQL query
- Revert order of Last 7 days stored bytes (older to newer)
- No legends for bars graph in bgraph.inc.php
- Moved link to last 24 hours Jobs in main layout
- New link to Pools and Volumes in main layout
// Graph title
$this->plot->SetTitle( $this->title );
- //$this->plot->SetLegend(array('Engineering', 'Manufacturing', 'Administration'));
// Setting up legends
- $legends = array();
- foreach( $this->data as $key => $legend ) {
- $this->plot->SetLegend( implode(': ',$legend) );
+ if( $this->type != 'bars' ) {
+ $legends = array();
+ foreach( $this->data as $key => $legend ) {
+ $this->plot->SetLegend( implode(': ',$legend) );
+ }
}
# Turn off X tick labels and ticks because they don't apply here:
$this->plot->SetXTickLabelPos('none');
$this->plot->SetXTickPos('none');
+ $this->plot->SetPlotAreaWorld(NULL, 0, NULL, NULL);
+
$this->plot->DrawGraph();
} // end function Render()
if( PEAR::isError( $result ) ) {
die( "Unable to get Job Bytes from catalog" );
}else{
+ $stored_bytes = 0;
$tmp = $result->fetchRow( DB_FETCHMODE_ASSOC );
- return array( $tmp['EndTime'], $tmp['stored_bytes'] );
+
+ $day = date( "d/m", strtotime($end_date) );
+
+ if( isset( $tmp['stored_bytes'] ) )
+ $stored_bytes = $tmp['stored_bytes'];
+
+ return array( $day, $stored_bytes );
}
}
} // end class Bweb
array_push( $data, $dbSql->GetPoolsStatistics( $pool ) );
}
-echo '<pre>';
-var_dump( $data );
-echo '</pre>';
-
$graph->SetData( $data, 'pie', 'text-data-single' );
$graph->SetGraphSize( 400, 230 );
$graph->Render();
$smarty->assign('graph_pools', $graph->Get_Image_file() );
-// Stored Bytes last 7 days
+// Last 7 days stored Bytes graph
$data = array();
$graph = new BGraph( "graph2.png" );
$days = array();
// Get the last 7 days interval (start and end)
-for( $c = 0 ; $c < 7 ; $c++ ) {
+for( $c = 6 ; $c >= 0 ; $c-- ) {
$today = ( mktime() - ($c * 86400) );
array_push( $days, array( 'start' => date( "Y-m-d 00:00:00", $today ), 'end' => date( "Y-m-d 23:59:00", $today ) ) );
}
array_push( $days_stored_bytes, $dbSql->GetStoredBytesByInterval( $day['start'], $day['end'] ) );
}
-//echo '<pre>';
-//var_dump( $days );
-//echo '</pre>';
-
-echo '<pre>';
-var_dump( $days_stored_bytes );
-echo '</pre>';
-
$graph->SetData( $days_stored_bytes, 'bars', 'text-data' );
$graph->SetGraphSize( 400, 230 );
<div class="box">
<p class="title">Pools and volumes status</p>
<img src="{$graph_pools}" alt="" />
+ <br />
+ <a href="pools.php" title="Show pools and volumes status">Pools and Volumes status</a>
+ <br /> <br />
</div> <!-- end div box -->
<div class="box">
<div class="box">
<p class="title">Job Status Report (last 24 hours)</p>
<img src="{$graph_jobs}" alt="" />
+ <br />
+ <a href="jobs.php" title="Show last 24 hours jobs status">Show last jobs status</a>
+ <br /> <br />
</div> <!-- end div box -->
<form method="get" action="report.php" target="_blank">
<table width="100%" cellpadding="0" cellspacing="3" border="0">
- <tr>
+
+<!--
+<tr>
<td colspan=2 align=center>
- <!-- <a href="javascript:OpenWin('index.php?Full_popup=yes','490','350')">{t}Show details{/t}</a> -->
+ <a href="javascript:OpenWin('index.php?Full_popup=yes','490','350')">{t}Show details{/t}</a>
<a href="jobs.php" title="Show last jobs details">Show last jobs status</a>
</td>
</tr>
+-->
<tr>
<td colspan=2 align=center>
<a href="javascript:OpenWin('index.php?pop_graph1=yes','600','400')">{t}Last month, bytes transferred{/t}</a>