[node-patches] Change in ovirt-node[master]: tui: Fix "page loading" message

fabiand at fedoraproject.org fabiand at fedoraproject.org
Thu Sep 13 13:18:44 UTC 2012


Fabian Deutsch has uploaded a new change for review.

Change subject: tui: Fix "page loading" message
......................................................................

tui: Fix "page loading" message

Sometimes the pages take a while to load, therefor a "loading" message
is shown.
There is a small delay added to give the user some time to be able to
read the message and not interprete it as some flickering.

rhbz#816900

Change-Id: I6f4174ac99c70b5bb634fc784a2ec88c5d44be70
Signed-off-by: Fabian Deutsch <fabiand at fedoraproject.org>
---
M scripts/ovirt-config-setup.py
1 file changed, 11 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/86/7986/1

diff --git a/scripts/ovirt-config-setup.py b/scripts/ovirt-config-setup.py
index c9e6e67..a1aede0 100755
--- a/scripts/ovirt-config-setup.py
+++ b/scripts/ovirt-config-setup.py
@@ -29,6 +29,7 @@
 import pkgutil
 import ovirt_config_setup
 import sys
+import time
 from ovirtnode.ovirtfunctions import *
 from ovirtnode.password import *
 from ovirtnode.log import *
@@ -1920,13 +1921,23 @@
         self.screen_locked = False
         while active and (self.__finished == False):
             logger.debug("Current Page: " + str(self.__current_page))
+
             self._create_blank_screen()
             screen = self.screen
+
             # apply any colorsets that were provided.
             if is_console():
                 self.set_console_colors()
                 screen.setColor(customColorset(1), "black", "magenta")
+
+            if self.__current_page < FIRST_PLUGIN_PAGE:
+                self._set_title()
+                screen.drawRootText(15, 10, "Loading page ...")
+                screen.refresh()
+                time.sleep(0.3)
+
             elements = self.get_elements_for_page(screen, self.__current_page)
+
             self.gridform = GridForm(screen, "", 2, 1)
             self._set_title()
             content = Grid(1, len(elements) + 3)


--
To view, visit http://gerrit.ovirt.org/7986
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6f4174ac99c70b5bb634fc784a2ec88c5d44be70
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