Merge pull request #1056 from paulgear/master

A couple more minor fixes for storage graphs
This commit is contained in:
Neil Lathwood
2015-05-18 15:03:27 +01:00
2 changed files with 5 additions and 6 deletions

View File

@ -60,14 +60,13 @@ foreach (dbFetchRows($sql,$param) as $drive) {
$graph_array_zoom['width'] = "400";
$link = "graphs/id=" . $graph_array['id'] . "/type=" . $graph_array['type'] . "/from=" . $graph_array['from'] . "/to=" . $graph_array['to'] . "/";
$mini_graph = overlib_link($link, generate_graph_tag($graph_array), generate_graph_tag($graph_array_zoom), NULL);
$bar_link = overlib_link($link, print_percentage_bar (400, 20, $perc, "$used / $total", "ffffff", $background['left'], $free, "ffffff", $background['right']), generate_graph_tag($graph_array_zoom), NULL);
$background = get_percentage_colours($perc);
$bar_link = overlib_link($link, print_percentage_bar (400, 20, $perc, "$used / $total", "ffffff", $background['left'], $free, "ffffff", $background['right']), generate_graph_tag($graph_array_zoom), NULL);
$response[] = array('hostname' => generate_device_link($drive),
'storage_descr' => $drive['storage_descr'],
'graph' => $mini_graph,
'storage_size' => $bar_link,
'storage_used' => $bar_link,
'storage_perc' => $perc . "%");
if ($_POST['view'] == "graphs") {
$graph_array['height'] = "100";
@ -82,7 +81,7 @@ foreach (dbFetchRows($sql,$param) as $drive) {
$response[] = array('hostname' => $graph_data[0],
'storage_descr' => $graph_data[1],
'graph' => $graph_data[2],
'storage_size' => $graph_data[3],
'storage_used' => $graph_data[3],
'storage_perc' => '');
} # endif graphs

View File

@ -5,8 +5,8 @@
<th data-column-id="hostname">Device</th>
<th data-column-id="storage_descr">Storage</th>
<th data-column-id="graph" data-sortable="false" data-searchable="false"></th>
<th data-column-id="storage_size" data-searchable="false">Usage</th>
<th data-column-id="storage_perc" data-searchable="false">Used</th>
<th data-column-id="storage_used" data-searchable="false">Used</th>
<th data-column-id="storage_perc" data-searchable="false">Usage</th>
</tr>
</thead>
</table>