mirror of https://github.com/jumpserver/jumpserver
135 lines
3.4 KiB
Python
135 lines
3.4 KiB
Python
{% load i18n %}
|
|
|
|
<div class='summary'>
|
|
<p>{% trans 'The following is a summary of account change secret tasks, please review and handle them' %}</p>
|
|
<table>
|
|
<caption></caption>
|
|
<thead>
|
|
<tr>
|
|
<th colspan='2'>任务汇总:</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>{% trans 'Task name' %}:</td>
|
|
<td>{{ execution.automation.name }} </td>
|
|
</tr>
|
|
<tr>
|
|
<td>{% trans 'Date start' %}:</td>
|
|
<td>{{ execution.date_start | date:"Y/m/d H:i:s" }}</td>
|
|
</tr>
|
|
<tr>
|
|
<td>{% trans 'Date end' %}:</td>
|
|
<td>{{ execution.date_finished | date:"Y/m/d H:i:s" }}</td>
|
|
</tr>
|
|
<tr>
|
|
<td>{% trans 'Time using' %}:</td>
|
|
<td>{{ execution.duration }}s</td>
|
|
</tr>
|
|
<tr>
|
|
<td>{% trans 'Assets count' %}:</td>
|
|
<td>{{ summary.total_assets }}</td>
|
|
</tr>
|
|
<tr>
|
|
<td>{% trans 'Asset success count' %}:</td>
|
|
<td>{{ summary.ok_assets }}</td>
|
|
</tr>
|
|
<tr>
|
|
<td>{% trans 'Asset failed count' %}:</td>
|
|
<td>{{ summary.fail_assets }}</td>
|
|
</tr>
|
|
<tr>
|
|
<td>{% trans 'Asset not support count' %}:</td>
|
|
<td>{{ summary.error_assets }}</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class='result'>
|
|
{% if summary.ok_accounts %}
|
|
<p>{% trans 'Success accounts' %}: {{ summary.ok_accounts }}</p>
|
|
<table>
|
|
<caption></caption>
|
|
<thead>
|
|
<tr>
|
|
<th>{% trans 'No.' %}</th>
|
|
<th>{% trans 'Asset' %}</th>
|
|
<th>{% trans 'Username' %}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for account in result.ok_accounts %}
|
|
<tr>
|
|
<td>{{ forloop.counter }}</td>
|
|
<td>{{ account.asset }}</td>
|
|
<td>{{ account.username }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% endif %}
|
|
</div>
|
|
<div class='result'>
|
|
{% if summary.lost_accounts %}
|
|
<p>{% trans 'Failed accounts' %}: {{ summary.fail_accounts }}</p>
|
|
<table>
|
|
<caption></caption>
|
|
<thead>
|
|
<tr>
|
|
<th>{% trans 'No.' %}</th>
|
|
<th>{% trans 'Asset' %}</th>
|
|
<th>{% trans 'Username' %}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for account in result.fail_accounts %}
|
|
<tr>
|
|
<td>{{ forloop.counter }}</td>
|
|
<td>{{ account.asset }}</td>
|
|
<td>{{ account.username }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% endif %}
|
|
</div>
|
|
|
|
<style>
|
|
table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
max-width: 100%;
|
|
text-align: left;
|
|
margin-top: 10px;
|
|
padding: 20px;
|
|
}
|
|
|
|
th {
|
|
background: #f2f2f2;
|
|
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>
|