diff --git a/Netdisco/Changes b/Netdisco/Changes index 804875d5..93a8a52f 100644 --- a/Netdisco/Changes +++ b/Netdisco/Changes @@ -1,5 +1,10 @@ 2.029015 + [NEW FEATURES] + + * [#4] Allow comment on device port in the log, for any user + * [#18] Inventory by Model by OS Report + [ENHANCEMENTS] * Request net-snmp-devel on Fedora/Red-Hat builds @@ -10,6 +15,9 @@ * Fix for node search on some formats of IPv6 addr being seen as MAC * [#190] Ignore entries in the discover form that don't look like IP/hostname + * Delete all job queue entries (regardless of status) when deleting device + * [#15] Undiscovered Neighbor report JOIN fixed, and updated to include + the ports where Macsuck saw the MAC address of a known Device 2.029014 - 2014-11-19 diff --git a/Netdisco/MANIFEST b/Netdisco/MANIFEST index 0c59f914..e64b6c38 100644 --- a/Netdisco/MANIFEST +++ b/Netdisco/MANIFEST @@ -201,6 +201,7 @@ lib/App/Netdisco/Web/Plugin/Report/DeviceDnsMismatch.pm lib/App/Netdisco/Web/Plugin/Report/DevicePoeStatus.pm lib/App/Netdisco/Web/Plugin/Report/DuplexMismatch.pm lib/App/Netdisco/Web/Plugin/Report/HalfDuplex.pm +lib/App/Netdisco/Web/Plugin/Report/InventoryByModelByOS.pm lib/App/Netdisco/Web/Plugin/Report/IpInventory.pm lib/App/Netdisco/Web/Plugin/Report/ModuleInventory.pm lib/App/Netdisco/Web/Plugin/Report/Netbios.pm @@ -341,6 +342,7 @@ share/views/ajax/report/generic_report.tt share/views/ajax/report/generic_report_csv.tt share/views/ajax/report/halfduplex.tt share/views/ajax/report/halfduplex_csv.tt +share/views/ajax/report/inventorybymodelbyos.tt share/views/ajax/report/ipinventory.tt share/views/ajax/report/ipinventory_csv.tt share/views/ajax/report/moduleinventory.tt diff --git a/Netdisco/META.yml b/Netdisco/META.yml index a58d7f29..885716b3 100644 --- a/Netdisco/META.yml +++ b/Netdisco/META.yml @@ -7,11 +7,11 @@ build_requires: ExtUtils::MakeMaker: 6.59 Test::More: 0.88 configure_requires: - DBIx::Class: 0.082801 + DBIx::Class: '0.082801' 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 @@ -39,7 +39,7 @@ requires: DBIx::Class: 0.08281 DBIx::Class::Helpers: 2.024 Daemon::Control: 0.001006 - Dancer: 1.3132 + Dancer: '1.3132' Dancer::Plugin::Auth::Extensible: 0.3 Dancer::Plugin::DBIC: 0.2001 Dancer::Plugin::Passphrase: 2.0.1 @@ -68,7 +68,7 @@ requires: Plack::Middleware::ReverseProxy: 0.15 Role::Tiny: 1.002005 SNMP::Info: 3.18 - SQL::Translator: 0.11018 + SQL::Translator: '0.11018' Sereal: 0 Socket6: 0.23 Starman: 0.4008 @@ -91,4 +91,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.029014 +version: '2.029014' 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/DB/Result/DevicePort.pm b/Netdisco/lib/App/Netdisco/DB/Result/DevicePort.pm index 93b94367..8093e42e 100644 --- a/Netdisco/lib/App/Netdisco/DB/Result/DevicePort.pm +++ b/Netdisco/lib/App/Netdisco/DB/Result/DevicePort.pm @@ -160,6 +160,16 @@ __PACKAGE__->has_many( active_nodes_with_age => 'App::Netdisco::DB::Result::Virt cascade_copy => 0, cascade_update => 0, cascade_delete => 0 }, ); +=head2 logs + +Returns the set of C entries associated with this Port. + +=cut + +__PACKAGE__->has_many( logs => 'App::Netdisco::DB::Result::DevicePortLog', + { 'foreign.ip' => 'self.ip', 'foreign.port' => 'self.port' }, +); + =head2 power Returns a row from the C table if one refers to this @@ -345,4 +355,16 @@ Returns the C column instantiated into a L object. sub net_mac { return NetAddr::MAC->new(mac => (shift)->mac) } +=head2 last_comment + +Returns the most recent comment from the logs for this device port. + +=cut + +sub last_comment { + my $row = (shift)->logs->search(undef, + { order_by => { -desc => 'creation' }, rows => 1 })->first; + return ($row ? $row->log : ''); +} + 1; diff --git a/Netdisco/lib/App/Netdisco/DB/Result/Virtual/UndiscoveredNeighbors.pm b/Netdisco/lib/App/Netdisco/DB/Result/Virtual/UndiscoveredNeighbors.pm index 94d14c18..427e716d 100644 --- a/Netdisco/lib/App/Netdisco/DB/Result/Virtual/UndiscoveredNeighbors.pm +++ b/Netdisco/lib/App/Netdisco/DB/Result/Virtual/UndiscoveredNeighbors.pm @@ -22,14 +22,17 @@ __PACKAGE__->result_source_instance->view_definition(<<'ENDSQL'); a.log, a.finished FROM device_port p - JOIN device d ON d.ip = p.ip - JOIN ADMIN a ON p.remote_ip = a.device - WHERE p.remote_ip NOT IN - (SELECT ALIAS - FROM device_ip) - AND a.action = 'discover' - ORDER BY p.remote_ip, - a.finished DESC + JOIN device d + ON d.ip = p.ip + LEFT JOIN admin a + ON (p.remote_ip = a.device AND a.action = 'discover') + WHERE + (p.remote_ip NOT IN (SELECT alias FROM device_ip)) + OR + ((p.remote_ip IS NULL) AND p.is_uplink) + ORDER BY + p.remote_ip ASC, + a.finished DESC ENDSQL __PACKAGE__->add_columns( diff --git a/Netdisco/lib/App/Netdisco/DB/ResultSet/Device.pm b/Netdisco/lib/App/Netdisco/DB/ResultSet/Device.pm index 79050cff..b39a8e2c 100644 --- a/Netdisco/lib/App/Netdisco/DB/ResultSet/Device.pm +++ b/Netdisco/lib/App/Netdisco/DB/ResultSet/Device.pm @@ -594,7 +594,6 @@ sub delete { $schema->resultset('Admin')->search({ device => { '-in' => $devices->as_query }, - action => { '-like' => 'queued%' }, })->delete; $schema->resultset('Topology')->search({ diff --git a/Netdisco/lib/App/Netdisco/DB/ResultSet/DevicePort.pm b/Netdisco/lib/App/Netdisco/DB/ResultSet/DevicePort.pm index 4b471617..91ee2682 100644 --- a/Netdisco/lib/App/Netdisco/DB/ResultSet/DevicePort.pm +++ b/Netdisco/lib/App/Netdisco/DB/ResultSet/DevicePort.pm @@ -157,6 +157,7 @@ sub delete { DevicePortVlan DevicePortWireless DevicePortSsid + DevicePortLog /) { $schema->resultset($set)->search( { ip => { '-in' => $ports->as_query }}, diff --git a/Netdisco/lib/App/Netdisco/Web/Device.pm b/Netdisco/lib/App/Netdisco/Web/Device.pm index 23ea7caa..2235d7d9 100644 --- a/Netdisco/lib/App/Netdisco/Web/Device.pm +++ b/Netdisco/lib/App/Netdisco/Web/Device.pm @@ -14,6 +14,7 @@ hook 'before' => sub { my @default_port_columns_right = ( { name => 'c_descr', label => 'Description', default => '' }, + { name => 'c_comment', label => 'Last Comment', default => '' }, { name => 'c_type', label => 'Type', default => '' }, { name => 'c_duplex', label => 'Duplex', default => '' }, { name => 'c_lastchange', label => 'Last Change', default => '' }, diff --git a/Netdisco/lib/App/Netdisco/Web/Plugin/Report/InventoryByModelByOS.pm b/Netdisco/lib/App/Netdisco/Web/Plugin/Report/InventoryByModelByOS.pm new file mode 100644 index 00000000..b5015647 --- /dev/null +++ b/Netdisco/lib/App/Netdisco/Web/Plugin/Report/InventoryByModelByOS.pm @@ -0,0 +1,30 @@ +package App::Netdisco::Web::Plugin::Report::InventoryByModelByOS; + +use Dancer ':syntax'; +use Dancer::Plugin::DBIC; +use Dancer::Plugin::Auth::Extensible; + +use App::Netdisco::Web::Plugin; + +register_report( + { category => 'Device', + tag => 'inventorybymodelbyos', + label => 'Inventory by Model by OS', + provides_csv => 0, + } +); + +get '/ajax/content/report/inventorybymodelbyos' => require_login sub { + my @results = schema('netdisco')->resultset('Device')->search(undef, { + columns => [qw/vendor model os os_ver/], + select => [ { count => 'os_ver' } ], + as => [qw/ os_ver_count /], + group_by => [qw/ vendor model os os_ver /], + order_by => ['vendor', 'model', { -desc => 'count' }, 'os_ver'], + })->hri->all; + + template 'ajax/report/inventorybymodelbyos.tt', { results => \@results, }, + { layout => undef }; +}; + +1; diff --git a/Netdisco/lib/App/Netdisco/Web/Plugin/Report/PortLog.pm b/Netdisco/lib/App/Netdisco/Web/Plugin/Report/PortLog.pm index 73ca2700..5c8c9081 100644 --- a/Netdisco/lib/App/Netdisco/Web/Plugin/Report/PortLog.pm +++ b/Netdisco/lib/App/Netdisco/Web/Plugin/Report/PortLog.pm @@ -14,6 +14,32 @@ register_report({ hidden => true, }); +sub _sanity_ok { + return 0 unless + param('ip') =~ m/^[[:print:]]+$/ + and param('port') =~ m/^[[:print:]]+$/ + and param('log') =~ m/^[[:print:]]+$/; + + return 1; +} + +ajax '/ajax/control/report/portlog/add' => require_login sub { + send_error('Bad Request', 400) unless _sanity_ok(); + + schema('netdisco')->txn_do(sub { + my $user = schema('netdisco')->resultset('DevicePortLog') + ->create({ + ip => param('ip'), + port => param('port'), + reason => 'other', + log => param('log'), + username => session('logged_in_user'), + userip => request->remote_address, + action => 'comment', + }); + }); +}; + ajax '/ajax/content/report/portlog' => require_role port_control => sub { my $device = param('q'); my $port = param('f'); diff --git a/Netdisco/share/config.yml b/Netdisco/share/config.yml index fdbf2f5f..91b2ac9b 100644 --- a/Netdisco/share/config.yml +++ b/Netdisco/share/config.yml @@ -46,6 +46,7 @@ web_plugins: - Report::HalfDuplex - Report::DeviceAddrNoDNS - Report::DeviceByLocation + - Report::InventoryByModelByOS - Report::DeviceDnsMismatch - Report::DevicePoeStatus - Report::DuplexMismatch diff --git a/Netdisco/share/views/ajax/admintask/undiscoveredneighbors.tt b/Netdisco/share/views/ajax/admintask/undiscoveredneighbors.tt index 204b04f8..5bcfb7af 100644 --- a/Netdisco/share/views/ajax/admintask/undiscoveredneighbors.tt +++ b/Netdisco/share/views/ajax/admintask/undiscoveredneighbors.tt @@ -1,7 +1,7 @@ - + @@ -12,11 +12,18 @@ - + diff --git a/Netdisco/share/views/ajax/admintask/undiscoveredneighbors_csv.tt b/Netdisco/share/views/ajax/admintask/undiscoveredneighbors_csv.tt index 78cef5fb..f69d9016 100644 --- a/Netdisco/share/views/ajax/admintask/undiscoveredneighbors_csv.tt +++ b/Netdisco/share/views/ajax/admintask/undiscoveredneighbors_csv.tt @@ -1,5 +1,5 @@ [% USE CSV -%] -[% CSV.dump([ 'Device Triggering Last Discovery Attempt' 'Device Port' +[% CSV.dump([ 'Observing Device' 'Device Port' 'Remote IP' 'Remote Port' 'Remote ID' 'Remote Type' 'Last Discovery Attempt' 'Discovery Log']) %] diff --git a/Netdisco/share/views/ajax/device/ports.tt b/Netdisco/share/views/ajax/device/ports.tt index 4e23349c..f91bf468 100644 --- a/Netdisco/share/views/ajax/device/ports.tt +++ b/Netdisco/share/views/ajax/device/ports.tt @@ -82,6 +82,10 @@ rel="tooltip" data-placement="top" data-offset="3" data-animation="" data-title="Enable Port"> + [% END %] + [% ELSE %] + [% END %] + [% IF params.c_comment %] + + [% END %] + [% IF params.c_type %] [% END %] diff --git a/Netdisco/share/views/ajax/device/ports_csv.tt b/Netdisco/share/views/ajax/device/ports_csv.tt index 63343a00..343aba46 100644 --- a/Netdisco/share/views/ajax/device/ports_csv.tt +++ b/Netdisco/share/views/ajax/device/ports_csv.tt @@ -61,6 +61,10 @@ [% myport.push(row.descr) %] [% END %] + [% IF params.c_comment %] + [% myport.push(row.last_comment) %] + [% END %] + [% IF params.c_type %] [% myport.push(row.type) %] [% END %] diff --git a/Netdisco/share/views/ajax/report/inventorybymodelbyos.tt b/Netdisco/share/views/ajax/report/inventorybymodelbyos.tt new file mode 100644 index 00000000..925946f6 --- /dev/null +++ b/Netdisco/share/views/ajax/report/inventorybymodelbyos.tt @@ -0,0 +1,71 @@ +
Device Location Triggering
Last Discovery Attempt
Observing Device Undiscovered Neighbor Last Discovery Attempt Last Discovery Log
[% row.dns || row.name || row.ip | html_entity %] ( [% row.port | html_entity %] ) - [% row.remote_ip | html_entity %] - ([% row.remote_port | html_entity %]) - [% ' id: '_ row.remote_id IF row.remote_id %] - [% ' type: '_ row.remote_type IF row.remote_type %] + [% IF row.remote_ip %] + + [% row.remote_ip | html_entity %] + ([% row.remote_port | html_entity %]) + [% '
' IF row.remote_id or row.remote_type %] + [% ' id: '_ row.remote_id IF row.remote_id %] + [% ' type: '_ row.remote_type IF row.remote_type %] + [% ELSE %] + Known Device's MAC Address seen on this Port during Macsuck + [% END %] +
[% row.finished | html_entity %] [% row.log | html_entity %]
[% END %] @@ -89,9 +93,6 @@ rel="tooltip" data-placement="top" data-offset="3" data-animation="" data-title="View Port Log"> - [% ELSE %] - - [% END %] [% IF row.is_master %] @@ -121,6 +122,10 @@ [% row.descr | html_entity %][% row.last_comment | html_entity %][% row.type | html_entity %]
+ + + + + + + + + [% FOREACH row IN results %] + + + + + + [% END %] + +
ModelOperating System VersionCount
+ + [% row.vendor.ucfirst | html_entity %] [% row.model | html_entity %] + [% IF row.os %] running "[% row.os | html_entity %]"[% END %] + + + [% row.os_ver | html_entity %] + [% row.os_ver_count | html_entity %]
+ + + + diff --git a/Netdisco/share/views/ajax/report/ipinventory_csv.tt b/Netdisco/share/views/ajax/report/ipinventory_csv.tt index 24299690..25d11fbb 100644 --- a/Netdisco/share/views/ajax/report/ipinventory_csv.tt +++ b/Netdisco/share/views/ajax/report/ipinventory_csv.tt @@ -4,8 +4,8 @@ [% FOREACH row IN results %] [% mylist = [] %] [% mylist.push(row.ip) %] + [% mylist.push(row.mac) %] [% mylist.push(row.dns) %] - [% mylist.push(row.time_first) %] [% mylist.push(row.time_last) %] [% CSV.dump(mylist) %] diff --git a/Netdisco/share/views/ajax/report/portlog.tt b/Netdisco/share/views/ajax/report/portlog.tt index 777e32d1..b229065e 100644 --- a/Netdisco/share/views/ajax/report/portlog.tt +++ b/Netdisco/share/views/ajax/report/portlog.tt @@ -1,6 +1,3 @@ -[% IF results.count == 0 %] -
This port's log is empty.
-[% ELSE %] @@ -10,9 +7,24 @@ + + + + + + + + + + + + + [% WHILE (row = results.next) %] @@ -21,15 +33,16 @@ + [% END %]
Action Reason LogAction
-[% session.logged_in_user | html_entity %]-commentOther + +
[% row.creation_stamp | html_entity %][% row.action | html_entity %] [% settings.port_control_reasons.item(row.reason) || row.reason | html_entity %] [% row.log || '-' | html_entity %]
-[% END %]