add connection table to dashboard
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -1,29 +1,37 @@
|
|||||||
|
{% macro table_elm(elm, col_class, tag='td') -%}
|
||||||
|
{% if elm is mapping %}
|
||||||
|
<{{tag}}
|
||||||
|
{% if (col_class|length) > 0 or elm.class is defined%}class="{{col_class}} {{elm.class}}"{% endif %}
|
||||||
|
{% if elm.colspan is defined %}colspan="{{elm.colspan}}"{% endif %}
|
||||||
|
{% if elm.rowspan is defined %}rowspan="{{elm.rowspan}}"{% endif %}
|
||||||
|
>{{elm.val}}</{{tag}}>
|
||||||
|
{% else %}
|
||||||
|
<{{tag}}
|
||||||
|
{% if (col_class|length) > 0 %}class="{{col_class}}"{% endif %}
|
||||||
|
>{{elm}}</{{tag}}>
|
||||||
|
{% endif %}
|
||||||
|
{%- endmacro%}
|
||||||
|
|
||||||
<h5>Connections</h5>
|
<h5>Connections</h5>
|
||||||
<table class="w3-table w3-striped w3-bordered w3-border w3-hoverable w3-white">
|
<table class="w3-table w3-striped w3-bordered w3-border w3-hoverable w3-white">
|
||||||
<tr>
|
{% if table.thead is defined%}
|
||||||
<th class="w3-hide-large"></th>
|
<thead>
|
||||||
</tr>
|
{% for row in table.thead %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>United States</td>
|
{% for col in row %}
|
||||||
<td>65%</td>
|
{{table_elm(col, table.col_classes[loop.index0], 'th')}}
|
||||||
</tr>
|
{% endfor %}
|
||||||
<tr>
|
</tr>
|
||||||
<td>UK</td>
|
{% endfor %}
|
||||||
<td>15.7%</td>
|
</thead>
|
||||||
</tr>
|
{% endif %}
|
||||||
<tr>
|
<tbody>
|
||||||
<td>Russia</td>
|
{% for row in table.tbody %}
|
||||||
<td>5.6%</td>
|
<tr>
|
||||||
</tr>
|
{% for col in row %}
|
||||||
<tr>
|
{{table_elm(col, table.col_classes[loop.index0])}}
|
||||||
<td>Spain</td>
|
{% endfor %}
|
||||||
<td>2.1%</td>
|
</tr>
|
||||||
</tr>
|
{% endfor %}
|
||||||
<tr>
|
</tbody>
|
||||||
<td>India</td>
|
</table>
|
||||||
<td>1.9%</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>France</td>
|
|
||||||
<td>1.5%</td>
|
|
||||||
</tr>
|
|
||||||
|
|||||||
Reference in New Issue
Block a user