diff --git a/Netdisco/Changes b/Netdisco/Changes index f3036e80..c0f84c55 100644 --- a/Netdisco/Changes +++ b/Netdisco/Changes @@ -14,6 +14,7 @@ * Allow filtering out of Device Ports on Node (MAC) search * Display Voice VLAN on Cisco devices * [#202] Detect failed OUI and MIB downloads + * [#208] Always show port log icon [BUG FIXES] diff --git a/Netdisco/lib/App/Netdisco/Web/Plugin/Report/PortLog.pm b/Netdisco/lib/App/Netdisco/Web/Plugin/Report/PortLog.pm index 5c8c9081..dd5b97cf 100644 --- a/Netdisco/lib/App/Netdisco/Web/Plugin/Report/PortLog.pm +++ b/Netdisco/lib/App/Netdisco/Web/Plugin/Report/PortLog.pm @@ -40,7 +40,7 @@ ajax '/ajax/control/report/portlog/add' => require_login sub { }); }; -ajax '/ajax/content/report/portlog' => require_role port_control => sub { +ajax '/ajax/content/report/portlog' => require_login sub { my $device = param('q'); my $port = param('f'); send_error('Bad Request', 400) unless $device and $port; diff --git a/Netdisco/share/public/css/netdisco.css b/Netdisco/share/public/css/netdisco.css index 9f280171..85c1befd 100644 --- a/Netdisco/share/public/css/netdisco.css +++ b/Netdisco/share/public/css/netdisco.css @@ -162,18 +162,15 @@ div.content > div.tab-content table.nd_floatinghead thead { /* nudge cell content to the right when port_control controls are enabled */ .nd_editable-cell > .nd_this-port-only { - margin-left: 18px; - margin-right: 18px; + margin-left: 14px; + margin-right: 35px; } .nd_editable-cell > .nd_port-only-first { - margin-left: 9px; + margin-left: 5px; } .nd_editable-cell > .nd_editable-cell-content { - margin-right: 18px; -} -.table .nd_nudge-for-icon { - padding-left: 25px; + margin-right: 25px; } /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ @@ -269,13 +266,17 @@ td > form.nd_inline-form { display: none; } +.nd_hand-icon { + margin-right: 4px; +} + /* port admin log view */ .nd_log-icon { cursor: pointer; color: black; - float: left; - visibility: hidden; - margin-top: 3px; + float: right; + padding-left: 10px; + margin-top: 2px; } .nd_log-icon:hover, .nd_log-icon:focus { text-decoration: none; diff --git a/Netdisco/share/public/javascripts/netdisco_portcontrol.js b/Netdisco/share/public/javascripts/netdisco_portcontrol.js index edbd15e5..c6d107ab 100644 --- a/Netdisco/share/public/javascripts/netdisco_portcontrol.js +++ b/Netdisco/share/public/javascripts/netdisco_portcontrol.js @@ -97,7 +97,6 @@ $(document).ready(function() { // toggle visibility of port up/down and edit controls $('.tab-content').on('mouseenter', '.nd_editable-cell', function() { $(this).children('.nd_hand-icon').show(); - $(this).children('.nd_log-icon').css('visibility', 'visible'); if (! $(this).is(':focus')) { $(this).children('.nd_edit-icon').show(); // ports $(this).siblings('td').find('.nd_device-details-edit').show(); // details @@ -105,7 +104,6 @@ $(document).ready(function() { }); $('.tab-content').on('mouseleave', '.nd_editable-cell', function() { $(this).children('.nd_hand-icon').hide(); - $(this).children('.nd_log-icon').css('visibility', 'hidden'); if (! $(this).is(':focus')) { $(this).children('.nd_edit-icon').hide(); // ports $(this).siblings('td').find('.nd_device-details-edit').hide(); // details diff --git a/Netdisco/share/views/ajax/device/ports.tt b/Netdisco/share/views/ajax/device/ports.tt index 01dafa6a..c899dc07 100644 --- a/Netdisco/share/views/ajax/device/ports.tt +++ b/Netdisco/share/views/ajax/device/ports.tt @@ -8,9 +8,7 @@ [% NEXT IF item.name == 'c_nodes' AND params.c_nodes AND params.c_neighbors %] [% NEXT UNLESS params.${item.name} %] [% SET th_class = '' %] - [% IF (user_can_port_control AND params.c_admin AND (item.name == 'c_port' OR item.name == 'c_name')) %] - [% th_class = ' class="nd_nudge-for-icon portsort"' %] - [% ELSIF (item.name == 'c_port' OR item.name == 'c_descr' OR item.name == 'c_name') %] + [% IF (item.name == 'c_port' OR item.name == 'c_descr' OR item.name == 'c_name') %] [% th_class = ' class="portsort"' %] [% END %] @@ -62,6 +60,22 @@ + [% ELSE %] + + [% END %] + [% ELSE %] + + [% END %] + + + + [% IF user_can_port_control AND params.c_admin %] + [% IF row.up_admin == 'up' %] [% ELSE %] - [% END %] - - - - [% ELSE %] - [% END %] @@ -147,7 +150,7 @@ data-field="c_name" data-for-device="[% device.ip | html_entity %]" data-for-port="[% row.port | html_entity %]"> [% ELSE %] - + [% END %]
[% row.name | html_entity %] diff --git a/Netdisco/share/views/report.tt b/Netdisco/share/views/report.tt index a08d2c9a..16792d92 100644 --- a/Netdisco/share/views/report.tt +++ b/Netdisco/share/views/report.tt @@ -31,9 +31,9 @@ href="#[% report.tag %]_pane">[% report.label %] [% IF report.tag == 'portlog' %] - [% params.q %] + [% params.q %] - - [% params.f %] + [% params.f %] [% ELSIF report.provides_csv %]