Line 12: |
Line 12: |
| !${node_type} | | !${node_type} |
| !AD/AP<br>AS/AS+]], | | !AD/AP<br>AS/AS+]], |
| + | _header_template_simple = [[!# |
| + | !colspan="3"|${node_type}]], |
| _column_cell_templates = { | | _column_cell_templates = { |
| node = [[| colspan="${colspan}" rowspan="${rowspan}" style="text-align: center; color: ${color}; background-color: ${bg_color};" |${values.node}]], | | node = [[| colspan="${colspan}" rowspan="${rowspan}" style="text-align: center; color: ${color}; background-color: ${bg_color};" |${values.node}]], |
Line 302: |
Line 304: |
| } | | } |
| return self._args["comment"] or node_types[self._node_type] or "Fleet" | | return self._args["comment"] or node_types[self._node_type] or "Fleet" |
| + | end |
| + | |
| + | function NodeInfo:is_simple_node_type() |
| + | return self._node_type == 'resource' -- or ... |
| end | | end |
| | | |
| function NodeInfo:create_header() | | function NodeInfo:create_header() |
− | local header_string = format{self._header_template, node_type = self:format_node_type() } | + | local header_string = format{ |
− | self._header = header_string
| + | self:is_simple_node_type() and self._header_template_simple or self._header_template, |
− | self._header_bottom = header_string
| + | node_type = self:format_node_type() |
| + | } |
| + | self._header = header_string |
| + | self._header_bottom = header_string |
| end | | end |
| | | |