Hide neighbors interface when more than 3 in device ports pages #2460

Merged
merged 7 commits into from Nov 19, 2015

Projects

None yet

3 participants

@Alucardfh

Hi,

This PR is an attempt to provide a way of unclutter the device ports page when an interface has many neighbors.

Clicking on the arrow will toggle the rest of the list of neighbors.

My web design skilled are somewhat limited,so I am considering this as a proof of concept open to comment and suggestions.

Related to issue #2409

The result can be see below :

Hidden :
neighborshidden

Visible :

neighborsvisible

Louis Bailleul added some commits Nov 19, 2015
Louis Bailleul Add hide/show feature for neighbors interfaces in the device ports page 32f97ab
Louis Bailleul Remove unneeded changes
cc9fde6
Louis Bailleul Did not modified any styles so remove any changes in the file 40c7f8c
@laf
Member
laf commented Nov 19, 2015

Thanks @Alucardfh

Few things for me:

  • Can you sign the contributors agreement. An example is: vizay@f9c6941
  • Could you swap out the right and left arrows for + and - (we use that format elsewhere).
  • If no data is available for the right hand side the right arrow still appears indicating you have something to show. Can you remove it if no data exists?
  • Not sure I'm a fan of making all the cells clickable, stops you copy and pasting and also opening links up in new windows. Can that be removed?
@Alucardfh

I'll work on 1,2 and 3.

For 4, I made all the cells clickable because the whole row was clickable before.
But I agree that it can be annoying when you want to copy and paste or open in a new tab.

@laf
Member
laf commented Nov 19, 2015

K, leave 4 as is then for now. We had the same thing on devices lists :(

Louis Bailleul Only display plus icon if there is something to display
d66c18d
Louis Bailleul Only display plus sign if there is more than three neighbor interfaces
Take into account the number of ipv6 interfaces
b48dbc9
@laf laf merged commit d0bbe24 into librenms:master Nov 19, 2015

2 checks passed

Auto-Deploy Build finished. No test results found.
Details
Scrutinizer No new issues
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment