feature/api-controller-improvements (#567)
* added error handler for api controller * while downloading the config from the api, the Connecting status is now displayed * added a button to delete container config for api servers * added crc check to avoid re-import of api configs * fixed currentIndex of serversMenuContent after DefaultServerIndexChanged * added closing the import window after re-importing the config from api
This commit is contained in:
parent
dba05aab07
commit
e0863a58aa
20 changed files with 275 additions and 113 deletions
|
|
@ -225,7 +225,69 @@ PageType {
|
|||
|
||||
DividerType {
|
||||
visible: content.isServerWithWriteAccess
|
||||
}
|
||||
}
|
||||
|
||||
LabelWithButtonType {
|
||||
visible: content.isServerWithWriteAccess
|
||||
Layout.fillWidth: true
|
||||
|
||||
text: qsTr("Clear server from Amnezia software")
|
||||
textColor: "#EB5757"
|
||||
|
||||
clickedFunction: function() {
|
||||
questionDrawer.headerText = qsTr("Do you want to clear server from Amnezia software?")
|
||||
questionDrawer.descriptionText = qsTr("All containers will be deleted on the server. This means that configuration files, keys and certificates will be deleted.")
|
||||
questionDrawer.yesButtonText = qsTr("Continue")
|
||||
questionDrawer.noButtonText = qsTr("Cancel")
|
||||
|
||||
questionDrawer.yesButtonFunction = function() {
|
||||
questionDrawer.visible = false
|
||||
PageController.goToPage(PageEnum.PageDeinstalling)
|
||||
if (ServersModel.isDefaultServerCurrentlyProcessed() && ConnectionController.isConnected) {
|
||||
ConnectionController.closeConnection()
|
||||
}
|
||||
InstallController.removeAllContainers()
|
||||
}
|
||||
questionDrawer.noButtonFunction = function() {
|
||||
questionDrawer.visible = false
|
||||
}
|
||||
questionDrawer.visible = true
|
||||
}
|
||||
}
|
||||
|
||||
DividerType {
|
||||
visible: content.isServerWithWriteAccess
|
||||
}
|
||||
|
||||
LabelWithButtonType {
|
||||
visible: ServersModel.isCurrentlyProcessedServerFromApi()
|
||||
Layout.fillWidth: true
|
||||
|
||||
text: qsTr("Reset API config")
|
||||
textColor: "#EB5757"
|
||||
|
||||
clickedFunction: function() {
|
||||
questionDrawer.headerText = qsTr("Do you want to reset API config?")
|
||||
questionDrawer.descriptionText = ""
|
||||
questionDrawer.yesButtonText = qsTr("Continue")
|
||||
questionDrawer.noButtonText = qsTr("Cancel")
|
||||
|
||||
questionDrawer.yesButtonFunction = function() {
|
||||
questionDrawer.visible = false
|
||||
PageController.showBusyIndicator(true)
|
||||
ApiController.clearApiConfig()
|
||||
PageController.showBusyIndicator(false)
|
||||
}
|
||||
questionDrawer.noButtonFunction = function() {
|
||||
questionDrawer.visible = false
|
||||
}
|
||||
questionDrawer.visible = true
|
||||
}
|
||||
}
|
||||
|
||||
DividerType {
|
||||
visible: ServersModel.isCurrentlyProcessedServerFromApi()
|
||||
}
|
||||
|
||||
QuestionDrawer {
|
||||
id: questionDrawer
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue