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

Uncrispify AlertAddressForm #3080

Merged
merged 2 commits into from
Oct 4, 2024
Merged

Uncrispify AlertAddressForm #3080

merged 2 commits into from
Oct 4, 2024

Conversation

stveit
Copy link
Contributor

@stveit stveit commented Oct 3, 2024

Fixes #3076

I assume that the column containing HTML('') was there to act as a fake column so the formatting of the other columns was correct. If this is removed, then one of the columns get sent far to the right.

A FormColumn with an empty fields argument seems to accomplish the exact same thing.

URL: http://localhost/alertprofiles/address/

@stveit stveit self-assigned this Oct 3, 2024
Copy link

github-actions bot commented Oct 3, 2024

🦙 MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Elapsed time
✅ PYTHON black 992 0 11.13s
✅ PYTHON ruff 987 0 0.1s

See detailed report in MegaLinter reports

MegaLinter is graciously provided by OX Security

Copy link

github-actions bot commented Oct 3, 2024

Test results

    9 files      9 suites   8m 30s ⏱️
2 136 tests 2 136 ✅ 0 💤 0 ❌
4 011 runs  4 011 ✅ 0 💤 0 ❌

Results for commit 2d5d249.

♻️ This comment has been updated with latest results.

Copy link

codecov bot commented Oct 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 60.45%. Comparing base (b507e20) to head (2d5d249).
Report is 326 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3080      +/-   ##
==========================================
- Coverage   60.46%   60.45%   -0.01%     
==========================================
  Files         605      605              
  Lines       43801    43793       -8     
  Branches       48       48              
==========================================
- Hits        26483    26475       -8     
  Misses      17306    17306              
  Partials       12       12              

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

@stveit stveit added the refactor label Oct 3, 2024
Copy link
Contributor

@johannaengland johannaengland left a comment

Choose a reason for hiding this comment

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

When comparing the resulting HTML when editing an alert address there is one field missing after the changes where applied:
<input type="hidden" name="id" value="1034" id="id_id">
I am not sure why a hidden field is not being rendered

Copy link

sonarqubecloud bot commented Oct 4, 2024

@stveit
Copy link
Contributor Author

stveit commented Oct 4, 2024

When comparing the resulting HTML when editing an alert address there is one field missing after the changes where applied: <input type="hidden" name="id" value="1034" id="id_id"> I am not sure why a hidden field is not being rendered

I could not reproduce, it seems to be there for me when I'm testing. But I did see that I used {} instead of [] for the form list 🤣
can you try again after this change?

Copy link
Contributor

@johannaengland johannaengland left a comment

Choose a reason for hiding this comment

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

Now the id field is there!

@stveit stveit merged commit 656dd6d into master Oct 4, 2024
12 of 14 checks passed
@stveit stveit deleted the uncrispify/AlertAddressForm branch October 4, 2024 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Uncrispify python/nav/web/alertprofiles/forms.py:AlertAddressForm
2 participants