def render_widgets(self, ctx, data): w = aw.ResultWidget() w.setFragmentParent(self) n1 = results.notifierFromFunction(w.handleResult) self.controller.addNotifier(n1) c = aw.CommandWidget(self.controller) c.setFragmentParent(self) return ctx.tag[w, tags.br, c]
def render_widgets(self, ctx, data): w = aw.StatusWidget(self.controller) w.setFragmentParent(self) reactor.callLater(.1, w.refreshStatus) n2 = results.notifierFromFunction(w.refreshStatus) self.controller.addNotifier(n2) c = aw.CommandWidget(self.controller) c.setFragmentParent(self) c.addNotifier(n2) return ctx.tag[w, tags.br, c]
def render_widgets(self, ctx, data): f = aw.CommandWidget(self.controller) f.setFragmentParent(self) g = aw.StatusWidget(self.controller) g.setFragmentParent(self) h = aw.ResultWidget() h.setFragmentParent(self) n1 = results.notifierFromFunction(h.handleResult) self.controller.addNotifier(n1) n2 = results.notifierFromFunction(g.refreshStatus) f.addNotifier(n2) reactor.callLater(1, g.refreshStatus) build = tags.table(id="monitor")[tags.tr[tags.td(valign="top")[g], tags.td(valign="top")[h, tags.br, f]]] return ctx.tag[build]
def render_widget(self, ctx, data): w = aw.CommandWidget(self.controller) w.setFragmentParent(self) return ctx.tag[w]