Feature #723
closedAdd database connection tester to the setup wizard.
100%
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
Updated by Eric Hou over 14 years ago
- % 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
Updated by Eric Hou over 14 years ago
- Status changed from Assigned to In Code Review
- Assignee changed from Eric Hou to Amber Herold
Updated by Amber Herold over 14 years ago
- 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.
Updated by Eric Hou over 14 years ago
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,
Updated by Eric Hou over 14 years ago
- 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