Add Sources management to HTMX interface#1901
Conversation
Test results 6 files 1 248 suites 2m 25s ⏱️ Results for commit 51a5024. ♻️ This comment has been updated with latest results. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1901 +/- ##
==========================================
+ Coverage 88.21% 88.43% +0.22%
==========================================
Files 140 143 +3
Lines 6848 6954 +106
==========================================
+ Hits 6041 6150 +109
+ Misses 807 804 -3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
2d34171 to
eddf5aa
Compare
eddf5aa to
1a263ba
Compare
| </div> | ||
| </div> | ||
| <form method="dialog" class="modal-backdrop"> | ||
| <button>close</button> |
There was a problem hiding this comment.
I did have this problem, but it's fixed for me. Have you rebuilt the css?
There was a problem hiding this comment.
I have, still the same problem 🤷
There was a problem hiding this comment.
@johannaengland I thought you were referring to the Sources delete dialog, and didn't realize the Source Type dialog was implemented differently 🥲 Should be fixed now though (see the fixup)!
| class UserIsStaffMixin(UserPassesTestMixin): | ||
| def test_func(self): | ||
| return self.request.user.is_staff | ||
|
|
||
|
|
There was a problem hiding this comment.
Much better location than in plannedmaintenance, yes, though the ultimate location is in argus.htmx.auth.utils, if Django doesn't already have this mixin. No need to move it, though.
hmpf
left a comment
There was a problem hiding this comment.
Very good that you are told you can't delete sources with incidents.
Having the token column is excellent, but the token is only accessible when regenerating. There are two token systems, though. What about the knox tokens?
drf tokens needs to be stored in the glue service somehow and I'm not sure ppl will realize they can just select the text in the green popup.
Follow-up:
I think it would be better to not have the popup but to alter the row (add a temporary row just after?) with the message and token, and maybe a copypaste button (that does not break selecting the token manually!) with a "I've seen you, go away"-button. That will also help if multiple tokens are set at a time. Each is shown, next to the source it is for.
feab55c to
51a5024
Compare
51a5024 to
2513c76
Compare
|
|




Scope and purpose
Fixes #1898.
Add staff-only Sources management (SourceSystem and SourceSystemType) to the HTMX interface, removing the need to use the Django admin panel for this.
Screenshots
Contributor Checklist