Use Device displayname on VRF page (#14851)

* Use displayname

* Style

* Style
This commit is contained in:
electrocret 2023-02-20 17:40:18 -06:00 committed by GitHub
parent b6df8b0116
commit a21c6ec91c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,5 +1,6 @@
<?php
use App\Facades\DeviceCache;
use LibreNMS\Config;
if (! Auth::user()->hasGlobalRead()) {
@ -122,7 +123,7 @@ if (! Auth::user()->hasGlobalRead()) {
echo "<tr bgcolor='$dev_colour'><td width=150><a href='";
echo \LibreNMS\Util\Url::generate(['page' => 'device'], ['device' => $device['device_id'], 'tab' => 'routing', 'view' => 'basic', 'proto' => 'vrf']);
echo "'>" . $device['hostname'] . '</a> ';
echo "'>" . DeviceCache::get($device['device_id'])->displayName() . '</a> ';
if ($device['vrf_name'] != $vrf['vrf_name']) {
echo "<a href='#' onmouseover=\" return overlib('Expected Name : " . $vrf['vrf_name'] . '<br />Configured : ' . $device['vrf_name'] . "', CAPTION, '<span class=list-large>VRF Inconsistency</span>' ,FGCOLOR,'#e5e5e5', BGCOLOR, '#c0c0c0', BORDER, 5, CELLPAD, 4, CAPCOLOR, '#050505');\" onmouseout=\"return nd();\"> <i class='fa fa-flag fa-lg' style='color:red' aria-hidden='true'></i></a>";