Ejemplo n.º 1
0
 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]
Ejemplo n.º 2
0
 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]
Ejemplo n.º 3
0
 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]
Ejemplo n.º 4
0
 def __init__(self, controller):
     livepage.LivePage.__init__(self)
     self.controller = controller
     self.clients = []
     self.events = []
     self.controller.getIDs().addCallback(self.gotIDs)
     n = results.notifierFromFunction(
         lambda _: self.controller.getIDs().addCallback(self.gotIDs))
     self.controller.addNotifier(n)
     if not self.children:
         self.children = {}
     self.children["controller.css"] = static.File(
         util.sibpath(__file__, 'controller.css'))
     self.children["controller.js"] = static.File(
         util.sibpath(__file__, 'controller.js'))
Ejemplo n.º 5
0
 def __init__(self, controller):
     self.controller = controller
     reactor.callLater(1, self.ready)
     n = results.notifierFromFunction(
         lambda _:self.controller.getIDs().addCallback(self.gotIDs))
     self.controller.addNotifier(n)