Dashboard broken after adding widget #10831

Closed
opened 2025-12-29 21:36:25 +01:00 by adam · 5 comments
Owner

Originally created by @ed-ud on GitHub (Feb 28, 2025).

Originally assigned to: @jnovinger on GitHub.

Deployment Type

Self-hosted

NetBox Version

v4.2.3

Python Version

3.12

Steps to Reproduce

  1. Go to main dashboard page and click Unlock.
  2. Click Add Widget.
  3. Select object type Notifications.
  4. Click Save.

Dashboard gets the error from the screenshot below.

Expected Behavior

We shouldn't be able to select models that don't work, or cause the dashboard to break.

Observed Behavior

Image

Originally created by @ed-ud on GitHub (Feb 28, 2025). Originally assigned to: @jnovinger on GitHub. ### Deployment Type Self-hosted ### NetBox Version v4.2.3 ### Python Version 3.12 ### Steps to Reproduce 1. Go to main dashboard page and click Unlock. 2. Click Add Widget. 3. Select object type Notifications. 4. Click Save. Dashboard gets the error from the screenshot below. ### Expected Behavior We shouldn't be able to select models that don't work, or cause the dashboard to break. ### Observed Behavior ![Image](https://github.com/user-attachments/assets/7afbf649-4691-4e96-9357-27e3a09693b5)
adam added the type: bugstatus: acceptedseverity: medium labels 2025-12-29 21:36:25 +01:00
adam closed this issue 2025-12-29 21:36:25 +01:00
Author
Owner

@arthanson commented on GitHub (Mar 3, 2025):

@ed-ud Can you please re-check and update the reproduction steps. There is no "object type" Notifications by default, there is a Widget type. I tried Widget Type: object Counts and Models: Extras > Notifications, but that worked fine on mine.

Image

@arthanson commented on GitHub (Mar 3, 2025): @ed-ud Can you please re-check and update the reproduction steps. There is no "object type" Notifications by default, there is a Widget type. I tried Widget Type: object Counts and Models: Extras > Notifications, but that worked fine on mine. ![Image](https://github.com/user-attachments/assets/886b3ca4-d68b-4842-82b2-eb9ea50cb437)
Author
Owner

@ed-ud commented on GitHub (Mar 3, 2025):

Sorry... select Object List and then select Model: Extras > Notification

@ed-ud commented on GitHub (Mar 3, 2025): Sorry... select Object List and then select Model: Extras > Notification
Author
Owner

@arthanson commented on GitHub (Mar 4, 2025):

This is hard to get to do, and there is the workaround, but once you do this the dashboard is hosed and people will need to lookup how to clear the dashboard out, should be an easy fix so marking as medium priority.

@arthanson commented on GitHub (Mar 4, 2025): This is hard to get to do, and there is the workaround, but once you do this the dashboard is hosed and people will need to lookup how to clear the dashboard out, should be an easy fix so marking as medium priority.
Author
Owner

@ed-ud commented on GitHub (Mar 4, 2025):

Someone can try to put their Notifications on the dashboard - seems like a reasonable thing to do.
It's not really "hard to get to do"... you just add a normal widget the normal way, nothing odd about it.

@ed-ud commented on GitHub (Mar 4, 2025): Someone can try to put their Notifications on the dashboard - seems like a reasonable thing to do. It's not really "hard to get to do"... you just add a normal widget the normal way, nothing odd about it.
Author
Owner

@jnovinger commented on GitHub (Mar 4, 2025):

Wrote a regression-ish test for this along with an ObjectListWidget.ConfigForm.clean_model() method, which caught the same issue with the following object type choices:

  + [
  +     'Core > Object Type',
  +     'DCIM > Cable Termination',
  +     'DCIM > Console Port Template',
  +     'DCIM > Console Server Port Template',
  +     'DCIM > Device Bay Template',
  +     'DCIM > Front Port Template',
  +     'DCIM > Interface Template',
  +     'DCIM > Inventory Item Template',
  +     'DCIM > Module Bay Template',
  +     'DCIM > Power Outlet Template',
  +     'DCIM > Power Port Template',
  +     'DCIM > Rear Port Template',
  +     'Extras > Bookmark',
  +     'Extras > Branch',
  +     'Extras > Dashboard',
  +     'Extras > Notification',
  +     'Extras > Staged Change',
  +     'Extras > Subscription',
  +     'IPAM > FHRP Group Assignment',
  + ]
@jnovinger commented on GitHub (Mar 4, 2025): Wrote a regression-ish test for this along with an `ObjectListWidget.ConfigForm.clean_model()` method, which caught the same issue with the following object type choices: ``` + [ + 'Core > Object Type', + 'DCIM > Cable Termination', + 'DCIM > Console Port Template', + 'DCIM > Console Server Port Template', + 'DCIM > Device Bay Template', + 'DCIM > Front Port Template', + 'DCIM > Interface Template', + 'DCIM > Inventory Item Template', + 'DCIM > Module Bay Template', + 'DCIM > Power Outlet Template', + 'DCIM > Power Port Template', + 'DCIM > Rear Port Template', + 'Extras > Bookmark', + 'Extras > Branch', + 'Extras > Dashboard', + 'Extras > Notification', + 'Extras > Staged Change', + 'Extras > Subscription', + 'IPAM > FHRP Group Assignment', + ] ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#10831