mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Added service description to option drop down for editing and deleting services to make it easier to distinguish between services.
This commit is contained in:
@@ -13,7 +13,14 @@ else {
|
||||
}
|
||||
|
||||
foreach (dbFetchRows('SELECT * FROM `services` AS S, `devices` AS D WHERE S.device_id = D.device_id ORDER BY hostname') as $device) {
|
||||
$servicesform .= "<option value='".$device['service_id']."'>".$device['service_id'].'.'.$device['hostname'].' - '.$device['service_type'].'</option>';
|
||||
$service_description = '';
|
||||
|
||||
if (!empty($device['service_desc'])) {
|
||||
$service_description = ' - ' . substr($device['service_desc'], 0, 30);
|
||||
}
|
||||
|
||||
$servicesform .= "<option value='".$device['service_id']."'>".$device['hostname'].' - '.$device['service_type'].$service_description.'</option>';
|
||||
|
||||
}
|
||||
|
||||
if ($updated) {
|
||||
@@ -26,7 +33,7 @@ else {
|
||||
<input type=hidden name='delsrv' value='yes'>
|
||||
<div class='well well-lg'>
|
||||
<div class='form-group'>
|
||||
<label for='service' class='col-sm-2 control-label'>Device - Service</label>
|
||||
<label for='service' class='col-sm-2 control-label'>Device - Service - Description (if populated)</label>
|
||||
<div class='col-sm-5'>
|
||||
<select name='service' id='service' class='form-control input-sm'>
|
||||
$servicesform
|
||||
|
||||
@@ -13,7 +13,13 @@ else {
|
||||
}
|
||||
|
||||
foreach (dbFetchRows('SELECT * FROM `services` AS S, `devices` AS D WHERE S.device_id = D.device_id ORDER BY hostname') as $device) {
|
||||
$servicesform .= "<option value='".$device['service_id']."'>".$device['hostname'].' - '.$device['service_type'].'</option>';
|
||||
$service_description = '';
|
||||
|
||||
if (!empty($device['service_desc'])) {
|
||||
$service_description = ' - ' . substr($device['service_desc'], 0, 30);
|
||||
}
|
||||
|
||||
$servicesform .= "<option value='".$device['service_id']."'>".$device['hostname'].' - '.$device['service_type'].$service_description.'</option>';
|
||||
}
|
||||
|
||||
if ($updated) {
|
||||
@@ -30,7 +36,7 @@ else {
|
||||
<input type=hidden name='delsrv' value='yes'>
|
||||
<div class='well well-lg'>
|
||||
<div class='form-group'>
|
||||
<label for='service' class='col-sm-2 control-label'>Device - Service</label>
|
||||
<label for='service' class='col-sm-2 control-label'>Device - Service - Description (if populated)</label>
|
||||
<div class='col-sm-5'>
|
||||
<select name='service' id='service' class='form-control input-sm'>
|
||||
$servicesform
|
||||
|
||||
Reference in New Issue
Block a user