Add trigger time to notification and newsletter tables

This commit is contained in:
JonnyWong16 2023-10-09 11:37:56 -07:00
commit fdc1dd3525
No known key found for this signature in database
GPG key ID: B1F1F9807184697A
5 changed files with 60 additions and 15 deletions

View file

@ -19,7 +19,20 @@ DOCUMENTATION :: END
% else:
${notifier['agent_label']} &nbsp;<span class="friendly_name">(${notifier['id']})</span>
% endif
<span class="toggle-right"><i class="fa fa-lg fa-fw fa-cog"></i></span>
<span class="toggle-right friendly_name">
% if notifier['last_triggered']:
<% icon, icon_tooltip = ('fa-check', 'Success') if notifier['last_success'] else ('fa-times', 'Failed') %>
<span id="notifier-last_triggered-${notifier['id']}">
<script>
$("#notifier-last_triggered-${notifier['id']}").html(
moment("${notifier['last_triggered']}", "X").fromNow() + ' <i class="fa fa-lg fa-fw ${icon}" data-toggle="tooltip" data-placement="top" title="${icon_tooltip}"></i>'
)
</script>
</span>
% else:
never
<i class="fa fa-lg fa-fw fa-minus"></i>
% endif
</span>
</li>
% endfor