diff --git a/Netdisco/Changes b/Netdisco/Changes index 4a63b7e2..18fd0d7a 100644 --- a/Netdisco/Changes +++ b/Netdisco/Changes @@ -1,8 +1,47 @@ -2.029008 +2.029012 - 2014-10-09 + + [BUG FIXES] + + * [#152] HP devices with port names "D##" not sorted by portsort.js + +2.029011 - 2014-10-07 + + [BUG FIXES] + + * Fix typo in the Device By Location report template + +2.029010 - 2014-10-07 + + [NEW FEATURES] + + * Administration (SSH, Telnet, Web) links for devices + * [#143] Pass parameter(s) to custom reports via bind_params config + + [BUG FIXES] + + * Require old DBIC version to fix deploy problem + +2.029009 - 2014-09-27 [ENHANCEMENTS] - * Setting for items in number of records per table page menu (table_showrecordsmenu). + * Defaults now exist for all expire tasks + * Added expire_jobs to remove jobs queue items after 14 days + + [BUG FIXES] + + * Require new DBIC version to fix duplicate DB connection problem + +2.029008 - 2014-09-23 + + [ENHANCEMENTS] + + * [#144] Setting for items in number of records per table page menu (table_showrecordsmenu). + + [BUG FIXES] + + * Add Dancer import to SSHCollector Platforms + * Add note to docs to workaround current Dancer/YAML::XS issue 2.029007 - 2014-09-12 diff --git a/Netdisco/MANIFEST b/Netdisco/MANIFEST index e1080c3c..78e9d877 100644 --- a/Netdisco/MANIFEST +++ b/Netdisco/MANIFEST @@ -314,6 +314,7 @@ share/views/ajax/admintask/undiscoveredneighbors.tt share/views/ajax/admintask/undiscoveredneighbors_csv.tt share/views/ajax/admintask/userlog.tt share/views/ajax/admintask/users.tt +share/views/ajax/datatabledefaults.tt share/views/ajax/device/addresses.tt share/views/ajax/device/addresses_csv.tt share/views/ajax/device/details.tt @@ -391,6 +392,7 @@ share/views/report.tt share/views/search.tt share/views/sidebar/device/netmap.tt share/views/sidebar/device/ports.tt +share/views/sidebar/report/generic_report.tt share/views/sidebar/report/ipinventory.tt share/views/sidebar/report/moduleinventory.tt share/views/sidebar/report/netbios.tt diff --git a/Netdisco/META.yml b/Netdisco/META.yml index f593b944..c46fc253 100644 --- a/Netdisco/META.yml +++ b/Netdisco/META.yml @@ -10,7 +10,7 @@ configure_requires: ExtUtils::MakeMaker: 6.59 distribution_type: module dynamic_config: 1 -generated_by: 'Module::Install version 1.06' +generated_by: 'Module::Install version 1.12' license: bsd meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html @@ -35,7 +35,7 @@ requires: Archive::Extract: 0 CGI::Expand: 2.05 DBD::Pg: 0 - DBIx::Class: 0.0825 + DBIx::Class: 0.0827 DBIx::Class::Helpers: 2.018004 Daemon::Control: 0.001 Dancer: 1.3112 @@ -71,7 +71,6 @@ requires: Sereal: 0 Socket6: 0.23 Starman: 0.4008 - Sys::Proctitle: 0 Template: 2.24 Template::Plugin::CSV: 0.04 Template::Plugin::Number::Format: 1.02 @@ -91,4 +90,4 @@ resources: homepage: http://netdisco.org/ license: http://opensource.org/licenses/bsd-license.php repository: git://git.code.sf.net/p/netdisco/netdisco-ng -version: 2.029007 +version: '2.029012' diff --git a/Netdisco/Makefile.PL b/Netdisco/Makefile.PL index 5f1aa25b..63baa139 100644 --- a/Netdisco/Makefile.PL +++ b/Netdisco/Makefile.PL @@ -16,7 +16,7 @@ requires 'Archive::Extract' => 0; requires 'CGI::Expand' => 2.05; requires 'Data::Printer' => 0; requires 'DBD::Pg' => 0; -requires 'DBIx::Class' => 0.08250; +requires 'DBIx::Class' => 0.08270; requires 'DBIx::Class::Helpers' => 2.018004; requires 'Daemon::Control' => 0.001000; requires 'Dancer' => 1.3112; diff --git a/Netdisco/inc/Module/Install.pm b/Netdisco/inc/Module/Install.pm index 4ecf46b9..5460dd50 100644 --- a/Netdisco/inc/Module/Install.pm +++ b/Netdisco/inc/Module/Install.pm @@ -17,7 +17,7 @@ package Module::Install; # 3. The ./inc/ version of Module::Install loads # } -use 5.005; +use 5.006; use strict 'vars'; use Cwd (); use File::Find (); @@ -31,7 +31,7 @@ BEGIN { # This is not enforced yet, but will be some time in the next few # releases once we can make sure it won't clash with custom # Module::Install extensions. - $VERSION = '1.06'; + $VERSION = '1.12'; # Storage for the pseudo-singleton $MAIN = undef; @@ -156,10 +156,10 @@ END_DIE sub autoload { my $self = shift; my $who = $self->_caller; - my $cwd = Cwd::cwd(); + my $cwd = Cwd::getcwd(); my $sym = "${who}::AUTOLOAD"; $sym->{$cwd} = sub { - my $pwd = Cwd::cwd(); + my $pwd = Cwd::getcwd(); if ( my $code = $sym->{$pwd} ) { # Delegate back to parent dirs goto &$code unless $cwd eq $pwd; @@ -239,7 +239,7 @@ sub new { # ignore the prefix on extension modules built from top level. my $base_path = Cwd::abs_path($FindBin::Bin); - unless ( Cwd::abs_path(Cwd::cwd()) eq $base_path ) { + unless ( Cwd::abs_path(Cwd::getcwd()) eq $base_path ) { delete $args{prefix}; } return $args{_self} if $args{_self}; @@ -338,7 +338,7 @@ sub find_extensions { if ( $subpath eq lc($subpath) || $subpath eq uc($subpath) ) { my $content = Module::Install::_read($subpath . '.pm'); my $in_pod = 0; - foreach ( split //, $content ) { + foreach ( split /\n/, $content ) { $in_pod = 1 if /^=\w/; $in_pod = 0 if /^=cut/; next if ($in_pod || /^=cut/); # skip pod text @@ -434,7 +434,7 @@ END_OLD # _version is for processing module versions (eg, 1.03_05) not # Perl versions (eg, 5.8.1). -sub _version ($) { +sub _version { my $s = shift || 0; my $d =()= $s =~ /(\.)/g; if ( $d >= 2 ) { @@ -450,12 +450,12 @@ sub _version ($) { return $l + 0; } -sub _cmp ($$) { +sub _cmp { _version($_[1]) <=> _version($_[2]); } # Cloned from Params::Util::_CLASS -sub _CLASS ($) { +sub _CLASS { ( defined $_[0] and diff --git a/Netdisco/inc/Module/Install/Base.pm b/Netdisco/inc/Module/Install/Base.pm index 802844aa..f9bf5de5 100644 --- a/Netdisco/inc/Module/Install/Base.pm +++ b/Netdisco/inc/Module/Install/Base.pm @@ -4,7 +4,7 @@ package Module::Install::Base; use strict 'vars'; use vars qw{$VERSION}; BEGIN { - $VERSION = '1.06'; + $VERSION = '1.12'; } # Suspend handler for "redefined" warnings diff --git a/Netdisco/inc/Module/Install/Can.pm b/Netdisco/inc/Module/Install/Can.pm index 22167b8f..b4e5e3b4 100644 --- a/Netdisco/inc/Module/Install/Can.pm +++ b/Netdisco/inc/Module/Install/Can.pm @@ -8,7 +8,7 @@ use Module::Install::Base (); use vars qw{$VERSION @ISA $ISCORE}; BEGIN { - $VERSION = '1.06'; + $VERSION = '1.12'; @ISA = 'Module::Install::Base'; $ISCORE = 1; } diff --git a/Netdisco/inc/Module/Install/Fetch.pm b/Netdisco/inc/Module/Install/Fetch.pm index bee0c4fb..54f14fb5 100644 --- a/Netdisco/inc/Module/Install/Fetch.pm +++ b/Netdisco/inc/Module/Install/Fetch.pm @@ -6,7 +6,7 @@ use Module::Install::Base (); use vars qw{$VERSION @ISA $ISCORE}; BEGIN { - $VERSION = '1.06'; + $VERSION = '1.12'; @ISA = 'Module::Install::Base'; $ISCORE = 1; } diff --git a/Netdisco/inc/Module/Install/Makefile.pm b/Netdisco/inc/Module/Install/Makefile.pm index 7052f365..81cddd55 100644 --- a/Netdisco/inc/Module/Install/Makefile.pm +++ b/Netdisco/inc/Module/Install/Makefile.pm @@ -8,7 +8,7 @@ use Fcntl qw/:flock :seek/; use vars qw{$VERSION @ISA $ISCORE}; BEGIN { - $VERSION = '1.06'; + $VERSION = '1.12'; @ISA = 'Module::Install::Base'; $ISCORE = 1; } @@ -133,7 +133,7 @@ sub makemaker_args { return $args; } -# For mm args that take multiple space-seperated args, +# For mm args that take multiple space-separated args, # append an argument to the current list. sub makemaker_append { my $self = shift; diff --git a/Netdisco/inc/Module/Install/Metadata.pm b/Netdisco/inc/Module/Install/Metadata.pm index 58430f30..2c66b1e2 100644 --- a/Netdisco/inc/Module/Install/Metadata.pm +++ b/Netdisco/inc/Module/Install/Metadata.pm @@ -6,7 +6,7 @@ use Module::Install::Base (); use vars qw{$VERSION @ISA $ISCORE}; BEGIN { - $VERSION = '1.06'; + $VERSION = '1.12'; @ISA = 'Module::Install::Base'; $ISCORE = 1; } @@ -347,7 +347,7 @@ sub name_from { ^ \s* package \s* ([\w:]+) - \s* ; + [\s|;]* /ixms ) { my ($name, $module_name) = ($1, $1); @@ -705,7 +705,7 @@ sub _write_mymeta_data { my @yaml = Parse::CPAN::Meta::LoadFile('META.yml'); my $meta = $yaml[0]; - # Overwrite the non-configure dependency hashs + # Overwrite the non-configure dependency hashes delete $meta->{requires}; delete $meta->{build_requires}; delete $meta->{recommends}; diff --git a/Netdisco/inc/Module/Install/Scripts.pm b/Netdisco/inc/Module/Install/Scripts.pm index 419286f3..66a33504 100644 --- a/Netdisco/inc/Module/Install/Scripts.pm +++ b/Netdisco/inc/Module/Install/Scripts.pm @@ -6,7 +6,7 @@ use Module::Install::Base (); use vars qw{$VERSION @ISA $ISCORE}; BEGIN { - $VERSION = '1.06'; + $VERSION = '1.12'; @ISA = 'Module::Install::Base'; $ISCORE = 1; } diff --git a/Netdisco/inc/Module/Install/Share.pm b/Netdisco/inc/Module/Install/Share.pm index 4e2b602a..a67f6e00 100644 --- a/Netdisco/inc/Module/Install/Share.pm +++ b/Netdisco/inc/Module/Install/Share.pm @@ -8,7 +8,7 @@ use ExtUtils::Manifest (); use vars qw{$VERSION @ISA $ISCORE}; BEGIN { - $VERSION = '1.06'; + $VERSION = '1.12'; @ISA = 'Module::Install::Base'; $ISCORE = 1; } diff --git a/Netdisco/inc/Module/Install/Win32.pm b/Netdisco/inc/Module/Install/Win32.pm index eeaa3fed..e48c32d9 100644 --- a/Netdisco/inc/Module/Install/Win32.pm +++ b/Netdisco/inc/Module/Install/Win32.pm @@ -6,7 +6,7 @@ use Module::Install::Base (); use vars qw{$VERSION @ISA $ISCORE}; BEGIN { - $VERSION = '1.06'; + $VERSION = '1.12'; @ISA = 'Module::Install::Base'; $ISCORE = 1; } diff --git a/Netdisco/inc/Module/Install/WriteAll.pm b/Netdisco/inc/Module/Install/WriteAll.pm index 85d8018c..409ef40c 100644 --- a/Netdisco/inc/Module/Install/WriteAll.pm +++ b/Netdisco/inc/Module/Install/WriteAll.pm @@ -6,7 +6,7 @@ use Module::Install::Base (); use vars qw{$VERSION @ISA $ISCORE}; BEGIN { - $VERSION = '1.06'; + $VERSION = '1.12'; @ISA = qw{Module::Install::Base}; $ISCORE = 1; } diff --git a/Netdisco/lib/App/Netdisco.pm b/Netdisco/lib/App/Netdisco.pm index 18b750fa..38ae6be4 100644 --- a/Netdisco/lib/App/Netdisco.pm +++ b/Netdisco/lib/App/Netdisco.pm @@ -4,7 +4,7 @@ use strict; use warnings; use 5.010_000; -our $VERSION = '2.029007'; +our $VERSION = '2.029012'; use App::Netdisco::Configuration; use Module::Find (); @@ -123,6 +123,7 @@ install Netdisco and its dependencies into the C user's home area su - netdisco curl -L http://cpanmin.us/ | perl - --notest --local-lib ~/perl5 App::Netdisco + ~/bin/localenv cpanm --notest --force Dancer@1.3126 DBIx::Class@0.08270 Link some of the newly installed apps into a handy location: @@ -190,7 +191,11 @@ Netdisco 2, disable your system's cron jobs for the Netdisco 1.x poller. For further documentation on deployment, see L. -=head1 Upgrading +=head1 Upgrading from 2.x + +If you're running a version of Netdisco prior to 2.x then you should follow +the full installation instructions, above. This process is for upgrading +version 2.x only. Before upgrading please review the latest L. Then, the process is as follows: @@ -198,6 +203,9 @@ Notes|App::Netdisco::Manual::ReleaseNotes>. Then, the process is as follows: # upgrade Netdisco ~/bin/localenv cpanm --notest App::Netdisco + # workaround for current upstream bug + ~/bin/localenv cpanm --notest --force Dancer@1.3126 DBIx::Class@0.08270 + # apply database schema updates ~/bin/netdisco-deploy diff --git a/Netdisco/lib/App/Netdisco/Daemon/Worker/Poller/Expiry.pm b/Netdisco/lib/App/Netdisco/Daemon/Worker/Poller/Expiry.pm index 2741907d..01d82d4a 100644 --- a/Netdisco/lib/App/Netdisco/Daemon/Worker/Poller/Expiry.pm +++ b/Netdisco/lib/App/Netdisco/Daemon/Worker/Poller/Expiry.pm @@ -40,6 +40,15 @@ sub expire { }); } + if (setting('expire_jobs') and setting('expire_jobs') > 0) { + schema('netdisco')->txn_do(sub { + schema('netdisco')->resultset('Admin')->search({ + entered => \[q/< (now() - ?::interval)/, + (setting('expire_jobs') * 86400)], + })->delete(); + }); + } + return job_done("Checked expiry for all Devices and Nodes"); } diff --git a/Netdisco/lib/App/Netdisco/Manual/Configuration.pod b/Netdisco/lib/App/Netdisco/Manual/Configuration.pod index b9578d99..ebee0c90 100644 --- a/Netdisco/lib/App/Netdisco/Manual/Configuration.pod +++ b/Netdisco/lib/App/Netdisco/Manual/Configuration.pod @@ -256,16 +256,21 @@ code or HTML templates. For example: FROM device d ORDER BY name -The C of each item in the C configuration is an alias for the +The C of each item in the C configuration is an alias for the report, and becomes part of the web path. You can munge the data retrieved from the database by placing a Perl script -with the same name as the C key into the C directory of -Netdisco's home area. The script can access C<$config> for its configuration -and C<@data> for the retrieved data. It should return a list of munged data. +with the same name as the C key into the "C" directory +of Netdisco's home area. The script can access C<$config> for its +configuration and C<@data> for the retrieved data. It should return a list of +munged data. Within the tree you can provide each of the keys below: +=head4 C + +Alias for the Report, which must be usable in a web path. + =head4 C