Skip to content

Conversation

hmpf
Copy link
Contributor

@hmpf hmpf commented Jul 10, 2025

Scope and purpose

Replaces #1385
Fixes #1382
Depends on #1512

Adds consistency and validation to ALL recognized GET-parameters on the incident list page.

With Django 5.2 we could go a step further in cleaning up this, some code taken from #1385. There should be no visible changes or changes to UX.

First step is #1512

Contributor Checklist

Every pull request should have this checklist filled out, no matter how small it is.
More information about contributing to Argus can be found in the
Development docs.

  • Added a changelog fragment for towncrier
    • invisible change, just slighter higher security
  • Added/amended tests for new/changed code
  • Added/changed documentation, including updates to the user manual if feature flow or UI is considerably changed
    • invisible change
  • Linted/formatted the code with ruff and djLint, easiest by using pre-commit
  • The first line of the commit message continues the sentence "If applied, this commit will ...", starts with a capital letter, does not end with punctuation and is 50 characters or less long. See our how-to
  • If applicable: Created new issues if this PR does not fix the issue completely/there is further work to be done

Copy link

@hmpf hmpf marked this pull request as ready for review July 10, 2025 14:38
@hmpf hmpf self-assigned this Jul 10, 2025
@hmpf hmpf added frontend Affects frontend DevEx labels Jul 10, 2025
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 85.43689% with 15 lines in your changes missing coverage. Please review.

Project coverage is 79.54%. Comparing base (624527f) to head (69b0f5e).

Files with missing lines Patch % Lines
src/argus/htmx/incident/views.py 84.48% 9 Missing ⚠️
src/argus/htmx/incident/filter.py 71.42% 4 Missing ⚠️
src/argus/htmx/incident/forms.py 90.90% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1514      +/-   ##
==========================================
+ Coverage   79.46%   79.54%   +0.08%     
==========================================
  Files         121      122       +1     
  Lines        5425     5511      +86     
==========================================
+ Hits         4311     4384      +73     
- Misses       1114     1127      +13     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@hmpf hmpf moved this from 📋 Backlog to ❓ Ready for review in Argus development, public Jul 10, 2025
@hmpf hmpf marked this pull request as draft July 11, 2025 10:40
def filter(self, queryset):
timeframe = self.get_clean_value()
if timeframe:
after = tznow() - timedelta(seconds=timeframe * 60)
Copy link
Contributor

Choose a reason for hiding this comment

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

Just to make it more explicit that timeframe is in minutes

Suggested change
after = tznow() - timedelta(seconds=timeframe * 60)
after = tznow() - timedelta(minutes=timeframe)

@github-project-automation github-project-automation bot moved this from ❓ Ready for review to 👍 Reviewer approved in Argus development, public Jul 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DevEx frontend Affects frontend

Projects

Status: 👍 Reviewer approved

Development

Successfully merging this pull request may close these issues.

Use form for page-size in incident list

3 participants