This is the next step after #583844: Refactor the package comparison user interface
one of our 0.2 goals that we ended up not meeting was to be able to migrate all of the sites on a platform to another platform.
With the refactor of the migrate form, we can now meet this goal.
The functionality is a new tab on the platform node, that takes you to a multi-step form.
the steps for this form are :
1. Select a target platform
2. a batch api page doing validation on each of the sites
3. a confirmation screen showing which sites can be migrated
I already have the basics of this working.
Comments
Comment #1
adrian commentedHere's a very ugly first version of this patch.
it works, but needs major love.
i think the validation is off, and the user interface is not very clear.
Comment #2
adrian commentedHere is a slightly cleaned up user interface.
Comment #3
adrian commentedneeds some more eyes on it before i commit
Comment #4
Anonymous (not verified) commentedIt would be awesome to have the list of passed sites in step 2 to be checkboxes as opposed to just bulk migrating all of them.. perhaps by default checking all of them along with a 'check all' box
But this is awesome. I should've tested on a sturdier VM that didn't bork at so many tasks and entered some sort of race condition :)
Comment #5
Anonymous (not verified) commentedA site that borked on install and is in Queued status is still included in the passed sites to be migrated. See screenshot, it is 11.home.mig5.net
I thought this might not be specific to *bulk* migrate, but the site node view has checks that prevent the Migrate task from being available if the site isn't in an enabled state, so it only occurs here.
Comment #6
univate commentedI took this for a spin and it worked well, good job.
Although I also wonder if there is a way to make this a generic bulk operations feature like the views_bulk_operations modules. That way were every you have a list of sites you could have a list of checkboxes next to them and a select box up the top to allow you to perform various tasks like migrate, disable, delete, backup on each of the selected sites?
Would mean that you could easily migrate or perform any of the tasks on just part of a platform or even sites from multiple platforms.
Comment #7
Anonymous (not verified) commentedUpdated patch attached.
General clean up, added a bunch of documentation, added a site status check so only enabled sites can be migrated, removed debugging data, added a friendly drupal_set_message on submission after step 2.
Comment #8
Anonymous (not verified) commentedIf no sites meet the dependencies for a batch migration, the form still submits but throws a foreach exception.
Attached patch throws a form_set_error instead explaining unmet dependencies (I had troubles preventing the form submission entirely if !$form_state['storage']['passed'] ) which is a cleaner stopgap
Comment #9
adrian commentedI'm not sure i want to turn this into checkboxapaloosa, because this form will need to scale to managing thousands of sites.
for this iteration the screen is displaying the site nodes, but in the future it will only display a summary of the task, with a mechanism to page through the sites that are being upgraded through ajax.
regarding paging, it's going to be VERY tricky to do in the context of the form, because every page of sites will need to remain within the form context. it can't ever navigate away from it, or it loses the data set.
Comment #10
univate commentedI had a go at converting the sites listing into a form which can perform bulk operations - #588204: Convert site listings table into a bulk operations form which i mentioned above in #6, it only works for the tasks that don't require extra input from the users (verifiy, backup etc...).
It doesn't work for migrate tasks in its present form and is really a complete separate issue to this one as it solves a complete different set of needs, so I created a separate issue for it.
Comment #11
adrian commentedI've cleaned this up a bit.
I also found some validation errors in the new code.
right now i'm grappling with the question of whether to consider a missing package a warning when it has not been enabled on the site being upgraded.
Comment #12
adrian commentedcommitted.
any issues with this functionality should have new tickets created for it.
thanks for the testing.