Merge lp://staging/~roadmr/capomastro/project-scheduling-ui-fixing into lp://staging/capomastro
Status: | Merged |
---|---|
Approved by: | Caio Begotti |
Approved revision: | 191 |
Merged at revision: | 193 |
Proposed branch: | lp://staging/~roadmr/capomastro/project-scheduling-ui-fixing |
Merge into: | lp://staging/capomastro |
Diff against target: |
531 lines (+345/-17) 9 files modified
projects/forms.py (+6/-0) projects/helpers.py (+33/-2) projects/templates/projects/periodictask_confirm_delete.html (+26/-0) projects/templates/projects/project_detail.html (+26/-1) projects/templates/projects/projectbuild_form.html (+1/-1) projects/tests/test_helpers.py (+74/-1) projects/tests/test_views.py (+110/-2) projects/urls.py (+1/-0) projects/views.py (+68/-10) |
To merge this branch: | bzr merge lp://staging/~roadmr/capomastro/project-scheduling-ui-fixing |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Caio Begotti (community) | Approve | ||
Review via email: mp+256405@code.staging.launchpad.net |
Commit message
User interface changes to create schedules to build projects periodically.
This just creates the required entries in the PeriodicTasks table for djcelery use, the actual running of said tasks will come in a subsequent merge.
Description of the change
The UI portion of the build scheduling feature.
I don't precreate nor provide a way of creating the 'intervals' at which the build can be scheduled: we can do that easily via the admin and the UI won't die if there are no intervals (it just won't allow scheduling builds).
The project build request form was repurposed to also allow scheduling, the button in the main project view reflects this. In the request form itself, one can select "Now" for an immediate build (old behavior) or choose one of the provided intervals. Clicking "build" will either fire up or schedule the build. If scheduled, the user is returned to the project detail view with a message.
The detail view will show any build schedules for the shown project, including the build interval and last-built time (which is important because the times are not aligned: e.g. if I select "every 24 hours" it will build 24 hours *after* I created the schedule, not at 00:00 hours). Also, a "delete" control with a confirmation screen is present in the detail view.
I don't provide a facility for editing schedules: they're quite trivial and it's easier to just remove them if unneeded and create new ones.
Any more complex editing of intervals or schedules can be done via the admin.
Also, note that this doesn't yet launch the builds, it just creates the records in the djcelery PeriodicTask table. The actual launching will come in another MR.
Finally, I didn't have time to write the tests for the deletion workflow :( I'll do so ASAP.
Besides my comments inline I am deploying it from Wendigo to give it a try :-D