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:
Mathieu Poussin
2019-12-20 21:21:31 +01:00
committed by PipoCanaja
parent 5015a49b6d
commit 15e29a49b1
2 changed files with 5 additions and 5 deletions

View File

@@ -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),

View File

@@ -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>