add 14 days mention and use same stats design for alias activity page (#1136)
* add 14 days mention and use same stats design for alias activity page * djlint
This commit is contained in:
parent
38c9138cdb
commit
2f9301eb97
|
@ -1,163 +1,128 @@
|
||||||
{% extends "default.html" %}
|
{% extends "default.html" %}
|
||||||
|
|
||||||
{% set active_page = "dashboard" %}
|
{% set active_page = "dashboard" %}
|
||||||
{% block head %}
|
|
||||||
|
|
||||||
<style>
|
|
||||||
{# https://bootsnipp.com/snippets/rljEW#}
|
|
||||||
.card-counter {
|
|
||||||
box-shadow: 2px 2px 10px #DADADA;
|
|
||||||
margin: 5px;
|
|
||||||
padding: 20px 10px;
|
|
||||||
background-color: #fff;
|
|
||||||
height: 100px;
|
|
||||||
border-radius: 5px;
|
|
||||||
transition: .3s linear all;
|
|
||||||
}
|
|
||||||
|
|
||||||
.card-counter:hover {
|
|
||||||
box-shadow: 4px 4px 20px #DADADA;
|
|
||||||
transition: .3s linear all;
|
|
||||||
}
|
|
||||||
|
|
||||||
.card-counter.primary {
|
|
||||||
background-color: #007bff;
|
|
||||||
color: #FFF;
|
|
||||||
}
|
|
||||||
|
|
||||||
.card-counter.danger {
|
|
||||||
background-color: #ef5350;
|
|
||||||
color: #FFF;
|
|
||||||
}
|
|
||||||
|
|
||||||
.card-counter.success {
|
|
||||||
background-color: #66bb6a;
|
|
||||||
color: #FFF;
|
|
||||||
}
|
|
||||||
|
|
||||||
.card-counter.info {
|
|
||||||
background-color: #26c6da;
|
|
||||||
color: #FFF;
|
|
||||||
}
|
|
||||||
|
|
||||||
.card-counter i {
|
|
||||||
font-size: 2em;
|
|
||||||
opacity: 0.2;
|
|
||||||
}
|
|
||||||
|
|
||||||
.card-counter .count-numbers {
|
|
||||||
position: absolute;
|
|
||||||
right: 35px;
|
|
||||||
top: 20px;
|
|
||||||
font-size: 32px;
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.card-counter .count-name {
|
|
||||||
position: absolute;
|
|
||||||
right: 35px;
|
|
||||||
top: 65px;
|
|
||||||
text-transform: capitalize;
|
|
||||||
opacity: 0.5;
|
|
||||||
display: block;
|
|
||||||
font-size: 18px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
{% endblock %}
|
|
||||||
{% block title %}Alias Activity{% endblock %}
|
{% block title %}Alias Activity{% endblock %}
|
||||||
{% block default_content %}
|
{% block default_content %}
|
||||||
|
|
||||||
<h1 class="h3">{{ alias.email }}</h1>
|
<h1 class="h3">{{ alias.email }}</h1>
|
||||||
<div class="row">
|
<!-- Stats -->
|
||||||
<div class="col-md-3 col-sm-6">
|
<div class="row">
|
||||||
<div class="card-counter primary">
|
<div class="col-12 col-md-6 col-lg-3">
|
||||||
<i class="fa fa-at"></i>
|
<div class="card">
|
||||||
<span class="count-numbers">{{ total }}</span>
|
<div class="card-body">
|
||||||
<span class="count-name">Email Handled</span>
|
<div class="d-flex align-items-center">
|
||||||
</div>
|
<div class="subheader">Total</div>
|
||||||
</div>
|
<div class="text-muted"
|
||||||
<div class="col-md-3 col-sm-6">
|
style="order: 2; margin-left: auto; font-size: .8rem">Last 14 days</div>
|
||||||
<div class="card-counter primary">
|
</div>
|
||||||
<i class="fa fa-paper-plane"></i>
|
<div class="h1 m-0">{{ total }}</div>
|
||||||
<span class="count-numbers">{{ email_forwarded }}</span>
|
</div>
|
||||||
<span class="count-name">Email Forwarded</span>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="col-12 col-md-6 col-lg-3">
|
||||||
<div class="col-md-3 col-sm-6">
|
<div class="card">
|
||||||
<div class="card-counter primary">
|
<div class="card-body">
|
||||||
<i class="fa fa-reply"></i>
|
<div class="d-flex align-items-center">
|
||||||
<span class="count-numbers">{{ email_replied }}</span>
|
<div class="subheader">Forwards</div>
|
||||||
<span class="count-name">Email Replied</span>
|
<div class="text-muted"
|
||||||
</div>
|
style="order: 2; margin-left: auto; font-size: .8rem">Last 14 days</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3 col-sm-6">
|
<div class="h1 m-0">{{ email_forwarded }}</div>
|
||||||
<div class="card-counter danger">
|
</div>
|
||||||
<i class="fa fa-ban"></i>
|
</div>
|
||||||
<span class="count-numbers">{{ email_blocked }}</span>
|
</div>
|
||||||
<span class="count-name">Email Blocked</span>
|
<div class="col-12 col-md-6 col-lg-3">
|
||||||
</div>
|
<div class="card">
|
||||||
</div>
|
<div class="card-body">
|
||||||
</div>
|
<div class="d-flex align-items-center">
|
||||||
<div class="row mt-4">
|
<div class="subheader">Replies/Sent</div>
|
||||||
{% for log in logs %}
|
<div class="text-muted"
|
||||||
|
style="order: 2; margin-left: auto; font-size: .8rem">Last 14 days</div>
|
||||||
|
</div>
|
||||||
|
<div class="h1 m-0">{{ email_replied }}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-md-6 col-lg-3">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="d-flex align-items-center">
|
||||||
|
<div class="subheader">Blocks</div>
|
||||||
|
<div class="text-muted"
|
||||||
|
style="order: 2; margin-left: auto; font-size: .8rem">Last 14 days</div>
|
||||||
|
</div>
|
||||||
|
<div class="h1 m-0">{{ email_blocked }}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- END Stats -->
|
||||||
|
<div class="row mt-4">
|
||||||
|
{% for log in logs %}
|
||||||
|
|
||||||
<div class="col-lg-6">
|
<div class="col-lg-6">
|
||||||
<div class="my-2 p-2 card border-light">
|
<div class="my-2 p-2 card border-light">
|
||||||
<div class="font-weight-bold">
|
<div class="font-weight-bold">
|
||||||
{{ log.when | dt }}
|
{{ log.when | dt }}
|
||||||
<div class="float-right pr-3">
|
<div class="float-right pr-3">
|
||||||
{% if log.bounced %}
|
{% if log.bounced %}
|
||||||
|
|
||||||
⚠️
|
⚠️
|
||||||
{% else %}
|
{% else %}
|
||||||
{% if log.is_reply %}
|
{% if log.is_reply %}
|
||||||
|
|
||||||
<i class="fa fa-reply"></i>
|
<i class="fa fa-reply"></i>
|
||||||
{% elif log.blocked %}
|
{% elif log.blocked %}
|
||||||
<i class="fa fa-ban text-danger"></i>
|
<i class="fa fa-ban text-danger"></i>
|
||||||
{% else %}
|
{% else %}
|
||||||
<i class="fa fa-paper-plane"></i>
|
<i class="fa fa-paper-plane"></i>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% if log.bounced and not log.is_reply %}
|
{% if log.bounced and not log.is_reply %}
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<span class="mr-2">{{ log.website_email }}</span>
|
<span class="mr-2">{{ log.website_email }}</span>
|
||||||
<img src="{{ url_for('static', filename='arrows/forward-arrow.svg') }}" class="arrow">
|
<img src="{{ url_for('static', filename='arrows/forward-arrow.svg') }}"
|
||||||
<span class="ml-2">{{ log.alias }}</span>
|
class="arrow">
|
||||||
<img src="{{ url_for('static', filename='arrows/blocked-arrow.svg') }}" class="arrow">
|
<span class="ml-2">{{ log.alias }}</span>
|
||||||
<span class="ml-2">{{ log.email_log.bounced_mailbox() }}</span>
|
<img src="{{ url_for('static', filename='arrows/blocked-arrow.svg') }}"
|
||||||
</div>
|
class="arrow">
|
||||||
{% elif log.bounced and log.is_reply %}
|
<span class="ml-2">{{ log.email_log.bounced_mailbox() }}</span>
|
||||||
<div>
|
</div>
|
||||||
<span class="ml-2">{{ log.email_log.bounced_mailbox() }}</span>
|
{% elif log.bounced and log.is_reply %}
|
||||||
<img src="{{ url_for('static', filename='arrows/forward-arrow.svg') }}" class="arrow">
|
<div>
|
||||||
<span class="ml-2">{{ log.alias }}</span>
|
<span class="ml-2">{{ log.email_log.bounced_mailbox() }}</span>
|
||||||
<img src="{{ url_for('static', filename='arrows/blocked-arrow.svg') }}" class="arrow">
|
<img src="{{ url_for('static', filename='arrows/forward-arrow.svg') }}"
|
||||||
<span class="mr-2">{{ log.website_email }}</span>
|
class="arrow">
|
||||||
</div>
|
<span class="ml-2">{{ log.alias }}</span>
|
||||||
{% else %}
|
<img src="{{ url_for('static', filename='arrows/blocked-arrow.svg') }}"
|
||||||
<div>{{ log.website_email }}</div>
|
class="arrow">
|
||||||
{% endif %}
|
<span class="mr-2">{{ log.website_email }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{% else %}
|
||||||
{% endfor %}
|
<div>{{ log.website_email }}</div>
|
||||||
</div>
|
{% endif %}
|
||||||
<nav aria-label="Alias log navigation">
|
</div>
|
||||||
<ul class="pagination">
|
</div>
|
||||||
<li class="page-item">
|
{% endfor %}
|
||||||
<a class="btn btn-outline-secondary {% if page_id == 0 %}disabled{% endif %}" href="{{ url_for('dashboard.alias_log', alias_id=alias_id, page_id=page_id-1) }}">
|
</div>
|
||||||
Previous
|
<nav aria-label="Alias log navigation">
|
||||||
</a>
|
<ul class="pagination">
|
||||||
</li>
|
<li class="page-item">
|
||||||
<li class="page-item">
|
<a class="btn btn-outline-secondary {% if page_id == 0 %}disabled{% endif %}"
|
||||||
<a class="btn btn-outline-secondary {% if last_page %}disabled{% endif %}" href="{{ url_for('dashboard.alias_log', alias_id=alias_id, page_id=page_id+1) }}">
|
href="{{ url_for('dashboard.alias_log', alias_id=alias_id, page_id=page_id-1) }}">
|
||||||
Next
|
Previous
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
<li class="page-item">
|
||||||
</nav>
|
<a class="btn btn-outline-secondary {% if last_page %}disabled{% endif %}"
|
||||||
|
href="{{ url_for('dashboard.alias_log', alias_id=alias_id, page_id=page_id+1) }}">
|
||||||
|
Next
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block script %}{% endblock %}
|
{% block script %}{% endblock %}
|
||||||
|
|
|
@ -350,6 +350,7 @@ Alias description
|
||||||
<span class="alias-activity">{{ alias_info.nb_forward }}</span> forwards,
|
<span class="alias-activity">{{ alias_info.nb_forward }}</span> forwards,
|
||||||
<span class="alias-activity">{{ alias_info.nb_blocked }}</span> blocks,
|
<span class="alias-activity">{{ alias_info.nb_blocked }}</span> blocks,
|
||||||
<span class="alias-activity">{{ alias_info.nb_reply }}</span> sents
|
<span class="alias-activity">{{ alias_info.nb_reply }}</span> sents
|
||||||
|
in the last 14 days
|
||||||
<a href="{{ url_for('dashboard.alias_log', alias_id=alias.id) }}"
|
<a href="{{ url_for('dashboard.alias_log', alias_id=alias.id) }}"
|
||||||
class="btn btn-sm btn-link">
|
class="btn btn-sm btn-link">
|
||||||
See All →
|
See All →
|
||||||
|
|
Loading…
Reference in a new issue