summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Server/Reports
diff options
context:
space:
mode:
authorTim Laszlo <tim.laszlo@gmail.com>2012-06-14 11:20:25 -0500
committerTim Laszlo <tim.laszlo@gmail.com>2012-06-14 11:20:25 -0500
commit591200dab6feb2a5f9f42292fc92e778591a8a38 (patch)
tree9e9b80d4b1292625e4796c39813c422fd4985c17 /src/lib/Bcfg2/Server/Reports
parentd0555789f2af89817b4bf50a4d88e98ad6c20730 (diff)
downloadbcfg2-591200dab6feb2a5f9f42292fc92e778591a8a38.tar.gz
bcfg2-591200dab6feb2a5f9f42292fc92e778591a8a38.tar.bz2
bcfg2-591200dab6feb2a5f9f42292fc92e778591a8a38.zip
web_reports: Make reasons clickable in entry listings
Diffstat (limited to 'src/lib/Bcfg2/Server/Reports')
-rw-r--r--src/lib/Bcfg2/Server/Reports/reports/models.py2
-rw-r--r--src/lib/Bcfg2/Server/Reports/reports/templates/config_items/common.html2
-rw-r--r--src/lib/Bcfg2/Server/Reports/reports/templates/config_items/listing.html2
3 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/Bcfg2/Server/Reports/reports/models.py b/src/lib/Bcfg2/Server/Reports/reports/models.py
index 3bce17a30..2ddaba02a 100644
--- a/src/lib/Bcfg2/Server/Reports/reports/models.py
+++ b/src/lib/Bcfg2/Server/Reports/reports/models.py
@@ -283,6 +283,8 @@ class Reason(models.Model):
rv.append("Incorrect data")
if self.unpruned:
rv.append("Directory has extra files")
+ if len(rv) == 0:
+ rv.append("Exists")
return rv
@staticmethod
diff --git a/src/lib/Bcfg2/Server/Reports/reports/templates/config_items/common.html b/src/lib/Bcfg2/Server/Reports/reports/templates/config_items/common.html
index 02e53cff5..570ad645b 100644
--- a/src/lib/Bcfg2/Server/Reports/reports/templates/config_items/common.html
+++ b/src/lib/Bcfg2/Server/Reports/reports/templates/config_items/common.html
@@ -30,7 +30,7 @@
<td>{{ entry.kind }}</td>
<td><a href="{% url reports_item type=type_name pk=interaction.0 %}">{{ entry.name }}</a></td>
<td>{{ interaction|length }}</td>
- <td>{{ reason.short_list|join:"," }}</td>
+ <td><a href="{% url reports_item type=type_name pk=interaction.0 %}">{{ reason.short_list|join:"," }}</a></td>
</tr>
{% endfor %}
</table>
diff --git a/src/lib/Bcfg2/Server/Reports/reports/templates/config_items/listing.html b/src/lib/Bcfg2/Server/Reports/reports/templates/config_items/listing.html
index f81325054..bc883098d 100644
--- a/src/lib/Bcfg2/Server/Reports/reports/templates/config_items/listing.html
+++ b/src/lib/Bcfg2/Server/Reports/reports/templates/config_items/listing.html
@@ -23,7 +23,7 @@
<tr class='{% cycle listview,listview_alt %}'>
<td><a href="{% url reports_item type=mod_or_bad,pk=eis.0 %}">{{entry.name}}</a></td>
<td>{{ eis|length }}</td>
- <td>{{ reason.short_list|join:"," }}</td>
+ <td><a href="{% url reports_item type=mod_or_bad,pk=eis.0 %}">{{ reason.short_list|join:"," }}</a></td>
</tr>
{% endfor %}
</table>