Hide grid stack buttons when dashboard is locked #8284

Closed
opened 2025-12-29 20:34:44 +01:00 by adam · 7 comments
Owner

Originally created by @jsenecal on GitHub (Jul 3, 2023).

NetBox version

v3.5.4

Python version

3.8

Steps to Reproduce

1- Navigate to the dashboard page
2- Scroll down to confirm the dashboard is locked with the presence of the following button:
image
3- Click on the "cog" button at the top left corner of any dashboard cards.
4- Make any change and save.
5- Notice that your change was applied even though the dashboard is locked.

Expected Behavior

The cog-style and close buttons should be hidden when the dashboard is locked in order to prevent changes to the dashboard in modal forms or from the dashboard itself.

Observed Behavior

Changes to dashboard cards are not prevented when the dashboard is locked.

Originally created by @jsenecal on GitHub (Jul 3, 2023). ### NetBox version v3.5.4 ### Python version 3.8 ### Steps to Reproduce 1- Navigate to the dashboard page 2- Scroll down to confirm the dashboard is locked with the presence of the following button: ![image](https://github.com/netbox-community/netbox/assets/1564902/51e144f9-86f0-4f9f-8e5a-4d7fcc5c428a) 3- Click on the "cog" button at the top left corner of any dashboard cards. 4- Make any change and save. 5- Notice that your change was applied even though the dashboard is locked. ### Expected Behavior The `cog`-style and `close` buttons should be hidden when the dashboard is locked in order to prevent changes to the dashboard in modal forms or from the dashboard itself. ### Observed Behavior Changes to dashboard cards are not prevented when the dashboard is locked.
adam added the type: featurepending closurestatus: under reviewtopic: UI/UX labels 2025-12-29 20:34:44 +01:00
adam closed this issue 2025-12-29 20:34:44 +01:00
Author
Owner

@jsenecal commented on GitHub (Jul 3, 2023):

Related to changes submitted in 121e5c2c91 (fix included)

@jsenecal commented on GitHub (Jul 3, 2023): Related to changes submitted in https://github.com/netbox-community/netbox/pull/12664/commits/121e5c2c91b25629340e9767edeb2509267a9e3b (fix included)
Author
Owner

@jeremystretch commented on GitHub (Aug 17, 2023):

I'm not a fan of the proposed change. IMO it's much more convenient to allow the user to reconfigure and/or delete dashboard widgets directly. The concept of "locking" the dashboard pertained to restricting the repositioning (via Gridstack) of widgets within the dashboard, which (prior to the change) was happening accidentally, especially on mobile.

@jeremystretch commented on GitHub (Aug 17, 2023): I'm not a fan of the proposed change. IMO it's much more convenient to allow the user to reconfigure and/or delete dashboard widgets directly. The concept of "locking" the dashboard pertained to restricting the repositioning (via Gridstack) of widgets within the dashboard, which (prior to the change) was happening accidentally, especially on mobile.
Author
Owner

@jsenecal commented on GitHub (Aug 17, 2023):

The buttons add visual clutter to a view that is meant to be mostly informational.

Hiding these buttons can also be used to prevent an unauthenticated user to attempt to modify the displayed dashboard. (Another change would be required to hide the unlock button altogether when unauthenticated or when you dont have permission to do so)

image

@jsenecal commented on GitHub (Aug 17, 2023): The buttons add visual clutter to a view that is meant to be mostly informational. Hiding these buttons can also be used to prevent an unauthenticated user to attempt to modify the displayed dashboard. (Another change would be required to hide the unlock button altogether when unauthenticated or when you dont have permission to do so) ![image](https://github.com/netbox-community/netbox/assets/1564902/70d07c56-a758-403c-9c26-fc2c3d7d87df)
Author
Owner

@jeremystretch commented on GitHub (Aug 17, 2023):

The buttons add visual clutter to a view that is meant to be mostly informational.

I disagree. I think they're visible enough to ensure users know how and where to manipulate the widgets without getting in the way (no additional heading space is consumed).

Hiding these buttons can also be used to prevent an unauthenticated user to attempt to modify the displayed dashboard.

This should be resolved by not rendering the buttons for an unauthenticated user regardless of whether the dashboard is locked.

@jeremystretch commented on GitHub (Aug 17, 2023): > The buttons add visual clutter to a view that is meant to be mostly informational. I disagree. I think they're visible enough to ensure users know how and where to manipulate the widgets without getting in the way (no additional heading space is consumed). > Hiding these buttons can also be used to prevent an unauthenticated user to attempt to modify the displayed dashboard. This should be resolved by not rendering the buttons for an unauthenticated user regardless of whether the dashboard is locked.
Author
Owner

@jsenecal commented on GitHub (Aug 17, 2023):

This, to me, feels inconsistent with the rest of the behavior on the page, where only when unlocking you can add widgets or reset them.

Lock means locked, no changes. Unlocked allows for changes, any of them. This should be reflected on the whole dashboard IMO.

If the intended behavior of the "lock/unlock" buttons is only to prevent users from moving the widgets, I don't think we should hide the other buttons at the bottom.

@jsenecal commented on GitHub (Aug 17, 2023): This, to me, feels inconsistent with the rest of the behavior on the page, where only when unlocking you can add widgets or reset them. Lock means locked, no changes. Unlocked allows for changes, any of them. This should be reflected on the whole dashboard IMO. If the intended behavior of the "lock/unlock" buttons is only to prevent users from moving the widgets, I don't think we should hide the other buttons at the bottom.
Author
Owner

@github-actions[bot] commented on GitHub (Dec 13, 2023):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Do not attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our contributing guide.

@github-actions[bot] commented on GitHub (Dec 13, 2023): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. **Do not** attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our [contributing guide](https://github.com/netbox-community/netbox/blob/develop/CONTRIBUTING.md).
Author
Owner

@github-actions[bot] commented on GitHub (Jan 13, 2024):

This issue has been automatically closed due to lack of activity. In an effort to reduce noise, please do not comment any further. Note that the core maintainers may elect to reopen this issue at a later date if deemed necessary.

@github-actions[bot] commented on GitHub (Jan 13, 2024): This issue has been automatically closed due to lack of activity. In an effort to reduce noise, please do not comment any further. Note that the core maintainers may elect to reopen this issue at a later date if deemed necessary.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#8284