Netbox: Device Name when we hover over a device with Image

Created on 26 Feb 2020  路  6Comments  路  Source: netbox-community/netbox

Environment

  • Python version: 3.6.8 -->
  • NetBox version: 2.7.7

Proposed Functionality

Is it possible to show the device name as a tool tip when we hover over a device in rack layout.The new Feature to add images is nice but we cannot see the device name until we click the device and go inside it.

Use Case

Helpful in identifying the devices like chassis,Network quickly in rack layout with Images shown in rack view

Database Changes

NA

External Dependencies

NA

accepted

All 6 comments

This could be browser or settings dependent, because the hover tooltip with device details is already implemented and it shows for me in Chrome, FF and Edge (Tested in NB 2.7.3, 2.7.7 and 2.7.8).

@czarnian That shows the Device Type on 2.7.8

This should be a fairly trivial change.

Personally I think the device names are more important than the images, and should always appear on top of the images, maybe with an outline (or some cleverness to select a contrasting colour) to ensure contrast. On hover, the image opacity could be reduced to increase the text contrast.

It's probably a good idea to include some way to ensure contrast even if the text only appears on hover, either decreasing image opacity or adding an outline.

I suggest this SVG/CSS:

<defs>
<filter id="outline">
  <feMorphology operator="dilate" radius="1"/>
  <feColorMatrix type="matrix" values="
  -1 0 0 1 0
  0 -1 0 1 0
  0 0 -1 1 0
  0 0 0  1 0" result="outline"/>
  <feMerge>
    <feMergeNode in="outline"/>
    <feMergeNode in="SourceGraphic"/>
  </feMerge>
</filter>
</defs>
text {
  ...
  filter: url(#outline);
  pointer-events: none; /* make hover event pass through to image */
}
image:hover {
  opacity: 50%;
}

I disagree. device name on top of the picture renders the picture useless. maybe the default should be flipped. only show the pictures when the user selects this. this would restore the default behaviour.

Out of curiosity, other than looking pretty, what use do you get out of the picture, particularly such that it'd be compromised by putting text over it?

As per the original request, the name is most likely just going to be in the tooltip, any other requests will be out of scope.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hellerve picture hellerve  路  3Comments

VictorJ76 picture VictorJ76  路  3Comments

markve-sa picture markve-sa  路  4Comments

mrfroggg picture mrfroggg  路  3Comments

robbagithub picture robbagithub  路  3Comments