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

Replace the Django admin UI #6466

Closed
jeremystretch opened this issue May 21, 2021 · 2 comments
Closed

Replace the Django admin UI #6466

jeremystretch opened this issue May 21, 2021 · 2 comments
Assignees
Labels
status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application
Milestone

Comments

@jeremystretch
Copy link
Member

NetBox version

v2.11.3

Feature type

New functionality

Proposed functionality

NetBox currently relies on Django's built-in administrative UI to manage the following objects:

  • Custom fields
  • Custom links
  • Export templates
  • Webhooks
  • User keys (deprecated)
  • Users
  • Groups
  • Permissions
  • REST API tokens

The admin UI also provides an interface into job results, background tasks, and installed plugins.

This issue proposes replicating the necessary views within the main NetBox UI and eliminating our dependence on the Django admin UI entirely.

Use case

While the Django admin UI is an incredibly powerful and valuable tool, we have reached the point in NetBox development where we no longer need to rely on it. Providing our own views to manage these objects provides a more consistent user experience and eliminates an extra dimension of standardization and testing.

Database changes

No response

External dependencies

No response

@jeremystretch jeremystretch added type: feature Introduction of new functionality to the application status: under review Further discussion is needed to determine this issue's scope and/or implementation labels May 21, 2021
@jeremystretch jeremystretch added status: accepted This issue has been accepted for implementation and removed status: under review Further discussion is needed to determine this issue's scope and/or implementation labels May 25, 2021
@jeremystretch jeremystretch added this to the v3.0 milestone May 25, 2021
@jeremystretch jeremystretch self-assigned this Jun 15, 2021
@jeremystretch
Copy link
Member Author

While we can move the NetBox components to their own views, we might still want to keep the Django admin UI around for two reasons.

First, we use Django's stock User and Group models from django.contrib.auth, which don't fit the pattern of determining e.g. URL paths from a model's app_label. While we can employ proxy models to work around this in some cases, this doesn't address all potential conflicts. And unfortunately, moving to a custom user model would be quite a headache.

Second, some NetBox plugins rely on the Django admin UI for administration of their own models. Indeed, it is currently a documented feature of the plugins API. I'm not sure we want to give that up.

Maybe we should scale back the scope of this proposal to just focus on moving out the "NetBox stuff" (custom fields, etc.) into standard views. Thoughts?

@ziggekatten
Copy link

Completely agree. Mostly as moving away from current admin would wreck alot of our scripts and integrations. Probably all of them.....

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application
Projects
None yet
Development

No branches or pull requests

2 participants