Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide plugin models from widgets if desired #12810

Closed
dreng opened this issue Jun 4, 2023 · 3 comments
Closed

Hide plugin models from widgets if desired #12810

dreng opened this issue Jun 4, 2023 · 3 comments
Labels
status: under review Further discussion is needed to determine this issue's scope and/or implementation type: feature Introduction of new functionality to the application

Comments

@dreng
Copy link
Contributor

dreng commented Jun 4, 2023

NetBox version

v3.5.4-dev

Feature type

Change to existing functionality

Proposed functionality

Please implement a parameter for plugin models in order to make them hide from widgets' config. Something like:

class Meta:
    widget = False

Use case

It turned out that a misconfiguration within a widget may render NetBox unusable. See #12520. In this case a user tried to create a widget that contains a model from the NetBox Topology Views Plugin. This model has never been intended to be listed or counted. It has only one special custom view and no list view.

Adding this model will result in an error. As a result, no page can be opened any more. It is not exactly a bug, but it looks like one to the user.

Implementing the proposed parameter let plugin developers prevent this misconfiguration.

Another Solution would be to check if the model supports being counted before it shows up in the widget configuration. I don't know if that would be an easier way.

Database changes

None

External dependencies

None that I am aware of.

@dreng dreng added the type: feature Introduction of new functionality to the application label Jun 4, 2023
@jeremystretch jeremystretch added the status: under review Further discussion is needed to determine this issue's scope and/or implementation label Jun 14, 2023
@jeremystretch
Copy link
Member

This model has never been intended to be listed or counted. It has only one special custom view and no list view.

This touches on the recurring theme of "public" vs "private" models in NetBox. We don't have a good solution for this currently.

@github-actions
Copy link
Contributor

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 github-actions bot added the pending closure Requires immediate attention to avoid being closed for inactivity label Sep 13, 2023
@jeremystretch
Copy link
Member

I think this will be captured under #13427, so let's capture any further conversation related to this use case under that issue.

@jeremystretch jeremystretch closed this as not planned Won't fix, can't repro, duplicate, stale Oct 6, 2023
@jeremystretch jeremystretch removed the pending closure Requires immediate attention to avoid being closed for inactivity label Oct 6, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: under review Further discussion is needed to determine this issue's scope and/or implementation type: feature Introduction of new functionality to the application
Projects
None yet
Development

No branches or pull requests

2 participants