mirror of
https://github.com/librenms/librenms.git
synced 2024-09-21 10:28:13 +00:00
show device group on device overview (#15338)
* show device group on device overview * . * better styling on device group display
This commit is contained in:
parent
6e592f99c1
commit
5c9f3c80e5
@ -13,6 +13,24 @@
|
||||
* @author LibreNMS Contributors
|
||||
*/
|
||||
|
||||
function show_device_group($device_group_id) {
|
||||
$device_group_name = DB::table('device_groups')->where('id', $device_group_id)->value('name');
|
||||
?>
|
||||
<div class="panel-heading">
|
||||
<span class="devices-font-bold">
|
||||
<?php
|
||||
if ($device_group_id == 'none') {
|
||||
echo "ungrouped Devices";
|
||||
} elseif ($device_group_id) {
|
||||
echo "Device Group: ";
|
||||
}
|
||||
?>
|
||||
</span>
|
||||
<?php echo $device_group_name ?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
$pagetitle[] = 'Devices';
|
||||
|
||||
if (! isset($vars['format'])) {
|
||||
@ -199,6 +217,7 @@ if ($format == 'graph') {
|
||||
$where = substr($where, 0, strlen($where) - 3);
|
||||
$where .= ' )';
|
||||
}
|
||||
show_device_group($vars['group']);
|
||||
|
||||
$query = 'SELECT * FROM `devices` LEFT JOIN `locations` ON `devices`.`location_id` = `locations`.`id` WHERE 1';
|
||||
|
||||
@ -289,6 +308,7 @@ if ($format == 'graph') {
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<?php show_device_group($vars['group']); ?>
|
||||
<table id="devices" class="table table-hover table-condensed table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
|
Loading…
Reference in New Issue
Block a user