several bug fixes
This commit is contained in:
@@ -50,6 +50,7 @@ requires:
|
|||||||
Starman: 0.3008
|
Starman: 0.3008
|
||||||
Template: 2.24
|
Template: 2.24
|
||||||
YAML: 0.84
|
YAML: 0.84
|
||||||
|
YAML::XS: 0.41
|
||||||
namespace::clean: 0.24
|
namespace::clean: 0.24
|
||||||
perl: 5.10.0
|
perl: 5.10.0
|
||||||
version: 0.9902
|
version: 0.9902
|
||||||
@@ -59,4 +60,4 @@ resources:
|
|||||||
homepage: http://netdisco.org/
|
homepage: http://netdisco.org/
|
||||||
license: http://opensource.org/licenses/bsd-license.php
|
license: http://opensource.org/licenses/bsd-license.php
|
||||||
repository: git://git.code.sf.net/p/netdisco/netdisco-ng
|
repository: git://git.code.sf.net/p/netdisco/netdisco-ng
|
||||||
version: 2.007000_003
|
version: 2.007000_004
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ requires 'SNMP::Info' => 3.01;
|
|||||||
requires 'SQL::Translator' => 0.11016;
|
requires 'SQL::Translator' => 0.11016;
|
||||||
requires 'Template' => 2.24;
|
requires 'Template' => 2.24;
|
||||||
requires 'YAML' => 0.84;
|
requires 'YAML' => 0.84;
|
||||||
|
requires 'YAML::XS' => 0.41;
|
||||||
requires 'namespace::clean' => 0.24;
|
requires 'namespace::clean' => 0.24;
|
||||||
requires 'version' => 0.9902;
|
requires 'version' => 0.9902;
|
||||||
|
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ sub build_tasks_list {
|
|||||||
|
|
||||||
info sprintf "MCE will load %s tasks: %s Manager, %s Scheduler, %s Poller, %s Interactive",
|
info sprintf "MCE will load %s tasks: %s Manager, %s Scheduler, %s Poller, %s Interactive",
|
||||||
(scalar @$tasks),
|
(scalar @$tasks),
|
||||||
((setting('workers')-{pollers} or setting('workers')->{interactives}) ? 1 : 0),
|
((setting('workers')->{pollers} or setting('workers')->{interactives}) ? 1 : 0),
|
||||||
(setting('housekeeping') ? 1 : 0),
|
(setting('housekeeping') ? 1 : 0),
|
||||||
(setting('workers')->{pollers} || 0),
|
(setting('workers')->{pollers} || 0),
|
||||||
(setting('workers')->{interactives} || 0);
|
(setting('workers')->{interactives} || 0);
|
||||||
|
|||||||
@@ -73,11 +73,11 @@ for its use.
|
|||||||
say 'This is the Netdisco II deployment script.';
|
say 'This is the Netdisco II deployment script.';
|
||||||
say '';
|
say '';
|
||||||
say 'Before we continue, the following prerequisites must be in place:';
|
say 'Before we continue, the following prerequisites must be in place:';
|
||||||
say ' * Internet access';
|
|
||||||
say ' * Database added to PostgreSQL for Netdisco';
|
say ' * Database added to PostgreSQL for Netdisco';
|
||||||
say ' * User added to PostgreSQL with rights to the Netdisco Database';
|
say ' * User added to PostgreSQL with rights to the Netdisco Database';
|
||||||
say ' * "~/environments/deployment.yml" file configured with Database dsn/user/pass';
|
say ' * "~/environments/deployment.yml" file configured with Database dsn/user/pass';
|
||||||
say ' * A full backup of any existing Netdisco database data';
|
say ' * A full backup of any existing Netdisco database data';
|
||||||
|
say ' * Internet access (for OUIs and MIBs)';
|
||||||
say '';
|
say '';
|
||||||
say 'You will be asked to confirm all changes to your system.';
|
say 'You will be asked to confirm all changes to your system.';
|
||||||
say '';
|
say '';
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ use 5.010_000;
|
|||||||
use File::ShareDir 'dist_dir';
|
use File::ShareDir 'dist_dir';
|
||||||
use Path::Class;
|
use Path::Class;
|
||||||
|
|
||||||
our $VERSION = '2.007000_003';
|
our $VERSION = '2.007000_004';
|
||||||
|
|
||||||
BEGIN {
|
BEGIN {
|
||||||
if (not length ($ENV{DANCER_APPDIR} || '')
|
if (not length ($ENV{DANCER_APPDIR} || '')
|
||||||
@@ -28,6 +28,15 @@ BEGIN {
|
|||||||
$ENV{DANCER_PUBLIC} ||= $auto->subdir('public')->stringify;
|
$ENV{DANCER_PUBLIC} ||= $auto->subdir('public')->stringify;
|
||||||
$ENV{DANCER_VIEWS} ||= $auto->subdir('views')->stringify;
|
$ENV{DANCER_VIEWS} ||= $auto->subdir('views')->stringify;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
# Dancer 1 uses the broken YAML.pm module
|
||||||
|
# This is a global sledgehammer - could just apply to Dancer::Config
|
||||||
|
use YAML;
|
||||||
|
use YAML::XS;
|
||||||
|
no warnings 'redefine';
|
||||||
|
*YAML::LoadFile = sub { goto \&YAML::XS::LoadFile };
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
=head1 NAME
|
=head1 NAME
|
||||||
@@ -41,10 +50,9 @@ network management tool. Pieces are still missing however, so if you're a new
|
|||||||
user please see L<http://netdisco.org/> for further information on the project
|
user please see L<http://netdisco.org/> for further information on the project
|
||||||
and how to download the current official release.
|
and how to download the current official release.
|
||||||
|
|
||||||
L<App::Netdisco> provides a web frontend and a backend daemon to handle
|
L<App::Netdisco> provides a web frontend with built-in web server, and a
|
||||||
interactive requests such as changing port or device properties. There is not
|
backend daemon to handle interactive requests such as changing port or device
|
||||||
yet a device poller, so please still use the old Netdisco's discovery, arpnip,
|
properties.
|
||||||
and macsuck.
|
|
||||||
|
|
||||||
If you have any trouble getting the frontend running, speak to someone in the
|
If you have any trouble getting the frontend running, speak to someone in the
|
||||||
C<#netdisco> IRC channel (on freenode). Before installing or upgrading please
|
C<#netdisco> IRC channel (on freenode). Before installing or upgrading please
|
||||||
@@ -131,6 +139,8 @@ take care of all this for you:
|
|||||||
|
|
||||||
~/bin/netdisco-deploy
|
~/bin/netdisco-deploy
|
||||||
|
|
||||||
|
Answer yes to all questions, if this is a new installation of Netdisco 2.
|
||||||
|
|
||||||
=head1 Startup
|
=head1 Startup
|
||||||
|
|
||||||
Run the following command to start the web-app server as a backgrounded daemon
|
Run the following command to start the web-app server as a backgrounded daemon
|
||||||
@@ -138,12 +148,17 @@ Run the following command to start the web-app server as a backgrounded daemon
|
|||||||
|
|
||||||
~/bin/netdisco-web start
|
~/bin/netdisco-web start
|
||||||
|
|
||||||
|
If the Inventory is empty because this is a new installation, you probably
|
||||||
|
want to either run some polling jobs from the command-line, or give a web user
|
||||||
|
some admin rights (see L</"User Rights">, below).
|
||||||
|
|
||||||
Run the following command to start the job control daemon (port control, etc):
|
Run the following command to start the job control daemon (port control, etc):
|
||||||
|
|
||||||
~/bin/netdisco-daemon start
|
~/bin/netdisco-daemon start
|
||||||
|
|
||||||
You should take care not to run this Netdisco daemon and the legacy daemon at
|
You should take care not to run this Netdisco daemon and the legacy daemon at
|
||||||
the same time.
|
the same time. Similarly, if you use the device discovery with Netdisco 2,
|
||||||
|
disable your system's cron jobs for the Netdisco 1 poller.
|
||||||
|
|
||||||
=head1 Upgrading
|
=head1 Upgrading
|
||||||
|
|
||||||
@@ -153,13 +168,13 @@ Notes|App::Netdisco::Manual::ReleaseNotes>. Then, the process is as follows:
|
|||||||
# upgrade Netdisco
|
# upgrade Netdisco
|
||||||
~/bin/localenv cpanm --notest App::Netdisco
|
~/bin/localenv cpanm --notest App::Netdisco
|
||||||
|
|
||||||
# apply database schema updates (optionally, get latest OIDs/MIBs)
|
# apply database schema updates
|
||||||
~/bin/netdisco-deploy
|
~/bin/netdisco-deploy
|
||||||
|
|
||||||
# restart web service
|
# restart web service
|
||||||
~/bin/netdisco-web restart
|
~/bin/netdisco-web restart
|
||||||
|
|
||||||
# optionally, restart job daemon if you use it
|
# restart job daemon (if you use it)
|
||||||
~/bin/netdisco-daemon restart
|
~/bin/netdisco-daemon restart
|
||||||
|
|
||||||
=head1 Tips and Tricks
|
=head1 Tips and Tricks
|
||||||
@@ -172,8 +187,8 @@ or MAC addreses, VLAN numbers, and so on.
|
|||||||
|
|
||||||
=head2 User Rights
|
=head2 User Rights
|
||||||
|
|
||||||
When user authentication is disabled (C<no_auth>) the default username is
|
When user authentication is disabled (C<no_auth: true>) the default username
|
||||||
"guest", which has no special privilege. To grant port and device control
|
is "guest", which has no special privilege. To grant port and device control
|
||||||
rights to this user, create a row in the C<users> table of the Netdisco
|
rights to this user, create a row in the C<users> table of the Netdisco
|
||||||
database with a username of C<guest> and appropriate flags set to true:
|
database with a username of C<guest> and appropriate flags set to true:
|
||||||
|
|
||||||
@@ -237,7 +252,7 @@ Oliver Gorwits <oliver@cpan.org>
|
|||||||
|
|
||||||
=head1 COPYRIGHT AND LICENSE
|
=head1 COPYRIGHT AND LICENSE
|
||||||
|
|
||||||
This software is copyright (c) 2012 by The Netdisco Developer Team.
|
This software is copyright (c) 2012, 2013 by The Netdisco Developer Team.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
Redistribution and use in source and binary forms, with or without
|
||||||
modification, are permitted provided that the following conditions are met:
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ sub capacity_for {
|
|||||||
|
|
||||||
my $current = $queue->search({role => $role})->count;
|
my $current = $queue->search({role => $role})->count;
|
||||||
|
|
||||||
return ($current < setting('workers')->{$setting}));
|
return ($current < setting('workers')->{$setting});
|
||||||
}
|
}
|
||||||
|
|
||||||
sub take_jobs {
|
sub take_jobs {
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ sub _try_connect {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sub _build_mibdirs {
|
sub _build_mibdirs {
|
||||||
my $home = (setting('mibhome') || $ENV{NETDISCO_HOME} || $ENV{HOME});
|
my $home = (setting('mibhome') || dir(($ENV{NETDISCO_HOME} || $ENV{HOME}), 'netdisco-mibs'));
|
||||||
return map { dir($home, $_) }
|
return map { dir($home, $_) }
|
||||||
@{ setting('mibdirs') || _get_mibdirs_content($home) };
|
@{ setting('mibdirs') || _get_mibdirs_content($home) };
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,8 @@ hook 'before' => sub {
|
|||||||
->find(session('user')));
|
->find(session('user')));
|
||||||
|
|
||||||
# really just for dev work, to quieten the logs
|
# really just for dev work, to quieten the logs
|
||||||
var('user')->port_control(0) if setting('no_port_control');
|
var('user')->port_control(0)
|
||||||
|
if var('user') and setting('no_port_control');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -10,18 +10,13 @@
|
|||||||
// but which cannot use jQuery delegation via .on()
|
// but which cannot use jQuery delegation via .on()
|
||||||
function inner_view_processing(tab) {
|
function inner_view_processing(tab) {
|
||||||
|
|
||||||
// reload this table every 10 seconds
|
// reload this table every 5 seconds
|
||||||
if (tab == 'jobqueue') {
|
if (tab == 'jobqueue') {
|
||||||
$('#nd_device-name').text('10');
|
$('#nd_device-name').text('5');
|
||||||
nd_timers.push(setTimeout(function() { $('#nd_device-name').text('9') }, 1000 ));
|
nd_timers.push(setTimeout(function() { $('#nd_device-name').text('4') }, 1000 ));
|
||||||
nd_timers.push(setTimeout(function() { $('#nd_device-name').text('8') }, 2000 ));
|
nd_timers.push(setTimeout(function() { $('#nd_device-name').text('3') }, 2000 ));
|
||||||
nd_timers.push(setTimeout(function() { $('#nd_device-name').text('7') }, 3000 ));
|
nd_timers.push(setTimeout(function() { $('#nd_device-name').text('2') }, 3000 ));
|
||||||
nd_timers.push(setTimeout(function() { $('#nd_device-name').text('6') }, 4000 ));
|
nd_timers.push(setTimeout(function() { $('#nd_device-name').text('1') }, 4000 ));
|
||||||
nd_timers.push(setTimeout(function() { $('#nd_device-name').text('5') }, 5000 ));
|
|
||||||
nd_timers.push(setTimeout(function() { $('#nd_device-name').text('4') }, 6000 ));
|
|
||||||
nd_timers.push(setTimeout(function() { $('#nd_device-name').text('3') }, 7000 ));
|
|
||||||
nd_timers.push(setTimeout(function() { $('#nd_device-name').text('2') }, 8000 ));
|
|
||||||
nd_timers.push(setTimeout(function() { $('#nd_device-name').text('1') }, 9000 ));
|
|
||||||
nd_timers.push(setTimeout(function() {
|
nd_timers.push(setTimeout(function() {
|
||||||
// clear any running timers
|
// clear any running timers
|
||||||
for (var i = 0; i < nd_timers.length; i++) {
|
for (var i = 0; i < nd_timers.length; i++) {
|
||||||
@@ -29,7 +24,7 @@
|
|||||||
}
|
}
|
||||||
// reload the tab content
|
// reload the tab content
|
||||||
$('#' + tab + '_form').trigger('submit');
|
$('#' + tab + '_form').trigger('submit');
|
||||||
}, 10000));
|
}, 5000));
|
||||||
}
|
}
|
||||||
|
|
||||||
// activate typeahead on the topo boxes
|
// activate typeahead on the topo boxes
|
||||||
|
|||||||
Reference in New Issue
Block a user