예제 #1
0
 def _build_widget(self, **kwargs):
     total_items = [
         Padding.center_60(Text(self.title, align="center")),
         Padding.center_60(
             Divider("\N{BOX DRAWINGS LIGHT HORIZONTAL}", 1, 1))
     ]
     if self.input_items:
         for item in self.input_items:
             key = item[0]
             caption = item[1]
             try:
                 mask = item[2]
             except:
                 mask = None
             self.input_selection[key] = EditInput(caption="",
                                                   mask=mask)
             col = Columns(
                 [
                     ("weight", 0.4, Text(caption, align="right")),
                     Color.string_input(self.input_selection[key],
                                        focus_map="string_input focus")
                 ]
             )
             total_items.append(Padding.center_60(col))
     total_items.append(
         Padding.center_60(
             Divider("\N{BOX DRAWINGS LIGHT HORIZONTAL}", 1, 1)))
     total_items.append(Padding.center_20(self._build_buttons()))
     return Filler(Pile(total_items), valign='middle')
예제 #2
0
 def _build_widget(self, **kwargs):
     total_items = [
         Padding.center_60(Text(self.title, align="center")),
         Padding.center_60(
             Divider("\N{BOX DRAWINGS LIGHT HORIZONTAL}", 1, 1))
     ]
     if self.input_items:
         for item in self.input_items:
             key = item[0]
             caption = item[1]
             try:
                 mask = item[2]
             except:
                 mask = None
             self.input_selection[key] = StringEditor(caption="", mask=mask)
             col = Columns([
                 ("weight", 0.4, Text(caption, align="right")),
                 Color.string_input(self.input_selection[key],
                                    focus_map="string_input focus")
             ])
             total_items.append(Padding.center_60(col))
     total_items.append(
         Padding.center_60(
             Divider("\N{BOX DRAWINGS LIGHT HORIZONTAL}", 1, 1)))
     total_items.append(Padding.center_20(self._build_buttons()))
     return Filler(Pile(total_items), valign='middle')
예제 #3
0
 def _build_widget(self):
     total_items = [
         Padding.center_60(Text(self.title, align="center")),
         Padding.center_60(
             Divider("\N{BOX DRAWINGS LIGHT HORIZONTAL}", 1, 1))
     ]
     for item in self.radio_items.keys():
         opt, desc = self.radio_items[item]
         col = Columns([("weight", 0.4, opt), Text(desc)], dividechars=1)
         total_items.append(Padding.center_60(col))
     total_items.append(
         Padding.center_60(
             Divider("\N{BOX DRAWINGS LIGHT HORIZONTAL}", 1, 1)))
     total_items.append(Padding.center_20(self._build_buttons()))
     return Filler(Pile(total_items), valign='middle')
 def _build_widget(self):
     total_items = [
         Padding.center_60(Text(self.title, align="center")),
         Padding.center_60(
             Divider("\N{BOX DRAWINGS LIGHT HORIZONTAL}", 1, 1))
     ]
     for item in self.radio_items.keys():
         opt, desc = self.radio_items[item]
         col = Columns(
             [
                 ("weight", 0.4, opt),
                 Text(desc)
             ], dividechars=1)
         total_items.append(Padding.center_60(col))
     total_items.append(
         Padding.center_60(
             Divider("\N{BOX DRAWINGS LIGHT HORIZONTAL}", 1, 1)))
     total_items.append(Padding.center_20(self._build_buttons()))
     return Filler(Pile(total_items), valign='middle')
예제 #5
0
 def __init__(self, error):
     log.debug("showing error view for: {}".format(error))
     bug_url = ("https://github.com/Ubuntu-Solutions-Engineering"
                "/openstack-installer/issues/new")
     body = [
         Padding.center_60(
             Text("Oops, there was a problem with your install:",
                  align="center")),
         Padding.center_95(
             Divider("\N{BOX DRAWINGS LIGHT HORIZONTAL}", 1, 1)),
         Padding.center_85(Text("Reason:")),
         Padding.center_80(Color.error_major(Text(error))),
         Padding.line_break(""),
         Padding.center_85(
             Text("Please file a bug with the above output and of "
                  "~/.cloud-install/*.log at {}".format(bug_url))),
         Padding.line_break(""),
         Padding.center_95(
             Divider("\N{BOX DRAWINGS LIGHT HORIZONTAL}", 1, 1)),
         Padding.center_20(self._build_buttons())
     ]
     super().__init__(Filler(Pile(body), valign="middle"))
 def __init__(self, error):
     log.debug("showing error view for: {}".format(error))
     bug_url = ("https://github.com/Ubuntu-Solutions-Engineering"
                "/openstack-installer/issues/new")
     body = [
         Padding.center_60(
             Text("Oops, there was a problem with your install:",
                  align="center")),
         Padding.center_95(
             Divider("\N{BOX DRAWINGS LIGHT HORIZONTAL}", 1, 1)),
         Padding.center_85(Text("Reason:")),
         Padding.center_80(Color.error_major(Text(error))),
         Padding.line_break(""),
         Padding.center_85(
             Text("Please file a bug with the above output and of "
                  "~/.cloud-install/*.log at {}".format(bug_url))),
         Padding.line_break(""),
         Padding.center_95(
             Divider("\N{BOX DRAWINGS LIGHT HORIZONTAL}", 1, 1)),
         Padding.center_20(self._build_buttons())
     ]
     super().__init__(Filler(Pile(body), valign="middle"))