[node-patches] Change in ovirt-node[master]: status: Align labels
fabiand at fedoraproject.org
fabiand at fedoraproject.org
Tue Dec 11 20:09:34 UTC 2012
Fabian Deutsch has uploaded a new change for review.
Change subject: status: Align labels
......................................................................
status: Align labels
Change-Id: I1551ec31173076f8722e62096725f25550b6447e
Signed-off-by: Fabian Deutsch <fabiand at fedoraproject.org>
---
M scripts/tui/src/ovirt/node/plugins/status.py
M scripts/tui/src/ovirt/node/ui/widgets.py
2 files changed, 12 insertions(+), 5 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/84/9884/1
diff --git a/scripts/tui/src/ovirt/node/plugins/status.py b/scripts/tui/src/ovirt/node/plugins/status.py
index 82bb6bb..d41fa7f 100644
--- a/scripts/tui/src/ovirt/node/plugins/status.py
+++ b/scripts/tui/src/ovirt/node/plugins/status.py
@@ -59,13 +59,14 @@
"""Describes the UI this plugin requires
This is an ordered list of (path, widget) tuples.
"""
+ aligned = lambda l: l.ljust(16)
widgets = [
("status.networking",
- ovirt.node.ui.KeywordLabel("Networking")),
+ ovirt.node.ui.KeywordLabel(aligned("Networking: "))),
("status.logs",
- ovirt.node.ui.KeywordLabel("Logs")),
+ ovirt.node.ui.KeywordLabel(aligned("Logs: "))),
("status.vms.running",
- ovirt.node.ui.KeywordLabel("Running VMs")),
+ ovirt.node.ui.KeywordLabel(aligned("Running VMs: "))),
]
# Save it "locally" as a dict, for better accessability
self._widgets = dict(widgets)
diff --git a/scripts/tui/src/ovirt/node/ui/widgets.py b/scripts/tui/src/ovirt/node/ui/widgets.py
index 35d2476..c1e85f9 100644
--- a/scripts/tui/src/ovirt/node/ui/widgets.py
+++ b/scripts/tui/src/ovirt/node/ui/widgets.py
@@ -190,7 +190,7 @@
self._text = text
keyword_markup = (self._keyword_attr, self._keyword)
text_markup = (self._text_attr, self._text)
- markup = [keyword_markup, ": ", text_markup]
+ markup = [keyword_markup, text_markup]
self._label.set_text(markup)
return self._text
@@ -353,5 +353,11 @@
return key
-class PageWidget(urwid.Pile):
+class PageWidget(urwid.WidgetWrap):
save_button = None
+
+ def __init__(self, widgets):
+# self._listwalker = urwid.SimpleListWalker(widgets)
+# self._listbox = urwid.ListBox(self._listwalker)
+ self._pile = urwid.Pile(widgets)
+ super(PageWidget, self).__init__(self._pile)
--
To view, visit http://gerrit.ovirt.org/9884
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1551ec31173076f8722e62096725f25550b6447e
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