aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2019-05-02 15:33:45 +0100
committerStruan Donald <struan@exo.org.uk>2019-05-13 09:29:35 +0100
commit1a7835da6ee96d0287c4523110ebb01f662cafd6 (patch)
treea4266f09b0e5d623f4886e20525a7f066fc277e1
parent9c8751f9db75657579d7db765792e6f061f7d390 (diff)
show open311 failure details in admin report edit page
Rather than having to go into the database to see any error details display it in the admin. The error only shows the first few lines by default and expands on hover.
-rw-r--r--templates/web/base/admin/report_edit.html5
-rw-r--r--web/cobrands/sass/_admin.scss10
2 files changed, 15 insertions, 0 deletions
diff --git a/templates/web/base/admin/report_edit.html b/templates/web/base/admin/report_edit.html
index e38932d7f..a26a35c50 100644
--- a/templates/web/base/admin/report_edit.html
+++ b/templates/web/base/admin/report_edit.html
@@ -87,6 +87,11 @@ class="admin-offsite-link">[% problem.latitude %], [% problem.longitude %]</a>
<input type="submit" class="btn" name="mark_sent" value="[% loc('Mark as sent') %]">
[% END %]
</li>
+[% IF c.user.is_superuser AND problem.send_fail_count > 0 %]
+<li class="sm">[% loc('Send Fail Count:') %] [% problem.send_fail_count %]</li>
+<li class="sm">[% loc('Last failure:') %] [% PROCESS format_time time=problem.send_fail_timestamp %]</li>
+<li class="sm truncate_height">[% loc('Reason:') %] [% problem.send_fail_reason | html %]</li>
+[% END %]
<li class="sm">[% loc('Last update:') %] [% PROCESS format_time time=problem.lastupdate %]</li>
<li>[% loc('Alerts:') %] [% alert_count %]</li>
<li>[% loc('Service:') %] [% problem.service OR '<em>' _ loc('None') _ '</em>' %]</li>
diff --git a/web/cobrands/sass/_admin.scss b/web/cobrands/sass/_admin.scss
index 1f55c62df..745c74fd7 100644
--- a/web/cobrands/sass/_admin.scss
+++ b/web/cobrands/sass/_admin.scss
@@ -240,3 +240,13 @@ $button_bg_col: #a1a1a1; // also search bar (tables)
font-weight: normal;
}
}
+
+.truncate_height {
+ max-height: 3em;
+ overflow: hidden;
+ text-overflow: ellipsis;
+
+ &:hover {
+ max-height: initial;
+ }
+}