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

Searchable Contact Assignments per Content-Type in API/UI #8645

Closed
moonrail opened this issue Feb 15, 2022 · 0 comments · Fixed by #8742
Closed

Searchable Contact Assignments per Content-Type in API/UI #8645

moonrail opened this issue Feb 15, 2022 · 0 comments · Fixed by #8742
Labels
status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation type: feature Introduction of new functionality to the application

Comments

@moonrail
Copy link

moonrail commented Feb 15, 2022

NetBox version

v3.1.7

Feature type

New functionality

Proposed functionality

I propose adding query/filter parameters in the API & UI on each Content-Type, that is supported by Contact Assignments.

So it would be possible to just filter by Contact & Contact-Role to receive all matching Objects:
virtualization/virtual-machines/?contact=Some%20Team&contact_role=administration

If the direct integration is not the design pattern desired by the maintainers, and it should be kept as a standalone endpoint/functionality, the UI at least requires a combined filterable list on all Contact Assignments, that basically represents the API endpoint /api/tenancy/contact-assignments/ for users being able to leverage this useful feature.
Like with /dcim/interfaces/ in the UI.

Use case

Currently the only places for viewing Contact Assignments in the UI are:

  • on the Contact itself
  • on the Contact-Role itself
  • on the Object itself

All these pages provide no further filtering on shown Contact Assignments.

Consider having a Contact that has more than a handful of Devices, VMs, Virtual-Chassis and Clusters assigned - how would one leverage the UI to find all VMs, the Contact is an "Administrator" for?

Via API it is possible to filter for NetBox Objects by Contact & Contact-Role, e.g.:
api/tenancy/contact-assignments/?content_type=virtualization.virtualmachine&contact_id=6&role=administration

Database changes

None

External dependencies

None

@moonrail moonrail added the type: feature Introduction of new functionality to the application label Feb 15, 2022
@moonrail moonrail changed the title Searchable Contact Assignments per Content-Type in UI Searchable Contact Assignments per Content-Type in API/UI Feb 15, 2022
@jeremystretch jeremystretch added the status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation label Feb 18, 2022
minitriga added a commit to minitriga/netbox that referenced this issue Feb 24, 2022
jeremystretch added a commit that referenced this issue Mar 18, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation type: feature Introduction of new functionality to the application
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants