From 69f6401e878817bb2f470d3c1a4b922c6d69dbea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=81=E5=B9=BF?= Date: Wed, 27 Mar 2019 11:21:21 +0800 Subject: [PATCH] Dev (#2544) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [Update] 更新翻译 (#2541) * [Update] 更新缓存机制 * [Update] 增加task最大允许事件,并设置命令最大运行时间为60s --- .../assets/asset_asset_user_list.html | 2 +- apps/common/permissions.py | 8 + apps/jumpserver/settings.py | 1 + apps/locale/zh/LC_MESSAGES/django.mo | Bin 69760 -> 69791 bytes apps/locale/zh/LC_MESSAGES/django.po | 186 ++++++++++-------- apps/ops/tasks.py | 8 +- .../ops/command_execution_create.html | 19 +- apps/ops/views/command.py | 5 +- apps/perms/api/user_group_permission.py | 2 +- apps/perms/api/user_permission.py | 137 +++++++------ apps/perms/utils.py | 100 +++++++--- 11 files changed, 296 insertions(+), 172 deletions(-) diff --git a/apps/assets/templates/assets/asset_asset_user_list.html b/apps/assets/templates/assets/asset_asset_user_list.html index 540be02d8..9a330ce77 100644 --- a/apps/assets/templates/assets/asset_asset_user_list.html +++ b/apps/assets/templates/assets/asset_asset_user_list.html @@ -46,7 +46,7 @@ {% trans 'Username' %} - {% trans 'Version' %} + {% trans 'Password version' %} {% trans 'Reachable' %} {% trans 'Date updated' %} {% trans 'Action' %} diff --git a/apps/common/permissions.py b/apps/common/permissions.py index 10ef329ed..67154b228 100644 --- a/apps/common/permissions.py +++ b/apps/common/permissions.py @@ -70,6 +70,14 @@ class IsCurrentUserOrReadOnly(permissions.BasePermission): return obj == request.user +class LoginRequiredMixin(UserPassesTestMixin): + def test_func(self): + if self.request.user.is_authenticated: + return True + else: + return False + + class AdminUserRequiredMixin(UserPassesTestMixin): def test_func(self): if not self.request.user.is_authenticated: diff --git a/apps/jumpserver/settings.py b/apps/jumpserver/settings.py index 02e48c3c4..d516c097c 100644 --- a/apps/jumpserver/settings.py +++ b/apps/jumpserver/settings.py @@ -475,6 +475,7 @@ CELERY_WORKER_REDIRECT_STDOUTS = True CELERY_WORKER_REDIRECT_STDOUTS_LEVEL = "INFO" # CELERY_WORKER_HIJACK_ROOT_LOGGER = True CELERY_WORKER_MAX_TASKS_PER_CHILD = 40 +CELERY_TASK_SOFT_TIME_LIMIT = 3600 # Cache use redis CACHES = { diff --git a/apps/locale/zh/LC_MESSAGES/django.mo b/apps/locale/zh/LC_MESSAGES/django.mo index 7196bfa06fc852332f3287f7f17f6c56a1276e04..3f02ced3b75f39c7e05af529afbaa4b798798876 100644 GIT binary patch delta 19199 zcmYk@2b4`$`^WJ!W=0>3!C)}D8NK)3$LNWg=%Ys`dae>gCszqkGHL|T1rbrAM2QyR zjp!|E_y-Y@_AI`3yc&#q^mbMC#!J0>w?X<~@)a{7?D9>=a=&&!4nvU}dY zA)dFplCqw+v5DtR$4xi_t2On!DYy&AV4Y^3cQ(lL4&i=W_>SjACGos=Eyz+hbbh_dcKyiK9>h%t7vkmx$V`m6#1TpmyXqYAbJG za(s?a_!`+#FRGnePzh9h70iuwF&p+o?c_xC=}M+jNQZvZ6|TTg+=(gid-EuU6Q9Gh zcn3SyCl12c4xZN>7vnqlxC8fJh1wlm#b;QK_&#a@c{;hR zi$(27an!vljRmkBs@(*vjZ;zg{uFAVuTi%&oK;3+cGNAYf?9C1&g{Roq5}yHlz_Sg zy-@ddC~C_mq6S)Q`8B9^J5U21wEDA{m-q^5=R$Y_HBMSAf;mvPv>~d0OCJSw=z_Wh zpP=sL0@S_ShFS3#YRhk<27GRYCb%8SfU1u|Ewm770p&0lYoZ>)x)_3uPz&%ir=W>C zSj7<3){Q`|bQ| zLkh)kBr>U0THMLMWNc~#Zp)tlVSp@eQ(s;Gy?T(%tKw+ zm#AlHTQBxM1%(qNv{mO(_v|6+%98hXR~C&Lun1~^%BTg$VM=@-bw%A#6OF=DI0H5A zLW?(|#@UT}NRRofa0@lyYfOddKX3!(Kuu5_we^)yTUrZstKL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 b/apps/locale/zh/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Jumpserver 0.3.3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-03-22 17:12+0800\n" +"POT-Creation-Date: 2019-03-26 14:56+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: ibuler \n" "Language-Team: Jumpserver team\n" @@ -73,7 +73,7 @@ msgstr "网域" #: perms/templates/perms/asset_permission_list.html:57 #: perms/templates/perms/asset_permission_list.html:78 #: perms/templates/perms/asset_permission_list.html:128 -#: xpack/plugins/change_auth_plan/forms.py:101 +#: xpack/plugins/change_auth_plan/forms.py:115 #: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_execution_list.html:55 #: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_list.html:15 #: xpack/plugins/cloud/models.py:123 @@ -102,7 +102,7 @@ msgstr "如果有多个的互相隔离的网络,设置资产属于的网域, #: assets/forms/asset.py:92 assets/forms/asset.py:96 assets/forms/domain.py:17 #: assets/forms/label.py:15 #: perms/templates/perms/asset_permission_asset.html:88 -#: xpack/plugins/change_auth_plan/forms.py:92 +#: xpack/plugins/change_auth_plan/forms.py:105 #: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_asset_list.html:84 msgid "Select assets" msgstr "选择资产" @@ -125,9 +125,9 @@ msgstr "选择资产" #: terminal/templates/terminal/command_list.html:73 #: terminal/templates/terminal/session_list.html:41 #: terminal/templates/terminal/session_list.html:72 -#: xpack/plugins/change_auth_plan/models.py:65 -#: xpack/plugins/change_auth_plan/models.py:401 -#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_create_update.html:40 +#: xpack/plugins/change_auth_plan/forms.py:114 +#: xpack/plugins/change_auth_plan/models.py:408 +#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_create_update.html:46 #: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_execution_list.html:54 #: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_execution_subtask_list.html:13 #: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_list.html:14 @@ -179,7 +179,7 @@ msgstr "SSH网关,支持代理SSH,RDP和VNC" #: users/templates/users/user_list.html:23 #: users/templates/users/user_profile.html:51 #: users/templates/users/user_pubkey_update.html:53 -#: xpack/plugins/change_auth_plan/forms.py:84 +#: xpack/plugins/change_auth_plan/forms.py:97 #: xpack/plugins/change_auth_plan/models.py:58 #: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:61 #: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_list.html:12 @@ -211,6 +211,13 @@ msgstr "名称" #: users/templates/users/user_detail.html:67 #: users/templates/users/user_list.html:24 #: users/templates/users/user_profile.html:47 +#: xpack/plugins/change_auth_plan/forms.py:99 +#: xpack/plugins/change_auth_plan/models.py:60 +#: xpack/plugins/change_auth_plan/models.py:404 +#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:65 +#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_execution_list.html:53 +#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_execution_subtask_list.html:12 +#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_list.html:13 msgid "Username" msgstr "用户名" @@ -232,7 +239,7 @@ msgstr "密码或密钥密码" #: users/templates/users/user_pubkey_update.html:40 #: users/templates/users/user_update.html:20 #: xpack/plugins/change_auth_plan/models.py:90 -#: xpack/plugins/change_auth_plan/models.py:252 +#: xpack/plugins/change_auth_plan/models.py:259 msgid "Password" msgstr "密码" @@ -517,9 +524,7 @@ msgstr "未知" msgid "Latest version" msgstr "最新版本" -#: assets/models/authbook.py:29 -#: assets/templates/assets/asset_asset_user_list.html:49 -#: ops/templates/ops/adhoc_history.html:58 +#: assets/models/authbook.py:29 ops/templates/ops/adhoc_history.html:58 #: ops/templates/ops/adhoc_history_detail.html:57 #: ops/templates/ops/task_adhoc.html:58 ops/templates/ops/task_history.html:64 msgid "Version" @@ -530,12 +535,12 @@ msgid "AuthBook" msgstr "" #: assets/models/base.py:29 xpack/plugins/change_auth_plan/models.py:94 -#: xpack/plugins/change_auth_plan/models.py:259 +#: xpack/plugins/change_auth_plan/models.py:266 msgid "SSH private key" msgstr "ssh密钥" #: assets/models/base.py:30 xpack/plugins/change_auth_plan/models.py:97 -#: xpack/plugins/change_auth_plan/models.py:255 +#: xpack/plugins/change_auth_plan/models.py:262 msgid "SSH public key" msgstr "ssh公钥" @@ -774,7 +779,7 @@ msgstr "手动登录" #: assets/views/label.py:26 assets/views/label.py:43 assets/views/label.py:69 #: assets/views/system_user.py:28 assets/views/system_user.py:44 #: assets/views/system_user.py:60 assets/views/system_user.py:74 -#: templates/_nav.html:19 +#: templates/_nav.html:19 xpack/plugins/change_auth_plan/models.py:65 msgid "Assets" msgstr "资产管理" @@ -948,7 +953,7 @@ msgid "If set id, will use this id update asset existed" msgstr "如果设置了id,则会使用该行信息更新该id的资产" #: assets/templates/assets/_asset_list_modal.html:7 assets/views/asset.py:51 -#: templates/_nav.html:22 +#: templates/_nav.html:22 xpack/plugins/change_auth_plan/views.py:110 msgid "Asset list" msgstr "资产列表" @@ -957,7 +962,7 @@ msgid "Update asset user auth" msgstr "更新资产用户认证信息" #: assets/templates/assets/_asset_user_auth_modal.html:23 -#: xpack/plugins/change_auth_plan/forms.py:88 +#: xpack/plugins/change_auth_plan/forms.py:101 msgid "Please input password" msgstr "请输入密码" @@ -978,7 +983,7 @@ msgstr "如果使用了nat端口映射,请设置为ssh真实监听的端口" #: assets/templates/assets/asset_update.html:21 #: assets/templates/assets/gateway_create_update.html:37 #: perms/templates/perms/asset_permission_create_update.html:38 -#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_create_update.html:37 +#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_create_update.html:43 msgid "Basic" msgstr "基本" @@ -1000,7 +1005,7 @@ msgstr "自动生成密钥" #: assets/templates/assets/gateway_create_update.html:53 #: perms/templates/perms/asset_permission_create_update.html:50 #: terminal/templates/terminal/terminal_update.html:40 -#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_create_update.html:61 +#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_create_update.html:67 msgid "Other" msgstr "其它" @@ -1031,7 +1036,7 @@ msgstr "其它" #: users/templates/users/user_profile_update.html:63 #: users/templates/users/user_pubkey_update.html:70 #: users/templates/users/user_pubkey_update.html:76 -#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_create_update.html:65 +#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_create_update.html:71 #: xpack/plugins/cloud/templates/cloud/account_create_update.html:33 #: xpack/plugins/cloud/templates/cloud/sync_instance_task_create.html:35 #: xpack/plugins/interface/templates/interface/interface.html:88 @@ -1068,7 +1073,7 @@ msgstr "重置" #: users/templates/users/user_password_update.html:72 #: users/templates/users/user_profile_update.html:64 #: users/templates/users/user_pubkey_update.html:77 -#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_create_update.html:66 +#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_create_update.html:72 #: xpack/plugins/interface/templates/interface/interface.html:89 msgid "Submit" msgstr "提交" @@ -1098,7 +1103,11 @@ msgstr "关闭" #: perms/templates/perms/asset_permission_asset.html:18 #: perms/templates/perms/asset_permission_detail.html:18 #: perms/templates/perms/asset_permission_user.html:18 +#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_asset_list.html:17 +#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:20 +#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_execution_list.html:17 #: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_execution_list.html:106 +#: xpack/plugins/change_auth_plan/views.py:83 msgid "Detail" msgstr "详情" @@ -1235,7 +1244,7 @@ msgstr "替换资产的管理员" #: assets/templates/assets/admin_user_detail.html:91 #: perms/templates/perms/asset_permission_asset.html:116 -#: xpack/plugins/change_auth_plan/forms.py:96 +#: xpack/plugins/change_auth_plan/forms.py:109 #: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_asset_list.html:112 msgid "Select nodes" msgstr "选择节点" @@ -1301,6 +1310,10 @@ msgstr "资产用户列表" msgid "Asset users of" msgstr "资产用户" +#: assets/templates/assets/asset_asset_user_list.html:49 +msgid "Password version" +msgstr "密码版本" + #: assets/templates/assets/asset_asset_user_list.html:51 #: assets/templates/assets/cmd_filter_detail.html:73 #: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:109 @@ -1927,7 +1940,7 @@ msgid "MFA" msgstr "MFA" #: audits/models.py:100 audits/templates/audits/login_log_list.html:57 -#: xpack/plugins/change_auth_plan/models.py:405 +#: xpack/plugins/change_auth_plan/models.py:412 #: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_execution_subtask_list.html:15 #: xpack/plugins/cloud/models.py:172 #: xpack/plugins/cloud/templates/cloud/sync_instance_task_history.html:69 @@ -1952,8 +1965,8 @@ msgstr "登录日期" #: ops/templates/ops/task_history.html:58 perms/models.py:34 #: perms/templates/perms/asset_permission_detail.html:86 terminal/models.py:165 #: terminal/templates/terminal/session_list.html:78 -#: xpack/plugins/change_auth_plan/models.py:238 -#: xpack/plugins/change_auth_plan/models.py:408 +#: xpack/plugins/change_auth_plan/models.py:245 +#: xpack/plugins/change_auth_plan/models.py:415 #: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_execution_list.html:59 #: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_execution_subtask_list.html:17 msgid "Date start" @@ -2283,8 +2296,8 @@ msgstr "完成时间" #: ops/models/adhoc.py:326 ops/templates/ops/adhoc_history.html:57 #: ops/templates/ops/task_history.html:63 ops/templates/ops/task_list.html:33 -#: xpack/plugins/change_auth_plan/models.py:241 -#: xpack/plugins/change_auth_plan/models.py:411 +#: xpack/plugins/change_auth_plan/models.py:248 +#: xpack/plugins/change_auth_plan/models.py:418 #: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_execution_list.html:58 #: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_execution_subtask_list.html:16 msgid "Time" @@ -2434,35 +2447,35 @@ msgstr "任务列表" msgid "Go" msgstr "" -#: ops/templates/ops/command_execution_create.html:144 +#: ops/templates/ops/command_execution_create.html:148 msgid "Selected assets" msgstr "已选择资产" -#: ops/templates/ops/command_execution_create.html:147 +#: ops/templates/ops/command_execution_create.html:151 msgid "In total" msgstr "总共" -#: ops/templates/ops/command_execution_create.html:182 +#: ops/templates/ops/command_execution_create.html:186 msgid "" "Select the left asset, select the running system user, execute command in " "batch" msgstr "选择左侧资产, 选择运行的系统用户,批量执行命令" -#: ops/templates/ops/command_execution_create.html:200 +#: ops/templates/ops/command_execution_create.html:204 msgid "Unselected assets" msgstr "没有选中资产" -#: ops/templates/ops/command_execution_create.html:204 +#: ops/templates/ops/command_execution_create.html:208 msgid "No input command" msgstr "没有输入命令" -#: ops/templates/ops/command_execution_create.html:208 +#: ops/templates/ops/command_execution_create.html:212 msgid "No system user was selected" msgstr "没有选择系统用户" -#: ops/templates/ops/command_execution_create.html:253 +#: ops/templates/ops/command_execution_create.html:257 msgid "Pending" -msgstr "" +msgstr "等待" #: ops/templates/ops/command_execution_list.html:64 msgid "Finished" @@ -2521,7 +2534,7 @@ msgstr "更新任务内容: {}" #: ops/views/adhoc.py:44 ops/views/adhoc.py:69 ops/views/adhoc.py:82 #: ops/views/adhoc.py:95 ops/views/adhoc.py:108 ops/views/adhoc.py:121 -#: ops/views/adhoc.py:134 ops/views/command.py:43 ops/views/command.py:67 +#: ops/views/adhoc.py:134 ops/views/command.py:44 ops/views/command.py:68 msgid "Ops" msgstr "作业中心" @@ -2533,11 +2546,11 @@ msgstr "任务列表" msgid "Task run history" msgstr "执行历史" -#: ops/views/command.py:44 +#: ops/views/command.py:45 msgid "Command execution list" msgstr "命令执行列表" -#: ops/views/command.py:68 templates/_nav_user.html:9 +#: ops/views/command.py:69 templates/_nav_user.html:9 msgid "Command execution" msgstr "命令执行" @@ -4740,49 +4753,57 @@ msgstr "MFA 解绑成功,返回登录页面" msgid "Password length" msgstr "密码长度" -#: xpack/plugins/change_auth_plan/forms.py:40 +#: xpack/plugins/change_auth_plan/forms.py:45 +msgid "* For security, please do not change root user's password" +msgstr "* 为了安全,请不要更改root用户的密码" + +#: xpack/plugins/change_auth_plan/forms.py:54 msgid "* Please enter custom password" msgstr "* 请输入自定义密码" -#: xpack/plugins/change_auth_plan/forms.py:50 +#: xpack/plugins/change_auth_plan/forms.py:63 msgid "* Please enter a valid crontab expression" msgstr "* 请输入有效的 crontab 表达式" -#: xpack/plugins/change_auth_plan/forms.py:86 -#: xpack/plugins/change_auth_plan/models.py:60 -#: xpack/plugins/change_auth_plan/models.py:397 -#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:65 -#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_execution_list.html:53 -#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_execution_subtask_list.html:12 -#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_list.html:13 -msgid "Asset username" -msgstr "资产用户名" - -#: xpack/plugins/change_auth_plan/forms.py:102 -#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_create_update.html:54 +#: xpack/plugins/change_auth_plan/forms.py:116 +#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_create_update.html:60 #: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:81 #: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_list.html:17 msgid "Periodic perform" msgstr "定时执行" -#: xpack/plugins/change_auth_plan/forms.py:106 +#: xpack/plugins/change_auth_plan/forms.py:120 +msgid "" +"Tips: Currently only unix-like assets are supported, while Windows assets " +"are not" +msgstr "提示:目前仅支持类Unix资产,暂不支持Windows资产" + +#: xpack/plugins/change_auth_plan/forms.py:122 +msgid "" +"Tips: The username of the user on the asset to be modified. if the user " +"exists, change the password; If the user does not exist, create the user." +msgstr "" +"提示:用户名为将要修改的资产上的用户的用户名。如果用户存在,则修改密码;如果" +"用户不存在,则创建用户。" + +#: xpack/plugins/change_auth_plan/forms.py:126 msgid "Tips: (Units: hour)" msgstr "提示:(单位: 时)" -#: xpack/plugins/change_auth_plan/forms.py:107 +#: xpack/plugins/change_auth_plan/forms.py:127 msgid "" -"eg: Every Sunday 03:05 run (5 3 * * 0)
Tips: Using 5 digits linux " -"crontab expressions (Online tools)
Note: If both Regularly perform and " -"Cycle perform are set, give priority to Regularly perform" +"eg: Every Sunday 03:05 run <5 3 * * 0>
Tips: Using 5 digits linux " +"crontab expressions (Online tools)
Note: If both Regularly " +"perform and Cycle perform are set, give priority to Regularly perform" msgstr "" -"eg:每周日 03:05 执行(5 3 * * 0)
提示: 使用5位 Linux crontab 表达式" -"(在线工具
注" -"意: 如果同时设置了定期执行和周期执行,优先使用定期执行" +"eg:每周日 03:05 执行 <5 3 * * 0>
提示: 使用5位 Linux crontab 表达式 <" +"分 时 日 月 星期> (在线工" +"具
注意: 如果同时设置了定期执行和周期执行,优先使用定期执行" #: xpack/plugins/change_auth_plan/meta.py:9 #: xpack/plugins/change_auth_plan/models.py:110 -#: xpack/plugins/change_auth_plan/models.py:245 +#: xpack/plugins/change_auth_plan/models.py:252 #: xpack/plugins/change_auth_plan/views.py:31 #: xpack/plugins/change_auth_plan/views.py:47 #: xpack/plugins/change_auth_plan/views.py:68 @@ -4818,7 +4839,7 @@ msgid "Regularly perform" msgstr "定期执行" #: xpack/plugins/change_auth_plan/models.py:83 -#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_create_update.html:45 +#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_create_update.html:51 #: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:69 #: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_execution_list.html:57 #: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_list.html:16 @@ -4830,34 +4851,35 @@ msgstr "密码策略" msgid "Password rules" msgstr "密码规则" -#: xpack/plugins/change_auth_plan/models.py:249 +#: xpack/plugins/change_auth_plan/models.py:209 +msgid "For security, do not change root user's password" +msgstr "为了安全,禁止更改root用户的密码" + +#: xpack/plugins/change_auth_plan/models.py:212 +msgid "Assets is empty, please add the asset" +msgstr "资产为空,请添加资产" + +#: xpack/plugins/change_auth_plan/models.py:256 msgid "Change auth plan snapshot" msgstr "改密计划快照" -#: xpack/plugins/change_auth_plan/models.py:264 -#: xpack/plugins/change_auth_plan/models.py:415 +#: xpack/plugins/change_auth_plan/models.py:271 +#: xpack/plugins/change_auth_plan/models.py:422 msgid "Change auth plan execution" msgstr "改密计划执行" -#: xpack/plugins/change_auth_plan/models.py:424 +#: xpack/plugins/change_auth_plan/models.py:431 msgid "Change auth plan execution subtask" msgstr "改密计划执行子任务" -#: xpack/plugins/change_auth_plan/models.py:442 +#: xpack/plugins/change_auth_plan/models.py:449 msgid "Authentication failed" msgstr "认证失败" -#: xpack/plugins/change_auth_plan/models.py:444 +#: xpack/plugins/change_auth_plan/models.py:451 msgid "Connection timeout" msgstr "连接超时" -#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_asset_list.html:17 -#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:20 -#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_execution_list.html:17 -#: xpack/plugins/change_auth_plan/views.py:83 -msgid "Plan detail" -msgstr "计划详情" - #: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_asset_list.html:23 #: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:26 #: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_execution_list.html:23 @@ -4873,13 +4895,19 @@ msgstr "添加资产" msgid "Add node to this plan" msgstr "添加节点" +#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_create_update.html:12 +msgid "" +"When the user password on the asset is changed, the action is performed " +"using the admin user associated with the asset" +msgstr "更改资产上的用户密码时,将会使用与该资产关联的管理用户进行操作" + #: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:76 msgid "Length" msgstr "长度" #: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:134 -msgid "Execute plan" -msgstr "执行计划" +msgid "Run plan manually" +msgstr "手动执行计划" #: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:179 #: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_list.html:101 @@ -4915,10 +4943,6 @@ msgstr "计划列表" msgid "Update plan" msgstr "更新计划" -#: xpack/plugins/change_auth_plan/views.py:110 -msgid "plan asset list" -msgstr "计划资产列表" - #: xpack/plugins/change_auth_plan/views.py:140 msgid "Plan execution task list" msgstr "执行任务列表" diff --git a/apps/ops/tasks.py b/apps/ops/tasks.py index 9de1d0437..aef8ea055 100644 --- a/apps/ops/tasks.py +++ b/apps/ops/tasks.py @@ -4,6 +4,7 @@ import subprocess from django.conf import settings from celery import shared_task, subtask +from celery.exceptions import SoftTimeLimitExceeded from django.utils import timezone from common.utils import get_logger, get_object_or_none @@ -38,11 +39,14 @@ def run_ansible_task(tid, callback=None, **kwargs): logger.error("No task found") -@shared_task +@shared_task(soft_time_limit=60) def run_command_execution(cid, **kwargs): execution = get_object_or_none(CommandExecution, id=cid) if execution: - execution.run() + try: + execution.run() + except SoftTimeLimitExceeded: + print("HLLL") else: logger.error("Not found the execution id: {}".format(cid)) diff --git a/apps/ops/templates/ops/command_execution_create.html b/apps/ops/templates/ops/command_execution_create.html index 378acba9d..8352d1607 100644 --- a/apps/ops/templates/ops/command_execution_create.html +++ b/apps/ops/templates/ops/command_execution_create.html @@ -5,17 +5,17 @@ {% block custom_head_css_js %} + + + + - - - -