[PR #12091] [MERGED] #12081: Script & report cleanup #13906

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/12091
Author: @jeremystretch
Created: 3/29/2023
Status: Merged
Merged: 3/29/2023
Merged by: @jeremystretch

Base: featureHead: 12081-cleanup


📝 Commits (7)

  • 48ee8a9 start() and terminate() methods on Job should call save()
  • c915d23 Fix display of associated jobs
  • 556353c Introduce get_latest_jobs() method on JobsMixin
  • 22aaa7d Update messaging when no reports/scripts exist
  • f4fe7a1 Catch ImportErrors when rendering report/script lists
  • 4da655c Fix loading of nested modules
  • 27f1c6e Fix URLs for nested scripts/reports

📊 Changes

11 files changed (+129 additions, -130 deletions)

View changed files

📝 netbox/core/models/jobs.py (+4 -3)
📝 netbox/extras/migrations/0091_create_managedfiles.py (+2 -9)
📝 netbox/extras/models/mixins.py (+12 -11)
📝 netbox/extras/models/reports.py (+7 -1)
📝 netbox/extras/models/scripts.py (+3 -1)
📝 netbox/extras/reports.py (+1 -2)
📝 netbox/extras/urls.py (+5 -5)
📝 netbox/extras/views.py (+8 -27)
📝 netbox/netbox/models/features.py (+14 -2)
📝 netbox/templates/extras/report_list.html (+51 -49)
📝 netbox/templates/extras/script_list.html (+22 -20)

📄 Description

Closes: #12081

  • Calling .start() or .terminate() on a Job saves the entire instance
  • Fixed support for nested modules
  • Update template content displayed when reports/scripts have not been loaded

🔄 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/12091 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 3/29/2023 **Status:** ✅ Merged **Merged:** 3/29/2023 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `feature` ← **Head:** `12081-cleanup` --- ### 📝 Commits (7) - [`48ee8a9`](https://github.com/netbox-community/netbox/commit/48ee8a94b4093605639c491a808eed9067c35ff4) start() and terminate() methods on Job should call save() - [`c915d23`](https://github.com/netbox-community/netbox/commit/c915d2360c192a5272deba8d7448854707eeff40) Fix display of associated jobs - [`556353c`](https://github.com/netbox-community/netbox/commit/556353c2f3dc5e3cf17e40afc11bd1b3e5504e8e) Introduce get_latest_jobs() method on JobsMixin - [`22aaa7d`](https://github.com/netbox-community/netbox/commit/22aaa7d0978ba6731058b63f0a474e31608baaa6) Update messaging when no reports/scripts exist - [`f4fe7a1`](https://github.com/netbox-community/netbox/commit/f4fe7a1f9e414969ff8df3e80d8b2895940dab77) Catch ImportErrors when rendering report/script lists - [`4da655c`](https://github.com/netbox-community/netbox/commit/4da655c16309436f6e2173f96372128e876ff534) Fix loading of nested modules - [`27f1c6e`](https://github.com/netbox-community/netbox/commit/27f1c6eadf305f64af2a36edf5480e37b5ed7358) Fix URLs for nested scripts/reports ### 📊 Changes **11 files changed** (+129 additions, -130 deletions) <details> <summary>View changed files</summary> 📝 `netbox/core/models/jobs.py` (+4 -3) 📝 `netbox/extras/migrations/0091_create_managedfiles.py` (+2 -9) 📝 `netbox/extras/models/mixins.py` (+12 -11) 📝 `netbox/extras/models/reports.py` (+7 -1) 📝 `netbox/extras/models/scripts.py` (+3 -1) 📝 `netbox/extras/reports.py` (+1 -2) 📝 `netbox/extras/urls.py` (+5 -5) 📝 `netbox/extras/views.py` (+8 -27) 📝 `netbox/netbox/models/features.py` (+14 -2) 📝 `netbox/templates/extras/report_list.html` (+51 -49) 📝 `netbox/templates/extras/script_list.html` (+22 -20) </details> ### 📄 Description ### Closes: #12081 - Calling `.start()` or `.terminate()` on a Job saves the entire instance - Fixed support for nested modules - Update template content displayed when reports/scripts have not been loaded --- <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:21:28 +01:00
adam closed this issue 2025-12-29 23:21:28 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#13906