Merge branch 'master' into og-autoload

Conflicts:
	Netdisco/share/config.yml
This commit is contained in:
Oliver Gorwits
2014-07-01 21:50:01 +01:00
60 changed files with 124 additions and 70 deletions

View File

@@ -1,4 +1,4 @@
2.027008_001 - 2014-06-01
2.028000 - 2014-07-01
[NEW FEATURES]
@@ -7,6 +7,7 @@
[ENHANCEMENTS]
* Web daemon will drop root status always if --port is not given
* Ignore devices with "phone" in their CDP/LLDP platform description
* Change log format to contain UTC timestamp
* Link to VLAN search by name from VLAN Inventory report
@@ -16,11 +17,15 @@
[BUG FIXES]
* Subnets report date range fixed, & (unnecessary?) "not" option removed
* Track how many times the device uptime wrapped (F. Schiavarelli)
* Fix for device counts in VLAN Inventory report
* Forward port housekeeping/schedule and expiry/expire legacy config
* Store started timestamp on job completion
* Set UTF-8 mode on Pg database connection
* Identify changes in device type after initial discover
* Add netdisco-rancid-export to installed scripts
* Template INCLUDE path stuffing broken for plugins [#103]
2.027007 - 2014-05-27

View File

@@ -27,7 +27,6 @@ lib/App/Netdisco/Core/Macsuck.pm
lib/App/Netdisco/Core/Nbtstat.pm
lib/App/Netdisco/Daemon/DB.pm
lib/App/Netdisco/Daemon/DB/Result/Admin.pm
lib/App/Netdisco/Daemon/JobQueue.pm
lib/App/Netdisco/Daemon/LocalQueue.pm
lib/App/Netdisco/Daemon/Util.pm
lib/App/Netdisco/Daemon/Worker/Common.pm
@@ -78,6 +77,7 @@ lib/App/Netdisco/DB/Result/Virtual/ApRadioChannelPower.pm
lib/App/Netdisco/DB/Result/Virtual/CidrIps.pm
lib/App/Netdisco/DB/Result/Virtual/DeviceDnsMismatch.pm
lib/App/Netdisco/DB/Result/Virtual/DeviceLinks.pm
lib/App/Netdisco/DB/Result/Virtual/DevicePoeStatus.pm
lib/App/Netdisco/DB/Result/Virtual/DuplexMismatch.pm
lib/App/Netdisco/DB/Result/Virtual/GenericReport.pm
lib/App/Netdisco/DB/Result/Virtual/NodeWithAge.pm
@@ -97,6 +97,7 @@ lib/App/Netdisco/DB/ResultSet/DeviceModule.pm
lib/App/Netdisco/DB/ResultSet/DevicePort.pm
lib/App/Netdisco/DB/ResultSet/DevicePortLog.pm
lib/App/Netdisco/DB/ResultSet/DevicePortSsid.pm
lib/App/Netdisco/DB/ResultSet/DevicePower.pm
lib/App/Netdisco/DB/ResultSet/Node.pm
lib/App/Netdisco/DB/ResultSet/NodeIp.pm
lib/App/Netdisco/DB/ResultSet/NodeNbt.pm
@@ -149,6 +150,7 @@ lib/App/Netdisco/Manual/ReleaseNotes.pod
lib/App/Netdisco/Manual/WritingPlugins.pod
lib/App/Netdisco/Util/Device.pm
lib/App/Netdisco/Util/DNS.pm
lib/App/Netdisco/Util/ExpandParams.pm
lib/App/Netdisco/Util/Node.pm
lib/App/Netdisco/Util/Noop.pm
lib/App/Netdisco/Util/Permission.pm
@@ -222,6 +224,7 @@ share/environments/deployment.yml
share/public/500.html
share/public/css/bootstrap-tree.css
share/public/css/bootstrap.min.css
share/public/css/dataTables.bootstrap.css
share/public/css/daterangepicker-bs2.css
share/public/css/font-awesome.min.css
share/public/css/jquery.qtip.min.css
@@ -256,21 +259,32 @@ share/public/images/dusseldorf_settings.png
share/public/images/glyphicons_072_bookmark.png
share/public/images/matte_basic_pin.png
share/public/images/navbar_disco.png
share/public/images/sort_asc.png
share/public/images/sort_asc_disabled.png
share/public/images/sort_both.png
share/public/images/sort_desc.png
share/public/images/sort_desc_disabled.png
share/public/images/splashyfish_left.png
share/public/images/splashyfish_right.png
share/public/images/tango_sweep.png
share/public/images/vaga_copy.png
share/public/javascripts/bootstrap.min.js
share/public/javascripts/d3.min.js
share/public/javascripts/dataTables.bootstrap.js
share/public/javascripts/dataTables.ip-address-detect.js
share/public/javascripts/dataTables.ip-address-sort.js
share/public/javascripts/daterangepicker.js
share/public/javascripts/he.js
share/public/javascripts/jquery-deserialize.js
share/public/javascripts/jquery-history.js
share/public/javascripts/jquery-latest.min.js
share/public/javascripts/jquery-ui.custom.min.js
share/public/javascripts/jquery.cookie.js
share/public/javascripts/jquery.dataTables.min.js
share/public/javascripts/jquery.floatThead.js
share/public/javascripts/jquery.qtip.min.js
share/public/javascripts/moment.min.js
share/public/javascripts/natural.js
share/public/javascripts/netdisco.js
share/public/javascripts/netdisco_portcontrol.js
share/public/javascripts/toastr.js

View File

@@ -58,7 +58,7 @@ requires:
Plack: 1.0023
Plack::Middleware::Expires: 0.03
Role::Tiny: 1.002005
SNMP::Info: 3.12
SNMP::Info: 3.16
SQL::Translator: 0.11016
Socket6: 0.23
Starman: 0.4008
@@ -81,4 +81,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.027007
version: 2.027008_001

View File

@@ -45,7 +45,7 @@ requires 'Plack::Middleware::Expires' => 0.03;
requires 'Role::Tiny' => 1.002005;
requires 'Socket6' => 0.23;
requires 'Starman' => 0.4008;
requires 'SNMP::Info' => 3.12;
requires 'SNMP::Info' => 3.16;
requires 'SQL::Translator' => 0.11016;
requires 'Template' => 2.24;
requires 'Template::Plugin::CSV' => 0.04;

View File

@@ -4,7 +4,7 @@ use strict;
use warnings;
use 5.010_000;
our $VERSION = '2.027007';
our $VERSION = '2.028000';
use App::Netdisco::Configuration;
use Module::Find ();

View File

@@ -169,7 +169,7 @@ sub store_device {
$device->model( Encode::decode('UTF-8', $snmp->model) );
$device->serial( Encode::decode('UTF-8', $snmp->serial) );
$device->snmp_class( $snmp->device_type );
$device->snmp_class( $snmp->class );
$device->last_discover(\'now()');
schema('netdisco')->txn_do(sub {
@@ -216,9 +216,20 @@ sub store_interfaces {
# clear the cached uptime and get a new one
my $dev_uptime = $snmp->load_uptime;
# used to track whether we've wrapped the device uptime
# used to track how many times the device uptime wrapped
my $dev_uptime_wrapped = 0;
# use SNMP-FRAMEWORK-MIB::snmpEngineTime if available to
# fix device uptime if wrapped
if (defined $snmp->snmpEngineTime) {
$dev_uptime_wrapped = int( $snmp->snmpEngineTime * 100 / 2**32 );
if ($dev_uptime_wrapped > 0) {
info sprintf ' [%s] interface - device uptime wrapped %d times - correcting',
$device->ip, $dev_uptime_wrapped;
$device->uptime( $dev_uptime + $dev_uptime_wrapped * 2**32 );
}
}
# build device interfaces suitable for DBIC
my %interfaces;
foreach my $entry (keys %$interfaces) {
@@ -264,7 +275,7 @@ sub store_interfaces {
debug sprintf
' [%s] interfaces - correcting LastChange for %s, assuming sysUptime wrap',
$device->ip, $port;
$lc += 2**32;
$lc += $dev_uptime_wrapped * 2**32;
}
}
}

View File

@@ -20,8 +20,13 @@ __PACKAGE__->result_source_instance->view_definition(<<'ENDSQL');
FROM subnets s1, node_ip ni
WHERE s1.net <<= ?::cidr
AND ni.ip <<= s1.net
AND ni.time_last >= ?
AND ((
ni.time_first IS null
AND ni.time_last IS null
) OR (
ni.time_last >= ?
AND ni.time_last <= ?
))
AND s1.last_discover >= ?
UNION
SELECT DISTINCT net, di.alias as ip

View File

@@ -294,6 +294,12 @@ Value: Boolean. Default: true.
Set to "C<false>" if you MUST maintain backwards compatibility with the Netdisco
1.x web interface. Strongly recommended that you leave this set to "C<true>".
=head3 C<table_pagesize>
Value: Number. Default: 10.
The number of rows in a table page.
=head2 Netdisco Core
=head3 C<mibhome>

View File

@@ -62,15 +62,28 @@ You I<must> reconfigure. Old configuration will not be migrated.
=head1 2.028000
=head2 General Changes
=head2 Incompatible Changes
The daemons can be started from init scripts, as root. They will drop back
from the root user to C<netdisco> before opening logs. However a limitation is
that the web frontend might need to keep root status to bind to a specific
port (e.g. 80) - the logs will then be created as root user. Sorry about that.
You might also find when upgrading that previous logs were owned by root and
Netdisco now wants to write to them as non-root (C<netdisco>) user. Please
either remove the logs before restarting, or alter their ownership.
Logs can be found in the C<logs> subdirectory of Netdisco's home area.
=head2 General Notices
The configuration item C<housekeeping> has been renamed to C<schedule>. Old
configuration will continue to work, but we recommend you rename this key in
your configuration anyway.
configuration will continue to work, but we recommend you now rename this key
in your configuration anyway.
=head1 2.025001
=head2 General Changes
=head2 General Notices
The Web and Backend daemons (C<netdisco-web> and C<netdisco-daemon>
respectively) will now watch your C<deployment.yml> configuration file, and

View File

@@ -18,15 +18,12 @@ get '/ajax/content/report/subnets' => require_login sub {
my $agenot = param('age_invert') || '0';
my ( $start, $end ) = param('daterange') =~ /(\d+-\d+-\d+)/gmx;
if ($agenot) {
my $tmp = $end;
$end = $start;
$start = $tmp;
}
$start = $start . ' 00:00:00';
$end = $end . ' 23:59:59';
my @results = schema('netdisco')->resultset('Virtual::SubnetUtilization')
->search(undef,{
bind => [ $subnet, $start, $end, $end, $subnet, $end, $end ],
bind => [ $subnet, $start, $end, $start, $subnet, $start, $start ],
})->hri->all;
return unless scalar @results;

View File

@@ -79,6 +79,7 @@ extra_web_plugins: []
jobqueue_refresh: 10
safe_password_store: true
reports: []
table_pagesize: 10
# -------------
# NETDISCO CORE

View File

@@ -65,7 +65,7 @@ $(document).ready(function() {
$('#data-table').dataTable({
"processing": true,
"stateSave": true,
"pageLength": 25,
"pageLength": [% settings.table_pagesize %],
"language": {
"search": 'Filter records: '
},

View File

@@ -33,7 +33,7 @@ $(document).ready(function() {
"searching": false,
"info": false,
"order": [[ 4, 'desc' ], [ 0, 'asc' ], [ 1, 'asc' ] ],
"pageLength": 25,
"pageLength": [% settings.table_pagesize %],
} );
} );
</script>

View File

@@ -91,7 +91,7 @@ $(document).ready(function() {
$('#data-table').dataTable({
"processing": true,
"stateSave": true,
"pageLength": 25,
"pageLength": [% settings.table_pagesize %],
"language": {
"search": 'Filter records: '
},

View File

@@ -29,7 +29,7 @@ $(document).ready(function() {
$('#data-table').dataTable({
"processing": true,
"stateSave": true,
"pageLength": 25,
"pageLength": [% settings.table_pagesize %],
"language": {
"search": 'Filter records: '
},

View File

@@ -19,7 +19,7 @@ $(document).ready(function() {
$('#aul-data-table').dataTable( {
"processing": true,
"stateSave": true,
"pageLength": 25,
"pageLength": [% settings.table_pagesize %],
"language": {
"search": 'Filter records: '
},

View File

@@ -80,7 +80,7 @@ $(document).ready(function() {
$('#data-table').dataTable({
"processing": true,
"stateSave": true,
"pageLength": 25,
"pageLength": [% settings.table_pagesize %],
"language": {
"search": 'Filter records: '
},

View File

@@ -15,7 +15,7 @@ $(document).ready(function() {
var table = $('#da-data-table').dataTable({
"processing": true,
"stateSave": true,
"pageLength": 25,
"pageLength": [% settings.table_pagesize %],
"language": {
"search": 'Filter records: '
},

View File

@@ -389,7 +389,7 @@ $(document).ready(function() {
"order": [[ 1, 'asc' ]],
"processing": true,
"stateSave": true,
"pageLength": 25,
"pageLength": [% settings.table_pagesize %],
"language": {
"search": 'Filter records: '
},

View File

@@ -12,7 +12,7 @@ $(document).ready(function() {
var table = $('#data-table').dataTable({
"processing": true,
"stateSave": true,
"pageLength": 25,
"pageLength": [% settings.table_pagesize %],
"language": {
"search": 'Filter records: '
},

View File

@@ -40,7 +40,7 @@ $(document).ready(function() {
var table = $('#data-table').DataTable({
"processing": true,
"stateSave": true,
"pageLength": 25,
"pageLength": [% settings.table_pagesize %],
"language": {
"search": 'Filter records: '
},

View File

@@ -14,7 +14,7 @@ $(document).ready(function() {
var table = $('#data-table').dataTable({
"processing": true,
"stateSave": true,
"pageLength": 25,
"pageLength": [% settings.table_pagesize %],
"language": {
"search": 'Filter records: '
},

View File

@@ -15,7 +15,7 @@ $(document).ready(function() {
var table = $('#data-table').dataTable({
"processing": true,
"stateSave": true,
"pageLength": 25,
"pageLength": [% settings.table_pagesize %],
"language": {
"search": 'Filter records: '
},

View File

@@ -15,7 +15,7 @@ $(document).ready(function() {
var table = $('#data-table').dataTable({
"processing": true,
"stateSave": true,
"pageLength": 25,
"pageLength": [% settings.table_pagesize %],
"language": {
"search": 'Filter records: '
},

View File

@@ -66,7 +66,7 @@ $(document).ready(function() {
var table = $('#data-table').DataTable({
"processing": true,
"stateSave": true,
"pageLength": 25,
"pageLength": [% settings.table_pagesize %],
"language": {
"search": 'Filter records: '
},

View File

@@ -16,7 +16,7 @@ $(document).ready(function() {
var table = $('#data-table').dataTable({
"processing": true,
"stateSave": true,
"pageLength": 25,
"pageLength": [% settings.table_pagesize %],
"language": {
"search": 'Filter records: '
},

View File

@@ -22,7 +22,7 @@ $(document).ready(function() {
$('#rg-data-table').dataTable({
"processing": true,
"stateSave": true,
"pageLength": 25,
"pageLength": [% settings.table_pagesize %],
"language": {
"search": 'Filter records: '
}

View File

@@ -14,7 +14,7 @@ $(document).ready(function() {
var table = $('#data-table').dataTable({
"processing": true,
"stateSave": true,
"pageLength": 25,
"pageLength": [% settings.table_pagesize %],
"language": {
"search": 'Filter records: '
},

View File

@@ -14,7 +14,7 @@ $(document).ready(function() {
var table = $('#data-table').dataTable({
"processing": true,
"stateSave": true,
"pageLength": 25,
"pageLength": [% settings.table_pagesize %],
"language": {
"search": 'Filter records: '
},

View File

@@ -32,7 +32,7 @@ $(document).ready(function() {
var table = $('#data-table').dataTable({
"processing": true,
"stateSave": true,
"pageLength": 25,
"pageLength": [% settings.table_pagesize %],
"language": {
"search": 'Filter records: '
},

View File

@@ -28,7 +28,7 @@ $(document).ready(function() {
var table = $('#data-table').dataTable({
"processing": true,
"stateSave": true,
"pageLength": 25,
"pageLength": [% settings.table_pagesize %],
"language": {
"search": 'Filter records: '
},

View File

@@ -15,7 +15,7 @@ $(document).ready(function() {
var table = $('#data-table').dataTable({
"processing": true,
"stateSave": true,
"pageLength": 25,
"pageLength": [% settings.table_pagesize %],
"language": {
"search": 'Filter records: '
},

View File

@@ -28,7 +28,7 @@ $(document).ready(function() {
var table = $('#data-table').dataTable({
"processing": true,
"stateSave": true,
"pageLength": 25,
"pageLength": [% settings.table_pagesize %],
"language": {
"search": 'Filter records: '
},

View File

@@ -16,7 +16,7 @@ $(document).ready(function() {
var table = $('#data-table').dataTable({
"processing": true,
"stateSave": true,
"pageLength": 25,
"pageLength": [% settings.table_pagesize %],
"language": {
"search": 'Filter records: '
},

View File

@@ -14,7 +14,7 @@ $(document).ready(function() {
var table = $('#data-table').dataTable({
"processing": true,
"stateSave": true,
"pageLength": 25,
"pageLength": [% settings.table_pagesize %],
"language": {
"search": 'Filter records: '
},

View File

@@ -14,7 +14,7 @@ $(document).ready(function() {
var table = $('#data-table').dataTable({
"processing": true,
"stateSave": true,
"pageLength": 25,
"pageLength": [% settings.table_pagesize %],
"language": {
"search": 'Filter records: '
},

View File

@@ -32,7 +32,7 @@ $(document).ready(function() {
$('#data-table').dataTable({
"processing": true,
"stateSave": true,
"pageLength": 25,
"pageLength": [% settings.table_pagesize %],
"language": {
"search": 'Filter records: '
}

View File

@@ -14,7 +14,7 @@ $(document).ready(function() {
var table = $('#data-table').dataTable({
"processing": true,
"stateSave": true,
"pageLength": 25,
"pageLength": [% settings.table_pagesize %],
"language": {
"search": 'Filter records: '
},

View File

@@ -28,7 +28,7 @@ $(document).ready(function() {
var table = $('#data-table').dataTable({
"processing": true,
"stateSave": true,
"pageLength": 25,
"pageLength": [% settings.table_pagesize %],
"language": {
"search": 'Filter records: '
},

View File

@@ -15,7 +15,7 @@ $(document).ready(function() {
var table = $('#data-table').dataTable({
"processing": true,
"stateSave": true,
"pageLength": 25,
"pageLength": [% settings.table_pagesize %],
"language": {
"search": 'Filter records: '
},

View File

@@ -11,7 +11,7 @@
</tbody>
[% FOREACH row IN results %]
<tr>
<td class="nd_center-cell"><a href="[% uri_for('/report/ipinventory') %]?subnet=[% row.subnet | uri %]&daterange=[% daterange | uri %]&limit=[% row.subnet_size | uri %]">
<td class="nd_center-cell"><a href="[% uri_for('/report/ipinventory') %]?subnet=[% row.subnet | uri %]&daterange=[% params.daterange | uri %]&age_invert=[% params.age_invert | uri %]&limit=[% row.subnet_size | uri %]">
[% row.subnet | html_entity %]</a></td>
<td class="nd_center-cell">[% row.subnet_size | format_number %]</td>
<td class="nd_center-cell">[% row.active | format_number %]</td>
@@ -26,7 +26,7 @@ $(document).ready(function() {
$('#data-table').dataTable({
"processing": true,
"stateSave": true,
"pageLength": 25,
"pageLength": [% settings.table_pagesize %],
"language": {
"search": 'Filter records: '
},

View File

@@ -14,7 +14,7 @@ $(document).ready(function() {
var table = $('#data-table').dataTable({
"processing": true,
"stateSave": true,
"pageLength": 25,
"pageLength": [% settings.table_pagesize %],
"language": {
"search": 'Filter records: '
},

View File

@@ -19,7 +19,7 @@ $(document).ready(function() {
var table = $('#ds-data-table').dataTable({
"processing": true,
"stateSave": true,
"pageLength": 25,
"pageLength": [% settings.table_pagesize %],
"language": {
"search": 'Filter records: '
},

View File

@@ -177,7 +177,7 @@ $(document).ready(function() {
var table = $('#nsbi-data-table').DataTable({
"processing": true,
"stateSave": true,
"pageLength": 25,
"pageLength": [% settings.table_pagesize %],
"language": {
"search": 'Filter records: '
},

View File

@@ -137,7 +137,7 @@ $(document).ready(function() {
var table = $('#nsbm-data-table').DataTable({
"processing": true,
"stateSave": true,
"pageLength": 25,
"pageLength": [% settings.table_pagesize %],
"language": {
"search": 'Filter records: '
},

View File

@@ -14,7 +14,7 @@ $(document).ready(function() {
var table = $('#ps-data-table').dataTable({
"processing": true,
"stateSave": true,
"pageLength": 25,
"pageLength": [% settings.table_pagesize %],
"language": {
"search": 'Filter records: '
},

View File

@@ -16,7 +16,7 @@ $(document).ready(function() {
var table = $('#vs-data-table').dataTable({
"processing": true,
"stateSave": true,
"pageLength": 25,
"pageLength": [% settings.table_pagesize %],
"language": {
"search": 'Filter records: '
},

View File

@@ -10,6 +10,7 @@
<legend class="nd_sidebar-legend">
<label><em><strong>Date Range</strong></em></label>
</legend>
<!--
<div class="clearfix input-prepend">
<label class="add-on">
<input type="checkbox" id="age_invert"
@@ -19,6 +20,7 @@
<span class="nd_searchcheckbox uneditable-input">Not within...</span>
</label>
</div>
-->
<div class="clearfix">
<input class="nd_side-input" id="daterange" required="required"
type="text" name="daterange" value="[%