work with both ip and hostname device id
This commit is contained in:
@@ -19,7 +19,7 @@ register_device_tab({ tag => 'snmp', label => 'SNMP',
|
|||||||
|
|
||||||
get '/ajax/content/device/snmp' => require_login sub {
|
get '/ajax/content/device/snmp' => require_login sub {
|
||||||
my $device = try { schema('netdisco')->resultset('Device')
|
my $device = try { schema('netdisco')->resultset('Device')
|
||||||
->find( param('q') ) }
|
->search_for_device( param('q') ) }
|
||||||
or send_error('Bad Device', 404);
|
or send_error('Bad Device', 404);
|
||||||
|
|
||||||
template 'ajax/device/snmp.tt', { device => $device->ip },
|
template 'ajax/device/snmp.tt', { device => $device->ip },
|
||||||
|
|||||||
Reference in New Issue
Block a user