mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
feature: add get_disks function (#6058)
This commit is contained in:
@@ -1472,3 +1472,9 @@ function get_oxidized_nodes_list()
|
||||
</tr>";
|
||||
}
|
||||
}
|
||||
|
||||
// fetches disks for a system
|
||||
function get_disks($device)
|
||||
{
|
||||
return dbFetchRows('SELECT * FROM `ucd_diskio` WHERE device_id = ? ORDER BY diskio_descr', array($device));
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
$storage = dbFetchCell('select count(*) from storage WHERE device_id = ?', array($device['device_id']));
|
||||
$diskio = dbFetchCell('select count(*) from ucd_diskio WHERE device_id = ?', array($device['device_id']));
|
||||
$diskio = get_disks($device['device_id']);
|
||||
$mempools = dbFetchCell('select count(*) from mempools WHERE device_id = ?', array($device['device_id'])) + count_mib_mempools($device);
|
||||
$processor = dbFetchCell('select count(*) from processors WHERE device_id = ?', array($device['device_id'])) + count_mib_processors($device);
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
$row = 1;
|
||||
|
||||
foreach (dbFetchRows('SELECT * FROM `ucd_diskio` WHERE device_id = ? ORDER BY diskio_descr', array($device['device_id'])) as $drive) {
|
||||
foreach (get_disk($device['device_id']) as $drive) {
|
||||
if (is_integer($row / 2)) {
|
||||
$row_colour = $list_colour_a;
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user