From 4fd9957becadd6260d74b61e92c0d5a644f014f7 Mon Sep 17 00:00:00 2001 From: ibuler Date: Wed, 20 Feb 2019 17:51:53 +0800 Subject: [PATCH 1/2] =?UTF-8?q?[Update]=20=E4=BF=AE=E6=94=B9celery?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/common/api.py | 41 ++++++++++++----------- apps/locale/zh/LC_MESSAGES/django.mo | Bin 61912 -> 61966 bytes apps/locale/zh/LC_MESSAGES/django.po | 48 +++++++++++++++------------ apps/ops/api/celery.py | 7 ++++ 4 files changed, 55 insertions(+), 41 deletions(-) diff --git a/apps/common/api.py b/apps/common/api.py index 6a2017cd4..cf3855b60 100644 --- a/apps/common/api.py +++ b/apps/common/api.py @@ -199,6 +199,8 @@ class LogTailApi(generics.RetrieveAPIView): buff_size = 1024 * 10 serializer_class = OutputSerializer end = False + mark = '' + log_path = '' def is_file_finish_write(self): return True @@ -206,6 +208,9 @@ class LogTailApi(generics.RetrieveAPIView): def get_log_path(self): raise NotImplementedError() + def get_no_file_message(self, request): + return 'Not found the log' + def filter_line(self, line): """ 过滤行,可能替换一些信息 @@ -214,27 +219,14 @@ class LogTailApi(generics.RetrieveAPIView): """ return line - def get(self, request, *args, **kwargs): - mark = request.query_params.get("mark") or str(uuid.uuid4()) - log_path = self.get_log_path() - - if not log_path or not os.path.isfile(log_path): - if self.is_file_finish_write(): - return Response({ - "data": 'Not found the log', - 'end': True, - 'mark': mark - }) - else: - return Response({"data": "Waiting...\r\n"}, status=200) - - with open(log_path, 'r') as f: - offset = cache.get(mark, 0) + def read_from_file(self): + with open(self.log_path, 'r') as f: + offset = cache.get(self.mark, 0) f.seek(offset) data = f.read(self.buff_size).replace('\n', '\r\n') - mark = str(uuid.uuid4()) - cache.set(mark, f.tell(), 5) + new_mark = str(uuid.uuid4()) + cache.set(new_mark, f.tell(), 5) if data == '' and self.is_file_finish_write(): self.end = True @@ -244,4 +236,15 @@ class LogTailApi(generics.RetrieveAPIView): if line == '': continue _data += new_line + '\r\n' - return Response({"data": _data, 'end': self.end, 'mark': mark}) + return _data, self.end, new_mark + + def get(self, request, *args, **kwargs): + self.mark = request.query_params.get("mark") or str(uuid.uuid4()) + self.log_path = self.get_log_path() + + if not self.log_path or not os.path.isfile(self.log_path): + msg = self.get_no_file_message(self.request) + return Response({"data": msg}, status=200) + + data, end, new_mark = self.read_from_file() + return Response({"data": data, 'end': end, 'mark': new_mark}) diff --git a/apps/locale/zh/LC_MESSAGES/django.mo b/apps/locale/zh/LC_MESSAGES/django.mo index 33091ed2ff7a38ec8bd65ef51693f33807fbc510..d57d38faf3e5fb4c5d0d12efe7f7b903f688b151 100644 GIT binary patch delta 14108 zcmXxr37m~(|HtwBFvb`&m>I(`F++@fvNMCs*w-vW%94g8dqvhbL&%bnu{9OZBBW$W zj3vn)*|P6@CdwKKJ)iGfzsKwU{NLB_cVG9l{O;>M=kUCqqZe|&doj2Fba=oVk3Y}m z_Pi%>cX7}22YB9_wUqU|ktF`Av=kmO= zZOL;zxt$v~vc2bp6IaJbY>I(Q<#nSGN}?C$$5*ikzKJoIj;zPa#A>((>ti;?W4R8V z*BhV3vY3VC@vNDzqvxF_u8tZ%EXDI8umlD&zgLZhc3u|?V`t2Z{jmVPj=FI?hTse{ z10#r+AUpBanVV4?+KC162o}XFsQdpzitUAT^1OV^?-in<1r$e>s162UD~!ez)B=WB zehii-o`||{393R{Pz&FQg>XL>#`Bm5?_n@LGJ`r(|1c5}G_=yP*b8f+b}%2~@C&Sf zdvFNe!=c#sS0R<>X~jp zE$kX<=Z{fmA^3S$@`|VhK8@OW8`L-*P$lkydUP+L&eBlSIMXaY7uE0c=c&I2T4fzJ zVHx7xs8ZcT4fGJJVE(Q=GfY4Y&=}RfJ*wnypdQ&|jKsxQ9M_@tQ%^)KBxr`#9}xORjK(HrT2d+ z4efk0>c(y6KJ&PF(fkwjcHB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#~c>Y2PdI!Ejt#qTg9ktRu<}vevc^lRLsl_kN9OvCfaXwUg zEz~Dq1JozrVARg%IDPMH3I(XxiJI_NR0?mQ9(;ijSo~M_SEkibpMV`v?PE~`e`fJ+ zOeDUI9Wdd78+RfuAfAcJaKYcS5YB&GMuBfRREL%L3f8;GcQ%egy&KE141R~B@H*zl zu9w`7#-SGeJ}RTjFb}3-GdzfmG3v6rMV&F@`@b&*?R*dp!*R$@$li5agsVCDirC~T zX;eFEXIn8hMqG2h<0Y8YQK@f^8uvA`yE(|($DyBv4wEV9x=gc%nW$?w*Wx9poqdiI za6M+n3cuSKqpooSRKJ#1-_z>*qcSqwoPt`|`@fTaJ@AQDthEl?u>kdlQSG--NALob z@~G=>fC^@9vpE)_{dJ3z&FN-}xfC_->g$}p-o~BQaK;*bN1feYRv&T0O&EvTNomxM zYnqKPnD|v}haFH8thD-VW;$x;2d({-PeB9T!Vr9h8aU{t`veR_z5P)*8H-^JT!tFx zym=Ef&J(PO!MEH3>SHKzdsKT5b0{jK{$#6|kLviP#cRy(Q4<|8&!KL`4QtPH+uir# zsD8~*6LmmM(9hzD=4{kFA0Zj?z2y|*sMw4e;1}26UBQeUp;8-s$2}N^dRg;YoFCPm zfH|$6Ss-K5S)pgX%bRX3(^L_WZkPFqG zicz>8!|{id)0DVc)dRKDI@Ic!DOW=t znnJI8JfJ`AQuhAe{y?p?_v*|I1X`xV)oU6^O6ymzXMn*{_SG++Pya`=?ELRA70EV3 zCmwz^Ev&)cfk3^K&_?Y7jZ?ZeY8q&pvYc{*w7(ja2?Uy_Bs6IlsGl;h$v0swc>aHX nTBj9m8rC+g{^ESWp_R&2u2HB`<(k#f`hHfVRobFEW3&7}pkkTr diff --git a/apps/locale/zh/LC_MESSAGES/django.po b/apps/locale/zh/LC_MESSAGES/django.po index 8502e7c3d..28c411839 100644 --- a/apps/locale/zh/LC_MESSAGES/django.po +++ 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-01-28 12:56+0800\n" +"POT-Creation-Date: 2019-02-20 16:46+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: ibuler \n" "Language-Team: Jumpserver team\n" @@ -21,11 +21,11 @@ msgstr "" msgid "You can't update the root node name" msgstr "不能修改根节点名称" -#: assets/api/node.py:281 +#: assets/api/node.py:282 msgid "Update node asset hardware information: {}" msgstr "更新节点资产硬件信息: {}" -#: assets/api/node.py:295 +#: assets/api/node.py:296 msgid "Test if the assets under the node are connectable: {}" msgstr "测试节点下资产是否可连接: {}" @@ -764,48 +764,48 @@ msgstr "获取资产信息失败:{}" msgid "Update some assets hardware info" msgstr "更新资产硬件信息" -#: assets/tasks.py:136 +#: assets/tasks.py:134 msgid "Update asset hardware info: {}" msgstr "更新资产硬件信息: {}" -#: assets/tasks.py:161 +#: assets/tasks.py:159 msgid "Test assets connectivity" msgstr "测试资产可连接性" -#: assets/tasks.py:185 +#: assets/tasks.py:183 msgid "Test assets connectivity: {}" msgstr "测试资产可连接性: {}" -#: assets/tasks.py:224 +#: assets/tasks.py:225 msgid "Test admin user connectivity period: {}" msgstr "定期测试管理账号可连接性: {}" -#: assets/tasks.py:231 +#: assets/tasks.py:232 msgid "Test admin user connectivity: {}" msgstr "测试管理行号可连接性: {}" -#: assets/tasks.py:270 +#: assets/tasks.py:271 msgid "Test system user connectivity: {}" msgstr "测试系统用户可连接性: {}" -#: assets/tasks.py:277 +#: assets/tasks.py:278 msgid "Test system user connectivity: {} => {}" msgstr "测试系统用户可连接性: {} => {}" -#: assets/tasks.py:290 +#: assets/tasks.py:291 msgid "Test system user connectivity period: {}" msgstr "定期测试系统用户可连接性: {}" -#: assets/tasks.py:362 +#: assets/tasks.py:363 msgid "" "Push system user task skip, auto push not enable or protocol is not ssh: {}" msgstr "推送系统用户任务跳过,自动推送没有打开,或协议不是ssh: {}" -#: assets/tasks.py:382 assets/tasks.py:396 +#: assets/tasks.py:383 assets/tasks.py:397 msgid "Push system users to assets: {}" msgstr "推送系统用户到入资产: {}" -#: assets/tasks.py:388 +#: assets/tasks.py:389 msgid "Push system users to asset: {} => {}" msgstr "推送系统用户到入资产: {} => {}" @@ -1092,7 +1092,7 @@ msgstr "选择节点" #: assets/templates/assets/admin_user_detail.html:100 #: assets/templates/assets/asset_detail.html:208 -#: assets/templates/assets/asset_list.html:635 +#: assets/templates/assets/asset_list.html:636 #: assets/templates/assets/cmd_filter_detail.html:106 #: assets/templates/assets/system_user_asset.html:112 #: assets/templates/assets/system_user_detail.html:182 @@ -1312,7 +1312,7 @@ msgstr "重命名成功" msgid "Rename failed, do not change the root node name" msgstr "重命名失败,不能更改root节点的名称" -#: assets/templates/assets/asset_list.html:629 +#: assets/templates/assets/asset_list.html:630 #: assets/templates/assets/system_user_list.html:137 #: users/templates/users/user_detail.html:382 #: users/templates/users/user_detail.html:408 @@ -1322,11 +1322,11 @@ msgstr "重命名失败,不能更改root节点的名称" msgid "Are you sure?" msgstr "你确认吗?" -#: assets/templates/assets/asset_list.html:630 +#: assets/templates/assets/asset_list.html:631 msgid "This will delete the selected assets !!!" msgstr "删除选择资产" -#: assets/templates/assets/asset_list.html:633 +#: assets/templates/assets/asset_list.html:634 #: assets/templates/assets/system_user_list.html:141 #: common/templates/common/terminal_setting.html:163 #: users/templates/users/user_detail.html:386 @@ -1339,16 +1339,16 @@ msgstr "删除选择资产" msgid "Cancel" msgstr "取消" -#: assets/templates/assets/asset_list.html:639 +#: assets/templates/assets/asset_list.html:640 msgid "Asset Deleted." msgstr "已被删除" -#: assets/templates/assets/asset_list.html:640 -#: assets/templates/assets/asset_list.html:645 +#: assets/templates/assets/asset_list.html:641 +#: assets/templates/assets/asset_list.html:646 msgid "Asset Delete" msgstr "删除" -#: assets/templates/assets/asset_list.html:644 +#: assets/templates/assets/asset_list.html:645 msgid "Asset Deleting failed." msgstr "删除失败" @@ -2315,6 +2315,10 @@ msgstr "" "div>
如果你看到了这个页面,证明你访问的不是nginx监听的端口,祝你好运" +#: ops/api/celery.py:54 +msgid "Waiting task start" +msgstr "等待任务开始" + #: ops/models/adhoc.py:38 msgid "Interval" msgstr "间隔" diff --git a/apps/ops/api/celery.py b/apps/ops/api/celery.py index caffff601..6be58770f 100644 --- a/apps/ops/api/celery.py +++ b/apps/ops/api/celery.py @@ -4,6 +4,7 @@ import os import re +from django.utils.translation import ugettext as _ from celery.result import AsyncResult from rest_framework import generics @@ -46,6 +47,12 @@ class CeleryTaskLogApi(LogTailApi): def is_file_finish_write(self): return self.task.ready() + def get_no_file_message(self, request): + if self.mark == 'undefined': + return '.' + else: + return _('Waiting task start') + class CeleryResultApi(generics.RetrieveAPIView): permission_classes = (IsValidUser,) From 859f2d97951ad731f342cd14683d68c2ea770c84 Mon Sep 17 00:00:00 2001 From: ibuler Date: Wed, 20 Feb 2019 19:00:01 +0800 Subject: [PATCH 2/2] =?UTF-8?q?[Update]=20=E6=94=AF=E6=8C=81telnet?= =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E6=AD=A3=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/common/forms.py | 4 +++ apps/jumpserver/conf.py | 1 + apps/jumpserver/settings.py | 1 + apps/locale/zh/LC_MESSAGES/django.mo | Bin 61966 -> 62169 bytes apps/locale/zh/LC_MESSAGES/django.po | 47 ++++++++++++++++----------- 5 files changed, 34 insertions(+), 19 deletions(-) diff --git a/apps/common/forms.py b/apps/common/forms.py index 33ee48f03..36ab924b7 100644 --- a/apps/common/forms.py +++ b/apps/common/forms.py @@ -159,6 +159,10 @@ class TerminalSettingForm(BaseForm): help_text=_("Units: days, Session, record, command will be delete " "if more than duration, only in database") ) + TERMINAL_TELNET_REGEX = forms.CharField( + required=False, label=_("Telnet login regex"), + help_text=_("ex: Last\s*login|success|成功") + ) class TerminalCommandStorage(BaseForm): diff --git a/apps/jumpserver/conf.py b/apps/jumpserver/conf.py index 971184c31..757af26fe 100644 --- a/apps/jumpserver/conf.py +++ b/apps/jumpserver/conf.py @@ -330,6 +330,7 @@ defaults = { 'TERMINAL_ASSET_LIST_PAGE_SIZE': 'auto', 'TERMINAL_SESSION_KEEP_DURATION': 9999, 'TERMINAL_HOST_KEY': '', + 'TERMINAL_TELNET_REGEX': '', 'SECURITY_MFA_AUTH': False, 'SECURITY_LOGIN_LIMIT_COUNT': 7, 'SECURITY_LOGIN_LIMIT_TIME': 30, diff --git a/apps/jumpserver/settings.py b/apps/jumpserver/settings.py index 40f757d39..f6db4e37d 100644 --- a/apps/jumpserver/settings.py +++ b/apps/jumpserver/settings.py @@ -555,3 +555,4 @@ SWAGGER_SETTINGS = { # Default email suffix EMAIL_SUFFIX = CONFIG.EMAIL_SUFFIX +TERMINAL_TELNET_REGEX = CONFIG.TERMINAL_TELNET_REGEX diff --git a/apps/locale/zh/LC_MESSAGES/django.mo b/apps/locale/zh/LC_MESSAGES/django.mo index d57d38faf3e5fb4c5d0d12efe7f7b903f688b151..6b3607f4b112feac7e3c1d6d04554d7cf13aca31 100644 GIT binary patch delta 15714 zcmaLed6>@S+sE91Pev7< z@A2sq;(6uqcsb7t7WTZ?>MQGcue9~NJY0a|FtwfM&A_EN8Edrnyn_MHTZ23B>5iTk zU&!-XcOp;yz%Fjw`dvLQinu$*;9xAmRNiU*PuD*YIc%>whBLocn}QaQjXI*<7>2_z9&=F( zm}B`@u_E!CsD3+9Cv*{-Vkt8xGXr-<3LF|Rv!A7it zUtl%7f{$YCJuC{JLr&HE6WOHKxwmsED*qcc#P)sM0;Zr&>N(U2%bF$Q;FIXr^e`AyVG-$pGc zB6y#hs0`{zl2HvSqjpvuHBlXlo1#vpC2AqPumbi+4Lk{J<7}(nh8l0T)gQ3@Db$Gt zFH_J7Tt_wh+YG(m4Ok3yl;u%JpN?8s4(euWg|T=y>Zk{y7B(I=-Za#LXJH(^fjX&; zSXR&fZV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#{MJ=b&^e)eZ%rUdT#t7-e0 zzdN&Ho%^_=&m3we(rPK?cyj4{Kg++ue}rQ_ZQ*)(KcP`#pq<~OQN_SVe*Z>MHJVVf zwblHbn!EWv!S^)ZKIE6YgV^A@hASJCM}Z| zQKt@9YLNMz@-1piAWq|(N_^Ds)U;w)DX!|X%pcb@Evzxo1nQOcKW#cDGGNzqeS@FT zEH&~|+I`D6f;#K{5zW#nr~SV=!>PB4s|We+p?ri|`qLuR-`y-Nu++cPtYY97KdE_C z{j=1lPs>i$x*Faf_cAU1#DUm`uRis-mc;iDe{l2o_V-e%XICns{v=sTi(P#6(VJ)l zZo3>pVz!%;A{VS^NxX2ev_<X+f$$UmP|D^CB@(xQCx$c(d|9;ElqevKBXftvn9EmD%MlfPmk-b3AV%B`)gMlIqm zYLOcKF_}wND}OGO-}6tmh)?>4E1^V}tjz|>Qz>WSA*v?(2`v)?hx{fjW1=sU4b)F~x4&J3s4p#Q_TE@ifr!>M^s`dMn2a>Dk-)Wgz zIg7TBC~cofn9DbWdPQTLbFTUHz4&ck*@%jH9s%ex@^NpZo8NT|7(`Pfe`FzjQ<|n?f;kVbn z)23GRO0xQNq}6|)E`C\n" "Language-Team: Jumpserver team\n" @@ -2003,45 +2003,54 @@ msgstr "" "单位:天。 会话、录像、命令记录超过该时长将会被删除(仅影响数据库存储, oss等不" "受影响)" -#: common/forms.py:171 +#: common/forms.py:163 +msgid "Telnet login regex" +msgstr "Telnet 成功正则表达式" + +#: common/forms.py:164 +msgid "ex: Last\\s*login|success|成功" +msgstr "" +"登录telnet服务器成功后的提示正则表达式,如: Last\\s*login|success|成功 " + +#: common/forms.py:175 msgid "MFA Secondary certification" msgstr "MFA 二次认证" -#: common/forms.py:173 +#: common/forms.py:177 msgid "" "After opening, the user login must use MFA secondary authentication (valid " "for all users, including administrators)" msgstr "开启后,用户登录必须使用MFA二次认证(对所有用户有效,包括管理员)" -#: common/forms.py:179 +#: common/forms.py:183 msgid "Limit the number of login failures" msgstr "限制登录失败次数" -#: common/forms.py:183 +#: common/forms.py:187 msgid "No logon interval" msgstr "禁止登录时间间隔" -#: common/forms.py:185 +#: common/forms.py:189 msgid "" "Tip: (unit/minute) if the user has failed to log in for a limited number of " "times, no login is allowed during this time interval." msgstr "" "提示:(单位:分)当用户登录失败次数达到限制后,那么在此时间间隔内禁止登录" -#: common/forms.py:191 +#: common/forms.py:195 msgid "Connection max idle time" msgstr "SSH最大空闲时间" -#: common/forms.py:193 +#: common/forms.py:197 msgid "" "If idle time more than it, disconnect connection(only ssh now) Unit: minute" msgstr "提示:(单位:分)如果超过该配置没有操作,连接会被断开(仅ssh)" -#: common/forms.py:199 +#: common/forms.py:203 msgid "Password expiration time" msgstr "密码过期时间" -#: common/forms.py:202 +#: common/forms.py:206 msgid "" "Tip: (unit: day) If the user does not update the password during the time, " "the user password will expire failure;The password expiration reminder mail " @@ -2051,45 +2060,45 @@ msgstr "" "提示:(单位:天)如果用户在此期间没有更新密码,用户密码将过期失效; 密码过期" "提醒邮件将在密码过期前5天内由系统(每天)自动发送给用户" -#: common/forms.py:211 +#: common/forms.py:215 msgid "Password minimum length" msgstr "密码最小长度 " -#: common/forms.py:215 +#: common/forms.py:219 msgid "Must contain capital letters" msgstr "必须包含大写字母" -#: common/forms.py:217 +#: common/forms.py:221 msgid "" "After opening, the user password changes and resets must contain uppercase " "letters" msgstr "开启后,用户密码修改、重置必须包含大写字母" -#: common/forms.py:222 +#: common/forms.py:226 msgid "Must contain lowercase letters" msgstr "必须包含小写字母" -#: common/forms.py:223 +#: common/forms.py:227 msgid "" "After opening, the user password changes and resets must contain lowercase " "letters" msgstr "开启后,用户密码修改、重置必须包含小写字母" -#: common/forms.py:228 +#: common/forms.py:232 msgid "Must contain numeric characters" msgstr "必须包含数字字符" -#: common/forms.py:229 +#: common/forms.py:233 msgid "" "After opening, the user password changes and resets must contain numeric " "characters" msgstr "开启后,用户密码修改、重置必须包含数字字符" -#: common/forms.py:234 +#: common/forms.py:238 msgid "Must contain special characters" msgstr "必须包含特殊字符" -#: common/forms.py:235 +#: common/forms.py:239 msgid "" "After opening, the user password changes and resets must contain special " "characters"