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

Implement a UI mechanism for advanced object selection #10054

Closed
jeremystretch opened this issue Aug 17, 2022 · 1 comment
Closed

Implement a UI mechanism for advanced object selection #10054

jeremystretch opened this issue Aug 17, 2022 · 1 comment
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

v3.3.0

Feature type

New functionality

Proposed functionality

This FR seeks to provide the user a more convenient and obvious method for selecting a related object when creating and editing NetBox object.

For example, when creating a new device, the user must select a site and may select a location and/or rack within that site. To aid the user in selecting a site, NetBox provides drop-down selections to filter by region and site group:

Screenshot 2022-08-17 at 15-46-02 Add a new device NetBox

However, it is not obvious to the user that the site, location, and rack fields are attributes of the device, whereas region and site group are not. Ideally, the region and site group selections should be moved to a hidden modal that can be summoned if needed when selecting the site. I envision the following workflow:

  1. User clicks a button to create a new device
  2. User begins searching for the desired site
  3. If found, user selects the site and moves on. Otherwise, user clicks a "filter" button next to the site field, which opens a simple modal containing drop-down selections for region, site group, and site.
  4. User selects the desired region or site group, then finds the desired site from the filtered list.
  5. User dismisses the modal, and the desired site is now selected in the device form.

I expect that we can render the modal via standard utility views rendered using HTMX requests for minimal overhead.

Use case

Abstracting the fields which exist solely for filtering has several benefits:

  • The filters can be removed from form classes (as they do not play a direct role in object creation/modification)
  • It is more clear to the user exactly which attributes they are actually defining on the object
  • Screen space is saved by removing unneeded filters (e.g. in cases where searching for the related object suffices)
  • It will become more feasible to offer direct "add" links for child objects that were previously accessible only via a parent object (e.g. device components)

Database changes

No response

External dependencies

No response

@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 Oct 17, 2022
@jeremystretch jeremystretch added needs milestone Awaiting prioritization for inclusion with a future NetBox release and removed status: under review Further discussion is needed to determine this issue's scope and/or implementation pending closure Requires immediate attention to avoid being closed for inactivity labels Oct 17, 2022
@jeremystretch jeremystretch added this to the v3.5 milestone Jan 5, 2023
@jeremystretch jeremystretch added status: accepted This issue has been accepted for implementation and removed needs milestone Awaiting prioritization for inclusion with a future NetBox release labels Jan 5, 2023
@jeremystretch jeremystretch self-assigned this Mar 2, 2023
jeremystretch added a commit that referenced this issue Mar 13, 2023
…11952)

* WIP

* WIP

* WIP

* Make object selector functional

* Replace extraneous form fields with selector widgets

* Avoid overlap with filterset field names

* Show checkmarks next to visibile filters

* Update results automatically when searching

* Include selector for device/VM component parent fields

* Use selector for filtering VLAN group/site

* Limit selector to 100 results
jeremystretch added a commit that referenced this issue Mar 15, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 12, 2023
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

1 participant