def refresh(self, args=None): """ Refresh screen. """ self._load_new_devices() EditTUISpoke.refresh(self, args) self._container = ListColumnContainer(1, columns_width=78, spacing=1) summary = self._summary_text() self.window.add_with_separator(TextWidget(summary)) hostname = _("Host Name: %s\n") % self.data.network.hostname self.window.add_with_separator(TextWidget(hostname)) current_hostname = _("Current host name: %s\n") % network.current_hostname() self.window.add_with_separator(TextWidget(current_hostname)) # if we have any errors, display them while len(self.errors) > 0: self.window.add_with_separator(TextWidget(self.errors.pop())) self._container.add(TextWidget(_("Set host name")), callback=self._set_hostname_callback) for dev_name in self.supported_devices: text = (_("Configure device %s") % dev_name) self._container.add(TextWidget(text), callback=self._configure_network_interface, data=dev_name) self.window.add_with_separator(self._container)
def refresh(self, args=None): EditTUISpoke.refresh(self, args) threadMgr.wait(THREAD_PAYLOAD) if self.data.method.method == "harddrive" and \ get_mount_device(DRACUT_ISODIR) == get_mount_device(DRACUT_REPODIR): message = _( "The installation source is in use by the installer and cannot be changed." ) self._window += [TextWidget(message), ""] return True _methods = [_("CD/DVD"), _("local ISO file"), _("Network")] if args == 3: text = [TextWidget(_(p)) for p in self._protocols] else: self._window += [ TextWidget(_("Choose an installation source type.")) ] text = [TextWidget(m) for m in _methods] def _prep(i, w): """ Mangle our text to make it look pretty on screen. """ number = TextWidget("%2d)" % (i + 1)) return ColumnWidget([(4, [number]), (None, [w])], 1) # gnarl and mangle all of our widgets so things look pretty on screen choices = [_prep(i, w) for i, w in enumerate(text)] displayed = ColumnWidget([(78, choices)], 1) self._window.append(displayed) return True
def refresh(self, args=None): EditTUISpoke.refresh(self, args) threadMgr.wait(THREAD_PAYLOAD_MD) _methods = [_("CD/DVD"), _("Network")] if args == 2: text = [TextWidget(p) for p in self._protocols] else: self._window += [ TextWidget(_("Choose an installation source type.")) ] text = [TextWidget(m) for m in _methods] def _prep(i, w): """ Mangle our text to make it look pretty on screen. """ number = TextWidget("%2d)" % (i + 1)) return ColumnWidget([(4, [number]), (None, [w])], 1) # gnarl and mangle all of our widgets so things look pretty on screen choices = [_prep(i, w) for i, w in enumerate(text)] displayed = ColumnWidget([(78, choices)], 1) self._window.append(displayed) return True
def refresh(self, args=None): EditTUISpoke.refresh(self, args) threadMgr.wait(THREAD_PAYLOAD) threadMgr.wait(THREAD_PAYLOAD_MD) _methods = [_("CD/DVD"), _("local ISO file"), _("Network")] if args == 3: text = [TextWidget(p) for p in self._protocols] else: self._window += [TextWidget(_("Choose an installation source type."))] text = [TextWidget(m) for m in _methods] def _prep(i, w): """ Mangle our text to make it look pretty on screen. """ number = TextWidget("%2d)" % (i + 1)) return ColumnWidget([(4, [number]), (None, [w])], 1) # gnarl and mangle all of our widgets so things look pretty on screen choices = [_prep(i, w) for i, w in enumerate(text)] displayed = ColumnWidget([(78, choices)], 1) self._window.append(displayed) return True
def refresh(self, args=None): """ Refresh screen. """ self._load_new_devices() EditTUISpoke.refresh(self, args) summary = self._summary_text() self._window += [TextWidget(summary), ""] hostname = _("Host Name: %s\n") % self.data.network.hostname self._window += [TextWidget(hostname), ""] current_hostname = _( "Current host name: %s\n") % network.current_hostname() self._window += [TextWidget(current_hostname), ""] # if we have any errors, display them while len(self.errors) > 0: self._window += [TextWidget(self.errors.pop()), ""] def _prep(i, w): """ Mangle our text to make it look pretty on screen. """ number = TextWidget("%2d)" % (i + 1)) return ColumnWidget([(4, [number]), (None, [w])], 1) _opts = [_("Set host name")] for devname in self.supported_devices: _opts.append(_("Configure device %s") % devname) text = [TextWidget(o) for o in _opts] # make everything presentable on screen choices = [_prep(i, w) for i, w in enumerate(text)] displayed = ColumnWidget([(78, choices)], 1) self._window += [displayed, ""] return True
def refresh(self, args=None): """ Refresh screen. """ self._load_new_devices() EditTUISpoke.refresh(self, args) summary = self._summary_text() self._window += [TextWidget(summary), ""] hostname = _("Host Name: %s\n") % self.data.network.hostname self._window += [TextWidget(hostname), ""] current_hostname = _("Current host name: %s\n") % network.current_hostname() self._window += [TextWidget(current_hostname), ""] # if we have any errors, display them while len(self.errors) > 0: self._window += [TextWidget(self.errors.pop()), ""] def _prep(i, w): """ Mangle our text to make it look pretty on screen. """ number = TextWidget("%2d)" % (i + 1)) return ColumnWidget([(4, [number]), (None, [w])], 1) _opts = [_("Set host name")] for devname in self.supported_devices: _opts.append(_("Configure device %s") % devname) text = [TextWidget(o) for o in _opts] # make everything presentable on screen choices = [_prep(i, w) for i, w in enumerate(text)] displayed = ColumnWidget([(78, choices)], 1) self._window += [displayed, ""] return True
def refresh(self, args=None): EditTUISpoke.refresh(self, args) if not self.ready: message = _( "Installation source refresh in progress, try again later.") self._window += [TextWidget(message), ""] return True _methods = [_("CD/DVD"), _("Local ISO file"), _("Network")] if args == 3: text = [TextWidget(_(p)) for p in self._protocols] else: self._window += [ TextWidget(_("Choose an installation source type.")) ] text = [TextWidget(m) for m in _methods] def _prep(i, w): """ Mangle our text to make it look pretty on screen. """ number = TextWidget("%2d)" % (i + 1)) return ColumnWidget([(4, [number]), (None, [w])], 1) # gnarl and mangle all of our widgets so things look pretty on screen choices = [_prep(i, w) for i, w in enumerate(text)] displayed = ColumnWidget([(78, choices)], 1) self._window.append(displayed) return True
def refresh(self, args=None): EditTUISpoke.refresh(self, args) threadMgr.wait(THREAD_PAYLOAD) _methods = [_("CD/DVD"), _("local ISO file"), _("Network")] if self.data.method.method == "harddrive" and \ get_mount_device(DRACUT_ISODIR) == get_mount_device(DRACUT_REPODIR): message = _("The installation source is in use by the installer and cannot be changed.") self._window += [TextWidget(message), ""] return True if args == 3: text = [TextWidget(_(p)) for p in self._protocols] else: self._window += [TextWidget(_("Choose an installation source type."))] text = [TextWidget(m) for m in _methods] def _prep(i, w): """ Mangle our text to make it look pretty on screen. """ number = TextWidget("%2d)" % (i + 1)) return ColumnWidget([(4, [number]), (None, [w])], 1) # gnarl and mangle all of our widgets so things look pretty on screen choices = [_prep(i, w) for i, w in enumerate(text)] displayed = ColumnWidget([(78, choices)], 1) self._window.append(displayed) return True
def refresh(self, args=None): """ Refresh screen. """ self._load_new_devices() EditTUISpoke.refresh(self, args) self._container = ListColumnContainer(1, columns_width=78, spacing=1) summary = self._summary_text() self.window.add_with_separator(TextWidget(summary)) hostname = _("Host Name: %s\n") % self.data.network.hostname self.window.add_with_separator(TextWidget(hostname)) current_hostname = _( "Current host name: %s\n") % network.current_hostname() self.window.add_with_separator(TextWidget(current_hostname)) # if we have any errors, display them while len(self.errors) > 0: self.window.add_with_separator(TextWidget(self.errors.pop())) self._container.add(TextWidget(_("Set host name")), callback=self._set_hostname_callback) for dev_name in self.supported_devices: text = (_("Configure device %s") % dev_name) self._container.add(TextWidget(text), callback=self._configure_network_interface, data=dev_name) self.window.add_with_separator(self._container)
def refresh(self, args=None): self.args._admin = "wheel" in self.args.groups self.args._groups = ", ".join(self.args.groups) # if we have any errors, display them while self.errors: print(self.errors.pop()) EditTUISpoke.refresh(self, args)
def refresh(self, args=None): """ Refresh screen. """ self._load_new_devices() EditTUISpoke.refresh(self, args) # on refresh check if we haven't got hostname from NM on activated # connection (dhcp or DNS) if self.hostname_dialog.value == network.DEFAULT_HOSTNAME: hostname = network.getHostname() network.update_hostname_data(self.data, hostname) self.hostname_dialog.value = self.data.network.hostname summary = self._summary_text() self._window += [TextWidget(summary), ""] hostname = _("Host Name: %s\n") % self.data.network.hostname self._window += [TextWidget(hostname), ""] # if we have any errors, display them while len(self.errors) > 0: self._window += [TextWidget(self.errors.pop()), ""] def _prep(i, w): """ Mangle our text to make it look pretty on screen. """ number = TextWidget("%2d)" % (i + 1)) return ColumnWidget([(4, [number]), (None, [w])], 1) _opts = [_("Set host name")] for devname in self.supported_devices: _opts.append(_("Configure device %s") % devname) text = [TextWidget(o) for o in _opts] # make everything presentable on screen choices = [_prep(i, w) for i, w in enumerate(text)] displayed = ColumnWidget([(78, choices)], 1) self._window.append(displayed) return True
def refresh(self, args=None): EditTUISpoke.refresh(self, args) threadMgr.wait(THREAD_PAYLOAD) self._container = ListColumnContainer(1, columns_width=78, spacing=1) if self.data.method.method == "harddrive" and \ get_mount_device(DRACUT_ISODIR) == get_mount_device(DRACUT_REPODIR): message = _( "The installation source is in use by the installer and cannot be changed." ) self.window.add_with_separator(TextWidget(message)) return if args == self.SET_NETWORK_INSTALL_MODE: self._container.add(TextWidget(_("Closest mirror")), self._set_network_close_mirror) self._container.add(TextWidget("http://"), self._set_network_url, SpecifyRepoSpoke.HTTP) self._container.add(TextWidget("https://"), self._set_network_url, SpecifyRepoSpoke.HTTPS) self._container.add(TextWidget("ftp://"), self._set_network_url, SpecifyRepoSpoke.FTP) self._container.add(TextWidget("nfs"), self._set_network_nfs) else: self.window.add( TextWidget(_("Choose an installation source type."))) self._container.add(TextWidget(_("CD/DVD")), self._set_cd_install_source) self._container.add(TextWidget(_("local ISO file")), self._set_iso_install_source) self._container.add(TextWidget(_("Network")), self._set_network_install_source) self.window.add_with_separator(self._container)
def refresh(self, args=None): """ Refresh window. """ EditTUISpoke.refresh(self, args) message = _("Configuring device %s." % self.args.device) self._window += [TextWidget(message), ""] return True
def refresh(self, args=None): """ Refresh window. """ EditTUISpoke.refresh(self, args) message = _("Configuring device %s.") % self.args.device self._window += [TextWidget(message), ""] return True
def refresh(self, args=None): self.args._admin = "wheel" in self.args.groups self.args._groups = ", ".join(self.args.groups) return EditTUISpoke.refresh(self, args)
def refresh(self, args=None): """ Refresh window. """ return EditTUISpoke.refresh(self, args)
def refresh(self, args = None): self.args._admin = "wheel" in self.args.groups self.args._groups = ", ".join(self.args.groups) return EditTUISpoke.refresh(self, args)
def refresh(self, args=None): """ Refresh window. """ EditTUISpoke.refresh(self, args) message = _("Configuring device %s.") % self.args.device self.window.add_with_separator(TextWidget(message))