Example #1
0
 def _setup_section(self, name, fields, rows):
     title = SectionTitle(name, bgcolor=self._bgcolor_section)
     title.set_font(color=self._other_section_font_color)
     anchor = Anchor('new', href='new.%s.machine' % name)
     title.row.append(TableCell(anchor))
     self.body.append(title)
     if len(rows):
         table = self._make_table(name, fields, rows, border=1, cellspacing=1)
         color_header(table, self._bgcolor_thead)
         self.body.append(table)
Example #2
0
 def _setup_section(self, name, fields, rows):
     title = SectionTitle(name)
     title.set_font(color='DarkViolet')
     anchor = Anchor('new', href='new.%s.mtype' % name)
     title.row.append(TableCell(anchor))
     self.body.append(title)
     if len(rows):
         table = self._make_table(name, fields, rows, border=1, cellspacing=1)
         color_header(table, 'MediumOrchid2')
         self.body.append(table)
Example #3
0
 def _setup_section(self, name, fields, rows):
     title = SectionTitle(name, bgcolor=self._bgcolor_section)
     title.set_font(color=self._other_section_font_color)
     anchor = Anchor('new', href='new.%s.machine' % name)
     title.row.append(TableCell(anchor))
     self.body.append(title)
     if len(rows):
         table = self._make_table(name, fields, rows, border=1, cellspacing=1)
         color_header(table, self._bgcolor_thead)
         self.body.append(table)
Example #4
0
 def _setup_section(self, name, fields, rows):
     title = SimpleTitleElement(name)
     title.set_font(color='DarkViolet')
     td = TD()
     anchor = Anchor('new.%s.mtype' % name, 'new')
     td.appendChild(anchor)
     title.row.appendChild(td)
     self.body.appendChild(title)
     if len(rows):
         table = self._make_table(name, fields, rows, border=1, cellspacing=1)
         color_header(table, 'MediumOrchid2')
         self.body.appendChild(table)
Example #5
0
 def _setup_variables_section(self, rows):
     section = 'Variables'
     machine = self.machine.current_machine
     relation = self.machine.relation
     # make the section
     title = SectionTitle(section, bgcolor=self._bgcolor_section)
     title.set_font(color=self._other_section_font_color)
     anchor = Anchor('new', href='new.%s.machine' % section)
     title.row.append(TableCell(anchor))
     self.body.append(title)
     if len(rows):
         table = self._make_variables_table(rows, border=1, cellspacing=1)
         color_header(table, self._bgcolor_thead)
         self.body.append(table)
Example #6
0
 def _setup_section(self, name, fields, rows):
     title = SectionTitle(name)
     title.set_font(color='DarkViolet')
     anchor = Anchor('new', href='new.%s.mtype' % name)
     title.row.append(TableCell(anchor))
     self.body.append(title)
     if len(rows):
         table = self._make_table(name,
                                  fields,
                                  rows,
                                  border=1,
                                  cellspacing=1)
         color_header(table, 'MediumOrchid2')
         self.body.append(table)
Example #7
0
 def _setup_variables_section(self, rows):
     section = 'Variables'
     machine = self.machine.current_machine
     relation = self.machine.relation
     # make the section
     title = SectionTitle(section, bgcolor=self._bgcolor_section)
     title.set_font(color=self._other_section_font_color)
     anchor = Anchor('new', href='new.%s.machine' % section)
     title.row.append(TableCell(anchor))
     self.body.append(title)
     if len(rows):
         table = self._make_variables_table(rows, border=1, cellspacing=1)
         color_header(table, self._bgcolor_thead)
         self.body.append(table)
Example #8
0
 def _setup_section(self, name, fields, rows):
     title = SimpleTitleElement(name)
     title.set_font(color='DarkViolet')
     td = TD()
     anchor = Anchor('new.%s.mtype' % name, 'new')
     td.appendChild(anchor)
     title.row.appendChild(td)
     self.body.appendChild(title)
     if len(rows):
         table = self._make_table(name,
                                  fields,
                                  rows,
                                  border=1,
                                  cellspacing=1)
         color_header(table, 'MediumOrchid2')
         self.body.appendChild(table)
Example #9
0
 def _setup_script_section(self):
     machine = self.machine.current_machine
     relation = self.machine.relation
     scriptnames = relation.scripts.scriptnames
     scripts = []
     for scriptname in scriptnames:
         result = relation.get_script(scriptname, show_inheritance=True)
         if result is not None:
             # if result is not None, then result is a tuple
             # that is (fileobj, parent)
             # but we need scriptname, parent
             scripts.append((scriptname, result[1]))
     # make the section
     title = SectionTitle('Scripts', bgcolor=self._bgcolor_section)
     title.set_font(color=self._other_section_font_color)
     anchor = Anchor('new', href='new.%s.machine' % 'Scripts')
     title.row.append(TableCell(anchor))
     self.body.append(title)
     if len(scripts):
         table = self._make_script_table(scripts, border=1, cellspacing=1)
         color_header(table, self._bgcolor_thead)
         self.body.append(table)
Example #10
0
 def _setup_script_section(self):
     machine = self.machine.current_machine
     relation = self.machine.relation
     scriptnames = relation.scripts.scriptnames
     scripts = []
     for scriptname in scriptnames:
         result = relation.get_script(scriptname, show_inheritance=True)
         if result is not None:
             # if result is not None, then result is a tuple
             # that is (fileobj, parent)
             # but we need scriptname, parent
             scripts.append((scriptname, result[1]))
     # make the section
     title = SectionTitle('Scripts', bgcolor=self._bgcolor_section)
     title.set_font(color=self._other_section_font_color)
     anchor = Anchor('new', href='new.%s.machine' % 'Scripts')
     title.row.append(TableCell(anchor))
     self.body.append(title)
     if len(scripts):
         table = self._make_script_table(scripts, border=1, cellspacing=1)
         color_header(table, self._bgcolor_thead)
         self.body.append(table)