added a "Cancel" button to interrupt the server configuration process when it is found that it is busy installing other software
This commit is contained in:
parent
08a8eadb49
commit
6ec090ea0d
17 changed files with 193 additions and 48 deletions
|
@ -346,6 +346,11 @@ void UiLogic::installServer(QMap<DockerContainer, QJsonObject> &containers)
|
|||
pageLogic<ServerConfiguringProgressLogic>()->set_labelServerBusyVisible(visible);
|
||||
};
|
||||
|
||||
ServerConfiguringProgressLogic::ButtonFunc cancelButtonFunc;
|
||||
cancelButtonFunc.setVisibleFunc = [this] (bool visible) -> void {
|
||||
pageLogic<ServerConfiguringProgressLogic>()->set_pushButtonCancelVisible(visible);
|
||||
};
|
||||
|
||||
int count = 0;
|
||||
ErrorCode error;
|
||||
for (QMap<DockerContainer, QJsonObject>::iterator i = containers.begin(); i != containers.end(); i++, count++) {
|
||||
|
@ -353,7 +358,7 @@ void UiLogic::installServer(QMap<DockerContainer, QJsonObject> &containers)
|
|||
|
||||
error = pageLogic<ServerConfiguringProgressLogic>()->doInstallAction([&] () {
|
||||
return m_serverController->setupContainer(installCredentials, i.key(), i.value());
|
||||
}, pageFunc, progressBarFunc, noButton, waitInfoFunc, busyInfoFunc);
|
||||
}, pageFunc, progressBarFunc, noButton, waitInfoFunc, busyInfoFunc, cancelButtonFunc);
|
||||
|
||||
m_serverController->disconnectFromHost(installCredentials);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue