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
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
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
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.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