more bug fixes

This commit is contained in:
Oliver Gorwits
2013-06-09 14:09:27 +01:00
parent dfeacd12e2
commit 23d0e1b0e7
7 changed files with 7 additions and 9 deletions

View File

@@ -7,7 +7,7 @@ use 5.010_000;
use File::ShareDir 'dist_dir';
use Path::Class;
our $VERSION = '2.007000_004';
our $VERSION = '2.007000_005';
BEGIN {
if (not length ($ENV{DANCER_APPDIR} || '')

View File

@@ -101,7 +101,7 @@ sub set_power {
my $ip = $job->device;
my $pn = $job->port;
(my $data = $job->subaction) =~ s/-\w+//;
(my $data = $job->subaction) =~ s/-\w+//; # remove -other
# snmp connect using rw community
my $info = snmp_connect_rw($ip)

View File

@@ -286,7 +286,6 @@ Value: List of Strings. Default:
- 'Virtual-Template\d+'
- 'Virtual-Access\d+'
- '(E|T)\d \d\/\d\/\d'
- 'Vlan1'
If present, device ports whose names match fully any of the items in this list
will be ignored by the discovery process.

View File

@@ -8,7 +8,7 @@ ajax '/ajax/portcontrol' => sub {
send_error('Forbidden', 403)
unless var('user')->port_control;
send_error('No device/port/field', 400)
unless param('device') and param('port') and param('field');
unless param('device') and (param('port') or param('field'));
my $log = sprintf 'd:[%s] p:[%s] f:[%s]. a:[%s] v[%s]',
param('device'), (param('port') || ''), param('field'),