moved handling of connection states from qml in connectionController

- added a check for already installed containers before installing the server/container
- added a button to scan the server for installed containers
- added separation for read/write and readonly servers for pageHome
This commit is contained in:
vladimir.kuznetsov 2023-06-21 20:56:00 +09:00
parent 3a264e6baf
commit 249be451f7
21 changed files with 466 additions and 245 deletions

View file

@ -24,7 +24,7 @@ PageType {
PageController.showErrorMessage(errorMessage)
}
function onInstallContainerFinished() {
function onInstallContainerFinished(isInstalledContainerFound) {
goToStartPage()
if (stackView.currentItem.objectName === PageController.getPagePath(PageEnum.PageHome)) {
PageController.restorePageHomeState(true)
@ -34,9 +34,15 @@ PageType {
} else {
goToPage(PageEnum.PageHome)
}
if (isInstalledContainerFound) {
//todo change to info message
PageController.showErrorMessage(qsTr("The container you are trying to install is already installed on the server. " +
"All installed containers have been added to the application"))
}
}
function onInstallServerFinished() {
function onInstallServerFinished(isInstalledContainerFound) {
goToStartPage()
if (stackView.currentItem.objectName === PageController.getPagePath(PageEnum.PageHome)) {
PageController.restorePageHomeState()
@ -46,6 +52,19 @@ PageType {
var pagePath = PageController.getPagePath(PageEnum.PageStart)
stackView.replace(pagePath, { "objectName" : pagePath })
}
if (isInstalledContainerFound) {
PageController.showErrorMessage(qsTr("The container you are trying to install is already installed on the server. " +
"All installed containers have been added to the application"))
}
}
function onServerAlreadyExists(serverIndex) {
goToStartPage()
ServersModel.setCurrentlyProcessedServerIndex(serverIndex)
goToPage(PageEnum.PageSettingsServerInfo, false)
PageController.showErrorMessage(qsTr("The server has already been added to the application"))
}
}