2022-06-29 11:28:26 +02:00
|
|
|
{% extends "default.html" %}
|
2020-09-10 20:14:55 +02:00
|
|
|
|
2022-06-29 11:28:26 +02:00
|
|
|
{% set active_page = "setting" %}
|
|
|
|
{% block title %}Alias Batch Import{% endblock %}
|
2020-09-10 20:14:55 +02:00
|
|
|
{% block default_content %}
|
2022-06-29 11:28:26 +02:00
|
|
|
|
2020-09-10 20:14:55 +02:00
|
|
|
<div class="card">
|
|
|
|
<div class="card-body">
|
|
|
|
<h1 class="h3">Alias Batch Import</h1>
|
2020-09-11 16:49:39 +02:00
|
|
|
<div class="alert alert-primary">
|
2022-06-29 11:28:26 +02:00
|
|
|
Only aliases created with <b>your verified domains</b> can be imported.
|
|
|
|
<br />
|
|
|
|
If mailboxes are set for an alias, they will only be linked if they already exist.
|
|
|
|
<br />
|
2020-09-11 16:49:39 +02:00
|
|
|
Please make sure to use the csv template file.
|
|
|
|
</div>
|
2020-09-10 20:14:55 +02:00
|
|
|
<p>
|
|
|
|
The import can take several minutes.
|
2022-06-29 11:28:26 +02:00
|
|
|
Please come back to this page to verify the import status.
|
|
|
|
<br />
|
2020-09-10 20:14:55 +02:00
|
|
|
If an alias already exists, it won't be imported.
|
|
|
|
</p>
|
2022-06-29 11:28:26 +02:00
|
|
|
<a href="{{ url_for('static', filename='batch_import_template.csv') }}"
|
|
|
|
download>Download CSV Template</a>
|
|
|
|
<hr />
|
2020-09-10 20:14:55 +02:00
|
|
|
<form method="post" enctype="multipart/form-data" class="mt-4">
|
2022-06-29 11:28:26 +02:00
|
|
|
<input required
|
|
|
|
type="file"
|
2020-09-10 20:14:55 +02:00
|
|
|
name="alias-file"
|
|
|
|
accept=".csv"
|
|
|
|
class="form-control-file">
|
2022-06-29 11:28:26 +02:00
|
|
|
<label>
|
|
|
|
Only <b>.csv</b> file is supported.
|
|
|
|
</label>
|
|
|
|
<br />
|
2020-09-10 20:14:55 +02:00
|
|
|
<button class="btn btn-success mt-2">Upload</button>
|
|
|
|
</form>
|
|
|
|
{% if batch_imports %}
|
2022-06-29 11:28:26 +02:00
|
|
|
|
|
|
|
<hr />
|
2020-09-10 20:14:55 +02:00
|
|
|
<h2 class="h3 mt-7">Batch imports</h2>
|
|
|
|
<table class="table">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
2022-06-29 11:28:26 +02:00
|
|
|
<th scope="col">Uploaded</th>
|
|
|
|
<th scope="col">Number Alias Imported</th>
|
|
|
|
<th scope="col">Status</th>
|
2020-09-10 20:14:55 +02:00
|
|
|
</tr>
|
2022-06-29 11:28:26 +02:00
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{% for batch_import in batch_imports %}
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td>{{ batch_import.created_at | dt }}</td>
|
|
|
|
<td>{{ batch_import.nb_alias() }}</td>
|
|
|
|
<td>
|
|
|
|
{% if batch_import.processed %}
|
|
|
|
|
|
|
|
Processed ✅
|
|
|
|
{% else %}
|
|
|
|
Pending
|
|
|
|
{% endif %}
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
2020-09-10 20:14:55 +02:00
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endblock %}
|