[PR #3423] [MERGED] Add custom scripting #12557

Closed
opened 2025-12-29 22:22:15 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/3423
Author: @jeremystretch
Created: 8/12/2019
Status: Merged
Merged: 8/26/2019
Merged by: @jeremystretch

Base: developHead: 3415-custom-scripts


📝 Commits (10+)

  • a25a27f Initial work on custom scripts (#3415)
  • 9d054fb Add options for script vars; include script output
  • 4fc1974 Added documentation for custom scripts
  • 3f7f3f8 Fix form field ordering
  • c62a9f1 Example script tweak
  • 950a098 BooleanVar cannot be required
  • 463c636 Extend example custom script to generate output
  • ab50443 Implemented permissions for scripts
  • 19eb4c5 Move script attributes under a Meta class
  • 3e75da4 Implemented run_script() wrapper

📊 Changes

21 files changed (+1095 additions, -5 deletions)

View changed files

📝 .gitignore (+2 -0)
docs/additional-features/custom-scripts.md (+213 -0)
📝 docs/configuration/optional-settings.md (+8 -0)
📝 netbox/extras/forms.py (+31 -0)
📝 netbox/extras/middleware.py (+25 -1)
netbox/extras/migrations/0024_scripts.py (+23 -0)
📝 netbox/extras/models.py (+15 -0)
netbox/extras/scripts.py (+343 -0)
📝 netbox/extras/signals.py (+12 -0)
netbox/extras/templatetags/log_levels.py (+37 -0)
netbox/extras/tests/test_scripts.py (+157 -0)
📝 netbox/extras/urls.py (+7 -3)
📝 netbox/extras/views.py (+61 -1)
📝 netbox/netbox/settings.py (+1 -0)
📝 netbox/project-static/css/base.css (+3 -0)
netbox/scripts/__init__.py (+0 -0)
netbox/templates/extras/script.html (+110 -0)
netbox/templates/extras/script_list.html (+38 -0)
netbox/templates/extras/templatetags/log_level.html (+1 -0)
📝 netbox/templates/inc/nav_menu.html (+3 -0)

...and 1 more files

📄 Description

Closes: #3415

Introduces the ability to run arbitrary custom scripts with data provided via the NetBox UI


🔄 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/3423 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 8/12/2019 **Status:** ✅ Merged **Merged:** 8/26/2019 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `develop` ← **Head:** `3415-custom-scripts` --- ### 📝 Commits (10+) - [`a25a27f`](https://github.com/netbox-community/netbox/commit/a25a27f31f4d9971db5121d8a4270afb2e665e8a) Initial work on custom scripts (#3415) - [`9d054fb`](https://github.com/netbox-community/netbox/commit/9d054fb345b360257124a9fd3dadfb01b6969257) Add options for script vars; include script output - [`4fc1974`](https://github.com/netbox-community/netbox/commit/4fc19742ec74b8e45a0beae65c64b9ee2ede2729) Added documentation for custom scripts - [`3f7f3f8`](https://github.com/netbox-community/netbox/commit/3f7f3f88f3ab8409e7b6c290047a718ef7ed5995) Fix form field ordering - [`c62a9f1`](https://github.com/netbox-community/netbox/commit/c62a9f1b3f71e2fe8d06ccac63dbbee7820df999) Example script tweak - [`950a098`](https://github.com/netbox-community/netbox/commit/950a09895ba5b9a156b4420275d8342960b12508) BooleanVar cannot be required - [`463c636`](https://github.com/netbox-community/netbox/commit/463c6363011095ab12a0412801f417772e12e8d9) Extend example custom script to generate output - [`ab50443`](https://github.com/netbox-community/netbox/commit/ab504439fbab1693cdefee897390af0e6350130b) Implemented permissions for scripts - [`19eb4c5`](https://github.com/netbox-community/netbox/commit/19eb4c510c4737110e9944ddbc3d842ddb5ae70c) Move script attributes under a Meta class - [`3e75da4`](https://github.com/netbox-community/netbox/commit/3e75da4307db8a7c9ea018f1fbdf268f5f753f53) Implemented run_script() wrapper ### 📊 Changes **21 files changed** (+1095 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `.gitignore` (+2 -0) ➕ `docs/additional-features/custom-scripts.md` (+213 -0) 📝 `docs/configuration/optional-settings.md` (+8 -0) 📝 `netbox/extras/forms.py` (+31 -0) 📝 `netbox/extras/middleware.py` (+25 -1) ➕ `netbox/extras/migrations/0024_scripts.py` (+23 -0) 📝 `netbox/extras/models.py` (+15 -0) ➕ `netbox/extras/scripts.py` (+343 -0) 📝 `netbox/extras/signals.py` (+12 -0) ➕ `netbox/extras/templatetags/log_levels.py` (+37 -0) ➕ `netbox/extras/tests/test_scripts.py` (+157 -0) 📝 `netbox/extras/urls.py` (+7 -3) 📝 `netbox/extras/views.py` (+61 -1) 📝 `netbox/netbox/settings.py` (+1 -0) 📝 `netbox/project-static/css/base.css` (+3 -0) ➕ `netbox/scripts/__init__.py` (+0 -0) ➕ `netbox/templates/extras/script.html` (+110 -0) ➕ `netbox/templates/extras/script_list.html` (+38 -0) ➕ `netbox/templates/extras/templatetags/log_level.html` (+1 -0) 📝 `netbox/templates/inc/nav_menu.html` (+3 -0) _...and 1 more files_ </details> ### 📄 Description ### Closes: #3415 Introduces the ability to run arbitrary custom scripts with data provided via the NetBox UI --- <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 22:22:15 +01:00
adam closed this issue 2025-12-29 22:22:15 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#12557