mirror of https://github.com/jumpserver/jumpserver
perf: automation report
parent
63aa14a973
commit
22aee54207
|
@ -47,6 +47,8 @@ def migrate_account_backup(apps, schema_editor):
|
||||||
automation_id = backup_id_old_new_map.get(str(execution.plan_id))
|
automation_id = backup_id_old_new_map.get(str(execution.plan_id))
|
||||||
if not automation_id:
|
if not automation_id:
|
||||||
continue
|
continue
|
||||||
|
snapshot = execution.snapshot
|
||||||
|
snapshot['type'] = "backup_account"
|
||||||
data = {
|
data = {
|
||||||
'automation_id': automation_id,
|
'automation_id': automation_id,
|
||||||
'date_start': execution.date_start,
|
'date_start': execution.date_start,
|
||||||
|
|
|
@ -1,78 +1,113 @@
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
|
|
||||||
<div class='summary'>
|
<div class="report-container">
|
||||||
<p>{% trans 'The following is a summary of account backup tasks, please review and handle them' %}</p>
|
<div class="summary-section">
|
||||||
<table>
|
<h2>
|
||||||
<caption></caption>
|
{% trans 'The following is a summary of account backup tasks, please review and handle them' %}
|
||||||
<thead>
|
</h2>
|
||||||
|
<table class="summary-table">
|
||||||
|
<caption></caption>
|
||||||
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan='2'>任务汇总:</th>
|
<th colspan="2">{% trans 'Task Summary' %}:</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% trans 'Task name' %}:</td>
|
<td>{% trans 'Task name' %}:</td>
|
||||||
<td>{{ execution.automation.name }} </td>
|
<td>{{ execution.automation.name }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% trans 'Date start' %}:</td>
|
<td>{% trans 'Date start' %}:</td>
|
||||||
<td>{{ execution.date_start | date:"Y/m/d H:i:s" }}</td>
|
<td>{{ execution.date_start | date:"Y/m/d H:i:s" }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% trans 'Date end' %}:</td>
|
<td>{% trans 'Date end' %}:</td>
|
||||||
<td>{{ execution.date_finished | date:"Y/m/d H:i:s" }}</td>
|
<td>{{ execution.date_finished | date:"Y/m/d H:i:s" }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% trans 'Time using' %}:</td>
|
<td>{% trans 'Time using' %}:</td>
|
||||||
<td>{{ execution.duration }}s</td>
|
<td>{{ execution.duration }}s</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% trans 'Account count' %}:</td>
|
<td>{% trans 'Account count' %}:</td>
|
||||||
<td>{{ summary.total_accounts }}</td>
|
<td>{{ summary.total_accounts }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% trans 'Type count' %}:</td>
|
<td>{% trans 'Type count' %}:</td>
|
||||||
<td>{{ summary.total_types }}</td>
|
<td>{{ summary.total_types }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
table {
|
.report-container {
|
||||||
width: 100%;
|
max-width: 1200px;
|
||||||
border-collapse: collapse;
|
margin: 20px auto;
|
||||||
max-width: 100%;
|
padding: 20px;
|
||||||
text-align: left;
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
|
||||||
margin-top: 10px;
|
Ubuntu, Cantarell, sans-serif;
|
||||||
padding: 20px;
|
}
|
||||||
|
|
||||||
|
h2,
|
||||||
|
h3 {
|
||||||
|
color: #2c3e50;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.section-header {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
table {
|
||||||
|
width: 100%;
|
||||||
|
border-collapse: collapse;
|
||||||
|
margin-bottom: 30px;
|
||||||
|
background-color: white;
|
||||||
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
||||||
|
border-radius: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.summary-table td:first-child {
|
||||||
|
width: 30%;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
th {
|
||||||
|
background-color: #f8f9fa;
|
||||||
|
padding: 12px 15px;
|
||||||
|
text-align: left;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #2c3e50;
|
||||||
|
border-bottom: 2px solid #eee;
|
||||||
|
}
|
||||||
|
|
||||||
|
td {
|
||||||
|
padding: 12px 15px;
|
||||||
|
border-bottom: 1px solid #eee;
|
||||||
|
color: #34495e;
|
||||||
|
}
|
||||||
|
|
||||||
|
tr:last-child td {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
tr:hover {
|
||||||
|
background-color: #f8f9fa;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.report-container {
|
||||||
|
padding: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
td,
|
||||||
th {
|
th {
|
||||||
background: #f2f2f2;
|
padding: 8px;
|
||||||
font-size: 14px;
|
|
||||||
padding: 5px;
|
|
||||||
border: 1px solid #ddd;
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
tr :first-child {
|
|
||||||
width: 30%;
|
|
||||||
}
|
|
||||||
|
|
||||||
td {
|
|
||||||
border: 1px solid #ddd;
|
|
||||||
padding: 5px;
|
|
||||||
font-size: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.result {
|
|
||||||
margin-top: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.result tr :first-child {
|
|
||||||
width: 10%;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
</style>
|
</style>
|
|
@ -1,133 +1,221 @@
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
|
|
||||||
<div class='summary'>
|
<div class="report-container">
|
||||||
<p>{% trans 'The following is a summary of account change secret tasks, please read and process' %}</p>
|
<div class="summary-section">
|
||||||
<table>
|
<h2>
|
||||||
<caption></caption>
|
{% trans 'The following is a summary of account change secret tasks, please read and process' %}
|
||||||
<thead>
|
</h2>
|
||||||
|
<table class="summary-table">
|
||||||
|
<caption></caption>
|
||||||
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan='2'>任务汇总:</th>
|
<th colspan="2">{% trans 'Task Summary' %}:</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% trans 'Task name' %}:</td>
|
<td>{% trans 'Task name' %}:</td>
|
||||||
<td>{{ execution.automation.name }} </td>
|
<td>{{ execution.automation.name }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% trans 'Date start' %}:</td>
|
<td>{% trans 'Date start' %}:</td>
|
||||||
<td>{{ execution.date_start | date:"Y/m/d H:i:s" }}</td>
|
<td>{{ execution.date_start | date:"Y/m/d H:i:s" }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% trans 'Date end' %}:</td>
|
<td>{% trans 'Date end' %}:</td>
|
||||||
<td>{{ execution.date_finished | date:"Y/m/d H:i:s" }}</td>
|
<td>{{ execution.date_finished | date:"Y/m/d H:i:s" }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% trans 'Time using' %}:</td>
|
<td>{% trans 'Time using' %}:</td>
|
||||||
<td>{{ execution.duration }}s</td>
|
<td>{{ execution.duration }}s</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% trans 'Assets count' %}:</td>
|
<td>{% trans 'Assets count' %}:</td>
|
||||||
<td>{{ summary.total_assets }}</td>
|
<td>{{ summary.total_assets }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% trans 'Asset success count' %}:</td>
|
<td>{% trans 'Asset success count' %}:</td>
|
||||||
<td>{{ summary.ok_assets }}</td>
|
<td class="success">{{ summary.ok_assets }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% trans 'Asset failed count' %}:</td>
|
<td>{% trans 'Asset failed count' %}:</td>
|
||||||
<td>{{ summary.fail_assets }}</td>
|
<td class="error">{{ summary.fail_assets }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% trans 'Asset not support count' %}:</td>
|
<td>{% trans 'Asset not support count' %}:</td>
|
||||||
<td>{{ summary.error_assets }}</td>
|
<td class="warning">{{ summary.error_assets }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class='result'>
|
<div class="result-section">
|
||||||
{% if summary.ok_accounts %}
|
{% if summary.ok_accounts %}
|
||||||
<p>{% trans 'Success accounts' %}: {{ summary.ok_accounts }}</p>
|
<div class="section-header">
|
||||||
<table>
|
<h3>
|
||||||
<caption></caption>
|
{% trans 'Success accounts' %}:
|
||||||
<thead>
|
<span class="badge badge-success">{{ summary.ok_accounts }}</span>
|
||||||
<tr>
|
</h3>
|
||||||
<th>{% trans 'No.' %}</th>
|
</div>
|
||||||
<th>{% trans 'Asset' %}</th>
|
<table class="data-table">
|
||||||
<th>{% trans 'Username' %}</th>
|
<caption></caption>
|
||||||
</tr>
|
<thead>
|
||||||
</thead>
|
<tr>
|
||||||
<tbody>
|
<th>{% trans 'No.' %}</th>
|
||||||
{% for account in result.ok_accounts %}
|
<th>{% trans 'Asset' %}</th>
|
||||||
<tr>
|
<th>{% trans 'Username' %}</th>
|
||||||
<td>{{ forloop.counter }}</td>
|
</tr>
|
||||||
<td>{{ account.asset }}</td>
|
</thead>
|
||||||
<td>{{ account.username }}</td>
|
<tbody>
|
||||||
</tr>
|
{% for account in result.ok_accounts %}
|
||||||
{% endfor %}
|
<tr>
|
||||||
</tbody>
|
<td>{{ forloop.counter }}</td>
|
||||||
</table>
|
<td>{{ account.asset }}</td>
|
||||||
|
<td>{{ account.username }}</td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<div class='result'>
|
|
||||||
|
<div class="result-section">
|
||||||
{% if summary.fail_accounts %}
|
{% if summary.fail_accounts %}
|
||||||
<p>{% trans 'Failed accounts' %}: {{ summary.fail_accounts }}</p>
|
<div class="section-header">
|
||||||
<table>
|
<h3>
|
||||||
<caption></caption>
|
{% trans 'Failed accounts' %}:
|
||||||
<thead>
|
<span class="badge badge-error">{{ summary.fail_accounts }}</span>
|
||||||
<tr>
|
</h3>
|
||||||
<th>{% trans 'No.' %}</th>
|
</div>
|
||||||
<th>{% trans 'Asset' %}</th>
|
<table class="data-table">
|
||||||
<th>{% trans 'Username' %}</th>
|
<caption></caption>
|
||||||
</tr>
|
<thead>
|
||||||
</thead>
|
<tr>
|
||||||
<tbody>
|
<th>{% trans 'No.' %}</th>
|
||||||
{% for account in result.fail_accounts %}
|
<th>{% trans 'Asset' %}</th>
|
||||||
<tr>
|
<th>{% trans 'Username' %}</th>
|
||||||
<td>{{ forloop.counter }}</td>
|
</tr>
|
||||||
<td>{{ account.asset }}</td>
|
</thead>
|
||||||
<td>{{ account.username }}</td>
|
<tbody>
|
||||||
</tr>
|
{% for account in result.fail_accounts %}
|
||||||
{% endfor %}
|
<tr>
|
||||||
</tbody>
|
<td>{{ forloop.counter }}</td>
|
||||||
</table>
|
<td>{{ account.asset }}</td>
|
||||||
|
<td>{{ account.username }}</td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
table {
|
.report-container {
|
||||||
width: 100%;
|
max-width: 1200px;
|
||||||
border-collapse: collapse;
|
margin: 20px auto;
|
||||||
max-width: 100%;
|
padding: 20px;
|
||||||
text-align: left;
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
|
||||||
margin-top: 10px;
|
Ubuntu, Cantarell, sans-serif;
|
||||||
padding: 20px;
|
}
|
||||||
|
|
||||||
|
h2,
|
||||||
|
h3 {
|
||||||
|
color: #2c3e50;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.section-header {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.badge {
|
||||||
|
background-color: #3498db;
|
||||||
|
color: white;
|
||||||
|
padding: 3px 10px;
|
||||||
|
border-radius: 12px;
|
||||||
|
font-size: 14px;
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.badge-success {
|
||||||
|
background-color: #27ae60;
|
||||||
|
}
|
||||||
|
|
||||||
|
.badge-error {
|
||||||
|
background-color: #e74c3c;
|
||||||
|
}
|
||||||
|
|
||||||
|
table {
|
||||||
|
width: 100%;
|
||||||
|
border-collapse: collapse;
|
||||||
|
margin-bottom: 30px;
|
||||||
|
background-color: white;
|
||||||
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
||||||
|
border-radius: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.summary-table td:first-child {
|
||||||
|
width: 30%;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
.data-table td:first-child {
|
||||||
|
width: 80px;
|
||||||
|
}
|
||||||
|
|
||||||
|
th {
|
||||||
|
background-color: #f8f9fa;
|
||||||
|
padding: 12px 15px;
|
||||||
|
text-align: left;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #2c3e50;
|
||||||
|
border-bottom: 2px solid #eee;
|
||||||
|
}
|
||||||
|
|
||||||
|
td {
|
||||||
|
padding: 12px 15px;
|
||||||
|
border-bottom: 1px solid #eee;
|
||||||
|
color: #34495e;
|
||||||
|
}
|
||||||
|
|
||||||
|
tr:last-child td {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.success {
|
||||||
|
color: #27ae60;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
.error {
|
||||||
|
color: #e74c3c;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
.warning {
|
||||||
|
color: #f39c12;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
.result-section {
|
||||||
|
margin-top: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
tr:hover {
|
||||||
|
background-color: #f8f9fa;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.report-container {
|
||||||
|
padding: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
td,
|
||||||
th {
|
th {
|
||||||
background: #f2f2f2;
|
padding: 8px;
|
||||||
font-size: 14px;
|
|
||||||
padding: 5px;
|
|
||||||
border: 1px solid #ddd;
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
tr :first-child {
|
|
||||||
width: 30%;
|
|
||||||
}
|
|
||||||
|
|
||||||
td {
|
|
||||||
border: 1px solid #ddd;
|
|
||||||
padding: 5px;
|
|
||||||
font-size: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.result {
|
|
||||||
margin-top: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.result tr :first-child {
|
|
||||||
width: 10%;
|
|
||||||
}
|
|
||||||
|
|
||||||
</style>
|
</style>
|
|
@ -1,124 +1,217 @@
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
|
|
||||||
<div class='summary'>
|
<div class="report-container">
|
||||||
<p>{% trans 'The following is a summary of the account check tasks. Please review and handle them' %}</p>
|
<div class="summary-section">
|
||||||
<table>
|
<h2>
|
||||||
<caption></caption>
|
{% trans 'The following is a summary of the account check tasks. Please review and handle them' %}
|
||||||
<thead>
|
</h2>
|
||||||
|
<table class="summary-table">
|
||||||
|
<caption></caption>
|
||||||
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan='2'>任务汇总:</th>
|
<th colspan="2">{% trans 'Task Summary' %}:</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% trans 'Task name' %}:</td>
|
<td>{% trans 'Task name' %}:</td>
|
||||||
<td>{{ execution.automation.name }} </td>
|
<td>{{ execution.automation.name }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% trans 'Date start' %}:</td>
|
<td>{% trans 'Date start' %}:</td>
|
||||||
<td>{{ execution.date_start | date:"Y/m/d H:i:s" }}</td>
|
<td>{{ execution.date_start | date:"Y/m/d H:i:s" }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% trans 'Date end' %}:</td>
|
<td>{% trans 'Date end' %}:</td>
|
||||||
<td>{{ execution.date_finished | date:"Y/m/d H:i:s" }}</td>
|
<td>{{ execution.date_finished | date:"Y/m/d H:i:s" }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% trans 'Time using' %}:</td>
|
<td>{% trans 'Time using' %}:</td>
|
||||||
<td>{{ execution.duration }}s</td>
|
<td>{{ execution.duration }}s</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% trans 'Assets count' %}:</td>
|
<td>{% trans 'Assets count' %}:</td>
|
||||||
<td>{{ summary.assets }}</td>
|
<td><span class="badge">{{ summary.assets }}</span></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% trans 'Asset success count' %}:</td>
|
<td>{% trans 'Asset success count' %}:</td>
|
||||||
<td>{{ summary.ok_assets }}</td>
|
<td class="success">{{ summary.ok_assets }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% trans 'Asset failed count' %}:</td>
|
<td>{% trans 'Asset failed count' %}:</td>
|
||||||
<td>{{ summary.fail_assets }}</td>
|
<td class="error">{{ summary.fail_assets }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% trans 'Asset not support count' %}:</td>
|
<td>{% trans 'Asset not support count' %}:</td>
|
||||||
<td>{{ summary.error_assets }}</td>
|
<td class="warning">{{ summary.error_assets }}</td>
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td>{% trans 'Account count' %}:</td>
|
|
||||||
<td>{{ summary.accounts }}</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% trans 'Ok count' %}:</td>
|
<td>{% trans 'Account count' %}:</td>
|
||||||
<td>{{ summary.ok }}</td>
|
<td><span class="badge">{{ summary.accounts }}</span></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% trans 'No password count' %}:</td>
|
<td>{% trans 'Ok count' %}:</td>
|
||||||
<td>{{ summary.no_secret }}</td>
|
<td class="success">{{ summary.ok }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
<tr>
|
||||||
|
<td>{% trans 'No password count' %}:</td>
|
||||||
|
<td class="warning">{{ summary.no_secret }}</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class='result'>
|
<div class="result-section">
|
||||||
{% if summary.weak_password %}
|
{% if summary.weak_password %}
|
||||||
<p>{% trans 'Week password' %}: {{ summary.weak_password }}</p>
|
<div class="section-header">
|
||||||
<p>{% trans 'Account check details' %}:</p>
|
<h3>
|
||||||
<table>
|
{% trans 'Week password' %}:
|
||||||
<caption></caption>
|
<span class="badge badge-error">{{ summary.weak_password }}</span>
|
||||||
<thead>
|
</h3>
|
||||||
<tr>
|
</div>
|
||||||
<th>{% trans 'No.' %}</th>
|
<p class="section-desc">{% trans 'Account check details' %}:</p >
|
||||||
<th>{% trans 'Asset' %}</th>
|
<table class="data-table">
|
||||||
<th>{% trans 'Username' %}</th>
|
<caption></caption>
|
||||||
<th>{% trans 'Result' %}</th>
|
<thead>
|
||||||
</tr>
|
<tr>
|
||||||
</thead>
|
<th>{% trans 'No.' %}</th>
|
||||||
<tbody>
|
<th>{% trans 'Asset' %}</th>
|
||||||
{% for account in result.weak_password %}
|
<th>{% trans 'Username' %}</th>
|
||||||
<tr>
|
<th>{% trans 'Result' %}</th>
|
||||||
<td>{{ forloop.counter }}</td>
|
</tr>
|
||||||
<td>{{ account.asset }}</td>
|
</thead>
|
||||||
<td>{{ account.username }}</td>
|
<tbody>
|
||||||
<td style="color: red">{% trans 'Week password' %}</td>
|
{% for account in result.weak_password %}
|
||||||
</tr>
|
<tr>
|
||||||
{% endfor %}
|
<td>{{ forloop.counter }}</td>
|
||||||
</tbody>
|
<td>{{ account.asset }}</td>
|
||||||
</table>
|
<td>{{ account.username }}</td>
|
||||||
|
<td class="error">{% trans 'Week password' %}</td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
{% else %}
|
{% else %}
|
||||||
<p>{% trans 'No weak password' %}</p>
|
<p class="no-data">{% trans 'No weak password' %}</p >
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
table {
|
.report-container {
|
||||||
width: 100%;
|
max-width: 1200px;
|
||||||
border-collapse: collapse;
|
margin: 20px auto;
|
||||||
max-width: 100%;
|
padding: 20px;
|
||||||
text-align: left;
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
|
||||||
margin-top: 20px;
|
Ubuntu, Cantarell, sans-serif;
|
||||||
padding: 20px;
|
}
|
||||||
|
|
||||||
|
h2,
|
||||||
|
h3 {
|
||||||
|
color: #2c3e50;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.section-header {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.section-desc {
|
||||||
|
color: #7f8c8d;
|
||||||
|
margin-bottom: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.badge {
|
||||||
|
background-color: #3498db;
|
||||||
|
color: white;
|
||||||
|
padding: 3px 10px;
|
||||||
|
border-radius: 12px;
|
||||||
|
font-size: 14px;
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.badge-error {
|
||||||
|
background-color: #e74c3c;
|
||||||
|
}
|
||||||
|
|
||||||
|
table {
|
||||||
|
width: 100%;
|
||||||
|
border-collapse: collapse;
|
||||||
|
margin-bottom: 30px;
|
||||||
|
background-color: white;
|
||||||
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
||||||
|
border-radius: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.summary-table td:first-child {
|
||||||
|
width: 30%;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
.data-table td:first-child {
|
||||||
|
width: 80px;
|
||||||
|
}
|
||||||
|
|
||||||
|
th {
|
||||||
|
background-color: #f8f9fa;
|
||||||
|
padding: 12px 15px;
|
||||||
|
text-align: left;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #2c3e50;
|
||||||
|
border-bottom: 2px solid #eee;
|
||||||
|
}
|
||||||
|
|
||||||
|
td {
|
||||||
|
padding: 12px 15px;
|
||||||
|
border-bottom: 1px solid #eee;
|
||||||
|
color: #34495e;
|
||||||
|
}
|
||||||
|
|
||||||
|
tr:last-child td {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.success {
|
||||||
|
color: #27ae60;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
.error {
|
||||||
|
color: #e74c3c;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
.warning {
|
||||||
|
color: #f39c12;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
.no-data {
|
||||||
|
text-align: center;
|
||||||
|
color: #7f8c8d;
|
||||||
|
padding: 20px;
|
||||||
|
background-color: #f8f9fa;
|
||||||
|
border-radius: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.result-section {
|
||||||
|
margin-top: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
tr:hover {
|
||||||
|
background-color: #f8f9fa;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.report-container {
|
||||||
|
padding: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
td,
|
||||||
th {
|
th {
|
||||||
background: #f2f2f2;
|
padding: 8px;
|
||||||
font-size: 14px;
|
|
||||||
padding: 5px;
|
|
||||||
border: 1px solid #ddd;
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
tr :first-child {
|
|
||||||
width: 30%;
|
|
||||||
}
|
|
||||||
|
|
||||||
td {
|
|
||||||
border: 1px solid #ddd;
|
|
||||||
padding: 5px;
|
|
||||||
font-size: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.result tr :first-child {
|
|
||||||
width: 10%;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
</style>
|
</style>
|
|
@ -1,164 +1,223 @@
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
|
|
||||||
<div class='summary'>
|
<div class="report-container">
|
||||||
<p>{% trans 'The following is a summary of the account check tasks. Please review and handle them' %}</p>
|
<div class="summary-section">
|
||||||
<table>
|
<h2>
|
||||||
<caption></caption>
|
{% trans 'The following is a summary of the account check tasks. Please review and handle them' %}
|
||||||
<thead>
|
</h2>
|
||||||
|
<table class="summary-table">
|
||||||
|
<caption></caption>
|
||||||
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan='2'>任务汇总:</th>
|
<th colspan="2">{% trans 'Task Summary' %}:</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% trans 'Task name' %}:</td>
|
<td>{% trans 'Task name' %}:</td>
|
||||||
<td>{{ execution.automation.name }} </td>
|
<td>{{ execution.automation.name }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% trans 'Date start' %}:</td>
|
<td>{% trans 'Date start' %}:</td>
|
||||||
<td>{{ execution.date_start | date:"Y/m/d H:i:s" }}</td>
|
<td>{{ execution.date_start | date:"Y/m/d H:i:s" }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% trans 'Date end' %}:</td>
|
<td>{% trans 'Date end' %}:</td>
|
||||||
<td>{{ execution.date_finished | date:"Y/m/d H:i:s" }}</td>
|
<td>{{ execution.date_finished | date:"Y/m/d H:i:s" }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% trans 'Time using' %}:</td>
|
<td>{% trans 'Time using' %}:</td>
|
||||||
<td>{{ execution.duration }}s</td>
|
<td>{{ execution.duration }}s</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% trans 'Assets count' %}:</td>
|
<td>{% trans 'Assets count' %}:</td>
|
||||||
<td>{{ summary.total_assets }}</td>
|
<td>{{ summary.total_assets }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% trans 'Asset success count' %}:</td>
|
<td>{% trans 'Asset success count' %}:</td>
|
||||||
<td>{{ summary.ok_assets }}</td>
|
<td class="success">{{ summary.ok_assets }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% trans 'Asset failed count' %}:</td>
|
<td>{% trans 'Asset failed count' %}:</td>
|
||||||
<td>{{ summary.fail_assets }}</td>
|
<td class="error">{{ summary.fail_assets }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% trans 'Asset not support count' %}:</td>
|
<td>{% trans 'Asset not support count' %}:</td>
|
||||||
<td>{{ summary.error_assets }}</td>
|
<td class="warning">{{ summary.error_assets }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class='result'>
|
<div class="result-section">
|
||||||
{% if summary.new_accounts %}
|
{% if summary.new_accounts %}
|
||||||
<p>{% trans 'New found accounts' %}: {{ summary.new_accounts }}</p>
|
<div class="section-header">
|
||||||
<table>
|
<h3>
|
||||||
<caption></caption>
|
{% trans 'New found accounts' %}:
|
||||||
<thead>
|
<span class="badge">{{ summary.new_accounts }}</span>
|
||||||
<tr>
|
</h3>
|
||||||
<th>{% trans 'No.' %}</th>
|
</div>
|
||||||
<th>{% trans 'Asset' %}</th>
|
<table class="data-table">
|
||||||
<th>{% trans 'Username' %}</th>
|
<caption></caption>
|
||||||
</tr>
|
<thead>
|
||||||
</thead>
|
<tr>
|
||||||
<tbody>
|
<th>{% trans 'No.' %}</th>
|
||||||
{% for account in result.new_accounts %}
|
<th>{% trans 'Asset' %}</th>
|
||||||
<tr>
|
<th>{% trans 'Username' %}</th>
|
||||||
<td>{{ forloop.counter }}</td>
|
</tr>
|
||||||
<td>{{ account.asset }}</td>
|
</thead>
|
||||||
<td>{{ account.username }}</td>
|
<tbody>
|
||||||
</tr>
|
{% for account in result.new_accounts %}
|
||||||
{% endfor %}
|
<tr>
|
||||||
</tbody>
|
<td>{{ forloop.counter }}</td>
|
||||||
</table>
|
<td>{{ account.asset }}</td>
|
||||||
|
<td>{{ account.username }}</td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
{% else %}
|
{% else %}
|
||||||
<p>{% trans 'No new accounts found' %}</p>
|
<p class="no-data">{% trans 'No new accounts found' %}</p >
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<div class='result'>
|
|
||||||
|
<div class="result-section">
|
||||||
{% if summary.lost_accounts %}
|
{% if summary.lost_accounts %}
|
||||||
<p>{% trans 'Lost accounts' %}: {{ summary.lost_accounts }}</p>
|
<div class="section-header">
|
||||||
<table>
|
<h3>
|
||||||
<caption></caption>
|
{% trans 'Lost accounts' %}:
|
||||||
<thead>
|
<span class="badge">{{ summary.lost_accounts }}</span>
|
||||||
<tr>
|
</h3>
|
||||||
<th>{% trans 'No.' %}</th>
|
</div>
|
||||||
<th>{% trans 'Asset' %}</th>
|
<table class="data-table">
|
||||||
<th>{% trans 'Username' %}</th>
|
<caption></caption>
|
||||||
</tr>
|
<thead>
|
||||||
</thead>
|
<tr>
|
||||||
<tbody>
|
<th>{% trans 'No.' %}</th>
|
||||||
{% for account in result.lost_accounts %}
|
<th>{% trans 'Asset' %}</th>
|
||||||
<tr>
|
<th>{% trans 'Username' %}</th>
|
||||||
<td>{{ forloop.counter }}</td>
|
</tr>
|
||||||
<td>{{ account.asset }}</td>
|
</thead>
|
||||||
<td>{{ account.username }}</td>
|
<tbody>
|
||||||
</tr>
|
{% for account in result.lost_accounts %}
|
||||||
{% endfor %}
|
<tr>
|
||||||
</tbody>
|
<td>{{ forloop.counter }}</td>
|
||||||
</table>
|
<td>{{ account.asset }}</td>
|
||||||
|
<td>{{ account.username }}</td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
{#<div class='result'>#}
|
|
||||||
{# <p>{% trans 'New found risks' %}: {{ summary.new_risks }}</p>#}
|
|
||||||
{# {% if summary.new_risks %}#}
|
|
||||||
{# <table>#}
|
|
||||||
{# <caption></caption>#}
|
|
||||||
{# <thead>#}
|
|
||||||
{# <tr>#}
|
|
||||||
{# <th>{% trans 'No.' %}</th>#}
|
|
||||||
{# <th>{% trans 'Asset' %}</th>#}
|
|
||||||
{# <th>{% trans 'Username' %}</th>#}
|
|
||||||
{# <th>{% trans 'Result' %}</th>#}
|
|
||||||
{# </tr>#}
|
|
||||||
{# </thead>#}
|
|
||||||
{# <tbody>#}
|
|
||||||
{# {% for risk in result.risks %}#}
|
|
||||||
{# <tr>#}
|
|
||||||
{# <td>{{ forloop.counter }}</td>#}
|
|
||||||
{# <td>{{ risk.asset }}</td>#}
|
|
||||||
{# <td>{{ risk.username }}</td>#}
|
|
||||||
{# <td>{{ risk.risk }}</td>#}
|
|
||||||
{# </tr>#}
|
|
||||||
{# {% endfor %}#}
|
|
||||||
{# </tbody>#}
|
|
||||||
{# </table>#}
|
|
||||||
{# {% endif %}#}
|
|
||||||
{#</div>#}
|
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
table {
|
.report-container {
|
||||||
width: 100%;
|
max-width: 1200px;
|
||||||
border-collapse: collapse;
|
margin: 20px auto;
|
||||||
max-width: 100%;
|
padding: 20px;
|
||||||
text-align: left;
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
|
||||||
margin-top: 10px;
|
Ubuntu, Cantarell, sans-serif;
|
||||||
padding: 20px;
|
}
|
||||||
|
|
||||||
|
h2,
|
||||||
|
h3 {
|
||||||
|
color: #2c3e50;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.section-header {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.badge {
|
||||||
|
background-color: #3498db;
|
||||||
|
color: white;
|
||||||
|
padding: 3px 10px;
|
||||||
|
border-radius: 12px;
|
||||||
|
font-size: 14px;
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
table {
|
||||||
|
width: 100%;
|
||||||
|
border-collapse: collapse;
|
||||||
|
margin-bottom: 30px;
|
||||||
|
background-color: white;
|
||||||
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
||||||
|
border-radius: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.summary-table td:first-child {
|
||||||
|
width: 30%;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
.data-table td:first-child {
|
||||||
|
width: 80px;
|
||||||
|
}
|
||||||
|
|
||||||
|
th {
|
||||||
|
background-color: #f8f9fa;
|
||||||
|
padding: 12px 15px;
|
||||||
|
text-align: left;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #2c3e50;
|
||||||
|
border-bottom: 2px solid #eee;
|
||||||
|
}
|
||||||
|
|
||||||
|
td {
|
||||||
|
padding: 12px 15px;
|
||||||
|
border-bottom: 1px solid #eee;
|
||||||
|
color: #34495e;
|
||||||
|
}
|
||||||
|
|
||||||
|
tr:last-child td {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.success {
|
||||||
|
color: #27ae60;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
.error {
|
||||||
|
color: #e74c3c;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
.warning {
|
||||||
|
color: #f39c12;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
.no-data {
|
||||||
|
text-align: center;
|
||||||
|
color: #7f8c8d;
|
||||||
|
padding: 20px;
|
||||||
|
background-color: #f8f9fa;
|
||||||
|
border-radius: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.result-section {
|
||||||
|
margin-top: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
tr:hover {
|
||||||
|
background-color: #f8f9fa;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.report-container {
|
||||||
|
padding: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
td,
|
||||||
th {
|
th {
|
||||||
background: #f2f2f2;
|
padding: 8px;
|
||||||
font-size: 14px;
|
|
||||||
padding: 5px;
|
|
||||||
border: 1px solid #ddd;
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
tr :first-child {
|
|
||||||
width: 30%;
|
|
||||||
}
|
|
||||||
|
|
||||||
td {
|
|
||||||
border: 1px solid #ddd;
|
|
||||||
padding: 5px;
|
|
||||||
font-size: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.result {
|
|
||||||
margin-top: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.result tr :first-child {
|
|
||||||
width: 10%;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
</style>
|
</style>
|
|
@ -1,77 +1,217 @@
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
|
|
||||||
<div class='summary'>
|
<div class="report-container">
|
||||||
<p>{% trans 'The following is a summary of account push tasks, please read and process' %}</p>
|
<div class="summary-section">
|
||||||
<table>
|
<h2>
|
||||||
<caption></caption>
|
{% trans 'The following is a summary of the account check tasks. Please review and handle them' %}
|
||||||
<thead>
|
</h2>
|
||||||
<tr>
|
<table class="summary-table">
|
||||||
<th colspan='2'>任务汇总:</th>
|
<caption></caption>
|
||||||
</tr>
|
<thead>
|
||||||
</thead>
|
<tr>
|
||||||
<tbody>
|
<th colspan="2">{% trans 'Task Summary' %}:</th>
|
||||||
<tr>
|
</tr>
|
||||||
<td>{% trans 'Task name' %}:</td>
|
</thead>
|
||||||
<td>{{ execution.automation.name }} </td>
|
<tbody>
|
||||||
</tr>
|
<tr>
|
||||||
<tr>
|
<td>{% trans 'Task name' %}:</td>
|
||||||
<td>{% trans 'Date start' %}:</td>
|
<td>{{ execution.automation.name }}</td>
|
||||||
<td>{{ execution.date_start | date:"Y/m/d H:i:s" }}</td>
|
</tr>
|
||||||
</tr>
|
<tr>
|
||||||
<tr>
|
<td>{% trans 'Date start' %}:</td>
|
||||||
<td>{% trans 'Date end' %}:</td>
|
<td>{{ execution.date_start | date:"Y/m/d H:i:s" }}</td>
|
||||||
<td>{{ execution.date_finished | date:"Y/m/d H:i:s" }}</td>
|
</tr>
|
||||||
</tr>
|
<tr>
|
||||||
<tr>
|
<td>{% trans 'Date end' %}:</td>
|
||||||
<td>{% trans 'Time using' %}:</td>
|
<td>{{ execution.date_finished | date:"Y/m/d H:i:s" }}</td>
|
||||||
<td>{{ execution.duration }}s</td>
|
</tr>
|
||||||
</tr>
|
<tr>
|
||||||
<tr>
|
<td>{% trans 'Time using' %}:</td>
|
||||||
<td>{% trans 'Assets count' %}:</td>
|
<td>{{ execution.duration }}s</td>
|
||||||
<td>{{ summary.total_assets }}</td>
|
</tr>
|
||||||
</tr>
|
<tr>
|
||||||
<tr>
|
<td>{% trans 'Assets count' %}:</td>
|
||||||
<td>{% trans 'Asset success count' %}:</td>
|
<td><span class="badge">{{ summary.assets }}</span></td>
|
||||||
<td>{{ summary.ok_assets }}</td>
|
</tr>
|
||||||
</tr>
|
<tr>
|
||||||
<tr>
|
<td>{% trans 'Asset success count' %}:</td>
|
||||||
<td>{% trans 'Asset failed count' %}:</td>
|
<td class="success">{{ summary.ok_assets }}</td>
|
||||||
<td>{{ summary.fail_assets }}</td>
|
</tr>
|
||||||
</tr>
|
<tr>
|
||||||
<tr>
|
<td>{% trans 'Asset failed count' %}:</td>
|
||||||
<td>{% trans 'Asset not support count' %}:</td>
|
<td class="error">{{ summary.fail_assets }}</td>
|
||||||
<td>{{ summary.error_assets }}</td>
|
</tr>
|
||||||
</tr>
|
<tr>
|
||||||
</tbody>
|
<td>{% trans 'Asset not support count' %}:</td>
|
||||||
</table>
|
<td class="warning">{{ summary.error_assets }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>{% trans 'Account count' %}:</td>
|
||||||
|
<td><span class="badge">{{ summary.accounts }}</span></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>{% trans 'Ok count' %}:</td>
|
||||||
|
<td class="success">{{ summary.ok }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>{% trans 'No password count' %}:</td>
|
||||||
|
<td class="warning">{{ summary.no_secret }}</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="result-section">
|
||||||
|
{% if summary.weak_password %}
|
||||||
|
<div class="section-header">
|
||||||
|
<h3>
|
||||||
|
{% trans 'Week password' %}:
|
||||||
|
<span class="badge badge-error">{{ summary.weak_password }}</span>
|
||||||
|
</h3>
|
||||||
|
</div>
|
||||||
|
<p class="section-desc">{% trans 'Account check details' %}:</p>
|
||||||
|
<table class="data-table">
|
||||||
|
<caption></caption>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>{% trans 'No.' %}</th>
|
||||||
|
<th>{% trans 'Asset' %}</th>
|
||||||
|
<th>{% trans 'Username' %}</th>
|
||||||
|
<th>{% trans 'Result' %}</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{% for account in result.weak_password %}
|
||||||
|
<tr>
|
||||||
|
<td>{{ forloop.counter }}</td>
|
||||||
|
<td>{{ account.asset }}</td>
|
||||||
|
<td>{{ account.username }}</td>
|
||||||
|
<td class="error">{% trans 'Week password' %}</td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
{% else %}
|
||||||
|
<p class="no-data">{% trans 'No weak password' %}</p>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
.report-container {
|
||||||
|
max-width: 1200px;
|
||||||
|
margin: 20px auto;
|
||||||
|
padding: 20px;
|
||||||
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
|
||||||
|
Ubuntu, Cantarell, sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2,
|
||||||
|
h3 {
|
||||||
|
color: #2c3e50;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.section-header {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.section-desc {
|
||||||
|
color: #7f8c8d;
|
||||||
|
margin-bottom: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.badge {
|
||||||
|
background-color: #3498db;
|
||||||
|
color: white;
|
||||||
|
padding: 3px 10px;
|
||||||
|
border-radius: 12px;
|
||||||
|
font-size: 14px;
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.badge-error {
|
||||||
|
background-color: #e74c3c;
|
||||||
|
}
|
||||||
|
|
||||||
table {
|
table {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
max-width: 100%;
|
margin-bottom: 30px;
|
||||||
text-align: left;
|
background-color: white;
|
||||||
margin-top: 10px;
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
||||||
padding: 20px;
|
border-radius: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.summary-table td:first-child {
|
||||||
|
width: 30%;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
.data-table td:first-child {
|
||||||
|
width: 80px;
|
||||||
}
|
}
|
||||||
|
|
||||||
th {
|
th {
|
||||||
background: #f2f2f2;
|
background-color: #f8f9fa;
|
||||||
font-size: 14px;
|
padding: 12px 15px;
|
||||||
padding: 5px;
|
text-align: left;
|
||||||
border: 1px solid #ddd;
|
font-weight: 600;
|
||||||
}
|
color: #2c3e50;
|
||||||
|
border-bottom: 2px solid #eee;
|
||||||
tr :first-child {
|
|
||||||
width: 30%;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
td {
|
td {
|
||||||
border: 1px solid #ddd;
|
padding: 12px 15px;
|
||||||
padding: 5px;
|
border-bottom: 1px solid #eee;
|
||||||
font-size: 12px;
|
color: #34495e;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tr:last-child td {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.success {
|
||||||
|
color: #27ae60;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
.error {
|
||||||
|
color: #e74c3c;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
.warning {
|
||||||
|
color: #f39c12;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
.no-data {
|
||||||
|
text-align: center;
|
||||||
|
color: #7f8c8d;
|
||||||
|
padding: 20px;
|
||||||
|
background-color: #f8f9fa;
|
||||||
|
border-radius: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.result-section {
|
||||||
|
margin-top: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
tr:hover {
|
||||||
|
background-color: #f8f9fa;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.report-container {
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
td,
|
||||||
|
th {
|
||||||
|
padding: 8px;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
Loading…
Reference in New Issue