From 23d3f45f6aac924f41484044c8968773527392da Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Tue, 23 Nov 2021 15:56:30 +0000 Subject: [PATCH] work with both ip and hostname device id --- lib/App/Netdisco/Web/Plugin/Device/SNMP.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/App/Netdisco/Web/Plugin/Device/SNMP.pm b/lib/App/Netdisco/Web/Plugin/Device/SNMP.pm index 54db9bca..2b1a3efe 100644 --- a/lib/App/Netdisco/Web/Plugin/Device/SNMP.pm +++ b/lib/App/Netdisco/Web/Plugin/Device/SNMP.pm @@ -19,7 +19,7 @@ register_device_tab({ tag => 'snmp', label => 'SNMP', get '/ajax/content/device/snmp' => require_login sub { my $device = try { schema('netdisco')->resultset('Device') - ->find( param('q') ) } + ->search_for_device( param('q') ) } or send_error('Bad Device', 404); template 'ajax/device/snmp.tt', { device => $device->ip },