[PR #18501] [MERGED] Fixes: #18241 - Script results log_threshold should default to Default #15363

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/18501
Author: @renatoalmeidaoliveira
Created: 1/27/2025
Status: Merged
Merged: 2/6/2025
Merged by: @jeremystretch

Base: mainHead: 18241-fix-log-threshold-dropdown


📝 Commits (5)

  • ebef1b9 Changed LogLevelChoices order; Changed ScriptResultView to select LogLevelChoices to LOG_DEFAULT and setup the html template to put (All) in the last one
  • b53d1f5 Change LogLevelChoices in ScriptResultView get_table method
  • fd407f9 Remove default option, add Default string to INFO
  • 1d9388f Fix scripts.py and reports.py to reflect removing DEFAULT level
  • ba38ffb fix linting

📊 Changes

6 files changed (+14 additions, -17 deletions)

View changed files

📝 netbox/extras/choices.py (+1 -3)
📝 netbox/extras/constants.py (+4 -5)
📝 netbox/extras/reports.py (+1 -1)
📝 netbox/extras/scripts.py (+1 -1)
📝 netbox/extras/views.py (+6 -6)
📝 netbox/templates/extras/script_result.html (+1 -1)

📄 Description

Fixes: #18241 - Script results log_threshold should default to Default

  • Changes the LogLevelChoices Choices order, putting LOG_DEBUG in the last position.
  • Changes script_result.html dropdown to add the string (All) only to the last possition following the new LogLevelChoices order
  • Changes ScriptResultView get method to return log_threshold with LOG_DEFAULT instead of LOG_DEBUG

🔄 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/18501 **Author:** [@renatoalmeidaoliveira](https://github.com/renatoalmeidaoliveira) **Created:** 1/27/2025 **Status:** ✅ Merged **Merged:** 2/6/2025 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `main` ← **Head:** `18241-fix-log-threshold-dropdown` --- ### 📝 Commits (5) - [`ebef1b9`](https://github.com/netbox-community/netbox/commit/ebef1b983a57e4926623fc37706c55b9fb7c9106) Changed LogLevelChoices order; Changed ScriptResultView to select LogLevelChoices to LOG_DEFAULT and setup the html template to put (All) in the last one - [`b53d1f5`](https://github.com/netbox-community/netbox/commit/b53d1f5f0e3a9302044939c02d63a77d528cc532) Change LogLevelChoices in ScriptResultView get_table method - [`fd407f9`](https://github.com/netbox-community/netbox/commit/fd407f973c13ba7c0776752177ab69289e3bde52) Remove default option, add Default string to INFO - [`1d9388f`](https://github.com/netbox-community/netbox/commit/1d9388feaa5125e74cc044439961f67e817766b2) Fix scripts.py and reports.py to reflect removing DEFAULT level - [`ba38ffb`](https://github.com/netbox-community/netbox/commit/ba38ffb005c6e126f574168dd2a702d3a2fe570f) fix linting ### 📊 Changes **6 files changed** (+14 additions, -17 deletions) <details> <summary>View changed files</summary> 📝 `netbox/extras/choices.py` (+1 -3) 📝 `netbox/extras/constants.py` (+4 -5) 📝 `netbox/extras/reports.py` (+1 -1) 📝 `netbox/extras/scripts.py` (+1 -1) 📝 `netbox/extras/views.py` (+6 -6) 📝 `netbox/templates/extras/script_result.html` (+1 -1) </details> ### 📄 Description ### Fixes: #18241 - Script results log_threshold should default to Default * Changes the LogLevelChoices `Choices` order, putting `LOG_DEBUG` in the last position. * Changes `script_result.html` dropdown to add the string `(All)` only to the last possition following the new `LogLevelChoices` order * Changes `ScriptResultView` get method to return `log_threshold` with `LOG_DEFAULT` instead of `LOG_DEBUG` --- <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:21:30 +01:00
adam closed this issue 2025-12-30 00:21:30 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#15363