[PR #15343] [MERGED] 10587 script pagination #14579

Closed
opened 2025-12-29 23:25:18 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/15343
Author: @arthanson
Created: 3/4/2024
Status: Merged
Merged: 3/7/2024
Merged by: @jeremystretch

Base: featureHead: 10587-script-pagination


📝 Commits (7)

📊 Changes

7 files changed (+241 additions, -133 deletions)

View changed files

📝 netbox/extras/migrations/0108_convert_reports_to_scripts.py (+0 -3)
📝 netbox/extras/migrations/0109_script_model.py (+12 -4)
📝 netbox/extras/migrations/0110_remove_eventrule_action_parameters.py (+3 -0)
📝 netbox/extras/tables/tables.py (+61 -1)
📝 netbox/extras/views.py (+56 -1)
📝 netbox/templates/extras/htmx/script_result.html (+49 -110)
📝 netbox/templates/extras/script_result.html (+60 -14)

📄 Description

Fixes: #10587

Makes the script logs use a tables2 table which allows pagination and sorting of columns. There were a couple bugs in the scripts migrations which this fixes (was causing jobs not to get correctly mapped from old script/report runs).

Original FR asked for filtering and export, however the logs are stored as a dict and filtering requires a queryset so filtering is not possible without converting the individual logs lines to be stored as regular DB objects.
Table configuration is implemented but not tested as table configuration is currently broken across all views.

Monosnap DeviceConnectionsReport | NetBox 2024-03-04 13-44-08


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/15343 **Author:** [@arthanson](https://github.com/arthanson) **Created:** 3/4/2024 **Status:** ✅ Merged **Merged:** 3/7/2024 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `feature` ← **Head:** `10587-script-pagination` --- ### 📝 Commits (7) - [`4e0c99b`](https://github.com/netbox-community/netbox/commit/4e0c99b8b000dec6d5b4f3ff28ed1e75891724f8) 10587 temp commit - [`c027c4f`](https://github.com/netbox-community/netbox/commit/c027c4fa24b8eb9f37049f6cdd6da6a10e1b9e68) 10587 temp commit - [`bbdf5c7`](https://github.com/netbox-community/netbox/commit/bbdf5c76cbfb8fc1cf1c8d693207204d79955b41) 10587 fix migrations - [`7d44da0`](https://github.com/netbox-community/netbox/commit/7d44da0a2afda54186d0cec37a9586593b1f7c17) 10587 pagination - [`ab9734a`](https://github.com/netbox-community/netbox/commit/ab9734a9d89a2b3ff13ff57e266da746dd1125b2) 10587 pagination - [`44fa0cb`](https://github.com/netbox-community/netbox/commit/44fa0cba1820ead192e954479c1bc79428272b75) 10587 pagination - [`954c406`](https://github.com/netbox-community/netbox/commit/954c406b0e463a6ba1ea89d1f47d849c3dc0fa21) 10587 review changes ### 📊 Changes **7 files changed** (+241 additions, -133 deletions) <details> <summary>View changed files</summary> 📝 `netbox/extras/migrations/0108_convert_reports_to_scripts.py` (+0 -3) 📝 `netbox/extras/migrations/0109_script_model.py` (+12 -4) 📝 `netbox/extras/migrations/0110_remove_eventrule_action_parameters.py` (+3 -0) 📝 `netbox/extras/tables/tables.py` (+61 -1) 📝 `netbox/extras/views.py` (+56 -1) 📝 `netbox/templates/extras/htmx/script_result.html` (+49 -110) 📝 `netbox/templates/extras/script_result.html` (+60 -14) </details> ### 📄 Description ### Fixes: #10587 Makes the script logs use a tables2 table which allows pagination and sorting of columns. There were a couple bugs in the scripts migrations which this fixes (was causing jobs not to get correctly mapped from old script/report runs). Original FR asked for filtering and export, however the logs are stored as a dict and filtering requires a queryset so filtering is not possible without converting the individual logs lines to be stored as regular DB objects. Table configuration is implemented but not tested as table configuration is currently broken across all views. ![Monosnap DeviceConnectionsReport | NetBox 2024-03-04 13-44-08](https://github.com/netbox-community/netbox/assets/99642/3ea76094-ce45-499f-9635-fdfed991f55c) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 23:25:18 +01:00
adam closed this issue 2025-12-29 23:25:18 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#14579