fix bug in jobs list

This commit is contained in:
Oliver Gorwits
2014-03-25 21:11:34 +00:00
parent 2cc8b41fb0
commit 8a85fb4e03

View File

@@ -13,6 +13,7 @@ my %jobs = map { $_ => 1} qw/
discover discover
macsuck macsuck
arpnip arpnip
nbtstat
/; /;
my %jobs_all = map {$_ => 1} qw/ my %jobs_all = map {$_ => 1} qw/
discoverall discoverall
@@ -43,21 +44,6 @@ sub add_job {
}; };
} }
# we have a separate list for jobs needing a device to avoid queueing
# such a job when there's no device param (it could still be duff, tho).
my %jobs = map { $_ => 1} qw/
discover
macsuck
arpnip
nbtstat
/;
my %jobs_all = map {$_ => 1} qw/
discoverall
macwalk
arpwalk
nbtwalk
/;
foreach my $jobtype (keys %jobs_all, keys %jobs) { foreach my $jobtype (keys %jobs_all, keys %jobs) {
ajax "/ajax/control/admin/$jobtype" => require_role admin => sub { ajax "/ajax/control/admin/$jobtype" => require_role admin => sub {
send_error('Missing device', 400) send_error('Missing device', 400)