Exemple #1
0
    def ui_content(self):
        ws = [
            ui.Header("header", _("Remote Storage")),
            ui.Entry("iscsi.initiator_name",
                     _("iSCSI Initiator Name:"),
                     align_vertical=True),
            ui.Divider("divider[0]"),
        ]

        net_is_configured = utils.network.NodeNetwork().is_configured()

        if not net_is_configured:
            ws.extend([
                ui.Notice(
                    "network.notice", "Networking is not configured, " +
                    "please configure it before NFSv4 " + "Domain"),
                ui.Divider("notice.divider")
            ])
        ws.extend([
            ui.Entry("nfsv4.domain",
                     _("NFSv4 Domain (example.redhat.com):"),
                     enabled=net_is_configured,
                     align_vertical=True)
        ])

        page = ui.Page("page", ws)
        self.widgets.add(page)
        return page
    def ui_content(self):
        sync_mgmt()

        buttons = []
        net_is_configured = utils.network.NodeNetwork().is_configured()
        header_menu = "{engine_name} Configuration".format(
            engine_name=config.engine_name)

        if not net_is_configured:
            ws = [
                ui.Header("header[0]", header_menu),
                ui.Notice(
                    "network.notice", "Networking is not configured, " +
                    "please configure it before " + "registering"),
                ui.Divider("divider[0]")
            ]

        elif self._hosted_engine_configured():
            ws = [
                ui.Header("header[0]", header_menu),
                ui.Notice(
                    "he.notice",
                    "Hosted Engine is configured. Engine registration "
                    "is disabled, as this host is already registered to"
                    " the hosted engine"),
                ui.Divider("divider[0]"),
                ui.Label("vdsm_cfg.password._label",
                         "Password for adding additional hosts"),
                ui.Label(
                    "vdsm_cfg.password._label2",
                    "Note: This sets the root password and "
                    "enables SSH"),
                ui.ConfirmedEntry("vdsm_cfg.password", "Password:"******"action.register", "Save")]

        else:
            ws = [
                ui.Header("header[0]", header_menu),
                ui.Entry("vdsm_cfg.address",
                         str(config.engine_name) + " FQDN (or fqdn:port):"),
                ui.Divider("divider[0]"),
                ui.Label(
                    "vdsm_cfg.password._label",
                    "Optional password for adding Node through " +
                    str(config.engine_name)),
                ui.Label(
                    "vdsm_cfg.password._label2",
                    "Note: This sets the root password and "
                    "enables SSH"),
                ui.ConfirmedEntry("vdsm_cfg.password", "Password:"******"action.register", "Save / Register")]

        page = ui.Page("page", ws)
        page.buttons = buttons

        self.widgets.add(page)
        return page
Exemple #3
0
 def __init__(self, path):
     widgets = [ui.Entry("bond.name", _("Name:")),
                ui.Divider("bond.divider[0]"),
                ui.Entry("bond.options", _("Options:")),
                ui.Divider("bond.divider[1]"),
                NicTable("bond.slaves", multi=True)]
     super(CreateBondDialog, self).__init__(path, _("Create Bond"), widgets)
Exemple #4
0
    def ui_content(self):
        """Describes the UI this plugin requires
        This is an ordered list of (path, widget) tuples.
        """
        mbond = defaults.NicBonding().retrieve()
        bond_status = ", ".join(mbond["slaves"] or [])
        bond_lbl = "Remove %s (%s)" % (mbond["name"], bond_status) \
            if bond_status else "Create Bond"

        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]"),
            NicTable("nics", height=3),
            ui.Row("row[0]", [
                ui.Button("button.ping", "Ping"),
                ui.Button("button.toggle_bond", bond_lbl)
            ])
        ]

        page = ui.Page("page", ws)
        # Save it "locally" as a dict, for better accessability
        self.widgets.add(page)
        return page
Exemple #5
0
 def ui_content(self):
     ws = [
         ui.Header("header[0]", "Storage Volumes"),
         ui.Label(
             "label[0]", "Please enter the sizes for the " +
             "following partitions in MB"),
         ui.Divider("divider[0]"),
         ui.Entry("storage.efi_size", "UEFI/Bios:", enabled=False),
         ui.Divider("divider[1]"),
         ui.Entry("storage.root_size", "Root & RootBackup:", enabled=False),
         ui.Label("label[1]", "(2 partitions at 512MB each)"),
         ui.Divider("divider[2]"),
         ui.Entry("storage.swap_size", "Swap:"),
         ui.Entry("storage.config_size", "Config:"),
         ui.Entry("storage.logging_size", "Logging:"),
         ui.Entry("storage.data_size", "Data:"),
     ]
     self.widgets.add(ws)
     page = ui.Page("storage", ws)
     page.buttons = [
         ui.QuitButton("button.quit", "Quit"),
         ui.Button("button.back", "Back"),
         ui.SaveButton("button.next", "Next")
     ]
     return page
 def ui_content(self):
     ws = [
         ui.Header("header[0]",
                   _("Require a password for the admin user?")),
         ui.Label(
             "label[0]",
             _("Please enter the current admin ") +
             _("password. You may also change the admin password ") +
             _("if required. If the new password fields are left ") +
             _("blank the password will remain the same.")),
         ui.Label("label[1]", _("Password for the admin user")),
         ui.Divider("divider[0]"),
         ui.PasswordEntry("upgrade.current_password",
                          _("Current Password:"******"divider[1]"),
         ui.ConfirmedEntry("upgrade.password",
                           _("Password:"******"current_password.info", ""),
         ui.Label("password.info", self.__no_new_password_msg)
     ]
     page = ui.Page("password", ws)
     page.buttons = [
         ui.QuitButton("button.quit", "Quit"),
         ui.Button("button.back", "Back"),
         ui.SaveButton("button.next", "Update")
     ]
     self.widgets.add(page)
     return page
Exemple #7
0
 def ui_content(self):
     ws = [
         ui.Header("header[0]",
                   "Require a password for local console access?"),
         ui.Label(
             "label[0]", "Please enter the current admin " +
             "password. You may also change the admin password " +
             "if required. If the new password fields are left" +
             "blank the password will remain the same."),
         ui.Label("label[1]", "Password for local console access"),
         ui.Divider("divider[0]"),
         ui.PasswordEntry("upgrade.current_password", "Current Password:"******"divider[1]"),
         ui.PasswordEntry("upgrade.password", "Password:"******"upgrade.password_confirmation",
                          "Confirm Password:"******"divider[2]"),
         ui.Label("current_password.info", ""),
         ui.Label("password.info", self.__no_new_password_msg)
     ]
     self.widgets.add(ws)
     page = ui.Page("password", ws)
     page.buttons = [
         ui.QuitButton("button.quit", "Quit"),
         ui.Button("button.back", "Back"),
         ui.SaveButton("button.next", "Update")
     ]
     return page
Exemple #8
0
    def ui_content(self):

        ws = [
            ui.Header("header[0]", _("Logging")),
            ui.Label(
                "logrotate.header",
                _("The logs will be rotated at the ") +
                _("specified size not more often than the ") +
                _("set inerval")),
            ui.Entry("logrotate.max_size",
                     _("Logrotate Max Log ") + _("Size (KB):")),
            ui.Options("logrotate.interval", _("Interval"), self._intervals),
            ui.Divider("divider[0]")
        ]

        net_is_configured = utils.network.NodeNetwork().is_configured()

        if not net_is_configured:
            ws.extend([
                ui.Notice(
                    "network.notice",
                    _("Networking is not configured, ") +
                    _("please configure it before rsyslog ") +
                    _("and/or netconsole")),
                ui.Divider("notice.divider")
            ])

        ws.extend([
            ui.Label(
                "rsyslog.header",
                _("RSyslog is an enhanced multi-") + _("threaded syslogd")),
            ui.Entry("rsyslog.address",
                     _("Server Address:"),
                     enabled=net_is_configured),
            ui.Entry("rsyslog.port",
                     _("Server Port:"),
                     enabled=net_is_configured),
            ui.Divider("divider[1]"),
            ui.Label(
                "netconsole.label",
                _("Netconsole service allows a remote sys") +
                _("log daemon to record printk() messages")),
            ui.Entry("netconsole.address",
                     _("Server Address:"),
                     enabled=net_is_configured),
            ui.Entry("netconsole.port",
                     _("Server Port:"),
                     enabled=net_is_configured)
        ])

        page = ui.Page("page", ws)
        self.widgets.add(page)
        return page
Exemple #9
0
    def ui_content(self):
        """Describes the UI this plugin requires
        This is an ordered list of (path, widget) tuples.
        """
        # Function to expand all "keywords" to the same length
        aligned = lambda l: l.ljust(13)

        # Network related widgets, appearing in one row
        network_widgets = [
            ui.KeywordLabel("networking", aligned(_("Networking: "))),
            ui.Label("networking.bridge", ""),
        ]

        action_widgets = [
            ui.Button("action.lock", _("Lock")),
            ui.Button("action.logoff", _("Log Off")),
            ui.Button("action.restart", _("Restart")),
            ui.Button("action.poweroff", _("Power Off"))
        ]

        widgets = [ui.Header("header[0]", _("System Information"))]

        if self.model()["managed_by"]:
            widgets += [
                ui.KeywordLabel("managed_by", aligned(_("Managed by: ")))
            ]

        widgets += [
            ui.KeywordLabel("status", aligned(_("Status: "))),
            ui.Divider("divider[0]"),
            ui.Row("row[0]", network_widgets),
            ui.Label("networking.ip", ""),
            ui.Divider("divider[1]"),
            ui.KeywordLabel("logs", aligned(_("Logs: "))),
            ui.KeywordLabel("libvirt.num_guests", aligned(_("Running VMs: "))),
            ui.Divider("divider[2]"),
            ui.Label("support.hint", _("Press F8 for support menu")),
            ui.Row("row[1]", [
                ui.Button("action.hostkey", _("View Host Key")),
                ui.Button("action.cpu_details", _("View CPU Details"))
            ]),
            ui.Button("action.console", "Set Console Path"),
            ui.Row("row[2]", action_widgets),
        ]

        self.widgets.add(widgets)

        page = ui.Page("page", widgets)
        page.buttons = []
        return page
 def ui_content(self):
     ws = [
         ui.Header(
             "header[0]", "%s is beeing installed ..." %
             self.application.product.PRODUCT_SHORT),
         ui.Divider("divider[0]"),
         ui.ProgressBar("progressbar", 0),
         ui.Divider("divider[1]"),
         ui.Label("log", ""),
     ]
     self.widgets.add(ws)
     page = ui.Page("progress", ws)
     page.buttons = []
     self._worker.start()
     return page
Exemple #11
0
    def __init__(self, title, description, plugin):
        self.keys = [
            "rhn.proxyhost", "rhn.proxyport", "rhn.proxyuser",
            "rhn.proxypassword"
        ]

        def clear_invalid(dialog, changes):
            [plugin.stash_change(prefix) for prefix in self.keys]

        title = _("RHSM Proxy Information")

        entries = [
            ui.Entry("rhn.proxyhost", "Server:"),
            ui.Entry("rhn.proxyport", "Port:"),
            ui.Entry("rhn.proxyuser", "Username:"******"rhn.proxypassword", "Password:"******"label[0]", description),
            ui.Divider("divider[0]")
        ]
        children.extend(entries)
        super(ProxyDialog, self).__init__("proxy.dialog", title, children)
        self.buttons = [
            ui.CloseButton("proxy.save", _("Save"), enabled=True),
            ui.CloseButton("proxy.close", _("Cancel"))
        ]

        b = plugins.UIElements(self.buttons)
        b["proxy.close"].on_activate.clear()
        b["proxy.close"].on_activate.connect(ui.CloseAction())
        b["proxy.close"].on_activate.connect(clear_invalid)
Exemple #12
0
    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
Exemple #13
0
 def ui_content(self):
     method = "Installing"
     product = self.application.product.PRODUCT_SHORT
     ws = [ui.Header("header[0]", "%s %s" % (method, product)),
           ui.Divider("divider[0]"),
           ui.ProgressBar("progressbar", 0),
           ui.Divider("divider[1]"),
           ui.Label("log", ""),
           ui.Divider("divider[2]"),
           ui.Button("action.reboot", "Reboot")
           ]
     self.widgets.add(ws)
     page = ui.Page("progress", ws)
     page.buttons = []
     self._worker.start()
     return page
Exemple #14
0
 def ui_content(self):
     ws = [ui.Header("header[0]",
                     "Require a password for the admin user?"),
           ui.Divider("divider[0]"),
           ui.PasswordEntry("admin.password", "Password:"******"admin.password_confirmation",
                            "Confirm Password:"******"divider[1]"),
           ui.Label("password.info", "")
           ]
     self.widgets.add(ws)
     page = ui.Page("password", ws)
     page.buttons = [ui.QuitButton("button.quit", "Quit"),
                     ui.Button("button.back", "Back"),
                     ui.SaveButton("button.next", "Install")]
     return page
Exemple #15
0
    def ui_content(self):
        """Describes the UI this plugin requires
        This is an ordered list of (path, widget) tuples.
        """
        ws = [ui.Header("ping.header", "Ping a remote host"),
              ui.Entry("ping.address", "Address:"),
              ui.Entry("ping.count", "Count:"),
              ui.Divider("divider[1]"),
              ui.SaveButton("ping.do_ping", "Ping"),
              ui.Divider("divider[2]"),
              ui.Label("ping.result", "Result:"),
              ]

        page = ui.Page("page", ws)
        page.buttons = []
        self.widgets.add(page)
        return page
Exemple #16
0
    def ui_content(self):
        if self.application.args.dry:
            net_is_configured = True
        else:
            net_is_configured = NodeNetwork().is_configured()

        if not net_is_configured:

            ws = ([
                ui.Divider("notice.divider"),
                ui.Notice(
                    "network.notice", "Networking is not configured, please " +
                    "configure it before configuring RHN"),
                ui.Divider("notice.divider")
            ])

        else:
            status, rhn_type = get_rhn_status()
            if status == 0:
                rhn_msg = ("RHN Registration is required only if you wish " +
                           "to use Red Hat Enterprise Linux with virtual " +
                           "guests subscriptions for your guests.")
            else:
                rhn_msg = "RHN Registration\n\nRegistration Status: %s" \
                          % rhn_type

            ws = [
                ui.Header("header[0]", rhn_msg),
                ui.Entry("rhn.user", "Login:"******"rhn.password", "Password:"******"rhn.profilename", "Profile Name (optional):"),
                ui.Divider("divider[0]"),
                ui.Options("rhn.type", "Type", self._rhn_types),
                ui.Entry("rhn.url", "URL:"),
                ui.Entry("rhn.ca", "CA URL:"),
                ui.Header("header[0]", "HTTP Proxy Configuration"),
                ui.Entry("rhn.proxyhost", "Server:"),
                ui.Entry("rhn.proxyport", "Port:"),
                ui.Entry("rhn.proxyuser", "Username:"******"rhn.proxypassword", "Password:"******"divider[1]"),
            ]

        page = ui.Page("page", ws)
        self.widgets.add(ws)
        return page
Exemple #17
0
    def ui_content(self):
        """Describes the UI this plugin requires
        This is an ordered list of (path, widget) tuples.
        """
        # _types needs to be rebuild on every page view, as the network
        # state can change between page views
        # NodeNetwork relies on runtime information which is N/A in dev mode
        if self.application.args.dry:
            net_is_configured = True
        else:
            net_is_configured = NodeNetwork().is_configured()

        ws = [ui.Header("kdump._header", _("Configure Kdump"))]

        if not net_is_configured:
            self._types = self._types_local
            ws.extend([
                ui.Notice(
                    _("network.notice"),
                    _("Networking is not configured, ") +
                    _("please configure it before NFS ") +
                    _("or SSH-based kdump")),
                ui.Divider("notice.divider")
            ])
            ws.extend([ui.Options("kdump.type", _("Type"), self._types)])

        else:
            self._types = self._types_local + self._types_remote
            ws.extend([ui.Options("kdump.type", _("Type"), self._types)])
            ws.extend([
                ui.Divider("divider[0]"),
                ui.Entry("kdump.nfs_location",
                         _("NFS Location ") + _("(example.com:/var/crash):"),
                         align_vertical=True),
                ui.Divider("divider[1]"),
                ui.Entry("kdump.ssh_location",
                         _("SSH Location ") + _("([email protected]):"),
                         align_vertical=True),
                ui.Entry("kdump.ssh_key",
                         "SSH Key URL (optional):",
                         align_vertical=True)
            ])
        page = ui.Page("page", ws)
        self.widgets.add(page)
        return page
Exemple #18
0
    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):
     ws = [ui.Header("header[0]", _("Installation"))]
     ws += self.___installation_options()
     ws += [ui.Divider("divider[0]")]
     ws += self.__additional_infos()
     self.widgets.add(ws)
     page = ui.Page("welcome", ws)
     page.buttons = [ui.QuitButton("button.quit", _("Quit"))]
     return page
    def ui_content(self):
        # Update the status on a page refresh
        self._model["hosted_engine.status"] = self.__get_vm_status()

        network_up = NodeNetwork().is_configured()

        ws = [ui.Header("header[0]", "Hosted Engine Setup")]

        if network_up:
            ws.extend([ui.KeywordLabel("hosted_engine.enabled",
                                       ("Hosted Engine: "))])
        else:
            ws.extend([ui.Notice("network.notice", "Networking is not " +
                                 "configured please configure it before " +
                                 "setting up hosted engine")])

        if self._configured():
            ws.extend([ui.Divider("divider[0]"),
                       ui.KeywordLabel("hosted_engine.vm",
                                       ("Engine VM: ")),
                       ui.KeywordLabel("hosted_engine.status",
                                       ("Engine Status: ")),
                       ui.Button("button.status", "Hosted Engine VM status"),
                       ui.Button("button.maintenance",
                                 "Set Hosted Engine maintenance")])

        if network_up:
            ws.extend([ui.Divider("divider.button"),
                       ui.Button("button.dialog", "Deploy Hosted Engine")])

        if self._show_progressbar:
            if "progress" in self._model:
                ws.append(ui.ProgressBar("download.progress",
                                         int(self._model["progress"])))
            else:
                ws.append(ui.ProgressBar("download.progress", 0))

            ws.append(ui.KeywordLabel("download.status", ""))

        page = ui.Page("page", ws)
        page.buttons = []
        self.widgets.add(page)
        return page
Exemple #21
0
 def ui_content(self):
     """Describes the UI this plugin requires
     This is an ordered list of (path, widget) tuples.
     """
     ws = [
         ui.Header("kdump._header", "Configure Kdump"),
         ui.Options("kdump.type", "Type", self._types),
         ui.Divider("divider[0]"),
         ui.Entry("kdump.nfs_location",
                  "NFS Location " + "(example.com:/var/crash):",
                  align_vertical=True),
         ui.Divider("divider[1]"),
         ui.Entry("kdump.ssh_location",
                  "SSH Location " + "([email protected]):",
                  align_vertical=True),
     ]
     page = ui.Page("page", ws)
     self.widgets.add(page)
     return page
Exemple #22
0
    def __init__(self, path, title, description):
        title = "Custom Block Device"

        device_entry = ui.Entry("boot.device.custom", "Device path:")
        children = [ui.Label("label[0]", description),
                    ui.Divider("divider[0]"),
                    device_entry]
        super(CustomDeviceDialog, self).__init__(path, title, children)
        self.buttons = [ui.SaveButton("dialog.device.custom.save"),
                        ui.CloseButton("dialog.device.custom.close", "Cancel")]
Exemple #23
0
    def ui_content(self):
        cfg = rhn_model.RHN().retrieve()
        if self.application.args.dry:
            net_is_configured = True
        else:
            net_is_configured = NodeNetwork().is_configured()

        if not net_is_configured:

            ws = ([
                ui.Divider("notice.divider"),
                ui.Notice(
                    "network.notice", "Networking is not configured, please " +
                    "configure it before configuring RHSM"),
                ui.Divider("notice.divider")
            ])

        else:
            rhn_msg = ("RHSM Registration is required only if you wish " +
                       "to use Red Hat Enterprise Linux with virtual " +
                       "guests subscriptions for your guests.")

            if cfg["rhntype"] and self._get_status(cfg) is not None:
                rhn_msg = self._get_status(cfg)

            ws = [
                ui.Header("header[0]", rhn_msg),
                ui.Entry("rhn.username", "Login:"******"rhn.password", "Password:"******"rhn.profilename", "Profile Name (optional):"),
                ui.Divider("divider[0]"),
                ui.Options("rhn.type", "Type", self._rhn_types),
                ui.Entry("rhn.url", "URL:"),
                ui.Entry("rhn.ca", "CA URL:"),
                ui.Entry("rhn.org", "Organization:"),
                ui.Entry("rhn.environment", "Environment:"),
                ui.Entry("rhn.activation_key", "Activation Key:"),
                ui.Button("button.proxy", "HTTP Proxy Configuration"),
            ]

        page = ui.Page("page", ws)
        self.widgets.add(ws)
        return page
Exemple #24
0
    def ui_content(self):
        """Describes the UI this plugin requires
        This is an ordered list of (path, widget) tuples.
        """
        mbond = defaults.NicBonding().retrieve()
        bond_status = ", ".join(mbond["slaves"]
                                or [])
        bond_lbl = _("Remove %s (%s)") % (mbond["name"], bond_status) \
            if bond_status else _("Create Bond")

        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]"),
              NicTable("nics", height=3),

              ui.Row("row[0]",
                     [ui.Button("button.ping", _("Ping")),
                      ui.Button("button.toggle_bond", bond_lbl)
                      ])
              ]

        page = ui.Page("page", ws)
        # Save it "locally" as a dict, for better accessability
        self.widgets.add(page)

        #
        # NIC Deatils Dialog and Bond creation is disabled
        # when Node is managed
        #
        if has_managed_ifnames():
            self._nic_details_group.enabled(False)
            self.widgets["button.toggle_bond"].enabled(False)
            nictbl = self.widgets["nics"]
            nictbl.on_activate.clear()
            nictbl.label(nictbl.label() + " (read-only/managed)")

        return page
Exemple #25
0
    def ui_content(self):
        """Describes the UI this plugin requires
        This is an ordered list of (path, widget) tuples.
        """
        buttons = [ui.Button("ping.do_ping", "Apply"),
                   ui.Button("ping.cancel", "Cancel")
                    ]
        ws = [ui.Header("ping.header", "Engine Setup"),
              ui.Divider("divider[1]"),
              ui.Row("row[0]", buttons),
              ui.Divider("divider[2]"),
              #ui.ProgressBar("ping.progress"),
              #ui.Divider("divider[3]"),
              ui.Label("ping.result", "Result:"),
              ]

        page = ui.Page("page", ws)
        page.buttons = []
        self.widgets.add(page)
        return page
Exemple #26
0
 def __init__(self, path, title):
     super(HostkeyDialog, self).__init__(path, title, [])
     ssh = security.Ssh()
     fp, hk = ssh.get_hostkey()
     self.children = [
         ui.Label("hostkey.label[0]", "RSA Host Key Fingerprint:"),
         ui.Label("hostkey.fp", fp),
         ui.Divider("hostkey.divider[0]"),
         ui.Label("hostkey.label[1]", "RSA Host Key:"),
         ui.Label("hostkey", "\n".join(textwrap.wrap(hk, 64))),
     ]
     self.buttons = [ui.CloseButton("dialog.close")]
Exemple #27
0
    def ui_content(self):
        ws = [
            ui.Header("header[0]", "SNMP"),
            ui.Checkbox("snmp.enabled", "Enable SNMP"),
            ui.Divider("divider[0]"),
            ui.Header("header[1]", "SNMP Password"),
            ui.ConfirmedEntry("snmp.password", "Password:"******"page", ws)
        self.widgets.add(ws)
        return page
Exemple #28
0
    def ui_content(self):
        ws = [
            ui.Header("header[0]", "CIM"),
            ui.Checkbox("cim.enabled", "Enable CIM"),
            ui.Divider("divider[0]"),
            ui.Header("header[1]", "CIM Password"),
            ui.ConfirmedEntry("cim.password", "Password:"******"page", ws)
        self.widgets.add(ws)
        return page
    def ui_content(self):
        ws = [ui.Header("header", "Remote Storage"),
              ui.Entry("iscsi.initiator_name", "iSCSI Initiator Name:",
                       align_vertical=True),
              ui.Divider("divider[0]"),
              ui.Entry("nfsv4.domain", "NFSv4 Domain (example.redhat.com):",
                       align_vertical=True),
              ]

        page = ui.Page("page", ws)
        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