remove all remaining footer-related things
This commit is contained in:
parent
a96c5c8805
commit
a2ccb0cd9e
|
@ -82,19 +82,10 @@ A subiquity screen consists of:
|
||||||
2. a scrollable content area
|
2. a scrollable content area
|
||||||
3. a stack of buttons, including "done"/"cancel" buttons for moving between
|
3. a stack of buttons, including "done"/"cancel" buttons for moving between
|
||||||
screens
|
screens
|
||||||
3. a footer
|
|
||||||
|
|
||||||
The header has a summary line describing the current screen against an "ubuntu
|
The header has a summary line describing the current screen against an "ubuntu
|
||||||
orange" background.
|
orange" background.
|
||||||
|
|
||||||
The footer has a progress bar indicating how far through the install process
|
|
||||||
the user was, a blank line and the summary area. Currently the summary area
|
|
||||||
contains static content for the first few screens, but there are vague plans to
|
|
||||||
make it specific to the currently focused element. Once the install has started
|
|
||||||
but before we get to the final screen, the summary area contains a summary of
|
|
||||||
progress made by the installation. Someday soon the summary area will also
|
|
||||||
contain a button that allows you to drop to a shell at any point.
|
|
||||||
|
|
||||||
The body area is where most of the action is. It follows a standard pattern
|
The body area is where most of the action is. It follows a standard pattern
|
||||||
described above, and the `subiquitycore.ui.utils.screen()` function makes it
|
described above, and the `subiquitycore.ui.utils.screen()` function makes it
|
||||||
very easy to follow that pattern. Many screen have "sub-dialogs" (think:
|
very easy to follow that pattern. Many screen have "sub-dialogs" (think:
|
||||||
|
|
|
@ -199,8 +199,6 @@ class IdentityController(BaseController):
|
||||||
self.model = app.base_model.identity
|
self.model = app.base_model.identity
|
||||||
|
|
||||||
def start_ui(self):
|
def start_ui(self):
|
||||||
footer = ""
|
|
||||||
self.ui.set_footer(footer)
|
|
||||||
self.ui.set_body(IdentityView(self.model, self))
|
self.ui.set_body(IdentityView(self.model, self))
|
||||||
device_owner = get_device_owner()
|
device_owner = get_device_owner()
|
||||||
if device_owner is not None:
|
if device_owner is not None:
|
||||||
|
@ -221,11 +219,9 @@ class IdentityController(BaseController):
|
||||||
self.model.add_user(result)
|
self.model.add_user(result)
|
||||||
login_details_path = '.subiquity/login-details.txt'
|
login_details_path = '.subiquity/login-details.txt'
|
||||||
else:
|
else:
|
||||||
self.ui.set_footer("Contacting store...")
|
|
||||||
self.loop.draw_screen()
|
self.loop.draw_screen()
|
||||||
cp = run_command(
|
cp = run_command(
|
||||||
["snap", "create-user", "--sudoer", "--json", email])
|
["snap", "create-user", "--sudoer", "--json", email])
|
||||||
self.ui.set_footer("")
|
|
||||||
if cp.returncode != 0:
|
if cp.returncode != 0:
|
||||||
self.ui.body.error.set_text(
|
self.ui.body.error.set_text(
|
||||||
"Creating user failed:\n" + cp.stderr)
|
"Creating user failed:\n" + cp.stderr)
|
||||||
|
@ -254,9 +250,7 @@ class IdentityController(BaseController):
|
||||||
|
|
||||||
def login(self):
|
def login(self):
|
||||||
title = "Configuration Complete"
|
title = "Configuration Complete"
|
||||||
footer = "View configured user and device access methods"
|
|
||||||
self.ui.set_header(title)
|
self.ui.set_header(title)
|
||||||
self.ui.set_footer(footer)
|
|
||||||
|
|
||||||
net_model = self.app.controller_instances['Network'].model
|
net_model = self.app.controller_instances['Network'].model
|
||||||
ifaces = net_model.get_all_netdevs()
|
ifaces = net_model.get_all_netdevs()
|
||||||
|
|
|
@ -28,7 +28,6 @@ COLORS = [
|
||||||
|
|
||||||
STYLES = [
|
STYLES = [
|
||||||
('frame_header', 'fg', 'orange'),
|
('frame_header', 'fg', 'orange'),
|
||||||
('frame_footer', 'fg', 'brand'),
|
|
||||||
('body', 'fg', 'bg'),
|
('body', 'fg', 'bg'),
|
||||||
|
|
||||||
('done_button', 'fg', 'bg'),
|
('done_button', 'fg', 'bg'),
|
||||||
|
@ -56,7 +55,6 @@ STYLES = [
|
||||||
|
|
||||||
STYLES_MONO = [
|
STYLES_MONO = [
|
||||||
('frame_header', 'white', 'black'),
|
('frame_header', 'white', 'black'),
|
||||||
('frame_footer', 'white', 'black'),
|
|
||||||
('body', 'white', 'black'),
|
('body', 'white', 'black'),
|
||||||
|
|
||||||
('done_button', 'white', 'black'),
|
('done_button', 'white', 'black'),
|
||||||
|
|
|
@ -269,15 +269,14 @@ class InstallProgressController(BaseController):
|
||||||
|
|
||||||
def _install_event_start(self, message):
|
def _install_event_start(self, message):
|
||||||
log.debug("_install_event_start %s", message)
|
log.debug("_install_event_start %s", message)
|
||||||
self.footer_description.set_text(message)
|
|
||||||
self.progress_view.add_event(self._event_indent + message)
|
self.progress_view.add_event(self._event_indent + message)
|
||||||
self._event_indent += " "
|
self._event_indent += " "
|
||||||
self.footer_spinner.start()
|
self.progress_view.spinner.start()
|
||||||
|
|
||||||
def _install_event_finish(self):
|
def _install_event_finish(self):
|
||||||
self._event_indent = self._event_indent[:-2]
|
self._event_indent = self._event_indent[:-2]
|
||||||
log.debug("_install_event_finish %r", self._event_indent)
|
log.debug("_install_event_finish %r", self._event_indent)
|
||||||
self.footer_spinner.stop()
|
self.progress_view.spinner.stop()
|
||||||
|
|
||||||
def curtin_event(self, event):
|
def curtin_event(self, event):
|
||||||
e = {}
|
e = {}
|
||||||
|
@ -340,15 +339,7 @@ class InstallProgressController(BaseController):
|
||||||
def curtin_start_install(self):
|
def curtin_start_install(self):
|
||||||
log.debug('curtin_start_install')
|
log.debug('curtin_start_install')
|
||||||
self.install_state = InstallState.RUNNING
|
self.install_state = InstallState.RUNNING
|
||||||
self.footer_description = urwid.Text(_("starting..."))
|
|
||||||
self.progress_view = ProgressView(self)
|
self.progress_view = ProgressView(self)
|
||||||
self.footer_spinner = self.progress_view.spinner
|
|
||||||
|
|
||||||
self.ui.auto_footer = False
|
|
||||||
self.ui.set_footer(urwid.Columns(
|
|
||||||
[('pack', urwid.Text(_("Install in progress:"))),
|
|
||||||
(self.footer_description),
|
|
||||||
('pack', self.footer_spinner)], dividechars=1))
|
|
||||||
|
|
||||||
self.journal_listener_handle = self.start_journald_listener(
|
self.journal_listener_handle = self.start_journald_listener(
|
||||||
[self._event_syslog_identifier, self._log_syslog_identifier],
|
[self._event_syslog_identifier, self._log_syslog_identifier],
|
||||||
|
@ -369,12 +360,6 @@ class InstallProgressController(BaseController):
|
||||||
return
|
return
|
||||||
self.install_state = InstallState.DONE
|
self.install_state = InstallState.DONE
|
||||||
log.debug('After curtin install OK')
|
log.debug('After curtin install OK')
|
||||||
self.ui.progress_current += 1
|
|
||||||
if not self.showing:
|
|
||||||
self.ui.set_footer(_("Install complete"))
|
|
||||||
else:
|
|
||||||
# Re-set footer so progress bar updates.
|
|
||||||
self.ui.set_footer(_("Thank you for using Ubuntu!"))
|
|
||||||
self._step_done('install')
|
self._step_done('install')
|
||||||
|
|
||||||
def cancel(self):
|
def cancel(self):
|
||||||
|
@ -564,16 +549,12 @@ class InstallProgressController(BaseController):
|
||||||
def start_ui(self):
|
def start_ui(self):
|
||||||
if self.install_state == InstallState.RUNNING:
|
if self.install_state == InstallState.RUNNING:
|
||||||
self.progress_view.title = _("Installing system")
|
self.progress_view.title = _("Installing system")
|
||||||
footer = _("Thank you for using Ubuntu!")
|
|
||||||
elif self.install_state == InstallState.DONE:
|
elif self.install_state == InstallState.DONE:
|
||||||
self.progress_view.title = _("Install complete!")
|
self.progress_view.title = _("Install complete!")
|
||||||
footer = _("Thank you for using Ubuntu!")
|
|
||||||
elif self.install_state == InstallState.ERROR:
|
elif self.install_state == InstallState.ERROR:
|
||||||
self.progress_view.title = (
|
self.progress_view.title = (
|
||||||
_('An error occurred during installation'))
|
_('An error occurred during installation'))
|
||||||
footer = _('Please report this error in Launchpad')
|
|
||||||
self.ui.set_body(self.progress_view)
|
self.ui.set_body(self.progress_view)
|
||||||
self.ui.set_footer(footer)
|
|
||||||
|
|
||||||
|
|
||||||
uu_apt_conf = """\
|
uu_apt_conf = """\
|
||||||
|
|
|
@ -38,7 +38,6 @@ COLORS = [
|
||||||
STYLES = [
|
STYLES = [
|
||||||
('frame_header_fringe', 'orange', 'bg'),
|
('frame_header_fringe', 'orange', 'bg'),
|
||||||
('frame_header', 'fg', 'orange'),
|
('frame_header', 'fg', 'orange'),
|
||||||
('frame_footer', 'fg', 'brand'),
|
|
||||||
('body', 'fg', 'bg'),
|
('body', 'fg', 'bg'),
|
||||||
|
|
||||||
('done_button', 'fg', 'bg'),
|
('done_button', 'fg', 'bg'),
|
||||||
|
@ -71,8 +70,8 @@ STYLES = [
|
||||||
|
|
||||||
|
|
||||||
STYLES_MONO = [
|
STYLES_MONO = [
|
||||||
|
('frame_header_fringe', 'black', 'white'),
|
||||||
('frame_header', 'white', 'black'),
|
('frame_header', 'white', 'black'),
|
||||||
('frame_footer', 'white', 'black'),
|
|
||||||
('body', 'white', 'black'),
|
('body', 'white', 'black'),
|
||||||
|
|
||||||
('done_button', 'white', 'black'),
|
('done_button', 'white', 'black'),
|
||||||
|
|
|
@ -433,7 +433,6 @@ class DeviceList(WidgetWrap):
|
||||||
|
|
||||||
class FilesystemView(BaseView):
|
class FilesystemView(BaseView):
|
||||||
title = _("Filesystem setup")
|
title = _("Filesystem setup")
|
||||||
footer = _("Select available disks to format and mount")
|
|
||||||
|
|
||||||
def __init__(self, model, controller):
|
def __init__(self, model, controller):
|
||||||
self.model = model
|
self.model = model
|
||||||
|
|
|
@ -59,7 +59,6 @@ review and modify the results.""")
|
||||||
class GuidedFilesystemView(BaseView):
|
class GuidedFilesystemView(BaseView):
|
||||||
|
|
||||||
title = _("Filesystem setup")
|
title = _("Filesystem setup")
|
||||||
footer = _("Choose guided or manual partitioning")
|
|
||||||
|
|
||||||
def __init__(self, controller):
|
def __init__(self, controller):
|
||||||
self.controller = controller
|
self.controller = controller
|
||||||
|
@ -111,7 +110,6 @@ def _wrap_button_row(row):
|
||||||
class GuidedDiskSelectionView(BaseView):
|
class GuidedDiskSelectionView(BaseView):
|
||||||
|
|
||||||
title = _("Filesystem setup")
|
title = _("Filesystem setup")
|
||||||
footer = (_("Choose the installation target"))
|
|
||||||
|
|
||||||
def __init__(self, model, controller, method):
|
def __init__(self, model, controller, method):
|
||||||
self.model = model
|
self.model = model
|
||||||
|
|
|
@ -385,7 +385,6 @@ class KeyboardForm(Form):
|
||||||
class KeyboardView(BaseView):
|
class KeyboardView(BaseView):
|
||||||
|
|
||||||
title = _("Keyboard configuration")
|
title = _("Keyboard configuration")
|
||||||
footer = _("Use UP, DOWN and ENTER keys to select your keyboard.")
|
|
||||||
|
|
||||||
def __init__(self, model, controller, opts):
|
def __init__(self, model, controller, opts):
|
||||||
self.model = model
|
self.model = model
|
||||||
|
|
|
@ -30,7 +30,6 @@ log = logging.getLogger("subiquity.views.welcome")
|
||||||
|
|
||||||
class WelcomeView(BaseView):
|
class WelcomeView(BaseView):
|
||||||
title = "Willkommen! Bienvenue! Welcome! Добро пожаловать! Welkom!"
|
title = "Willkommen! Bienvenue! Welcome! Добро пожаловать! Welkom!"
|
||||||
footer = _("Use UP, DOWN and ENTER keys to select your language.")
|
|
||||||
|
|
||||||
def __init__(self, model, controller):
|
def __init__(self, model, controller):
|
||||||
self.model = model
|
self.model = model
|
||||||
|
@ -39,7 +38,7 @@ class WelcomeView(BaseView):
|
||||||
self._build_model_inputs(),
|
self._build_model_inputs(),
|
||||||
buttons=None,
|
buttons=None,
|
||||||
narrow_rows=True,
|
narrow_rows=True,
|
||||||
excerpt=_("Please choose your preferred language.")))
|
excerpt=_("Use UP, DOWN and ENTER keys to select your language.")))
|
||||||
|
|
||||||
def _build_model_inputs(self):
|
def _build_model_inputs(self):
|
||||||
btns = []
|
btns = []
|
||||||
|
|
|
@ -127,7 +127,6 @@ class ZdevList(WidgetWrap):
|
||||||
|
|
||||||
class ZdevView(BaseView):
|
class ZdevView(BaseView):
|
||||||
title = _("Zdev setup")
|
title = _("Zdev setup")
|
||||||
footer = _("Activate and configure Z devices")
|
|
||||||
|
|
||||||
def __init__(self, controller):
|
def __init__(self, controller):
|
||||||
log.debug('FileSystemView init start()')
|
log.debug('FileSystemView init start()')
|
||||||
|
|
|
@ -50,9 +50,6 @@ class SubiquityCoreUI(WidgetWrap):
|
||||||
def set_header(self, title=None):
|
def set_header(self, title=None):
|
||||||
self._assign_contents(0, Header(title, self.right_icon))
|
self._assign_contents(0, Header(title, self.right_icon))
|
||||||
|
|
||||||
def set_footer(self, message):
|
|
||||||
pass
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def body(self):
|
def body(self):
|
||||||
return self.pile.contents[1][0]
|
return self.pile.contents[1][0]
|
||||||
|
|
|
@ -151,7 +151,6 @@ STYLE_NAMES = set([
|
||||||
'danger_button',
|
'danger_button',
|
||||||
'done_button focus',
|
'done_button focus',
|
||||||
'done_button',
|
'done_button',
|
||||||
'frame_footer',
|
|
||||||
'frame_header',
|
'frame_header',
|
||||||
'frame_header_fringe',
|
'frame_header_fringe',
|
||||||
'info_error',
|
'info_error',
|
||||||
|
|
|
@ -75,8 +75,6 @@ class NetworkView(BaseView):
|
||||||
excerpt = _("Configure at least one interface this server can use to talk "
|
excerpt = _("Configure at least one interface this server can use to talk "
|
||||||
"to other machines, and which preferably provides sufficient "
|
"to other machines, and which preferably provides sufficient "
|
||||||
"access for updates.")
|
"access for updates.")
|
||||||
footer = _("Select an interface to configure it or select Done to "
|
|
||||||
"continue")
|
|
||||||
|
|
||||||
def __init__(self, model, controller):
|
def __init__(self, model, controller):
|
||||||
self.model = model
|
self.model = model
|
||||||
|
|
|
@ -35,8 +35,6 @@ from subiquitycore.ui.utils import disabled
|
||||||
|
|
||||||
class BaseView(WidgetWrap):
|
class BaseView(WidgetWrap):
|
||||||
|
|
||||||
footer = ""
|
|
||||||
|
|
||||||
def show_overlay(self, overlay_widget, **kw):
|
def show_overlay(self, overlay_widget, **kw):
|
||||||
args = dict(
|
args = dict(
|
||||||
align='center',
|
align='center',
|
||||||
|
|
Loading…
Reference in New Issue