From 947c3a54c86e5a72c6427696ba60dcdd08614ed1 Mon Sep 17 00:00:00 2001 From: ibuler Date: Mon, 17 Mar 2025 10:28:57 +0800 Subject: [PATCH] perf: update automation report --- .../templates/accounts/change_secret_report.html | 12 ++++++------ .../templates/accounts/check_account_report.html | 10 +++++----- .../templates/accounts/gather_account_report.html | 10 +++++----- .../templates/accounts/push_account_report.html | 12 ++++++------ .../commands/services/services/celery_base.py | 3 ++- apps/i18n/lina/en.json | 2 +- 6 files changed, 25 insertions(+), 24 deletions(-) diff --git a/apps/accounts/templates/accounts/change_secret_report.html b/apps/accounts/templates/accounts/change_secret_report.html index 637e8fabb..5dd15cced 100644 --- a/apps/accounts/templates/accounts/change_secret_report.html +++ b/apps/accounts/templates/accounts/change_secret_report.html @@ -14,6 +14,11 @@
+
+ {% trans 'Task name' %} + {{ execution.automation.name }} +
+
{% trans 'Date start' %} {{ execution.date_start | date:"Y/m/d H:i:s" }} @@ -43,12 +48,7 @@ {% trans 'Asset not support count' %} {{ summary.error_assets | default:0 }}
- -
- {% trans 'Task name' %} - {{ execution.automation.name }} -
- +
{% trans 'Time using' %} {{ execution.duration }}s diff --git a/apps/accounts/templates/accounts/check_account_report.html b/apps/accounts/templates/accounts/check_account_report.html index e0b6bca68..c3f069fb6 100644 --- a/apps/accounts/templates/accounts/check_account_report.html +++ b/apps/accounts/templates/accounts/check_account_report.html @@ -14,6 +14,11 @@
+
+ {% trans 'Task name' %} + {{ execution.snapshot.name }} +
+
{% trans 'Date start' %} {{ execution.date_start | date:"Y/m/d H:i:s" }} @@ -57,11 +62,6 @@
-
- {% trans 'Task name' %} - {{ execution.snapshot.name }} -
-
{% trans 'Time using' %} {{ execution.duration }}s diff --git a/apps/accounts/templates/accounts/gather_account_report.html b/apps/accounts/templates/accounts/gather_account_report.html index 4fc9003ae..440613e23 100644 --- a/apps/accounts/templates/accounts/gather_account_report.html +++ b/apps/accounts/templates/accounts/gather_account_report.html @@ -12,6 +12,11 @@
+
+ {% trans 'Task name' %} + {{ execution.automation.name }} +
+
{% trans 'Date start' %} {{ execution.date_start | date:"Y/m/d H:i:s" }} @@ -42,11 +47,6 @@ {{ summary.error_assets | default:0 }}
-
- {% trans 'Task name' %} - {{ execution.automation.name }} -
-
{% trans 'Time using' %} {{ execution.duration }}s diff --git a/apps/accounts/templates/accounts/push_account_report.html b/apps/accounts/templates/accounts/push_account_report.html index 9d3de44cc..7708f05b8 100644 --- a/apps/accounts/templates/accounts/push_account_report.html +++ b/apps/accounts/templates/accounts/push_account_report.html @@ -13,6 +13,11 @@
+
+ {% trans 'Task name' %} + {{ execution.automation.name }} +
+
{% trans 'Date start' %} {{ execution.date_start | date:"Y/m/d H:i:s" }} @@ -42,12 +47,7 @@ {% trans 'Asset not support count' %} {{ summary.error_assets | default:0 }}
- -
- {% trans 'Task name' %} - {{ execution.automation.name }} -
- +
{% trans 'Time using' %} {{ execution.duration }}s diff --git a/apps/common/management/commands/services/services/celery_base.py b/apps/common/management/commands/services/services/celery_base.py index edfd7bb0e..859ca26b4 100644 --- a/apps/common/management/commands/services/services/celery_base.py +++ b/apps/common/management/commands/services/services/celery_base.py @@ -14,7 +14,8 @@ class CeleryBaseService(BaseService): print('\n- Start Celery as Distributed Task Queue: {}'.format(self.queue.capitalize())) ansible_config_path = os.path.join(settings.APPS_DIR, 'libs', 'ansible', 'ansible.cfg') ansible_modules_path = os.path.join(settings.APPS_DIR, 'libs', 'ansible', 'modules') - os.environ.setdefault('LC_ALL', 'C.UTF-8') + os.environ.setdefault('LC_ALL', 'en_US.UTF-8') + os.environ.setdefault('LANG', 'en_US.UTF-8') os.environ.setdefault('PYTHONOPTIMIZE', '1') os.environ.setdefault('ANSIBLE_FORCE_COLOR', 'True') os.environ.setdefault('ANSIBLE_CONFIG', ansible_config_path) diff --git a/apps/i18n/lina/en.json b/apps/i18n/lina/en.json index 41bc2f68b..a003cbede 100644 --- a/apps/i18n/lina/en.json +++ b/apps/i18n/lina/en.json @@ -1465,7 +1465,7 @@ "View": "View", "ViewMore": "View more", "ViewPerm": "View", - "ViewSecret": "View ciphertext", + "ViewSecret": "View secret", "VirtualAccountDetail": "Virtual account details", "VirtualAccountHelpMsg": "Virtual accounts are specialized accounts with specific purposes when connecting assets.", "VirtualAccountUpdate": "Virtual account update",