def make_guided_ui(self, status): if status.status == ProbeStatus.FAILED: self.app.show_error_report(status.error_report) return ProbingFailed(self, status.error_report) if status.error_report: self.app.show_error_report(status.error_report) return GuidedDiskSelectionView(self, status.disks)
def start_ui(self): if self._probe_task.task is None or not self._probe_task.task.done(): self.ui.set_body(SlowProbing(self)) schedule_task(self._wait_for_probing()) elif True in self._crash_reports: self.ui.set_body(ProbingFailed(self)) self.ui.body.show_error() else: # Once we've shown the filesystem UI, we stop listening for udev # events as merging system changes with configuration the user has # performed would be tricky. Possibly worth doing though! Just # not today. self.convert_autoinstall_config() self.stop_listening_udev() self.ui.set_body(GuidedDiskSelectionView(self)) pr = self._crash_reports.get(False) if pr is not None: self.app.show_error_report(pr) if self.answers['guided']: disk = self.model.all_disks()[self.answers['guided-index']] method = self.answers.get('guided-method') self.ui.body.form.guided_choice.value = { 'disk': disk, 'use_lvm': method == "lvm", } self.ui.body.done(self.ui.body.form) elif self.answers['manual']: self.manual()
def start_ui(self): if self._probe_state in [ProbeState.PROBING, ProbeState.REPROBING]: self.ui.set_body(SlowProbing(self)) elif self._probe_state == ProbeState.FAILED: self.ui.set_body(ProbingFailed(self)) else: self.ui.set_body(GuidedFilesystemView(self)) if self.answers['guided']: self.guided(self.answers.get('guided-method', 'direct')) elif self.answers['manual']: self.manual()
def start_ui(self): if self._cur_probe.state == ProbeState.PROBING: self.ui.set_body(SlowProbing(self)) elif self._cur_probe.state == ProbeState.FAILED: self.ui.set_body(ProbingFailed(self)) else: self.ui_shown = True # Should display a message if self._cur_probe.restricted, # i.e. full device probing failed. self.ui.set_body(GuidedFilesystemView(self)) if self.answers['guided']: self.guided(self.answers.get('guided-method', 'direct')) elif self.answers['manual']: self.manual()
async def make_ui_real(self, status): if status.status == ProbeStatus.FAILED: self.app.show_error_report(status.error_report) return ProbingFailed(self, status.error_report) self.model = FilesystemModel(status.bootloader) self.model.load_server_data(status) if self.model.bootloader == Bootloader.PREP: self.supports_resilient_boot = False else: release = lsb_release()['release'] self.supports_resilient_boot = release >= '20.04' if status.error_report: self.app.show_error_report(status.error_report) return GuidedDiskSelectionView(self)
def start_ui(self): if self._cur_probe.state == ProbeState.PROBING: self.ui.set_body(SlowProbing(self)) elif self._cur_probe.state == ProbeState.FAILED: self.ui.set_body(ProbingFailed(self)) else: # Once we've shown the filesystem UI, we stop listening for udev # events as merging system changes with configuration the user has # performed would be tricky. Possibly worth doing though! Just # not today. self.stop_listening_udev() # Should display a message if self._cur_probe.restricted, # i.e. full device probing failed. self.ui.set_body(GuidedFilesystemView(self)) if self.answers['guided']: self.guided(self.answers.get('guided-method', 'direct')) elif self.answers['manual']: self.manual()
def make_ui(self): if self._probe_task.task is None or not self._probe_task.task.done(): schedule_task(self._wait_for_probing()) return SlowProbing(self) elif True in self._crash_reports: pr = self._crash_reports[True] if pr is not None: self.app.show_error_report(pr.ref()) return ProbingFailed(self) else: # Once we've shown the filesystem UI, we stop listening for udev # events as merging system changes with configuration the user has # performed would be tricky. Possibly worth doing though! Just # not today. self.convert_autoinstall_config() self.stop_listening_udev() pr = self._crash_reports.get(False) if pr is not None: self.app.show_error_report(pr.ref()) if self.answers: self.app.aio_loop.call_soon(self._start_answers) return GuidedDiskSelectionView(self)