mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
bug: Fixed deletion of services + select query (#8030)
GROUP BY was missing a field, causing the page to not populate Rows were missing their ID, causing them to stay there when deleted.
This commit is contained in:
committed by
Neil Lathwood
co-authored by
Neil Lathwood
parent
181fe201fd
commit
9b392041f4
@@ -122,10 +122,10 @@ require_once 'includes/modal/delete_service.inc.php';
|
||||
<div class="row col-sm-12"><span id="message"></span></div>
|
||||
<?php
|
||||
if ($_SESSION['userlevel'] >= '5') {
|
||||
$host_sql = 'SELECT `D`.`device_id`,`D`.`hostname`,`D`.`sysName` FROM devices AS D, services AS S WHERE D.device_id = S.device_id GROUP BY `D`.`hostname`, `D`.`device_id` ORDER BY D.hostname';
|
||||
$host_sql = 'SELECT `D`.`device_id`,`D`.`hostname`,`D`.`sysName` FROM devices AS D, services AS S WHERE D.device_id = S.device_id GROUP BY `D`.`hostname`, `D`.`device_id`, `D`.`sysName` ORDER BY D.hostname';
|
||||
$host_par = array();
|
||||
} else {
|
||||
$host_sql = 'SELECT `D`.`device_id`,`D`.`hostname`,`D`.`sysName` FROM devices AS D, services AS S, devices_perms AS P WHERE D.device_id = S.device_id AND D.device_id = P.device_id AND P.user_id = ? GROUP BY `D`.`hostname`, `D`.`device_id` ORDER BY D.hostname';
|
||||
$host_sql = 'SELECT `D`.`device_id`,`D`.`hostname`,`D`.`sysName` FROM devices AS D, services AS S, devices_perms AS P WHERE D.device_id = S.device_id AND D.device_id = P.device_id AND P.user_id = ? GROUP BY `D`.`hostname`, `D`.`device_id`, `D`.`sysName` ORDER BY D.hostname';
|
||||
$host_par = array($_SESSION['user_id']);
|
||||
}
|
||||
|
||||
@@ -180,7 +180,7 @@ require_once 'includes/modal/delete_service.inc.php';
|
||||
}
|
||||
$head = false;
|
||||
?>
|
||||
<tr>
|
||||
<tr id="row_<?php echo $service['service_id']; ?>">
|
||||
<td><span data-toggle='tooltip' title='<?php echo $title ?>'
|
||||
class='alert-status <?php echo $label ?>'> </span></td>
|
||||
<td><?php echo nl2br(display($service['service_type'])) ?></td>
|
||||
|
||||
Reference in New Issue
Block a user