mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
webui: Added an empty option for delete device selection, and a minor db performance fix (#7018)
* webui: Added an empty option, also minor performance fix on the db query * Added missing backtick * Added html options per Laf's suggestion
This commit is contained in:
committed by
Neil Lathwood
parent
039e410d6d
commit
550e412808
@@ -57,8 +57,9 @@ if ($_SESSION['userlevel'] == 11) {
|
||||
<label for="id" class="col-sm-2 control-label">Device:</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="id" class="form-control" id="id">
|
||||
<option disabled="disabled" selected="selected">Please select</option>
|
||||
<?php
|
||||
foreach (dbFetchRows("SELECT * FROM `devices` ORDER BY `hostname`") as $data) {
|
||||
foreach (dbFetchRows("SELECT `device_id`, `hostname` FROM `devices` ORDER BY `hostname`") as $data) {
|
||||
echo("<option value='".$data['device_id']."'>".$data['hostname']."</option>");
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user