add ConsoleConf model and some other bits to get to point of starting the UI up

This commit is contained in:
Michael Hudson-Doyle 2018-03-08 16:39:03 +13:00
parent 68c15176ac
commit 386d44ee14
4 changed files with 17 additions and 2 deletions

View File

@ -164,7 +164,7 @@ class IdentityController(BaseController):
def __init__(self, common):
super().__init__(common)
self.model = IdentityModel(self.opts)
self.model = self.base_model.identity
def default(self):
title = "Profile setup"

View File

@ -17,6 +17,8 @@ import logging
from subiquitycore.core import Application
from console_conf.models.console_conf import ConsoleConfModel
log = logging.getLogger('console_conf.core')
@ -25,6 +27,9 @@ class ConsoleConf(Application):
from subiquity.palette import COLORS, STYLES, STYLES_MONO
project = "console_conf"
model_class = ConsoleConfModel
controllers = [
"Welcome",
"Network",

View File

@ -0,0 +1,10 @@
from subiquitycore.models.network import NetworkModel
from subiquitycore.models.identity import IdentityModel
class ConsoleConfModel:
"""The overall model for console-conf."""
def __init__(self, common):
self.network = NetworkModel()
self.identity = IdentityModel()

View File

@ -37,7 +37,7 @@ class WelcomeView(BaseView):
def _build_buttons(self):
self.buttons = [
ok_btn(on_press=self.confirm),
ok_btn("OK", on_press=self.confirm),
]
return Pile(self.buttons)