added server availability check after entering credentials

- moved the protocol self-selection button to the PageSetupWizardEasy page
This commit is contained in:
vladimir.kuznetsov 2023-07-31 20:38:13 +09:00
parent aa66133813
commit 0058edc24e
21 changed files with 1002 additions and 463 deletions

View file

@ -392,3 +392,24 @@ void InstallController::mountSftpDrive(const QString &port, const QString &passw
#endif
}
bool InstallController::checkSshConnection()
{
ServerController serverController(m_settings);
ErrorCode errorCode = ErrorCode::NoError;
QString output;
output = serverController.checkSshConnection(m_currentlyInstalledServerCredentials, &errorCode);
if (errorCode != ErrorCode::NoError) {
emit installationErrorOccurred(errorString(errorCode));
return false;
} else {
if (output.contains(tr("Please login as the user"))) {
output.replace("\n", "");
emit installationErrorOccurred(output);
return false;
}
}
return true;
}

View file

@ -37,6 +37,8 @@ public slots:
void mountSftpDrive(const QString &port, const QString &password, const QString &username);
bool checkSshConnection();
signals:
void installContainerFinished(QString finishMessage);
void installServerFinished(QString finishMessage);