Skip to content
Snippets Groups Projects
Commit bd61f18c authored by Allen Gilliland's avatar Allen Gilliland
Browse files

add back the ssl and non-ssl database connection try logic which went missing...

add back the ssl and non-ssl database connection try logic which went missing when we moved setup over to react/redux.  fixes #1304
parent fb2ffbdf
Branches
Tags
No related merge requests found
......@@ -37,25 +37,47 @@ export default class DatabaseStep extends Component {
'formError': null
});
// make sure that we are trying ssl db connections to start with
details.details.ssl = true;
try {
// validate them first
// validate the details before we move forward
await this.props.dispatch(validateDatabase(details));
// now that they are good, store them
this.props.dispatch(setDatabaseDetails({
'nextStep': ++this.props.stepNumber,
'details': details
}));
} catch (error) {
let formError = error;
if (details.details.ssl === true) {
details.details.ssl = false;
MetabaseAnalytics.trackEvent('Setup', 'Database Step', this.state.engine);
try {
// validate the details before we move forward
await this.props.dispatch(validateDatabase(details));
} catch (error) {
MetabaseAnalytics.trackEvent('Setup', 'Error', 'database validation: '+this.state.engine);
formError = null;
} catch (error2) {
formError = error2;
}
}
if (formError) {
MetabaseAnalytics.trackEvent('Setup', 'Error', 'database validation: '+this.state.engine);
this.setState({
'formError': formError
});
this.setState({
'formError': error
});
return;
}
}
// now that they are good, store them
this.props.dispatch(setDatabaseDetails({
'nextStep': ++this.props.stepNumber,
'details': details
}));
MetabaseAnalytics.trackEvent('Setup', 'Database Step', this.state.engine);
}
skipDatabase() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment