From 0e8f9ad19473ea576913dbd995a0adefbf30fb1c Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Tue, 15 Oct 2019 18:56:11 +0100 Subject: [PATCH] release 2.044003 --- Build.PL | 2 +- Changes | 12 ++++++- MANIFEST | 2 ++ META.json | 11 +++--- META.yml | 11 +++--- lib/App/Netdisco.pm | 2 +- share/public/javascripts/versionsort.js | 48 +++++++++++++++++++++++++ 7 files changed, 75 insertions(+), 13 deletions(-) create mode 100644 share/public/javascripts/versionsort.js diff --git a/Build.PL b/Build.PL index 9a6689a8..5c947ed6 100644 --- a/Build.PL +++ b/Build.PL @@ -78,7 +78,7 @@ Module::Build->new( 'Starman' => '0.4008', 'Storable' => '0', 'Sys::SigAction' => '0', - 'SNMP::Info' => '3.68', + 'SNMP::Info' => '3.70', 'SQL::Abstract' => '1.85', 'SQL::Translator' => '0.11024', 'Template' => '2.24', diff --git a/Changes b/Changes index 7cd6bbe8..8ec31cf0 100644 --- a/Changes +++ b/Changes @@ -1,4 +1,14 @@ -2.044003 - 2019-xx-xx +2.044003 - 2019-10-15 + + [NEW FEATURES] + + * #662 add TACACS+ support + + [ENHANCEMENTS] + + * #659 speed up Macsuck::Nodes while using $snmp->cisco_comm_indexing + * #663 sortable device OS version numbers + * ignore *_min_age when running jobs from netdisco-do [BUG FIXES] diff --git a/MANIFEST b/MANIFEST index d51c790f..d5207959 100644 --- a/MANIFEST +++ b/MANIFEST @@ -320,6 +320,7 @@ share/public/javascripts/netdisco_portcontrol.js share/public/javascripts/portsort.js share/public/javascripts/toastr.js share/public/javascripts/underscore.min.js +share/public/javascripts/versionsort.js share/radius_dictionaries/TODO share/schema_versions/App-Netdisco-DB-1-2-PostgreSQL.sql share/schema_versions/App-Netdisco-DB-10-11-PostgreSQL.sql @@ -377,6 +378,7 @@ share/schema_versions/App-Netdisco-DB-57-58-PostgreSQL.sql share/schema_versions/App-Netdisco-DB-58-59-PostgreSQL.sql share/schema_versions/App-Netdisco-DB-59-60-PostgreSQL.sql share/schema_versions/App-Netdisco-DB-6-7-PostgreSQL.sql +share/schema_versions/App-Netdisco-DB-60-61-PostgreSQL.sql share/schema_versions/App-Netdisco-DB-7-8-PostgreSQL.sql share/schema_versions/App-Netdisco-DB-8-9-PostgreSQL.sql share/schema_versions/App-Netdisco-DB-9-10-PostgreSQL.sql diff --git a/META.json b/META.json index c42dc878..db618314 100644 --- a/META.json +++ b/META.json @@ -4,7 +4,7 @@ "Oliver Gorwits " ], "dynamic_config" : 1, - "generated_by" : "Module::Build version 0.4229", + "generated_by" : "Module::Build version 0.4224", "license" : [ "bsd" ], @@ -40,6 +40,7 @@ "App::local::lib::helper" : "0.07", "Archive::Extract" : "0", "Authen::Radius" : "0", + "Authen::TacacsPlus" : "0", "CGI::Expand" : "2.05", "DBD::Pg" : "0", "DBIx::Class" : "0.082841", @@ -84,7 +85,7 @@ "Pod::Usage" : "0", "Regexp::Common" : "2017060201", "Role::Tiny" : "1.002005", - "SNMP::Info" : "3.68", + "SNMP::Info" : "3.70", "SQL::Abstract" : "1.85", "SQL::Translator" : "0.11024", "Scope::Guard" : "0", @@ -123,7 +124,7 @@ "provides" : { "App::Netdisco" : { "file" : "lib/App/Netdisco.pm", - "version" : "2.044002" + "version" : "2.044003" }, "App::Netdisco::AnyEvent::Nbtstat" : { "file" : "lib/App/Netdisco/AnyEvent/Nbtstat.pm" @@ -145,7 +146,7 @@ }, "App::Netdisco::DB" : { "file" : "lib/App/Netdisco/DB.pm", - "version" : "60" + "version" : "61" }, "App::Netdisco::DB::ExplicitLocking" : { "file" : "lib/App/Netdisco/DB/ExplicitLocking.pm" @@ -820,6 +821,6 @@ "x_IRC" : "irc://irc.freenode.org/#netdisco", "x_MailingList" : "https://lists.sourceforge.net/lists/listinfo/netdisco-users" }, - "version" : "2.044002", + "version" : "2.044003", "x_serialization_backend" : "JSON::PP version 2.97001" } diff --git a/META.yml b/META.yml index 00a640ba..a0651bdf 100644 --- a/META.yml +++ b/META.yml @@ -14,7 +14,7 @@ configure_requires: DBIx::Class: '0.082810' Module::Build: '0.42' dynamic_config: 1 -generated_by: 'Module::Build version 0.4229, CPAN::Meta::Converter version 2.150010' +generated_by: 'Module::Build version 0.4224, CPAN::Meta::Converter version 2.150010' license: bsd meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html @@ -23,7 +23,7 @@ name: App-Netdisco provides: App::Netdisco: file: lib/App/Netdisco.pm - version: '2.044002' + version: '2.044003' App::Netdisco::AnyEvent::Nbtstat: file: lib/App/Netdisco/AnyEvent/Nbtstat.pm App::Netdisco::Backend::Job: @@ -38,7 +38,7 @@ provides: file: lib/App/Netdisco/Configuration.pm App::Netdisco::DB: file: lib/App/Netdisco/DB.pm - version: '60' + version: '61' App::Netdisco::DB::ExplicitLocking: file: lib/App/Netdisco/DB/ExplicitLocking.pm App::Netdisco::DB::Result::Admin: @@ -488,6 +488,7 @@ requires: App::local::lib::helper: '0.07' Archive::Extract: '0' Authen::Radius: '0' + Authen::TacacsPlus: '0' CGI::Expand: '2.05' DBD::Pg: '0' DBIx::Class: '0.082841' @@ -532,7 +533,7 @@ requires: Pod::Usage: '0' Regexp::Common: '2017060201' Role::Tiny: '1.002005' - SNMP::Info: '3.68' + SNMP::Info: '3.70' SQL::Abstract: '1.85' SQL::Translator: '0.11024' Scope::Guard: '0' @@ -564,5 +565,5 @@ resources: homepage: http://netdisco.org/ license: http://opensource.org/licenses/bsd-license.php repository: https://github.com/netdisco/netdisco -version: '2.044002' +version: '2.044003' x_serialization_backend: 'CPAN::Meta::YAML version 0.018' diff --git a/lib/App/Netdisco.pm b/lib/App/Netdisco.pm index 83e1fc3a..43a8b1ed 100644 --- a/lib/App/Netdisco.pm +++ b/lib/App/Netdisco.pm @@ -4,7 +4,7 @@ use strict; use warnings; use 5.010_000; -our $VERSION = '2.044002'; +our $VERSION = '2.044003'; use App::Netdisco::Configuration; =head1 NAME diff --git a/share/public/javascripts/versionsort.js b/share/public/javascripts/versionsort.js new file mode 100644 index 00000000..d0bf2348 --- /dev/null +++ b/share/public/javascripts/versionsort.js @@ -0,0 +1,48 @@ +/** + * The following plug-in uses a modified version of the [naturalSort() function by Jim + * Palmer](http://www.overset.com/2008/09/01/javascript-natural-sort-algorithm-with-unicode-support) to provide natural sorting in DataTables. + * + * @name naturalsort.js + * @summary Sort software version number with a mix of numbers and letters with natural sort. + * @author [Jim Palmer](http://www.overset.com/2008/09/01/javascript-natural-sort-algorithm-with-unicode-support) + * + * @example + * $('#example').dataTable( { + * columnDefs: [ + * { type: 'versionsort', targets: 0 } + * ] + * } ); + */ + +function pad(datum, size) { + var s = "000000000" + datum; + return s.substr(s.length-size); +} + +(function() { + +/* + * Natural Sort algorithm for Javascript - Version 0.7 - Released under MIT license + * Author: Jim Palmer (based on chunking idea from Dave Koelle) + */ +/*jshint unused:false */ +function versionSort (a, b) { + "use strict"; + var pada = a.split(/(\D)/).map(x => pad(x, 5)).join(''); + var padb = b.split(/(\D)/).map(x => pad(x, 5)).join(''); + if ( pada < padb ) { return -1; } + else if ( pada > padb ) { return 1; } + return 0; +}; + +jQuery.extend( jQuery.fn.dataTableExt.oSort, { + "versionsort-asc": function ( a, b ) { + return versionSort(a,b); + }, + + "versionsort-desc": function ( a, b ) { + return versionSort(a,b) * -1; + } +} ); + +}());