much much much much much much prettier percentage bars and some moving around of overview page.

git-svn-id: http://www.observium.org/svn/observer/trunk@832 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2010-02-13 23:55:56 +00:00
parent 05735f4d55
commit 3c42f22dcf
9 changed files with 51 additions and 80 deletions
+4 -1
View File
@@ -23,6 +23,7 @@
if (isset($config['ignore_mount_network']) && $config['ignore_mount_network'] && $fstype == "hrStorageNetworkDisk") { $allow = 0; if ($debug) echo("network, skipping\n"); }
$descr = str_replace("mounted on: ", "", $descr);
$descr = preg_replace("/: [A-Za-z0-9_]+ file system, /", ", ", $descr);
echo("$fstype");
if($size > '0' && $allow) {
if(mysql_result(mysql_query("SELECT count(storage_id) FROM `storage` WHERE hrStorageIndex = '$hrStorageIndex' AND host_id = '".$device['device_id']."'"),0) == '0') {
@@ -32,10 +33,12 @@
echo("+");
} else {
$data = mysql_fetch_array(mysql_query("SELECT * FROM `storage` WHERE hrStorageIndex = '$hrStorageIndex' AND host_id = '".$device['device_id']."'"));
if($data['hrStorageDescr'] != $descr || $data['hrStorageSize'] != $size || $data['hrStorageAllocationUnits'] != $units ) {
if($data['hrStorageDescr'] != $descr || $data['hrStorageSize'] != $size || $data['hrStorageAllocationUnits'] != $units || $data['hrStorageType'] != $fstype) {
$query = "UPDATE storage SET `hrStorageDescr` = '$descr', `hrStorageType` = '$fstype', `hrStorageSize` = '$size', `hrStorageAllocationUnits` = '$units' ";
$query .= ", `hrStorageType` = '$fstype' ";
$query .= "WHERE hrStorageIndex = '$hrStorageIndex' AND host_id = '".$device['device_id']."'";
echo("U");
if($debug) { echo("$query \n"); }
mysql_query($query);
} else { echo("."); }
}