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:
Joseph Tingiris
2020-02-18 16:13:41 -05:00
committed by GitHub
parent 6a897b5c4a
commit 481363194d
2 changed files with 6 additions and 2 deletions

View File

@@ -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>

View File

@@ -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);