Add improved maintenance column with a dropdown showing tasks#1761
Add improved maintenance column with a dropdown showing tasks#1761
Conversation
Test results 6 files 888 suites 1m 56s ⏱️ Results for commit 1851bcf. ♻️ 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 #1761 +/- ##
=======================================
Coverage 82.57% 82.57%
=======================================
Files 137 137
Lines 6552 6552
=======================================
Hits 5410 5410
Misses 1142 1142 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
0d874e8 to
1972920
Compare
aleksfl
left a comment
There was a problem hiding this comment.
Mostly works as intended when testing. Documentation should probably be updated accordingly.
src/argus/htmx/templates/htmx/incident/cells/_incident_maintenance.html
Outdated
Show resolved
Hide resolved
src/argus/htmx/templates/htmx/incident/cells/_incident_maintenance.html
Outdated
Show resolved
Hide resolved
src/argus/htmx/templates/htmx/incident/cells/_incident_maintenance.html
Outdated
Show resolved
Hide resolved
src/argus/htmx/templates/htmx/incident/cells/_incident_maintenance.html
Outdated
Show resolved
Hide resolved
src/argus/htmx/templates/htmx/incident/cells/_incident_maintenance.html
Outdated
Show resolved
Hide resolved
hmpf
left a comment
There was a problem hiding this comment.
What happens if there are hundreds of incidents covered by the pm?
| {% if task.end_time.year >= 9999 %} | ||
| - now | ||
| {% else %} | ||
| - {{ task.end_time|date:"M d, H:i" }} |
There was a problem hiding this comment.
Let's be consistent with the date formats please. Always use the formats chosen in preferences.
- |date:preferences.argus_htmx.datetime_format
- |date:preferences.argus_htmx.date_format
- |date:preferences.argus_htmx.time_format
If another is needed, for "datetime without year", let's add another to the above list.
There was a problem hiding this comment.
Fixed, it is now using the date_format from user preferences. The idea behind using a custom date format was to present the information in the same way to all users, and keep the UI compact. E.g. an EPOCH timestamp is not very user friendly when used in ranges. However, I agree that it makes sense to be consistent, and leave it up to the user to use a proper date format.
The dropdown shows the tasks connected to an incident, and not the other way around (incidents for task). Only open incidents are checked against a new PM task. As such, unless we expect a lot of maintenance tasks covering the same incidents, the dropdown shouldn't have a lot of entries |
Yeah, I would also not expect hundreds of tasks that all cover one incident - then the user has done something wrong 😁 |
|
johannaengland
left a comment
There was a problem hiding this comment.
We can have the bug that when I click on one maintenance task icon that the dropdown stays visible until I click somewhere else as polish, not that important now
Yeah it seems to be related to the button remaining in focus after clicking it, and happens both in Brave and Firefox. An alternative would be to not use a button element as the trigger |




Scope and purpose
Resolves #1745
This PR improves the planned maintenance column by adding a dropdown with linkable connected tasks.
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.