From 8cd587755fd092e53b7ec18b5991965f8b544ef6 Mon Sep 17 00:00:00 2001 From: laf Date: Sat, 16 May 2015 21:04:59 +0100 Subject: [PATCH] Final version for storage page --- html/includes/table/storage.inc.php | 30 ++++++++++++++++++++--------- html/pages/health/storage.inc.php | 17 +++++----------- 2 files changed, 26 insertions(+), 21 deletions(-) diff --git a/html/includes/table/storage.inc.php b/html/includes/table/storage.inc.php index 89dd88bd91..0aa5962595 100644 --- a/html/includes/table/storage.inc.php +++ b/html/includes/table/storage.inc.php @@ -1,6 +1,22 @@ > /tmp/testing"); foreach (dbFetchRows($sql,$param) as $drive) { - if (device_permitted($drive['device_id'])) { $skipdrive = 0; if ($drive["os"] == "junos") { @@ -72,13 +86,12 @@ foreach (dbFetchRows($sql,$param) as $drive) { $background = get_percentage_colours($perc); - $response[] = array('device_id' => generate_device_link($drive), + $response[] = array('hostname' => generate_device_link($drive), 'storage_descr' => $drive['storage_descr'], 'graph' => $mini_graph, - 'usage' => $bar_link, + 'storage_size' => $bar_link, 'storage_used' => $perc . "%"); if ($_POST['view'] == "graphs") { - system("echo 'test' >> /tmp/testing"); $graph_array['height'] = "100"; $graph_array['width'] = "216"; $graph_array['to'] = $config['time']['now']; @@ -88,14 +101,13 @@ foreach (dbFetchRows($sql,$param) as $drive) { $return_data = true; include("includes/print-graphrow.inc.php"); unset($return_data); - $response[] = array('device_id' => $graph_data[0], + $response[] = array('hostname' => $graph_data[0], 'storage_descr' => $graph_data[1], 'graph' => $graph_data[2], - 'usage' => $graph_data[3], + 'storage_size' => $graph_data[3], 'storage_used' => ''); } # endif graphs - } } $output = array('current'=>$current,'rowCount'=>$rowCount,'rows'=>$response,'total'=>$total); diff --git a/html/pages/health/storage.inc.php b/html/pages/health/storage.inc.php index 320c566c6f..949e5e4f50 100644 --- a/html/pages/health/storage.inc.php +++ b/html/pages/health/storage.inc.php @@ -1,20 +1,12 @@ - -
- + - - - + + +
DeviceDevice StorageUsageUsedUsageUsed
@@ -23,6 +15,7 @@ echo $vars['view'];