mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Use sysName instead of hostname on AJAX search and new billing form (#10951)
* Fix hostname vs sysName on AJAX search and new billing form * Replace sysName by format_hostname()
This commit is contained in:
committed by
PipoCanaja
parent
5015a49b6d
commit
15e29a49b1
@@ -139,7 +139,7 @@ if (isset($_REQUEST['search'])) {
|
||||
'name' => $name,
|
||||
'description' => $description,
|
||||
'colours' => $port_colour,
|
||||
'hostname' => $result['hostname'],
|
||||
'hostname' => format_hostname($result),
|
||||
'port_id' => $result['port_id'],
|
||||
);
|
||||
}//end foreach
|
||||
@@ -196,7 +196,7 @@ if (isset($_REQUEST['search'])) {
|
||||
'bgp_image' => $bgp_image,
|
||||
'remoteas' => $remoteas,
|
||||
'colours' => $port_colour,
|
||||
'hostname' => $result['hostname'],
|
||||
'hostname' => format_hostname($result),
|
||||
);
|
||||
}//end foreach
|
||||
}//end if
|
||||
@@ -235,7 +235,7 @@ if (isset($_REQUEST['search'])) {
|
||||
|
||||
$device[] = array(
|
||||
'name' => $name,
|
||||
'hostname' => $result['hostname'],
|
||||
'hostname' => format_hostname($result),
|
||||
'app_id' => $result['app_id'],
|
||||
'device_id' => $result['device_id'],
|
||||
'colours' => $highlight_colour,
|
||||
@@ -282,7 +282,7 @@ if (isset($_REQUEST['search'])) {
|
||||
|
||||
$device[] = array(
|
||||
'name' => $name,
|
||||
'hostname' => $result['hostname'],
|
||||
'hostname' => format_hostname($result),
|
||||
'device_id' => $result['device_id'],
|
||||
'colours' => $highlight_colour,
|
||||
'device_image' => getIcon($result),
|
||||
|
@@ -47,7 +47,7 @@ if (Auth::user()->hasGlobalAdmin()) {
|
||||
$devices = dbFetchRows('SELECT * FROM `devices` ORDER BY hostname');
|
||||
foreach ($devices as $device) {
|
||||
$selected = $device['device_id'] == $port_device_id ? " selected" : "";
|
||||
echo "<option value='${device['device_id']}' $selected>${device['hostname']}</option>\n";
|
||||
echo "<option value='${device['device_id']}' $selected>" . format_hostname($device) . "</option>\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
|
Reference in New Issue
Block a user