Beispiel #1
0
    def menu(self):

        l = [
            util.main_header("TripleO Dashboard", align="center"),
            util.subtle("v{0}".format(tripleodash.RELEASE_STRING),
                        align="center"),
            self._time,
            self._time_until_update,
            urwid.Divider(),
            util.button("Overview", self.overview_window,
                        self._trigger_update),
            util.button("Glance Images", self.images_window,
                        self._trigger_update),
            util.button("Ironic Nodes", self.nodes_window,
                        self._trigger_update),
            util.button("Heat Stacks", self.stacks_window,
                        self._trigger_update),
            util.button("Nova Servers", self.servers_window,
                        self._trigger_update),
            urwid.Divider(),
            urwid.Divider(),
            util.exit_button("Quit")
        ]
        w = urwid.ListBox(urwid.SimpleListWalker(l))
        w.set_focus(3)
        return w
Beispiel #2
0
    def test_main_header(self):

        # Test
        txt = util.main_header("Header")

        # Verify
        self.assertEqual(txt.get_text(), ('Header ', [('main header', 7)]))