Add links for facts and nodes in fact table macro
Added links to the node page from the facts_table if show_nodes is True. Added links to the facts page from the facts_table if show_nodes is False. Added logic to switch TH table from facts to nodes if show_nodes is True.
This commit is contained in:
@@ -5,7 +5,11 @@
|
|||||||
<table class="filter-table table table-striped {% if condensed %}table-condensed{% endif%}" style="table-layout:fixed">
|
<table class="filter-table table table-striped {% if condensed %}table-condensed{% endif%}" style="table-layout:fixed">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
{% if show_node %}
|
||||||
|
<th>Node</th>
|
||||||
|
{% else %}
|
||||||
<th>Fact</th>
|
<th>Fact</th>
|
||||||
|
{% endif %}
|
||||||
<th>Value</th>
|
<th>Value</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@@ -13,9 +17,9 @@
|
|||||||
{% for fact in facts %}
|
{% for fact in facts %}
|
||||||
<tr>
|
<tr>
|
||||||
{% if show_node %}
|
{% if show_node %}
|
||||||
<td>{{fact.node}}</td>
|
<td><a href="{{url_for('node', node_name=fact.node)}}">{{fact.node}}</a></td>
|
||||||
{% else %}
|
{% else %}
|
||||||
<td>{{fact.name}}</td>
|
<td><a href="{{url_for('fact', fact=fact.name)}}">{{fact.name}}</a></td>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<td style="word-wrap:break-word">{{fact.value}}</td>
|
<td style="word-wrap:break-word">{{fact.value}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
Reference in New Issue
Block a user