if the container already exists, then add it to the list of containers in the client
This commit is contained in:
parent
b2fd94d20e
commit
b5778a9cb5
2 changed files with 3 additions and 3 deletions
|
|
@ -87,11 +87,11 @@ void ServerContainersLogic::onPushButtonContinueClicked(DockerContainer c, int p
|
||||||
emit uiLogic()->goToPage(Page::ServerConfiguringProgress);
|
emit uiLogic()->goToPage(Page::ServerConfiguringProgress);
|
||||||
qApp->processEvents();
|
qApp->processEvents();
|
||||||
|
|
||||||
ErrorCode e = uiLogic()->pageLogic<ServerConfiguringProgressLogic>()->doInstallAction([this, c, &config](){
|
ErrorCode error = uiLogic()->pageLogic<ServerConfiguringProgressLogic>()->doInstallAction([this, c, &config](){
|
||||||
return m_serverController->setupContainer(m_settings->serverCredentials(uiLogic()->selectedServerIndex), c, config);
|
return m_serverController->setupContainer(m_settings->serverCredentials(uiLogic()->selectedServerIndex), c, config);
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!e) {
|
if (error == ErrorCode::NoError || error == ErrorCode::ServerContainerAlreadyInstalledError) {
|
||||||
m_settings->setContainerConfig(uiLogic()->selectedServerIndex, c, config);
|
m_settings->setContainerConfig(uiLogic()->selectedServerIndex, c, config);
|
||||||
if (ContainerProps::containerService(c) == ServiceType::Vpn) {
|
if (ContainerProps::containerService(c) == ServiceType::Vpn) {
|
||||||
m_settings->setDefaultContainer(uiLogic()->selectedServerIndex, c);
|
m_settings->setDefaultContainer(uiLogic()->selectedServerIndex, c);
|
||||||
|
|
|
||||||
|
|
@ -337,7 +337,7 @@ void UiLogic::installServer(QMap<DockerContainer, QJsonObject> &containers)
|
||||||
m_serverController->disconnectFromHost(installCredentials);
|
m_serverController->disconnectFromHost(installCredentials);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (error == ErrorCode::NoError) {
|
if (error == ErrorCode::NoError || error == ErrorCode::ServerContainerAlreadyInstalledError) {
|
||||||
QJsonObject server;
|
QJsonObject server;
|
||||||
server.insert(config_key::hostName, installCredentials.hostName);
|
server.insert(config_key::hostName, installCredentials.hostName);
|
||||||
server.insert(config_key::userName, installCredentials.userName);
|
server.insert(config_key::userName, installCredentials.userName);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue