From 25e25d5eaa8a6d80e6b9dd4ef30e8d71aaa80d97 Mon Sep 17 00:00:00 2001 From: Adam Amstrong Date: Sun, 9 Mar 2008 23:22:34 +0000 Subject: [PATCH] Add missing pages git-svn-id: http://www.observium.org/svn/observer/trunk@131 61d68cd4-352d-0410-923a-c4978735b2b8 --- html/pages/customers.php | 1 + html/pages/storage.php | 53 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 html/pages/storage.php diff --git a/html/pages/customers.php b/html/pages/customers.php index 52077dac1c..bd97428be2 100644 --- a/html/pages/customers.php +++ b/html/pages/customers.php @@ -8,6 +8,7 @@ echo(""); + while($interface = mysql_fetch_array($query)) { $device = &$interface; diff --git a/html/pages/storage.php b/html/pages/storage.php new file mode 100644 index 0000000000..61c953a050 --- /dev/null +++ b/html/pages/storage.php @@ -0,0 +1,53 @@ += '5') { + $sql = "SELECT * FROM `storage` AS S, `devices` AS D WHERE S.host_id = D.device_id ORDER BY D.hostname, S.hrStorageDescr"; +} else { + $sql = "SELECT * FROM `storage` AS S, `devices` AS D, devices_perms as P WHERE D.host_id = D.device_id AND "; + $sql .= "D.device_id = P.device_id AND P.user_id = '" . $_SESSION['user_id'] . "' ORDER BY D.hostname, S.hrStorageDescr"; +} + +$query = mysql_query($sql); + +echo("
"); + +echo(" + + + + + + + "); + +$row = 1; + +while($drive = mysql_fetch_array($query)) { + + if(is_integer($row/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; } + + $total = $drive['hrStorageSize'] * $drive['hrStorageAllocationUnits']; + $used = $drive['hrStorageUsed'] * $drive['hrStorageAllocationUnits']; + $perc = round($drive['storage_perc'], 0); + $total = formatStorage($total); + $used = formatStorage($used); + + $store_url = "graph.php?id=" . $drive['storage_id'] . "&type=unixfs&from=$month&to=$now&width=400&height=125"; + $store_popup = "onmouseover=\"return overlib('', LEFT);\" onmouseout=\"return nd();\""; + + $drv_colour = percent_colour($perc); + + echo(""); + + + $row++; + +} + +echo("
DeviceStorageUsageSizeUsed
" . generatedevicelink($drive) . "" . $drive['hrStorageDescr'] . " + + " . $perc . "%" . $total . "" . $used . "
"); + + +?> +