mirror of
https://github.com/healthchecks/healthchecks.git
synced 2026-04-25 15:05:49 +03:00
[GH-ISSUE #465] UX improvements for the usage examples popup #351
Labels
No labels
bug
bug
bug
feature
good-first-issue
new integration
pull-request
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/healthchecks#351
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @immanuelfodor on GitHub (Dec 29, 2020).
Original GitHub issue: https://github.com/healthchecks/healthchecks/issues/465
8 6 * * * /home/user/backup.sh && .../usr/bin/curlin the example instead of justcurlfor envs that doesn't have the usr-bin on the crontab's PATH.curlcommand differs from the Bash tab's example, so you have no way of simply copying just the fsS-dev-null variant. When extending existing crontabs, there is no need for the timing and dummy backup command, you just need thecurlcommand. And copying part of the line manually with the mouse from a box that is even scroll-able is not that easy. Please give another copyable block just with thecurlcommand on the Crontab tab (the Bash tab also displays two blocks, so it's not unprecedented).@cuu508 commented on GitHub (Dec 30, 2020):
Thanks, this is great feedback!
Here's a mockup with a few changes:
To do: for simple checks, where possible, convert "Period: 5 minutes" to a corresponding cron expression, "*/5 * * * *".
I've assumed that
/usr/bin/will typically be included in PATH. In what environment that is not the case?Is it safe to assume
/usr/bin/curlis what the user wants? What if they've installed a custom curl binary in/usr/local/bin/?I'm leaning towards the "least surprise" principle here and specifying just "curl". If it's on PATH, it will work. If it's not on PATH, you will find that out and then make a deliberate decision which curl binary to use.
@immanuelfodor commented on GitHub (Dec 30, 2020):
Woooow, wonderful mockup, no one could ask for more, this is it, all changes are perfect! 🎉 🏆
Todo: yes, that would be great for all the possible slider positions. Otherwise, there is surely a cron expression added, so you wouldn't have to convert awkward periods, just the ones available on the slider :)
Curl: Now I've run through all my different OS variants with the following simple cron:
* * * * * echo "$PATH" > /tmp/path.txtand then checked the results withdate && cat /tmp/path.txt. All of them contained the/usr/binto my surprise, even Debian and CentOS being the most restrictive with just/usr/bin:/bin. I'm sorry, I remembered some place where just/binwas available out of the box, and I've been prepending/usr/binto curl since then just to make sure there are no surprises. I can let this point go, you're right, the user can decide in this case.@cuu508 commented on GitHub (Dec 30, 2020):
Now thinking about it, I think there are relatively few slider positions that cleanly map to a cron expression. For example, on the slider we can select periods like "every 59 minutes" or "every 23 hours" but I don't think there's a corresponding cron expression that would fit precisely. Here are the ones I think would work:
For the rest we could default to "* * * * *" and add another FIXME comment.
@immanuelfodor commented on GitHub (Dec 30, 2020):
Of course, this solution is still better and more useful than the previous hardcoded example. Thank you!