add ConsoleConf model and some other bits to get to point of starting the UI up
This commit is contained in:
parent
68c15176ac
commit
386d44ee14
|
@ -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"
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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()
|
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue