Feature #723
closed
Add database connection tester to the setup wizard.
Added by Eric Hou over 14 years ago.
Updated over 14 years ago.
Description
It is good to have mysql database connection tester and also validate the existence of the projectdb and leginondb database in the wizard.
Thanks.
Eric
- % Done changed from 0 to 100
Just finished the database validation checking.
To test:
in wizard step 3.
Try to enter wrong information for all the user input, The wizard will display which input value is wrong and user will have to fix them before they can move to the next step.
Thanks.
Eric
- Status changed from Assigned to In Code Review
- Assignee changed from Eric Hou to Amber Herold
- Assignee changed from Amber Herold to Eric Hou
Eric, looks like it will work well.
I have one comment. You are checking the db server and 2 databases (Leginon and Project) all within a single function, validateDB(). I think it might make it more general purpose to separate this into two functions, one to check the server and another to check a single db. Then we could add or remove database validations, without editing your class. It may be a little less efficient since you will want to include a db server check in each db validation, but I think the added flexibility would be worth it.
What do you think?
I know you want to be done with this file, so if you think it is a good idea, but don't feel like coding it, I can add it to my task list.
I actually thought about this yesterday when I driving home on the freeway.
Beside to what you mention, the formValidator class should be a stand along class. I should not put anything about Leginon or Project in there (The error message should be define when add validation not in the validation class).
I will improve this function later,
- Status changed from In Code Review to In Test
for rewrite the validateDB functionin formValidator class. I will make the other feature issue for it.
Because it might need to involve with writing an extend class to the formValidator class.
For now, test all the possible cases.
Thanks.
Eric
- Status changed from In Test to Closed
Also available in: Atom
PDF