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 '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 }} |
{% 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 }} |
{% trans 'Success accounts' %}: {{ summary.ok_accounts }}
-{% trans 'No.' %} | -{% trans 'Asset' %} | -{% trans 'Username' %} | -
---|---|---|
{{ forloop.counter }} | -{{ account.asset }} | -{{ account.username }} | -
{% trans 'No.' %} | +{% trans 'Asset' %} | +{% trans 'Username' %} | +
---|---|---|
{{ forloop.counter }} | +{{ account.asset }} | +{{ account.username }} | +
{% trans 'Failed accounts' %}: {{ summary.fail_accounts }}
-{% trans 'No.' %} | -{% trans 'Asset' %} | -{% trans 'Username' %} | -
---|---|---|
{{ forloop.counter }} | -{{ account.asset }} | -{{ account.username }} | -
{% trans 'No.' %} | +{% trans 'Asset' %} | +{% trans 'Username' %} | +
---|---|---|
{{ forloop.counter }} | +{{ account.asset }} | +{{ account.username }} | +
{% 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 }} | +
{% trans 'Week password' %}: {{ summary.weak_password }}
-{% trans 'Account check details' %}:
-{% trans 'No.' %} | -{% trans 'Asset' %} | -{% trans 'Username' %} | -{% trans 'Result' %} | -
---|---|---|---|
{{ forloop.counter }} | -{{ account.asset }} | -{{ account.username }} | -{% trans 'Week password' %} | -
{% trans 'Account check details' %}:
+{% trans 'No.' %} | +{% trans 'Asset' %} | +{% trans 'Username' %} | +{% trans 'Result' %} | +
---|---|---|---|
{{ forloop.counter }} | +{{ account.asset }} | +{{ account.username }} | +{% trans 'Week password' %} | +
{% trans 'No weak password' %}
+{% trans 'No weak password' %}
{% endif %} +{% 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 }} |
{% trans 'New found accounts' %}: {{ summary.new_accounts }}
-{% trans 'No.' %} | -{% trans 'Asset' %} | -{% trans 'Username' %} | -
---|---|---|
{{ forloop.counter }} | -{{ account.asset }} | -{{ account.username }} | -
{% trans 'No.' %} | +{% trans 'Asset' %} | +{% trans 'Username' %} | +
---|---|---|
{{ forloop.counter }} | +{{ account.asset }} | +{{ account.username }} | +
{% trans 'No new accounts found' %}
+{% trans 'No new accounts found' %}
{% endif %} -{% trans 'Lost accounts' %}: {{ summary.lost_accounts }}
-{% trans 'No.' %} | -{% trans 'Asset' %} | -{% trans 'Username' %} | -
---|---|---|
{{ forloop.counter }} | -{{ account.asset }} | -{{ account.username }} | -
{% trans 'No.' %} | +{% trans 'Asset' %} | +{% trans 'Username' %} | +
---|---|---|
{{ forloop.counter }} | +{{ account.asset }} | +{{ account.username }} | +
{% trans 'New found risks' %}: {{ summary.new_risks }}
#} -{# {% if summary.new_risks %}#} -{#{% trans 'No.' %} | #} -{#{% trans 'Asset' %} | #} -{#{% trans 'Username' %} | #} -{#{% trans 'Result' %} | #} -{#
---|---|---|---|
{{ forloop.counter }} | #} -{#{{ risk.asset }} | #} -{#{{ risk.username }} | #} -{#{{ risk.risk }} | #} -{#
{% 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 '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 }} | +
{% trans 'Account check details' %}:
+{% trans 'No.' %} | +{% trans 'Asset' %} | +{% trans 'Username' %} | +{% trans 'Result' %} | +
---|---|---|---|
{{ forloop.counter }} | +{{ account.asset }} | +{{ account.username }} | +{% trans 'Week password' %} | +
{% trans 'No weak password' %}
+ {% endif %} +