From a2c8669bc00ca1e779d7cd871e59712ff9ce5089 Mon Sep 17 00:00:00 2001 From: Paul Gear Date: Mon, 18 May 2015 21:51:00 +1000 Subject: [PATCH 1/2] Additional fix for sorting by total used storage column --- html/includes/table/storage.inc.php | 4 ++-- html/pages/health/storage.inc.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/html/includes/table/storage.inc.php b/html/includes/table/storage.inc.php index fc5486fc19..4116bb7694 100644 --- a/html/includes/table/storage.inc.php +++ b/html/includes/table/storage.inc.php @@ -67,7 +67,7 @@ foreach (dbFetchRows($sql,$param) as $drive) { $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 +82,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 diff --git a/html/pages/health/storage.inc.php b/html/pages/health/storage.inc.php index 29d6f7961e..8df6deeb45 100644 --- a/html/pages/health/storage.inc.php +++ b/html/pages/health/storage.inc.php @@ -5,8 +5,8 @@ Device Storage - Usage - Used + Used + Usage From 2285f8c2e8a14b25e17507aab98aef7b70446e2f Mon Sep 17 00:00:00 2001 From: Paul Gear Date: Mon, 18 May 2015 22:59:14 +1000 Subject: [PATCH 2/2] Fix first colour in storage graph being wrong --- html/includes/table/storage.inc.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/html/includes/table/storage.inc.php b/html/includes/table/storage.inc.php index 4116bb7694..8d7fd548df 100644 --- a/html/includes/table/storage.inc.php +++ b/html/includes/table/storage.inc.php @@ -60,9 +60,8 @@ 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'],