Files
librenms-librenms/includes/html/dev-groups-overview-data.inc.php
T

32 lines
1.2 KiB
PHP
Raw Normal View History

2020-06-10 13:38:33 +03:00
<?php
2020-09-21 15:59:34 +02:00
$device_groups = dbFetchRows('SELECT dg.id, dg.name FROM device_group_device AS d, device_groups AS dg WHERE dg.id=d.device_group_id AND d.device_id=? ORDER BY dg.name', [$device['device_id']]);
2020-06-10 13:38:33 +03:00
2020-06-11 11:12:16 +02:00
if (count($device_groups)) {
?>
<div class='row'>
2020-06-10 13:38:33 +03:00
<div class='col-md-12'>
2020-06-11 11:12:16 +02:00
<div class='panel panel-default panel-condensed device-overview'>
<div class='panel-heading'>
<a href="<?=url('device-groups')?>">
2020-06-11 11:12:16 +02:00
<i class="fa fa-th fa-lg icon-theme" aria-hidden="true"></i>
<strong>Device Group Membership</strong>
</a>
</div>
<div class="panel-body">
<div class="row">
<div class="col-sm-12">
<?php foreach ($device_groups as $group) { ?>
<span style="margin: 8px;">
<a href="<?=url('devices/group=' . $group['id'])?>" target="_blank"><?=$group['name']?></a>
2020-06-11 11:12:16 +02:00
</span>
<?php } ?>
</div>
</div>
</div>
</div>
2020-06-10 13:38:33 +03:00
</div>
2020-06-11 11:12:16 +02:00
</div>
<?php
2020-06-10 13:38:33 +03:00
}