added diagrams describing the process of obtaining information about clients

This commit is contained in:
vladimir.kuznetsov 2023-01-18 19:55:12 +03:00
parent d6d3bf6943
commit c5df7f9bb7
5 changed files with 125 additions and 15 deletions

View file

@ -52,7 +52,7 @@ void ClientInfoLogic::onUpdatePage()
const QString certId = model->data(modelIndex, ClientManagementModel::ClientRoles::OpenVpnCertIdRole).toString();
QString certData = model->data(modelIndex, ClientManagementModel::ClientRoles::OpenVpnCertDataRole).toString();
if (certData.isEmpty()) {
if (certData.isEmpty() && !certId.isEmpty()) {
QString stdOut;
auto cbReadStdOut = [&](const QString &data, QSharedPointer<QSsh::SshRemoteProcess> proc) {
stdOut += data + "\n";
@ -66,7 +66,7 @@ void ClientInfoLogic::onUpdatePage()
m_serverController->disconnectFromHost(credentials);
if (isErrorOccured(error)) {
set_busyIndicatorIsRunning(false);
uiLogic()->closePage();
emit uiLogic()->closePage();
return;
}
}

View file

@ -30,8 +30,10 @@ void ClientManagementLogic::onUpdatePage()
if (!protocols.empty()) {
m_currentMainProtocol = protocols.front();
ErrorCode error = getClientsList(m_settings->serverCredentials(uiLogic()->selectedServerIndex),
selectedContainer, m_currentMainProtocol, clients);
const ServerCredentials credentials = m_settings->serverCredentials(uiLogic()->selectedServerIndex);
ErrorCode error = getClientsList(credentials, selectedContainer, m_currentMainProtocol, clients);
m_serverController->disconnectFromHost(credentials);
if (error != ErrorCode::NoError) {
QMessageBox::warning(nullptr, APPLICATION_NAME,
tr("An error occurred while getting the list of clients.") + "\n" + errorString(error));