Show display name in Oxidized config search (#14800)

This commit is contained in:
electrocret
2023-01-26 09:18:55 -06:00
committed by GitHub
parent 8d49e72f22
commit d01538dd8f
2 changed files with 3 additions and 0 deletions

View File

@@ -10,6 +10,7 @@
* @copyright (C) 2013 LibreNMS Group
*/
use App\Facades\DeviceCache;
use LibreNMS\Config;
use LibreNMS\Enum\ImageFormat;
use LibreNMS\Util\Number;
@@ -923,6 +924,7 @@ function search_oxidized_config($search_in_conf_textbox)
foreach ($nodes as &$n) {
$dev = device_by_name($n['node']);
$n['dev_id'] = $dev ? $dev['device_id'] : false;
$n['full_name'] = $n['dev_id'] ? DeviceCache::get($n['dev_id'])->displayName() : $n['full_name'];
}
/*