netbox icon indicating copy to clipboard operation
netbox copied to clipboard

Dashboard widgets

Open jeremystretch opened this issue 3 years ago • 2 comments

NetBox version

v3.2.3

Feature type

New functionality

Proposed functionality

Allow customization of the NetBox dashboard (the default view) using content widgets that can be toggled and rearranged per the user's preferences. Some example widgets might include:

  • General object stats (similar to what exists today)
  • Most recent change log entries
  • Pinned objects (#8248)
  • Plugin content
  • RSS feed from https://netbox.dev

A widget would take the form of a Python class inheriting from some base class provided by NetBox, and would have its own rendering logic and HTML template (similar to a view). It might make sense to have different sizes of widget (e.g. small, medium, large) to enable some control over screen space utilization without getting too granular (perhaps by leveraging Bootstrap's 12-column layout).

Dashboard layout would be tracked as a per-user preference, and administrators can define a default layout.

Use case

The NetBox homepage currently lists only some statistics for hard-coded objects and the most recent entries from the change log. Moving to a customizable widget-based display affords users the opportunity to customize this view to include only the information most relevant to them.

Database changes

No response

External dependencies

No response

jeremystretch avatar May 24 '22 16:05 jeremystretch

It would be nice to have a way to "save" some list views with filters applied. For example I often found myself working on a set of devices, where I could filter a device list by some criteria. Getting back to that same filtered list is often more time consuming than it should be. (Yes I know multiple browser tabs and bookmarks exist, but... :)

I'm thinking if you could turn a list view into a widget (with one click) that had the same filters applied (essentially used the same URL) and it would show a count of matching objects with a link to that same view. Or even better, display a list of matching objects with perhaps action icons for each or something like that.

matejv avatar Jun 01 '22 06:06 matejv

Possible suggestion: For re-arrangeable widgets: https://jsfiddle.net/xlaptop2001/of7syvwx/ uses gridstack (pure javascript) and compatible with bootstrap.

arthanson avatar Aug 25 '22 22:08 arthanson

Unfortunately it doesn't look like we'll be able to squeeze this into v3.4, but hopefully we can tackle it in v3.5.

jeremystretch avatar Oct 27 '22 14:10 jeremystretch

Mostly there. Still have some cleanup to do and more widgets to add.

Screen recording of dashboard widgets prototype

jeremystretch avatar Feb 24 '23 13:02 jeremystretch

Not sure if its my chrome browser, but the headlines look much different from your gif. Are there some fonts missing? I like the look from your post much more. My screenshot is from https://beta-demo.netbox.dev/

image

Mostly there. Still have some cleanup to do and more widgets to add.

Screen recording of dashboard widgets prototype

julianstolp avatar Mar 31 '23 08:03 julianstolp

They look the same to me. No substantial design changes have been made since I posted that GIF. It's likely your system is using different fonts, but I don't believe that's specific to the widgets.

Happy to consider any design changes, but please open a new issue for any proposals as this one was solely to track the feature implementation and has been closed.

jeremystretch avatar Mar 31 '23 12:03 jeremystretch