[node-patches] Change in ovirt-node[master]: installer: Show keyboard page on upgrades
fabiand at fedoraproject.org
fabiand at fedoraproject.org
Mon May 13 15:32:09 UTC 2013
Fabian Deutsch has uploaded a new change for review.
Change subject: installer: Show keyboard page on upgrades
......................................................................
installer: Show keyboard page on upgrades
rhbz#923121
Change-Id: I089bd9f1cd84deab1bc81c386e5bb734f6e18256
Signed-off-by: Fabian Deutsch <fabiand at fedoraproject.org>
---
M src/ovirt/node/installer/keyboard_page.py
M src/ovirt/node/installer/welcome_page.py
2 files changed, 13 insertions(+), 9 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/15/14715/1
diff --git a/src/ovirt/node/installer/keyboard_page.py b/src/ovirt/node/installer/keyboard_page.py
index 1aad75c..fa79537 100644
--- a/src/ovirt/node/installer/keyboard_page.py
+++ b/src/ovirt/node/installer/keyboard_page.py
@@ -22,7 +22,7 @@
"""
Keyboard page of the installer
"""
-from ovirt.node import plugins, ui
+from ovirt.node import plugins, ui, installer
from ovirt.node.utils import system
@@ -70,4 +70,11 @@
kbd = system.Keyboard()
self.dry_or(lambda: kbd.set_layout(changes["keyboard.layout"]))
- self.application.ui.navigate.to_next_plugin()
+ app = self.application
+ welcome = app.get_plugin(installer.welcome_page.Plugin)
+ method = welcome.model()["method"]
+ nav = self.application.ui.navigate
+ if method in ["upgrade", "downgrade", "reinstall"]:
+ nav.to_plugin(installer.upgrade_page.Plugin)
+ else:
+ nav.to_next_plugin()
diff --git a/src/ovirt/node/installer/welcome_page.py b/src/ovirt/node/installer/welcome_page.py
index 9106d48..76963c9 100644
--- a/src/ovirt/node/installer/welcome_page.py
+++ b/src/ovirt/node/installer/welcome_page.py
@@ -65,29 +65,26 @@
pass
def on_merge(self, effective_changes):
-
- nav = self.application.ui.navigate
if "button.install" in effective_changes:
- self.application.ui.navigate.to_next_plugin()
self._model["method"] = "install"
elif "button.upgrade" in effective_changes:
- nav.to_plugin(installer.upgrade_page.Plugin)
self._model["method"] = "upgrade"
elif "button.downgrade" in effective_changes:
- nav.to_plugin(installer.upgrade_page.Plugin)
self._model["method"] = "downgrade"
elif "button.reinstall" in effective_changes:
- nav.to_plugin(installer.upgrade_page.Plugin)
self._model["method"] = "reinstall"
+
+ self.application.ui.navigate.to_next_plugin()
def ___installation_options(self):
if self.application.args.dry:
return [ui.Button("button.install", "Install (dry)"),
ui.Button("button.upgrade", "Upgrade (dry)"),
- ui.Button("button.downgrade", "Downgrade (dry)")]
+ ui.Button("button.downgrade", "Downgrade (dry)"),
+ ui.Button("button.reinstall", "Reinstall (dry)")]
media = utils.system.InstallationMedia()
--
To view, visit http://gerrit.ovirt.org/14715
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I089bd9f1cd84deab1bc81c386e5bb734f6e18256
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Fabian Deutsch <fabiand at fedoraproject.org>
More information about the node-patches
mailing list