Example #1
0
 def _add_table_header(self, table, fields, **atts):
     th = BaseElement('th', **atts)
     trow = TR()
     th.appendChild(trow)
     for field in fields:
         trow.appendChild(TxtTD(Bold(field)))
     table.appendChild(th)
     table.header = th
Example #2
0
 def _add_table_header(self, table, fields, **atts):
     th = BaseElement('th', **atts)
     trow = TR()
     th.appendChild(trow)
     for field in fields:
         trow.appendChild(TxtTD(Bold(field)))
     table.appendChild(th)
     table.header = th
Example #3
0
 def __init__(self, rows, **atts):
     BaseElement.__init__(self, 'table', **atts)
     for row in rows:
         trow = TR()
         p = TxtTD(row.package)
         trow.appendChild(p)
         a = TxtTD(row.action)
         trow.appendChild(a)
         self.appendChild(trow)
Example #4
0
 def __init__(self, fields, row, **atts):
     BaseElement.__init__(self, 'table', **atts)
     for field in fields:
         trow = TR()
         p = TxtTD(field)
         trow.appendChild(p)
         a = TxtTD(row[field])
         trow.appendChild(a)
         self.appendChild(trow)
Example #5
0
 def __init__(self, rows, **atts):
     BaseElement.__init__(self, 'table', **atts)
     hrow = TR()
     hrow.appendChild(TxtTD(Bold('Trait')))
     hrow.appendChild(TxtTD(Bold('Order')))
     self.appendChild(hrow)
     for row in rows:
         trow = TR()
         trow.appendChild(TxtTD(row.trait))
         trow.appendChild(TxtTD(row.ord))
         self.appendChild(trow)
Example #6
0
 def __init__(self, rows, **atts):
     BaseElement.__init__(self, 'table', **atts)
     for row in rows:
         trow = TR()
         fake_template = ',,,'.join([row.package, row.template.replace('.', ',')])
         ta = Anchor('show.template.%s' % fake_template, row.template)
         td = TD()
         td.appendChild(ta)
         trow.appendChild(td)
         p = TxtTD(row.package)
         trow.appendChild(p)
         self.appendChild(trow)
Example #7
0
 def __init__(self, rows, **atts):
     BaseElement.__init__(self, "table", **atts)
     for row in rows:
         trow = TR()
         fake_template = ",,,".join([row.package, row.template.replace(".", ",")])
         ta = Anchor("show.template.%s" % fake_template, row.template)
         td = TD()
         td.appendChild(ta)
         trow.appendChild(td)
         p = TxtTD(row.package)
         trow.appendChild(p)
         self.appendChild(trow)
Example #8
0
 def _add_table_row(self, table, fields, row):
     trow = TR()
     for field in fields:
         val = row[field]
         trow.appendChild(TxtTD(val))
     durl = 'delete.%s.%s' % (table.context, row[fields[0]])
     eurl = 'edit.%s.%s' % (table.context, row[fields[0]])
     delanchor = Anchor(durl, 'delete')
     editanchor = Anchor(eurl, 'edit')
     td = TD()
     td.appendChild(editanchor)
     td.appendChild(BR())
     td.appendChild(delanchor)
     trow.appendChild(td)
     #trow.appendChild(TxtTD(delanchor))
     table.appendChild(trow)
Example #9
0
 def set_machine(self, machine):
     self.machine.set_machine(machine)
     self.clear_body()
     title = SimpleTitleElement("Machine:  %s" % machine, bgcolor="IndianRed", width="100%")
     self.body.appendChild(title)
     mtable = BaseElement("table")
     for k, v in self.machine.current.items():
         trow = TR()
         trow.appendChild(TxtTD(Bold(k)))
         trow.appendChild(TxtTD(v))
         mtable.appendChild(trow)
     self.body.appendChild(mtable)
     newanchor = Anchor("new.machine.foo", "new")
     editanchor = Anchor("edit.machine.%s" % machine, "edit")
     self.body.appendChild(HR())
     self.body.appendChild(editanchor)
     self.body.appendChild(BR())
     self.body.appendChild(newanchor)
Example #10
0
 def __init__(self, rows, **atts):
     BaseElement.__init__(self, 'table', **atts)
     hrow = TR()
     hrow.appendChild(TxtTD(Bold('Trait')))
     hrow.appendChild(TxtTD(Bold('Order')))
     self.appendChild(hrow)
     for row in rows:
         trow = TR()
         trow.appendChild(TxtTD(row.trait))
         trow.appendChild(TxtTD(row.ord))
         self.appendChild(trow)
Example #11
0
 def __init__(self, rows, **atts):
     BaseElement.__init__(self, "table", **atts)
     hrow = TR()
     hrow.appendChild(TxtTD(Bold("Trait")))
     hrow.appendChild(TxtTD(Bold("Order")))
     self.appendChild(hrow)
     for row in rows:
         trow = TR()
         trow.appendChild(TxtTD(row.trait))
         trow.appendChild(TxtTD(row.ord))
         self.appendChild(trow)
Example #12
0
 def set_machine(self, machine):
     self.machine.set_machine(machine)
     self.clear_body()
     title = SimpleTitleElement('Machine:  %s' % machine, bgcolor='IndianRed',
                                width='100%')
     self.body.appendChild(title)
     mtable = BaseElement('table')
     for k,v in self.machine.current.items():
         trow = TR()
         trow.appendChild(TxtTD(Bold(k)))
         trow.appendChild(TxtTD(v))
         mtable.appendChild(trow)
     self.body.appendChild(mtable)
     newanchor = Anchor('new.machine.foo', 'new')
     editanchor = Anchor('edit.machine.%s' % machine, 'edit')
     self.body.appendChild(HR())
     self.body.appendChild(editanchor)
     self.body.appendChild(BR())
     self.body.appendChild(newanchor)
Example #13
0
 def __init__(self, rows, **atts):
     BaseElement.__init__(self, 'table', **atts)
     for row in rows:
         trow = TR()
         fake_template = ',,,'.join([row.package, row.template.replace('.', ',')])
         ta = Anchor('show.template.%s' % fake_template, row.template)
         td = TD()
         td.appendChild(ta)
         trow.appendChild(td)
         td = TD()
         ea = Anchor('edit.template.%s' % fake_template, '(edit)')
         td.appendChild(ea)
         trow.appendChild(td)
         p = TxtTD(row.package)
         trow.appendChild(p)
         self.appendChild(trow)
Example #14
0
 def __init__(self, fields, row, **atts):
     BaseElement.__init__(self, 'table', **atts)
     for field in fields:
         trow = TR()
         p = TxtTD(field)
         trow.appendChild(p)
         a = TxtTD(row[field])
         trow.appendChild(a)
         self.appendChild(trow)
Example #15
0
 def __init__(self, rows, **atts):
     BaseElement.__init__(self, 'table', **atts)
     for row in rows:
         trow = TR()
         p = TxtTD(row.package)
         trow.appendChild(p)
         a = TxtTD(row.action)
         trow.appendChild(a)
         self.appendChild(trow)
Example #16
0
 def _add_table_row(self, table, fields, row):
     trow = TR()
     for field in fields:
         val = row[field]
         trow.appendChild(TxtTD(val))
     durl = 'delete.%s.%s' % (table.context, row[fields[0]])
     eurl = 'edit.%s.%s' % (table.context, row[fields[0]])
     delanchor = Anchor(durl, 'delete')
     editanchor = Anchor(eurl, 'edit')
     td = TD()
     td.appendChild(editanchor)
     td.appendChild(BR())
     td.appendChild(delanchor)
     trow.appendChild(td)
     #trow.appendChild(TxtTD(delanchor))
     table.appendChild(trow)
Example #17
0
 def set_machine(self, machine):
     self.machine.set_machine(machine)
     self.clear_body()
     title = SimpleTitleElement('Machine:  %s' % machine, bgcolor='IndianRed',
                                width='100%')
     self.body.appendChild(title)
     mtable = BaseElement('table')
     for k,v in self.machine.current.items():
         trow = TR()
         trow.appendChild(TxtTD(Bold(k)))
         trow.appendChild(TxtTD(v))
         mtable.appendChild(trow)
     self.body.appendChild(mtable)
     self.body.appendChild(SectionTitle('Machine Type'))
     self.body.appendChild(SectionTitle('Kernel'))
     self.body.appendChild(SectionTitle('Profile'))
     self.body.appendChild(SectionTitle('Filesystem'))
Example #18
0
 def set_machine(self, machine):
     self.machine.set_machine(machine)
     self.clear_body()
     title = SimpleTitleElement('Machine:  %s' % machine,
                                bgcolor='IndianRed',
                                width='100%')
     self.body.appendChild(title)
     mtable = BaseElement('table')
     for k, v in self.machine.current.items():
         trow = TR()
         trow.appendChild(TxtTD(Bold(k)))
         trow.appendChild(TxtTD(v))
         mtable.appendChild(trow)
     self.body.appendChild(mtable)
     newanchor = Anchor('new.machine.foo', 'new')
     editanchor = Anchor('edit.machine.%s' % machine, 'edit')
     self.body.appendChild(HR())
     self.body.appendChild(editanchor)
     self.body.appendChild(BR())
     self.body.appendChild(newanchor)
Example #19
0
 def __init__(self, rows, **atts):
     BaseElement.__init__(self, "table", **atts)
     hrow = TR(bgcolor="MistyRose3")
     hrow.appendChild(TxtTD("Trait"))
     hrow.appendChild(TxtTD("Name"))
     hrow.appendChild(TxtTD("Value"))
     self.appendChild(hrow)
     for row in rows:
         trow = TR()
         trow.appendChild(TxtTD(row.trait))
         trow.appendChild(TxtTD(row.name))
         trow.appendChild(TxtTD(row.value))
         self.appendChild(trow)
Example #20
0
 def _add_table_row(self, table, fields, row):
     trow = TR()
     for field in fields:
         trow.appendChild(TxtTD(row[field]))
     table.appendChild(trow)
Example #21
0
 def _add_table_row(self, table, fields, row):
     trow = TR()
     for field in fields:
         trow.appendChild(TxtTD(row[field]))
     table.appendChild(trow)
Example #22
0
 def __init__(self, rows, **atts):
     BaseElement.__init__(self, 'table', **atts)
     hrow = TR(bgcolor='MistyRose3')
     hrow.appendChild(TxtTD('Trait'))
     hrow.appendChild(TxtTD('Name'))
     hrow.appendChild(TxtTD('Value'))
     self.appendChild(hrow)
     for row in rows:
         trow = TR()
         trow.appendChild(TxtTD(row.trait))
         trow.appendChild(TxtTD(row.name))
         trow.appendChild(TxtTD(row.value))
         self.appendChild(trow)
Example #23
0
 def __init__(self, rows, **atts):
     BaseElement.__init__(self, 'table', **atts)
     hrow = TR(bgcolor='MistyRose3')
     hrow.appendChild(TxtTD('Trait'))
     hrow.appendChild(TxtTD('Name'))
     hrow.appendChild(TxtTD('Value'))
     self.appendChild(hrow)
     for row in rows:
         trow = TR()
         trow.appendChild(TxtTD(row.trait))
         trow.appendChild(TxtTD(row.name))
         trow.appendChild(TxtTD(row.value))
         self.appendChild(trow)