Implement pagination, filtering, and export functionality for report and script results #7086

Closed
opened 2025-12-29 20:19:01 +01:00 by adam · 9 comments
Owner

Originally created by @atownson on GitHub (Oct 6, 2022).

Originally assigned to: @arthanson on GitHub.

NetBox version

v3.3.5

Feature type

New functionality

Proposed functionality

My proposal is to implement pagination, filtering, and export options for the report Report Results panel and the script Script Log panel.

For pagination, implement pagination for reports (Report Results panel) and scripts (Script Log panel) in the same manner as the model table pages, with a Per Page input.

As far as filtering for reports, the current Report Methods panel provides hyperlinks to the method results in the Report Results panel. Instead of grouping the results by Method in the Report Results panel, create a new "Method" column which could be filtered. Perhaps the Report Methods panel hyperlinks could be transitioned to provide quick filters rather than hyperlinks. My suggestion for filtering options would be to provide dropdown inputs to filter the Method and Level fields and textboxes to filter the Object and Message fields. Filters could be provided in a Filters tab, similar to the model table pages, to conserve real estate on the page.

My suggestion for filtering the Script Log for scripts would be to provide a dropdown input to filter the Level field and a textbox to search the Message field.

For export, implement exporting for reports (Report Results panel) and scripts (Script Log panel) in a similar manner as the model table pages, with an Export dropdown. I don't see a need for export template functionality. But rather simply "Export All" and "Export Filtered" options to export all results and the currently filtered results respectively.

Use case

Pagination would prevent the page content from becoming too large if many results are returned.

Filtering would allow users to better organize or search the results.

Export functionality would allow the results to be used outside the NetBox environment (i.e. emailed to users to correct certain modeling mistakes).

Database changes

None

External dependencies

None

Originally created by @atownson on GitHub (Oct 6, 2022). Originally assigned to: @arthanson on GitHub. ### NetBox version v3.3.5 ### Feature type New functionality ### Proposed functionality My proposal is to implement pagination, filtering, and export options for the report Report Results panel and the script Script Log panel. For pagination, implement pagination for reports (Report Results panel) and scripts (Script Log panel) in the same manner as the model table pages, with a **Per Page** input. As far as filtering for reports, the current **Report Methods** panel provides hyperlinks to the method results in the **Report Results** panel. Instead of grouping the results by **Method** in the **Report Results** panel, create a new "Method" column which could be filtered. Perhaps the **Report Methods** panel hyperlinks could be transitioned to provide quick filters rather than hyperlinks. My suggestion for filtering options would be to provide dropdown inputs to filter the **Method** and **Level** fields and textboxes to filter the **Object** and **Message** fields. Filters could be provided in a **Filters** tab, similar to the model table pages, to conserve real estate on the page. My suggestion for filtering the **Script Log** for scripts would be to provide a dropdown input to filter the **Level** field and a textbox to search the **Message** field. For export, implement exporting for reports (Report Results panel) and scripts (Script Log panel) in a similar manner as the model table pages, with an **Export** dropdown. I don't see a need for export template functionality. But rather simply "Export All" and "Export Filtered" options to export all results and the currently filtered results respectively. ### Use case Pagination would prevent the page content from becoming too large if many results are returned. Filtering would allow users to better organize or search the results. Export functionality would allow the results to be used outside the NetBox environment (i.e. emailed to users to correct certain modeling mistakes). ### Database changes None ### External dependencies None
adam added the status: acceptedtype: feature labels 2025-12-29 20:19:01 +01:00
adam closed this issue 2025-12-29 20:19:02 +01:00
Author
Owner

@kkthxbye-code commented on GitHub (Oct 6, 2022):

Some of this will be covered when I finish job scheduling:

https://github.com/netbox-community/netbox/pull/10417

However probably not exactly you describe it. I actually have a hard time visualising exactly what you are suggesting, could you perhaps make some crude drawings?

@kkthxbye-code commented on GitHub (Oct 6, 2022): Some of this will be covered when I finish job scheduling: https://github.com/netbox-community/netbox/pull/10417 However probably not exactly you describe it. I actually have a hard time visualising exactly what you are suggesting, could you perhaps make some crude drawings?
Author
Owner

@atownson commented on GitHub (Oct 6, 2022):

@kkthxbye-code, here's an illustration for Scripts:
image

@atownson commented on GitHub (Oct 6, 2022): @kkthxbye-code, here's an illustration for Scripts: ![image](https://user-images.githubusercontent.com/52260120/194366299-8d829610-a6c0-4fb0-bf1f-b5d7c15daf5f.png)
Author
Owner

@atownson commented on GitHub (Oct 6, 2022):

@kkthxbye-code, here's an illustration for Reports:
image

@atownson commented on GitHub (Oct 6, 2022): @kkthxbye-code, here's an illustration for Reports: ![image](https://user-images.githubusercontent.com/52260120/194372345-8cef8341-2595-4ff2-b0ad-9c28ab30ea5f.png)
Author
Owner

@github-actions[bot] commented on GitHub (Dec 6, 2022):

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 6, 2022): 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

@jeremystretch commented on GitHub (Dec 27, 2022):

Related: #9376

@jeremystretch commented on GitHub (Dec 27, 2022): Related: #9376
Author
Owner

@renatoalmeidaoliveira commented on GitHub (Feb 3, 2023):

@atownson since you are working in scripts, maybe some kind of "script hook" could be a nice feature.
That way the user can setup a script to be runned when something changes in Netbox

@renatoalmeidaoliveira commented on GitHub (Feb 3, 2023): @atownson since you are working in scripts, maybe some kind of "script hook" could be a nice feature. That way the user can setup a script to be runned when something changes in Netbox
Author
Owner

@jeremystretch commented on GitHub (Mar 2, 2023):

Great idea! @renatoalmeidaoliveira I just opened FR #11827 for this.

@jeremystretch commented on GitHub (Mar 2, 2023): Great idea! @renatoalmeidaoliveira I just opened FR #11827 for this.
Author
Owner

@ryanmerolle commented on GitHub (Mar 23, 2023):

pushed to 3.6 milestone

@ryanmerolle commented on GitHub (Mar 23, 2023): pushed to 3.6 milestone
Author
Owner

@lucasalvatore commented on GitHub (Jul 25, 2023):

👋 would love to be able to filter reports on the UI based on level (or any other row heading really)
e.g., running a report on this many devices:

image

is hard to get value out of the results due to so many devices on a single page. Would love to filter these

@lucasalvatore commented on GitHub (Jul 25, 2023): 👋 would love to be able to filter reports on the UI based on level (or any other row heading really) e.g., running a report on this many devices: ![image](https://github.com/netbox-community/netbox/assets/32399029/187deb2e-d5e5-42f5-bad7-09d0e1b20786) is hard to get value out of the results due to so many devices on a single page. Would love to filter these
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#7086