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
systemd create timer option #4645
systemd create timer option #4645
Conversation
Should "Service file name" be "Service name" perhaps? |
Instead of putting "At" on it's own row, I think it would work better to put it on the same line as the dropdown. |
0b4233d
to
38bafd2
Compare
Updated design changes (I think now it more follows the mock-ups) : |
Good improvements. This is starting to shape up really well! A couple of minor issues:
|
6183471
to
fec5e2f
Compare
@andreasn fixed all the issues you have mentioned.
fixes still left : |
e7a168f
to
19ae643
Compare
@andreasn I have corrected the position of datepicker in repeat yearly option. |
How about "run X seconds after system boot"? |
Even though it forms a better sentence, it would make the dropdown jump around. |
If I first create one timer, then decides to create another, the values from the old timer is still present in the timer creation dialog. It needs to be cleared out on exit. |
The error message "within 0-59" sounds a bit odd. Maybe "Needs to be between 0-59" |
Maybe this is a limitation of the calendar widget, but it feels a bit strange to be able to run a timer in the past. Not a biggie though. |
@andreasn I have updated the error messages. Bootstrap datepicker is difficult to work with! I needed a hack to get its position correct. :( Give a close look at boot-strap datepickers behaviour. |
ba00bca
to
1d74998
Compare
I wonder if it makes sense to spread the Repeat dropdown all across to line it up with the elements below better. Should be just a matter of removing the div#drop_repeat css |
0eb557c
to
f2d8b36
Compare
@@ -194,6 +195,9 @@ WantedBy=default.target | |||
|
|||
def svc_sel(service): | |||
return 'tr[data-goto-unit="%s"]' % service | |||
def wait_systemctl_timer(time): | |||
with testvm.Timeout(seconds=10, error_message="Timeout while waiting for systemctl list-timers"): | |||
m.execute("cmd='systemctl list-timers'; until $cmd | grep -m 1 '%s'; do sleep 1; done" % time) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
m.execute("cmd='systemctl list-timers'; until $cmd | grep -m 1 '%s'; do sleep 1; done" % time) would loop and check if systemctl list-timers has the updated results. This keeps checking every second for a total of 10sec after which timeout occurs.
@dperpeet which is better sleep 1 or sleep 0.5, here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dperpeet which is better sleep 1 or sleep 0.5, here?
1 is fine
debian tests fail - needs fix from #4857 |
c39c986
to
0b590f4
Compare
return 'tr[data-goto-unit="%s"]' % service | ||
def wait_systemctl_timer(time): | ||
with testvm.Timeout(seconds=20, error_message="Timeout while waiting for systemctl list-timers"): | ||
m.execute("sleep 1") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do you need to sleep here? the next loops does that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought if we called systemctl list-timer
in next line after 1 sec, then it can have the updated values. Let me test it locally in centos and fedora-atomic without the 1 sec and see if it works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests passed on centos and fedora-atomic locally.
fail(function(error) { | ||
console.log(error); | ||
}); | ||
console.log("#Timer file#\n" + timer_file); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dperpeet before we merge this, we should remove these console.log() lines. They give the contents of .service and .timer files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point, I will do this during merge
nice job, this will be part of Cockpit 0.118 |
great! thanks everyone! |
Work left to complete :
Fixes left: