diff --git a/apps/accounts/migrations/0019_backupaccountautomation_and_more.py b/apps/accounts/migrations/0019_backupaccountautomation_and_more.py index 47dbab646..ab98841f7 100644 --- a/apps/accounts/migrations/0019_backupaccountautomation_and_more.py +++ b/apps/accounts/migrations/0019_backupaccountautomation_and_more.py @@ -47,6 +47,8 @@ def migrate_account_backup(apps, schema_editor): automation_id = backup_id_old_new_map.get(str(execution.plan_id)) if not automation_id: continue + snapshot = execution.snapshot + snapshot['type'] = "backup_account" data = { 'automation_id': automation_id, 'date_start': execution.date_start, diff --git a/apps/accounts/templates/accounts/backup_account_report.html b/apps/accounts/templates/accounts/backup_account_report.html index 80d71e7ef..79b0cc19e 100644 --- a/apps/accounts/templates/accounts/backup_account_report.html +++ b/apps/accounts/templates/accounts/backup_account_report.html @@ -1,78 +1,113 @@ {% load i18n %} -
-

{% trans 'The following is a summary of account backup tasks, please review and handle them' %}

- - - +
+
+

+ {% trans 'The following is a summary of account backup tasks, please review and handle them' %} +

+
+ + - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - +
任务汇总:{% trans 'Task Summary' %}:
{% trans 'Task name' %}:{{ execution.automation.name }} {% trans 'Task name' %}:{{ execution.automation.name }}
{% trans 'Date start' %}:{{ execution.date_start | date:"Y/m/d H:i:s" }}{% trans 'Date start' %}:{{ execution.date_start | date:"Y/m/d H:i:s" }}
{% trans 'Date end' %}:{{ execution.date_finished | date:"Y/m/d H:i:s" }}{% trans 'Date end' %}:{{ execution.date_finished | date:"Y/m/d H:i:s" }}
{% trans 'Time using' %}:{{ execution.duration }}s{% trans 'Time using' %}:{{ execution.duration }}s
{% trans 'Account count' %}:{{ summary.total_accounts }}{% trans 'Account count' %}:{{ summary.total_accounts }}
{% trans 'Type count' %}:{{ summary.total_types }}{% trans 'Type count' %}:{{ summary.total_types }}
+
- + } + \ No newline at end of file diff --git a/apps/accounts/templates/accounts/change_secret_report.html b/apps/accounts/templates/accounts/change_secret_report.html index a6fa25f8d..8a6919d79 100644 --- a/apps/accounts/templates/accounts/change_secret_report.html +++ b/apps/accounts/templates/accounts/change_secret_report.html @@ -1,133 +1,221 @@ {% load i18n %} -
-

{% trans 'The following is a summary of account change secret tasks, please read and process' %}

- - - +
+
+

+ {% trans 'The following is a summary of account change secret tasks, please read and process' %} +

+
+ + - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - +
任务汇总:{% trans 'Task Summary' %}:
{% trans 'Task name' %}:{{ execution.automation.name }} {% trans 'Task name' %}:{{ execution.automation.name }}
{% trans 'Date start' %}:{{ execution.date_start | date:"Y/m/d H:i:s" }}{% trans 'Date start' %}:{{ execution.date_start | date:"Y/m/d H:i:s" }}
{% trans 'Date end' %}:{{ execution.date_finished | date:"Y/m/d H:i:s" }}{% trans 'Date end' %}:{{ execution.date_finished | date:"Y/m/d H:i:s" }}
{% trans 'Time using' %}:{{ execution.duration }}s{% trans 'Time using' %}:{{ execution.duration }}s
{% trans 'Assets count' %}:{{ summary.total_assets }}{% trans 'Assets count' %}:{{ summary.total_assets }}
{% trans 'Asset success count' %}:{{ summary.ok_assets }}{% trans 'Asset success count' %}:{{ summary.ok_assets }}
{% trans 'Asset failed count' %}:{{ summary.fail_assets }}{% trans 'Asset failed count' %}:{{ summary.fail_assets }}
{% trans 'Asset not support count' %}:{{ summary.error_assets }}{% trans 'Asset not support count' %}:{{ summary.error_assets }}
-
+ -
+
{% if summary.ok_accounts %} -

{% trans 'Success accounts' %}: {{ summary.ok_accounts }}

- - - - - - - - - - - {% for account in result.ok_accounts %} - - - - - - {% endfor %} - -
{% trans 'No.' %}{% trans 'Asset' %}{% trans 'Username' %}
{{ forloop.counter }}{{ account.asset }}{{ account.username }}
+
+

+ {% trans 'Success accounts' %}: + {{ summary.ok_accounts }} +

+
+ + + + + + + + + + + {% for account in result.ok_accounts %} + + + + + + {% endfor %} + +
{% trans 'No.' %}{% trans 'Asset' %}{% trans 'Username' %}
{{ forloop.counter }}{{ account.asset }}{{ account.username }}
{% endif %} -
-
+
+ +
{% if summary.fail_accounts %} -

{% trans 'Failed accounts' %}: {{ summary.fail_accounts }}

- - - - - - - - - - - {% for account in result.fail_accounts %} - - - - - - {% endfor %} - -
{% trans 'No.' %}{% trans 'Asset' %}{% trans 'Username' %}
{{ forloop.counter }}{{ account.asset }}{{ account.username }}
+
+

+ {% trans 'Failed accounts' %}: + {{ summary.fail_accounts }} +

+
+ + + + + + + + + + + {% for account in result.fail_accounts %} + + + + + + {% endfor %} + +
{% trans 'No.' %}{% trans 'Asset' %}{% trans 'Username' %}
{{ forloop.counter }}{{ account.asset }}{{ account.username }}
{% endif %} +
+ } + \ No newline at end of file diff --git a/apps/accounts/templates/accounts/check_account_report.html b/apps/accounts/templates/accounts/check_account_report.html index 6444f7f92..28bbdeb81 100644 --- a/apps/accounts/templates/accounts/check_account_report.html +++ b/apps/accounts/templates/accounts/check_account_report.html @@ -1,124 +1,217 @@ {% load i18n %} -
-

{% trans 'The following is a summary of the account check tasks. Please review and handle them' %}

- - - +
+
+

+ {% trans 'The following is a summary of the account check tasks. Please review and handle them' %} +

+
+ + - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - - - - - - + + - - + + - - + + - + + + + +
任务汇总:{% trans 'Task Summary' %}:
{% trans 'Task name' %}:{{ execution.automation.name }} {% trans 'Task name' %}:{{ execution.automation.name }}
{% trans 'Date start' %}:{{ execution.date_start | date:"Y/m/d H:i:s" }}{% trans 'Date start' %}:{{ execution.date_start | date:"Y/m/d H:i:s" }}
{% trans 'Date end' %}:{{ execution.date_finished | date:"Y/m/d H:i:s" }}{% trans 'Date end' %}:{{ execution.date_finished | date:"Y/m/d H:i:s" }}
{% trans 'Time using' %}:{{ execution.duration }}s{% trans 'Time using' %}:{{ execution.duration }}s
{% trans 'Assets count' %}:{{ summary.assets }}{% trans 'Assets count' %}:{{ summary.assets }}
{% trans 'Asset success count' %}:{{ summary.ok_assets }}{% trans 'Asset success count' %}:{{ summary.ok_assets }}
{% trans 'Asset failed count' %}:{{ summary.fail_assets }}{% trans 'Asset failed count' %}:{{ summary.fail_assets }}
{% trans 'Asset not support count' %}:{{ summary.error_assets }}
{% trans 'Account count' %}:{{ summary.accounts }}{% trans 'Asset not support count' %}:{{ summary.error_assets }}
{% trans 'Ok count' %}:{{ summary.ok }}{% trans 'Account count' %}:{{ summary.accounts }}
{% trans 'No password count' %}:{{ summary.no_secret }}{% trans 'Ok count' %}:{{ summary.ok }}
{% trans 'No password count' %}:{{ summary.no_secret }}
-
+ -
+
{% if summary.weak_password %} -

{% trans 'Week password' %}: {{ summary.weak_password }}

-

{% trans 'Account check details' %}:

- - - - - - - - - - - - {% for account in result.weak_password %} - - - - - - - {% endfor %} - -
{% trans 'No.' %}{% trans 'Asset' %}{% trans 'Username' %}{% trans 'Result' %}
{{ forloop.counter }}{{ account.asset }}{{ account.username }}{% trans 'Week password' %}
+
+

+ {% trans 'Week password' %}: + {{ summary.weak_password }} +

+
+

{% trans 'Account check details' %}:

+ + + + + + + + + + + + {% for account in result.weak_password %} + + + + + + + {% endfor %} + +
{% trans 'No.' %}{% trans 'Asset' %}{% trans 'Username' %}{% trans 'Result' %}
{{ forloop.counter }}{{ account.asset }}{{ account.username }}{% trans 'Week password' %}
{% else %} -

{% trans 'No weak password' %}

+

{% trans 'No weak password' %}

{% endif %} +
+ } + \ No newline at end of file diff --git a/apps/accounts/templates/accounts/gather_account_report.html b/apps/accounts/templates/accounts/gather_account_report.html index 9a0e3e76d..a98b11734 100644 --- a/apps/accounts/templates/accounts/gather_account_report.html +++ b/apps/accounts/templates/accounts/gather_account_report.html @@ -1,164 +1,223 @@ {% load i18n %} -
-

{% trans 'The following is a summary of the account check tasks. Please review and handle them' %}

- - - +
+
+

+ {% trans 'The following is a summary of the account check tasks. Please review and handle them' %} +

+
+ + - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - +
任务汇总:{% trans 'Task Summary' %}:
{% trans 'Task name' %}:{{ execution.automation.name }} {% trans 'Task name' %}:{{ execution.automation.name }}
{% trans 'Date start' %}:{{ execution.date_start | date:"Y/m/d H:i:s" }}{% trans 'Date start' %}:{{ execution.date_start | date:"Y/m/d H:i:s" }}
{% trans 'Date end' %}:{{ execution.date_finished | date:"Y/m/d H:i:s" }}{% trans 'Date end' %}:{{ execution.date_finished | date:"Y/m/d H:i:s" }}
{% trans 'Time using' %}:{{ execution.duration }}s{% trans 'Time using' %}:{{ execution.duration }}s
{% trans 'Assets count' %}:{{ summary.total_assets }}{% trans 'Assets count' %}:{{ summary.total_assets }}
{% trans 'Asset success count' %}:{{ summary.ok_assets }}{% trans 'Asset success count' %}:{{ summary.ok_assets }}
{% trans 'Asset failed count' %}:{{ summary.fail_assets }}{% trans 'Asset failed count' %}:{{ summary.fail_assets }}
{% trans 'Asset not support count' %}:{{ summary.error_assets }}{% trans 'Asset not support count' %}:{{ summary.error_assets }}
-
+ -
+
{% if summary.new_accounts %} -

{% trans 'New found accounts' %}: {{ summary.new_accounts }}

- - - - - - - - - - - {% for account in result.new_accounts %} - - - - - - {% endfor %} - -
{% trans 'No.' %}{% trans 'Asset' %}{% trans 'Username' %}
{{ forloop.counter }}{{ account.asset }}{{ account.username }}
+
+

+ {% trans 'New found accounts' %}: + {{ summary.new_accounts }} +

+
+ + + + + + + + + + + {% for account in result.new_accounts %} + + + + + + {% endfor %} + +
{% trans 'No.' %}{% trans 'Asset' %}{% trans 'Username' %}
{{ forloop.counter }}{{ account.asset }}{{ account.username }}
{% else %} -

{% trans 'No new accounts found' %}

+

{% trans 'No new accounts found' %}

{% endif %} -
-
+
+ +
{% if summary.lost_accounts %} -

{% trans 'Lost accounts' %}: {{ summary.lost_accounts }}

- - - - - - - - - - - {% for account in result.lost_accounts %} - - - - - - {% endfor %} - -
{% trans 'No.' %}{% trans 'Asset' %}{% trans 'Username' %}
{{ forloop.counter }}{{ account.asset }}{{ account.username }}
+
+

+ {% trans 'Lost accounts' %}: + {{ summary.lost_accounts }} +

+
+ + + + + + + + + + + {% for account in result.lost_accounts %} + + + + + + {% endfor %} + +
{% trans 'No.' %}{% trans 'Asset' %}{% trans 'Username' %}
{{ forloop.counter }}{{ account.asset }}{{ account.username }}
{% endif %} +
- -{#
#} -{#

{% trans 'New found risks' %}: {{ summary.new_risks }}

#} -{# {% if summary.new_risks %}#} -{# #} -{# #} -{# #} -{# #} -{# #} -{# #} -{# #} -{# #} -{# #} -{# #} -{# #} -{# {% for risk in result.risks %}#} -{# #} -{# #} -{# #} -{# #} -{# #} -{# #} -{# {% endfor %}#} -{# #} -{#
{% trans 'No.' %}{% trans 'Asset' %}{% trans 'Username' %}{% trans 'Result' %}
{{ forloop.counter }}{{ risk.asset }}{{ risk.username }}{{ risk.risk }}
#} -{# {% endif %}#} -{#
#} - + } + \ No newline at end of file diff --git a/apps/accounts/templates/accounts/push_account_report.html b/apps/accounts/templates/accounts/push_account_report.html index c04a55f3f..cc0e689ec 100644 --- a/apps/accounts/templates/accounts/push_account_report.html +++ b/apps/accounts/templates/accounts/push_account_report.html @@ -1,77 +1,217 @@ {% load i18n %} -
-

{% trans 'The following is a summary of account push tasks, please read and process' %}

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
任务汇总:
{% trans 'Task name' %}:{{ execution.automation.name }}
{% trans 'Date start' %}:{{ execution.date_start | date:"Y/m/d H:i:s" }}
{% trans 'Date end' %}:{{ execution.date_finished | date:"Y/m/d H:i:s" }}
{% trans 'Time using' %}:{{ execution.duration }}s
{% trans 'Assets count' %}:{{ summary.total_assets }}
{% trans 'Asset success count' %}:{{ summary.ok_assets }}
{% trans 'Asset failed count' %}:{{ summary.fail_assets }}
{% trans 'Asset not support count' %}:{{ summary.error_assets }}
+
+
+

+ {% trans 'The following is a summary of the account check tasks. Please review and handle them' %} +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{% trans 'Task Summary' %}:
{% trans 'Task name' %}:{{ execution.automation.name }}
{% trans 'Date start' %}:{{ execution.date_start | date:"Y/m/d H:i:s" }}
{% trans 'Date end' %}:{{ execution.date_finished | date:"Y/m/d H:i:s" }}
{% trans 'Time using' %}:{{ execution.duration }}s
{% trans 'Assets count' %}:{{ summary.assets }}
{% trans 'Asset success count' %}:{{ summary.ok_assets }}
{% trans 'Asset failed count' %}:{{ summary.fail_assets }}
{% trans 'Asset not support count' %}:{{ summary.error_assets }}
{% trans 'Account count' %}:{{ summary.accounts }}
{% trans 'Ok count' %}:{{ summary.ok }}
{% trans 'No password count' %}:{{ summary.no_secret }}
+
+ +
+ {% if summary.weak_password %} +
+

+ {% trans 'Week password' %}: + {{ summary.weak_password }} +

+
+

{% trans 'Account check details' %}:

+ + + + + + + + + + + + {% for account in result.weak_password %} + + + + + + + {% endfor %} + +
{% trans 'No.' %}{% trans 'Asset' %}{% trans 'Username' %}{% trans 'Result' %}
{{ forloop.counter }}{{ account.asset }}{{ account.username }}{% trans 'Week password' %}
+ {% else %} +

{% trans 'No weak password' %}

+ {% endif %} +
- + 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; + } + } + \ No newline at end of file