mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
* little title fix * Update dev-groups-overview-data.inc.php * Update dev-groups-overview-data.inc.php Co-authored-by: PipoCanaja <38363551+PipoCanaja@users.noreply.github.com>
26 lines
1.0 KiB
PHP
26 lines
1.0 KiB
PHP
<?php
|
|
|
|
$device_groups="";
|
|
foreach (dbFetchRows("select dg.id, dg.name from devices d, device_group_device g, device_groups dg where dg.id=g.device_group_id and g.device_id=d.device_id and d.hostname=? order by dg.name", array($device['hostname'])) as $groups) {
|
|
$device_groups .= (empty($device_groups) ? "" : str_repeat(" ", 4)) . '<a class="list-device" href="/devices/group=' . $groups['id'] . '" target="_blank">' . $groups['name'] . '</a>';
|
|
}
|
|
|
|
if (!empty($device_groups)) {
|
|
echo "<div class='row'>
|
|
<div class='col-md-12'>
|
|
<div class='panel panel-default panel-condensed device-overview'>
|
|
<div class='panel-heading'>";
|
|
echo '<a href="/device-groups">';
|
|
echo '<i class="fa fa-th fa-lg icon-theme" aria-hidden="true"></i><strong>Device Group Membership</strong>';
|
|
echo '</a></div><div class="panel-body">';
|
|
|
|
echo '<div class="row">
|
|
<div class="col-sm-12">' . $device_groups . '</div>
|
|
</div>';
|
|
|
|
echo "</div>
|
|
</div>
|
|
</div>
|
|
</div>";
|
|
}
|