issue loadmibs if needed when user gets snapshot

This commit is contained in:
Oliver Gorwits
2022-08-08 08:53:17 +01:00
parent a874882e6e
commit b03bb2ac62

View File

@@ -78,6 +78,9 @@ ajax "/ajax/control/admin/snapshot_req" => require_role admin => sub {
send_error('Bad device', 400)
if ! $device or $device->addr eq '0.0.0.0';
add_job('loadmibs')
if not schema('netdisco')->resultset('SNMPObject')->count();
# will store for download and for browsing
add_job('snapshot', $device->addr, 'yes') or send_error('Bad device', 400);
};