Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

renatoalmeidaoliveira
Copy link
Contributor

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

@DanSheps DanSheps requested a review from bctiemann January 27, 2025 18:42
@@ -162,12 +162,12 @@ class LogLevelChoices(ChoiceSet):
LOG_FAILURE = 'failure'

CHOICES = (
(LOG_DEBUG, _('Debug'), 'teal'),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this changed? I think the ordering is supposed to be of increasing severity. Also this should stay consistent with the order of the constants above and in LOG_LEVEL_RANK.

Is there something gained by changing the order here and the .first to .last in the template?

@@ -1315,17 +1315,17 @@ def get_table(self, job, request, bulk_actions=True):
index = 0

try:
log_threshold = LOG_LEVEL_RANK[request.GET.get('log_threshold', LogLevelChoices.LOG_DEBUG)]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Were these supposed to be changed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Script results log_threshold should default to Default
2 participants