mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Add Size column to edit Storage Settings table (#11164)
* add storage_size * capitalize Settings to match Device Settings, SNMP Settings, etc.
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
|
||||
?>
|
||||
|
||||
<h3>Storage settings</h3>
|
||||
<h3>Storage Settings</h3>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table id="storage" class="table table-hover table-condensed storage">
|
||||
@@ -22,6 +22,7 @@
|
||||
<tr>
|
||||
<th data-column-id="hostname">Device</th>
|
||||
<th data-column-id="storage_descr">Storage</th>
|
||||
<th data-column-id="storage_size">Size</th>
|
||||
<th data-column-id="storage_perc">%</th>
|
||||
<th data-column-id="storage_perc_warn" data-formatter="perc_update" data-header-css-class="edit-storage-input">% Warn</th>
|
||||
</tr>
|
||||
|
@@ -37,12 +37,15 @@ $sql = "SELECT * $sql";
|
||||
foreach (dbFetchRows($sql, $param) as $drive) {
|
||||
$perc = round($drive['storage_perc'], 0);
|
||||
$perc_warn = round($drive['storage_perc_warn'], 0);
|
||||
$size = formatStorage($drive['storage_size']);
|
||||
$response[] = array(
|
||||
'storage_id' => $drive['storage_id'],
|
||||
'hostname' => generate_device_link($drive),
|
||||
'storage_descr' => $drive['storage_descr'],
|
||||
'storage_perc' => $perc . "%",
|
||||
'storage_perc_warn' => $perc_warn);
|
||||
'storage_perc_warn' => $perc_warn,
|
||||
'storage_size' => $size
|
||||
);
|
||||
}
|
||||
|
||||
$output = array('current'=>$current,'rowCount'=>$rowCount,'rows'=>$response,'total'=>$total);
|
||||
|
Reference in New Issue
Block a user