[PR #19646] [CLOSED] Fixes: #19492: Add Save Button to Script Output Window #15692

Closed
opened 2025-12-30 00:23:26 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/19646
Author: @Omripresent
Created: 6/4/2025
Status: Closed

Base: mainHead: feat-19492


📝 Commits (5)

  • a483c85 Implements #19492: Add Save Button to Script Output Window
  • 62343b1 Add support for exporting job log as CSV
  • b0f61c6 Merge branch 'netbox-community:main' into feat-19492
  • c3828aa Remove log output feature
  • bd4c7c8 Remove unused imports

📊 Changes

2 files changed (+23 additions, -2 deletions)

View changed files

📝 netbox/extras/views.py (+10 -0)
📝 netbox/templates/extras/htmx/script_result.html (+13 -2)

📄 Description

Fixes: #19492: Add Save Button to Script Output Window

  • Added download button to script_result.html template following the same model of object_render_config.html
  • Added logic to ScriptResultView.get function to trigger content download when matching log or output.
    • Output export responds with the raw content of the script result
    • Log export responds with a CSV formatted content of the log table matching the visible table columns (works for both scripts and reports)

🔄 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/19646 **Author:** [@Omripresent](https://github.com/Omripresent) **Created:** 6/4/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `feat-19492` --- ### 📝 Commits (5) - [`a483c85`](https://github.com/netbox-community/netbox/commit/a483c85165b50d9feca2443cf9cdcbd26ab60afe) Implements #19492: Add Save Button to Script Output Window - [`62343b1`](https://github.com/netbox-community/netbox/commit/62343b124deb93b2f443523946386c32a2dd5b88) Add support for exporting job log as CSV - [`b0f61c6`](https://github.com/netbox-community/netbox/commit/b0f61c62888417ee983fcfb416cf11208d6a9e93) Merge branch 'netbox-community:main' into feat-19492 - [`c3828aa`](https://github.com/netbox-community/netbox/commit/c3828aa142a9fcf44d9a45e10f62c29f2f138764) Remove log output feature - [`bd4c7c8`](https://github.com/netbox-community/netbox/commit/bd4c7c8151a1839f3a48b420fe5cce3e104615c9) Remove unused imports ### 📊 Changes **2 files changed** (+23 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `netbox/extras/views.py` (+10 -0) 📝 `netbox/templates/extras/htmx/script_result.html` (+13 -2) </details> ### 📄 Description <!-- Thank you for your interest in contributing to NetBox! Please note that our contribution policy requires that a feature request or bug report be approved and assigned prior to opening a pull request. This helps avoid waste time and effort on a proposed change that we might not be able to accept. IF YOUR PULL REQUEST DOES NOT REFERENCE AN ISSUE WHICH HAS BEEN ASSIGNED TO YOU, IT WILL BE CLOSED AUTOMATICALLY. Please specify your assigned issue number on the line below. --> ### Fixes: #19492: Add Save Button to Script Output Window * Added download button to `script_result.html` template following the same model of `object_render_config.html` * Added logic to `ScriptResultView.get` function to trigger content download when matching log or output. * Output export responds with the raw content of the script result * Log export responds with a CSV formatted content of the log table matching the visible table columns (works for both scripts and reports) <!-- Please include a summary of the proposed changes below. --> --- <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-30 00:23:26 +01:00
adam closed this issue 2025-12-30 00:23:26 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#15692