From 84ed4c500881209e2dbda50ff66f65a43d3e98da Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Sun, 12 Jan 2014 22:11:15 +0000 Subject: [PATCH 1/5] move lag member icon into port icon column --- Netdisco/share/public/css/netdisco.css | 4 ++++ Netdisco/share/views/ajax/device/ports.tt | 22 ++++++++++++---------- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/Netdisco/share/public/css/netdisco.css b/Netdisco/share/public/css/netdisco.css index bd49e849..9ba29231 100644 --- a/Netdisco/share/public/css/netdisco.css +++ b/Netdisco/share/public/css/netdisco.css @@ -177,6 +177,10 @@ div.content > div.tab-content table.nd_floatinghead thead { text-align: center; } +td.nd_devport_icon i { + line-height: 18px; +} + /* undo nd_center-cell when in a modial dialog (which lives in table cell) */ .table .nd_center-cell .modal-body { text-align: left; diff --git a/Netdisco/share/views/ajax/device/ports.tt b/Netdisco/share/views/ajax/device/ports.tt index 3cef731b..e30693be 100644 --- a/Netdisco/share/views/ajax/device/ports.tt +++ b/Netdisco/share/views/ajax/device/ports.tt @@ -17,7 +17,7 @@ [% FOREACH row IN results %] - + [% IF row.up_admin != 'up' %] [% ELSIF row.stp == 'blocking' %] @@ -29,6 +29,15 @@ [% ELSE %] [% END %] + [% IF row.slave_of %]
+ [% IF row.get_column('agg_master_up_admin') != 'up' %] + + [% ELSIF row.get_column('agg_master_up') == 'up' %] + + [% ELSE %] + + [% END %] + [% END %] [% FOREACH config IN settings._extra_device_port_cols %] @@ -73,16 +82,9 @@ self_options) %]&q=[% params.q | uri %]&f=[% row.port | uri %]&prefer=port"> [% row.port | html_entity %] [% IF row.slave_of %]
- [% IF row.get_column('agg_master_up_admin') != 'up' %] - - [% ELSIF row.get_column('agg_master_up') == 'up' %] - - [% ELSE %] - - [% END %] - - [% row.slave_of | html_entity %] + [% row.slave_of | html_entity %]) [% END %] [% END %] From 27aa80ed9390037147a88b160c80d5e223f7cb79 Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Sun, 12 Jan 2014 22:12:06 +0000 Subject: [PATCH 2/5] rename link agg legend --- Netdisco/share/views/sidebar/device/ports.tt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Netdisco/share/views/sidebar/device/ports.tt b/Netdisco/share/views/sidebar/device/ports.tt index 09c70af9..4f7b3efa 100644 --- a/Netdisco/share/views/sidebar/device/ports.tt +++ b/Netdisco/share/views/sidebar/device/ports.tt @@ -43,7 +43,7 @@
  •   IP Phone
  •   Wireless Client
  •   Archived Data
  • -
  •   Aggregate Master
  • +
  •   Link Aggregate
  • [% IF user_has_role('port_control') %]
  •   Click "Update View"
  • [% END %] From 99ce56d7941a7d5f845ab79994876f65d4ff9025 Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Sun, 12 Jan 2014 22:13:53 +0000 Subject: [PATCH 3/5] remove brackets from lag name --- Netdisco/share/views/ajax/device/ports.tt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Netdisco/share/views/ajax/device/ports.tt b/Netdisco/share/views/ajax/device/ports.tt index e30693be..9ea6679b 100644 --- a/Netdisco/share/views/ajax/device/ports.tt +++ b/Netdisco/share/views/ajax/device/ports.tt @@ -82,9 +82,9 @@ self_options) %]&q=[% params.q | uri %]&f=[% row.port | uri %]&prefer=port"> [% row.port | html_entity %] [% IF row.slave_of %]
    - ( - [% row.slave_of | html_entity %]) + [% row.slave_of | html_entity %] [% END %] [% END %] From 25292e1ce856067bfe25ff6e3f270759723d5367 Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Sun, 12 Jan 2014 22:20:08 +0000 Subject: [PATCH 4/5] fix name of class --- Netdisco/share/public/css/netdisco.css | 2 +- Netdisco/share/views/ajax/device/ports.tt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Netdisco/share/public/css/netdisco.css b/Netdisco/share/public/css/netdisco.css index 9ba29231..a29e2736 100644 --- a/Netdisco/share/public/css/netdisco.css +++ b/Netdisco/share/public/css/netdisco.css @@ -177,7 +177,7 @@ div.content > div.tab-content table.nd_floatinghead thead { text-align: center; } -td.nd_devport_icon i { +td.nd_devport-icon i { line-height: 18px; } diff --git a/Netdisco/share/views/ajax/device/ports.tt b/Netdisco/share/views/ajax/device/ports.tt index 9ea6679b..a8451d8d 100644 --- a/Netdisco/share/views/ajax/device/ports.tt +++ b/Netdisco/share/views/ajax/device/ports.tt @@ -17,7 +17,7 @@ [% FOREACH row IN results %] - + [% IF row.up_admin != 'up' %] [% ELSIF row.stp == 'blocking' %] From 5557811aeb8de65448ad446705df9531adcd1647 Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Mon, 13 Jan 2014 00:38:18 +0000 Subject: [PATCH 5/5] fix icon placement in editable device port cells --- Netdisco/share/public/css/netdisco.css | 9 +++++++-- .../share/public/javascripts/netdisco_portcontrol.js | 6 ++++-- Netdisco/share/views/ajax/device/ports.tt | 8 ++++---- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/Netdisco/share/public/css/netdisco.css b/Netdisco/share/public/css/netdisco.css index a29e2736..ffc63734 100644 --- a/Netdisco/share/public/css/netdisco.css +++ b/Netdisco/share/public/css/netdisco.css @@ -158,9 +158,14 @@ 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; } +.nd_editable-cell > .nd_port-only-first { + margin-left: 9px; +} + .nd_editable-cell > .nd_editable-cell-content { - margin-left: 18px; + margin-right: 18px; } .table .nd_nudge-for-icon { padding-left: 25px; @@ -265,7 +270,7 @@ td > form.nd_inline-form { cursor: pointer; color: black; float: left; - display: none; + visibility: hidden; margin-top: 3px; } .nd_log-icon:hover, .nd_log-icon:focus { diff --git a/Netdisco/share/public/javascripts/netdisco_portcontrol.js b/Netdisco/share/public/javascripts/netdisco_portcontrol.js index dd810a27..9426d46e 100644 --- a/Netdisco/share/public/javascripts/netdisco_portcontrol.js +++ b/Netdisco/share/public/javascripts/netdisco_portcontrol.js @@ -92,14 +92,16 @@ $(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,.nd_log-icon').show(); + $(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 } }); $('.tab-content').on('mouseleave', '.nd_editable-cell', function() { - $(this).children('.nd_hand-icon,.nd_log-icon').hide(); + $(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 a8451d8d..9276a4a1 100644 --- a/Netdisco/share/views/ajax/device/ports.tt +++ b/Netdisco/share/views/ajax/device/ports.tt @@ -75,11 +75,11 @@ [% ELSE %] [% END %] - [% IF row.is_master %] - - [% END %] - + [% IF row.is_master %] +   + [% END %] [% row.port | html_entity %] [% IF row.slave_of %]