def ui_content(self): page_title = "Please select the disk to use for booting %s" % \ self.application.product.PRODUCT_SHORT other_device = self._model.get("boot.device.custom", "") devices = self.storage_discovery.all_devices_for_ui_table(other_device) ws = [ui.Header("header[0]", page_title)] if devices: ws += [ ui.Table( "boot.device", "", " %6s %11s %5s" % ("Location", "Device Name", "Size"), devices), DeviceDetails("label.details", self, "(No device)") ] else: ws += [ ui.Label("boot.no_device", "No Valid Boot Devices Detected") ] page = ui.Page("boot", ws) page.buttons = [ ui.QuitButton("button.quit", "Quit"), ui.Button("button.back", "Back"), ui.SaveButton("button.next", "Continue") ] self.widgets.add(page) return page
def ui_content(self): page_title = _("Please select the disk to use for booting %s") % \ self.application.product.PRODUCT_SHORT other_device = self._model.get("boot.device.custom", "") devices = self.storage_discovery.all_devices_for_ui_table() ws = [ui.Header("header[0]", page_title)] tbl_head = self.storage_discovery.tbl_tpl.format(bus=_("Location"), name=_("Device Name"), size=_("Size (GB)")) if devices: ws += [ui.Table("boot.device", "", tbl_head, devices), ui.Divider("divider[0]"), ui.Button("button.other_device", "Other device: %s" % other_device), DeviceDetails("label.details", self, _("(No device)")) ] else: ws += [ui.Label("boot.no_device", _("No Valid Boot Devices Detected"))] page = ui.Page("boot", ws) page.buttons = [ui.QuitButton("button.quit", _("Quit")), ui.Button("button.back", _("Back")), ui.SaveButton("button.next", _("Continue"))] self.widgets.add(page) return page
def ui_content(self): ws = [ ui.Header("header[0]", _("Support Info")), ui.Label("support.info", _("Select one of the logfiles below.")), ui.Divider("divider[0]"), ui.Table("support.logfile", "", _("Available Logfiles"), self.__debugfiles_to_offer()), ] page = ui.Page("page", ws) page.buttons = [] self.widgets.add(page) return page
def ui_content(self): """Describes the UI this plugin requires This is an ordered list of (path, widget) tuples. """ kbd = utils.system.Keyboard() ws = [ui.Header("header", "Keyboard Layout Selection"), ui.Table("keyboard.layout", "", "Available Keyboard Layouts", kbd.available_layouts()), ] page = ui.Page("page", ws) self.widgets.add(page) return page
def ui_content(self): kbd = utils.Keyboard() ws = [ ui.Header("header[0]", "Keyboard Layout Selection"), ui.Table("keyboard.layout", "Available Keyboard Layouts", "", kbd.available_layouts()), ] self.widgets.add(ws) page = ui.Page("keyboard", ws) page.buttons = [ ui.Button("button.quit", "Quit"), ui.Button("button.next", "Continue") ] return page
def ui_content(self): page_title = \ _("Please select the disk(s) to use for installation of %s") \ % self.application.product.PRODUCT_SHORT other_device = self._model.get("installation.device.custom", "") devices = self.storage_discovery.all_devices_for_ui_table() ws = [ui.Header("header[0]", page_title)] tbl_head = self.storage_discovery.tbl_tpl.format(bus="Location", name="Device Name", size="Size (GB)") if devices: ws += [ ui.Table("installation.device.current", "", tbl_head, devices, height=3, multi=True), ui.Button("button.other_device", "Other Device: %s" % other_device), ui.Divider("divider[0]"), DeviceDetails("installation.device.details", self, _("(No device)")) ] else: ws += [ ui.Label("installation.no_device", _("No Valid Install Devices Detected")) ] page = ui.Page("installation", ws) page.buttons = [ ui.QuitButton("button.quit", _("Quit")), ui.Button("button.back", _("Back")), ui.SaveButton("button.next", _("Continue")) ] self.widgets.add(page) # We are directly connecting to the table's on_change event # The tables on_change event is fired (in the multi-case) # when the highlighted entry is changed. table = self.widgets["installation.device.current"] table.on_change.connect(self.__update_details) return page
def ui_content(self): kbd = system.Keyboard() c = kbd.get_current() self.logger.debug("Current layout: %s" % c) ws = [ui.Header("header[0]", "Keyboard Layout Selection"), ui.Table("keyboard.layout", "", "Available Keyboard Layouts", kbd.available_layouts(), c), ui.Label("label[0]", "(Hit Enter to select a layout)") ] self.widgets.add(ws) page = ui.Page("keyboard", ws) page.buttons = [ui.QuitButton("button.quit", "Quit"), ui.Button("button.back", "Back"), ui.SaveButton("button.next", "Continue")] return page
def ui_content(self): """Describes the UI this plugin requires This is an ordered list of (path, widget) tuples. """ ws = [ui.Header("diagnostic._header", "Diagnostic Utilities"), ui.Label("diagnostic.info", "Select one of the tools below."), ui.Divider("diagnostic.divider"), ui.Table("diagnostic.tools", "", "Available diagnostics", self.__diagnostics(), height=min( len(self.__diagnostics()), 4)), ] page = ui.Page("page", ws) self.widgets.add(page) return page
def ui_content(self): ws = [ ui.Header("header[0]", "IPMI"), ui.KeywordLabel("ipmi.enabled", "IPMI Enabled: ") ] if Ipmi().check_status(): ws.extend([ ui.Divider("divider[0]"), ui.Header("header[1]", "Fan Status:"), ui.Table("ipmi_output", "", "Fan status", Ipmi().fan_status()) ]) page = ui.Page("page", ws) page.buttons = [] self.widgets.add(ws) return page
def ui_content(self): page_title = "Please select the disk to use for booting %s" % \ self.application.product.PRODUCT_SHORT ws = [ui.Header("header[0]", page_title), ui.Table("boot.device", "", " %6s %11s %5s" % ("Location", "Device Name", "Size"), self._device_list()), DeviceDetails("label.details", "(No device)") ] self.widgets.add(ws) page = ui.Page("boot", ws) page.buttons = [ui.Button("button.quit", "Quit"), ui.Button("button.back", "Back"), ui.Button("button.next", "Continue")] return page
def ui_content(self): profiles = [(profile, profile) for profile in tuned.get_available_profiles()] ws = [ ui.Header("header", "tuned Configuration"), ui.Label( "label", "Choose the tuned profile you would " + "like to apply to this system."), ui.Divider("divider[0]"), ui.KeywordLabel("tuned.profile", "Current Active Profile: "), ui.Table("tuned.profile", "", "Available tuned Profiles", profiles), ] page = ui.Page("page", ws) self.widgets.add(page) return page
def ui_content(self): all_plugins = self.__list_of_plugins() if all_plugins: selected_plugin = all_plugins[0][0] ws = [ui.Header("header[0]", _("Plugins")), ui.Table("plugins.installed", "", _("Installed Plugins:"), all_plugins, selected_plugin), ui.Divider("divider[0]"), ui.Row("row[0]", [ui.Label("label[0]", _("Name:")), ui.Label("plugin.name", "")]), ui.Row("row[1]", [ui.Label("label[0]", _("Version:")), ui.Label("plugin.version", "")]), ui.Row("row[2]", [ui.Label("label[0]", _("Date installed:")), ui.Label("plugin.createdat", "")]), ui.Divider("divider[1]"), ui.Row("row[3]", [ui.SaveButton("button.drpm", _("RPM Diff")), ui.SaveButton("button.dsrpm", _("SRPM Diff")), ui.SaveButton("button.dfile", _("File Diff"))]) ] plugin_selected_name = {"plugins.installed": selected_plugin} else: ws = [ui.Header("header[0]", _("Plugins")), ui.Label("label[0]", _("There are no plugins currently installed"))] page = ui.Page("page", ws) page.buttons = [] self.widgets.add(page) # show immediately data about the plugin selected if all_plugins: self.on_change(plugin_selected_name) return page
def ui_content(self): """Describes the UI this plugin requires This is an ordered list of (path, widget) tuples. """ kbd = utils.system.Keyboard() ws = [ui.Header("header", _("Keyboard Layout Selection")), ui.Label("label", _("Choose the Keyboard Layout you would ") + _("like to apply to this system.")), ui.Divider("divider[0]"), ui.KeywordLabel("keyboard.layout_name", _("Current Active ") + _("Keyboard Layout: ")), ui.Table("keyboard.layout", "", _("Available Keyboard Layouts"), kbd.available_layouts(), kbd.get_current()), ] page = ui.Page("page", ws) page.buttons = [ui.SaveButton("page.save", _("Save"))] self.widgets.add(page) return page
def ui_content(self): all_plugins = self.__list_of_plugins() if all_plugins: selected_plugin = all_plugins[0][0] ws = [ ui.Header("header[0]", "Installed Plugins"), ui.Table("plugins.installed", "", "Installed plugins:", all_plugins, selected_plugin), ui.Divider("divider[0]"), ui.Row("row[0]", [ ui.Label("label[0]", "Name:"), ui.Label("plugin.name", "") ]), ui.Row("row[1]", [ ui.Label("label[0]", "Version:"), ui.Label("plugin.version", "") ]), ui.Row("row[2]", [ ui.Label("label[0]", "Date installed:"), ui.Label("plugin.createdat", "") ]), ui.Divider("divider[1]"), ui.Row("row[3]", [ ui.SaveButton("button.drpm", "RPM Diff"), ui.SaveButton("button.dsrpm", "SRPM Diff"), ui.SaveButton("button.dfile", "File Diff") ]) ] else: ws = [ ui.Header("header[0]", "Plugins"), ui.Label("label[0]", "There are no plugins currently " + "installed") ] page = ui.Page("page", ws) page.buttons = [] self.widgets.add(page) return page
def ui_content(self): """Describes the UI this plugin requires This is an ordered list of (path, widget) tuples. """ ws = [ ui.Header("header[0]", "System Identification"), ui.Entry("hostname", "Hostname:"), ui.Divider("divider[0]"), ui.Entry("dns[0]", "DNS Server 1:"), ui.Entry("dns[1]", "DNS Server 2:"), ui.Divider("divider[1]"), ui.Entry("ntp[0]", "NTP Server 1:"), ui.Entry("ntp[1]", "NTP Server 2:"), ui.Divider("divider[2]"), ui.Table("nics", "Available System NICs", "Device Status Model MAC Address", self._get_nics()), ui.Button("button.ping", "Ping") ] page = ui.Page("page", ws) # Save it "locally" as a dict, for better accessability self.widgets.add(page) return page