mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-28 16:04:35 +02:00
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:
@@ -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("."); }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user