mail: rework the eventlog

This commit is contained in:
Girish Ramakrishnan
2021-10-08 20:34:06 -07:00
parent 0f4e71d478
commit 67918900bf
3 changed files with 35 additions and 24 deletions

View File

@@ -1,7 +1,9 @@
<div>
<a href="/#/email" class="back-to-view-link"><i class="fas fa-arrow-left"></i> {{ 'email.backAction' | tr }}</a>
<div class="col-md-8 col-md-offset-2">
<br/>
<div class="col-md-10 col-md-offset-1">
<h1>
{{ 'emails.eventlog.title' | tr }}
@@ -11,7 +13,7 @@
</div>
<div>
<div class="col-md-8 col-md-offset-2">
<div class="col-md-10 col-md-offset-1">
<div class="maillog-filter">
<input class="form-control" style="width: 200px;" placeholder="{{ 'main.searchPlaceholder' | tr }}" type="text" ng-model="activity.search" ng-model-options="{ debounce: 1000 }" ng-change="activity.updateFilter()" />
<multiselect ng-model="activity.selectedTypes" ms-header="{{ 'emails.typeFilterHeader' | tr }}" options="a.name for a in activityTypes" data-multiple="true" ng-change="activity.updateFilter(true)" filter-after-rows="5" scroll-after-rows="10"></multiselect>
@@ -26,16 +28,18 @@
</div>
<div>
<div class="col-md-8 col-md-offset-2">
<div class="col-md-10 col-md-offset-1">
<div class="card card-block" style="max-width: 100%">
<div>
<center ng-show="activity.busy"><h2><i class="fa fa-circle-notch fa-spin"></i></h2></center>
<table ng-hide="activity.busy" class="table table-hover" style="margin: 0;">
<table ng-hide="activity.busy" class="table table-hover" style="margin: 0; table-layout:fixed">
<thead>
<tr>
<th style="width: 5%"><!-- Icon --></th>
<th style="width: 20%">{{ 'emails.eventlog.time' | tr }}</th>
<th style="width: 75%">{{ 'emails.eventlog.details' | tr }}</th>
<th style="width: 15%">{{ 'emails.eventlog.time' | tr }}</th>
<th style="width: 25%">{{ 'emails.eventlog.mailFrom' | tr }}</th>
<th style="width: 25%">{{ 'emails.eventlog.rcptTo' | tr }}</th>
<th style="width: 30%">{{ 'emails.eventlog.details' | tr }}</th>
</tr>
</thead>
<tbody ng-hide="activity.eventLogs.length">
@@ -55,23 +59,26 @@
<i class="fas fa-arrow-circle-left" ng-show="eventlog.type === 'delivered'" uib-tooltip="{{ 'emails.eventlog.type.outgoing' | tr }}"></i>
<i class="fas fa-history" ng-show="eventlog.type === 'deferred'" uib-tooltip="{{ 'emails.eventlog.type.deferred' | tr }}"></i>
<i class="fas fa-arrow-circle-right" ng-show="eventlog.type === 'received'" uib-tooltip="{{ 'emails.eventlog.type.incoming' | tr }}"></i>
<i class="fas fa-align-justify" ng-show="eventlog.type === 'queued'" uib-tooltip="{{ 'emails.eventlog.type.queued' | tr }}"></i>
<i class="fas fa-align-justify" ng-show="eventlog.type === 'queued' && eventlog.details.spamStatus.indexOf('Yes,') !== 0" uib-tooltip="{{ 'emails.eventlog.type.queued' | tr }}"></i>
<i class="fas fa-trash" ng-show="eventlog.type === 'queued' && eventlog.details.spamStatus.indexOf('Yes,') === 0" uib-tooltip="{{ 'emails.eventlog.type.queued' | tr }}"></i>
<i class="fas fa-minus-circle" ng-show="eventlog.type === 'denied'" uib-tooltip="{{ 'emails.eventlog.type.denied' | tr }}"></i>
<i class="fas fa-hand-paper" ng-show="eventlog.type === 'bounce'" uib-tooltip="{{ 'emails.eventlog.type.bounce' | tr }}"></i>
<i class="fas fa-filter" ng-show="eventlog.type === 'spam-learn'" uib-tooltip="{{ 'emails.eventlog.type.spamFilterTrained' | tr }}"></i>
</td>
<td class="no-wrap"><span uib-tooltip="{{ eventlog.ts | prettyLongDate }}" class="arrow">{{ eventlog.ts | prettyDate }}</span></td>
<td class="elide-table-cell">{{ (eventlog.mailFrom | prettyEmailAddresses) || '-' }}</td>
<td class="elide-table-cell">{{ (eventlog.rcptTo | prettyEmailAddresses) || '-' }}</td>
<td>
<span ng-show="eventlog.type === 'bounce'">{{ 'emails.eventlog.type.bounceInfo' | tr:eventlog }}</span>
<span ng-show="eventlog.type === 'deferred'">{{ 'emails.eventlog.type.deferredInfo' | tr:eventlog }}</span>
<span ng-show="eventlog.type === 'bounce'">{{ 'emails.eventlog.type.bounceInfo' | tr }}. {{ eventlog.details.message || eventlog.details.reason }}</span>
<span ng-show="eventlog.type === 'deferred'">{{ 'emails.eventlog.type.deferredInfo' | tr: { delay:eventlog.details.delay } }}. {{ eventlog.details.message || details.reason }} </span>
<span ng-show="eventlog.type === 'queued'">
<span ng-show="eventlog.direction === 'inbound'">{{ 'emails.eventlog.type.inboundInfo' | tr:eventlog }}</span>
<span ng-show="eventlog.direction === 'outbound'">{{ 'emails.eventlog.type.outboundInfo' | tr:eventlog }}</span>
<span ng-show="eventlog.direction === 'inbound'">{{ 'emails.eventlog.type.inboundInfo' | tr }}</span>
<span ng-show="eventlog.direction === 'outbound'">{{ 'emails.eventlog.type.outboundInfo' | tr }}</span>
</span>
<span ng-show="eventlog.type === 'received'">{{ 'emails.eventlog.type.receivedInfo' | tr:eventlog }}</span>
<span ng-show="eventlog.type === 'delivered'">{{ 'emails.eventlog.type.deliveredInfo' | tr:eventlog }}</span>
<span ng-show="eventlog.type === 'denied'">{{ 'emails.eventlog.type.deniedInfo' | tr:eventlog }}</span>
<span ng-show="eventlog.type === 'spam-learn'">{{ 'emails.eventlog.type.spamFilterTrainedInfo' | tr:eventlog }}</span>
<span ng-show="eventlog.type === 'received'">{{ 'emails.eventlog.type.receivedInfo' | tr }}</span>
<span ng-show="eventlog.type === 'delivered'">{{ 'emails.eventlog.type.deliveredInfo' | tr }}</span>
<span ng-show="eventlog.type === 'denied'">{{ 'emails.eventlog.type.deniedInfo' | tr }}. {{ eventlog.details.message || eventlog.details.reason }} </span>
<span ng-show="eventlog.type === 'spam-learn'">{{ 'emails.eventlog.type.spamFilterTrainedInfo' | tr }}</span>
</td>
</tr>
<tr ng-show="activity.activeEventLog === eventlog">