Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
J
jumpserver
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ops
jumpserver
Commits
178055eb
Commit
178055eb
authored
Jan 21, 2019
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Update] 修改任务小写
parent
01a101a7
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
39 additions
and
48 deletions
+39
-48
django.mo
apps/locale/zh/LC_MESSAGES/django.mo
+0
-0
django.po
apps/locale/zh/LC_MESSAGES/django.po
+34
-30
callback.py
apps/ops/ansible/callback.py
+0
-12
adhoc.py
apps/ops/models/adhoc.py
+2
-3
utils.py
apps/ops/utils.py
+1
-1
v1.py
apps/terminal/serializers/v1.py
+2
-2
No files found.
apps/locale/zh/LC_MESSAGES/django.mo
View file @
178055eb
No preview for this file type
apps/locale/zh/LC_MESSAGES/django.po
View file @
178055eb
...
...
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Jumpserver 0.3.3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-01-
16 17:58
+0800\n"
"POT-Creation-Date: 2019-01-
21 17:40
+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: ibuler <ibuler@qq.com>\n"
"Language-Team: Jumpserver team<ibuler@qq.com>\n"
...
...
@@ -120,7 +120,7 @@ msgstr "端口"
#: perms/templates/perms/asset_permission_create_update.html:45
#: perms/templates/perms/asset_permission_list.html:56
#: perms/templates/perms/asset_permission_list.html:125
#: terminal/backends/command/models.py:13 terminal/models.py:1
43
#: terminal/backends/command/models.py:13 terminal/models.py:1
55
#: terminal/templates/terminal/command_list.html:40
#: terminal/templates/terminal/command_list.html:73
#: terminal/templates/terminal/session_list.html:41
...
...
@@ -158,8 +158,8 @@ msgstr "不能包含特殊字符"
#: perms/templates/perms/asset_permission_detail.html:62
#: perms/templates/perms/asset_permission_list.html:53
#: perms/templates/perms/asset_permission_list.html:72
#: perms/templates/perms/asset_permission_user.html:54 terminal/models.py:2
1
#: terminal/models.py:2
12
terminal/templates/terminal/terminal_detail.html:43
#: perms/templates/perms/asset_permission_user.html:54 terminal/models.py:2
2
#: terminal/models.py:2
33
terminal/templates/terminal/terminal_detail.html:43
#: terminal/templates/terminal/terminal_list.html:29 users/models/group.py:14
#: users/models/user.py:55 users/templates/users/_select_user_modal.html:13
#: users/templates/users/user_detail.html:63
...
...
@@ -427,7 +427,7 @@ msgstr "创建日期"
#: assets/templates/assets/user_asset_list.html:159 common/models.py:34
#: ops/models/adhoc.py:43 orgs/models.py:17 perms/models.py:39
#: perms/models.py:92 perms/templates/perms/asset_permission_detail.html:102
#: terminal/models.py:3
1
terminal/templates/terminal/terminal_detail.html:63
#: terminal/models.py:3
2
terminal/templates/terminal/terminal_detail.html:63
#: users/models/group.py:15 users/models/user.py:88
#: users/templates/users/user_detail.html:127
#: users/templates/users/user_group_detail.html:67
...
...
@@ -461,7 +461,7 @@ msgstr "可连接"
#: assets/models/asset.py:119 assets/models/base.py:36
msgid "Unknown"
msgstr ""
msgstr "
未知
"
#: assets/models/base.py:25
msgid "SSH private key"
...
...
@@ -534,7 +534,7 @@ msgid "Regex"
msgstr "正则表达式"
#: assets/models/cmd_filter.py:36 ops/models/command.py:21
#: ops/templates/ops/command_execution_list.html:60 terminal/models.py:1
49
#: ops/templates/ops/command_execution_list.html:60 terminal/models.py:1
61
#: terminal/templates/terminal/command_list.html:55
#: terminal/templates/terminal/command_list.html:71
#: terminal/templates/terminal/session_detail.html:48
...
...
@@ -638,7 +638,7 @@ msgstr "默认资产组"
#: perms/templates/perms/asset_permission_create_update.html:41
#: perms/templates/perms/asset_permission_list.html:54
#: perms/templates/perms/asset_permission_list.html:119 templates/index.html:87
#: terminal/backends/command/models.py:12 terminal/models.py:1
42
#: terminal/backends/command/models.py:12 terminal/models.py:1
54
#: terminal/templates/terminal/command_list.html:32
#: terminal/templates/terminal/command_list.html:72
#: terminal/templates/terminal/session_list.html:33
...
...
@@ -726,7 +726,7 @@ msgstr "登录模式"
#: perms/templates/perms/asset_permission_list.html:58
#: perms/templates/perms/asset_permission_list.html:79
#: perms/templates/perms/asset_permission_list.html:131 templates/_nav.html:25
#: terminal/backends/command/models.py:14 terminal/models.py:1
44
#: terminal/backends/command/models.py:14 terminal/models.py:1
56
#: terminal/templates/terminal/command_list.html:48
#: terminal/templates/terminal/command_list.html:74
#: terminal/templates/terminal/session_list.html:49
...
...
@@ -1661,7 +1661,7 @@ msgstr "系统用户资产"
#: audits/templates/audits/ftp_log_list.html:73
#: audits/templates/audits/operate_log_list.html:70
#: audits/templates/audits/password_change_log_list.html:52
#: terminal/models.py:1
46
terminal/templates/terminal/session_list.html:74
#: terminal/models.py:1
58
terminal/templates/terminal/session_list.html:74
#: terminal/templates/terminal/terminal_detail.html:47
msgid "Remote addr"
msgstr "远端地址"
...
...
@@ -1704,7 +1704,7 @@ msgstr "修改者"
#: ops/templates/ops/adhoc_history_detail.html:61
#: ops/templates/ops/command_execution_list.html:65
#: ops/templates/ops/task_history.html:58 perms/models.py:35
#: perms/templates/perms/asset_permission_detail.html:86 terminal/models.py:1
53
#: perms/templates/perms/asset_permission_detail.html:86 terminal/models.py:1
65
#: terminal/templates/terminal/session_list.html:78
msgid "Date start"
msgstr "开始日期"
...
...
@@ -1836,10 +1836,6 @@ msgstr "创建成功"
msgid "Delete succeed"
msgstr "删除成功"
#: common/api.py:221
msgid "Waiting ...\n"
msgstr ""
#: common/const.py:6
#, python-format
msgid "<b>%(name)s</b> was created successfully"
...
...
@@ -2218,7 +2214,7 @@ msgid "Password check rule"
msgstr "密码校验规则"
#: common/templates/common/terminal_setting.html:76 terminal/forms.py:27
#: terminal/models.py:2
5
#: terminal/models.py:2
6
msgid "Command storage"
msgstr "命令存储"
...
...
@@ -2235,7 +2231,7 @@ msgid "Add"
msgstr "添加"
#: common/templates/common/terminal_setting.html:98 terminal/forms.py:32
#: terminal/models.py:2
6
#: terminal/models.py:2
7
msgid "Replay storage"
msgstr "录像存储"
...
...
@@ -2324,6 +2320,14 @@ msgstr "Become"
msgid "Create by"
msgstr "创建者"
#: ops/models/adhoc.py:223
msgid "{} Start task: {}"
msgstr "{} 任务开始: {}"
#: ops/models/adhoc.py:226
msgid "{} Task finish"
msgstr "{} 任务结束"
#: ops/models/adhoc.py:324
msgid "Start time"
msgstr "开始时间"
...
...
@@ -3073,55 +3077,55 @@ msgstr ""
"录像文件支持存储到服务器端硬盘、AWS S3、 阿里云 OSS 中,默认存储到服务器端硬"
"盘, 更多查看文档"
#: terminal/models.py:2
2
#: terminal/models.py:2
3
msgid "Remote Address"
msgstr "远端地址"
#: terminal/models.py:2
3
#: terminal/models.py:2
4
msgid "SSH Port"
msgstr "SSH端口"
#: terminal/models.py:2
4
#: terminal/models.py:2
5
msgid "HTTP Port"
msgstr "HTTP端口"
#: terminal/models.py:1
13
#: terminal/models.py:1
25
msgid "Session Online"
msgstr "在线会话"
#: terminal/models.py:1
14
#: terminal/models.py:1
26
msgid "CPU Usage"
msgstr "CPU使用"
#: terminal/models.py:1
15
#: terminal/models.py:1
27
msgid "Memory Used"
msgstr "内存使用"
#: terminal/models.py:1
16
#: terminal/models.py:1
28
msgid "Connections"
msgstr "连接数"
#: terminal/models.py:1
17
#: terminal/models.py:1
29
msgid "Threads"
msgstr "线程数"
#: terminal/models.py:1
18
#: terminal/models.py:1
30
msgid "Boot Time"
msgstr "运行时间"
#: terminal/models.py:1
48
terminal/templates/terminal/session_list.html:104
#: terminal/models.py:1
60
terminal/templates/terminal/session_list.html:104
msgid "Replay"
msgstr "回放"
#: terminal/models.py:1
52
#: terminal/models.py:1
64
msgid "Date last active"
msgstr "最后活跃日期"
#: terminal/models.py:1
54
#: terminal/models.py:1
66
msgid "Date end"
msgstr "结束日期"
#: terminal/models.py:2
13
#: terminal/models.py:2
34
msgid "Args"
msgstr "参数"
...
...
apps/ops/ansible/callback.py
View file @
178055eb
...
...
@@ -118,18 +118,6 @@ class AdHocResultCallback(CallbackMixin, CallbackModule, CMDCallBackModule):
self
.
gather_result
(
"unreachable"
,
result
)
super
()
.
v2_runner_on_unreachable
(
result
)
def
on_playbook_start
(
self
,
name
):
date_start
=
datetime
.
datetime
.
now
()
.
strftime
(
'
%
Y-
%
m-
%
d
%
H:
%
M:
%
S'
)
self
.
display
(
"{} Start task: {}
\r\n
"
.
format
(
date_start
,
name
)
)
def
on_playbook_end
(
self
,
name
):
date_finished
=
datetime
.
datetime
.
now
()
.
strftime
(
'
%
Y-
%
m-
%
d
%
H:
%
M:
%
S'
)
self
.
display
(
"{} Task finish
\r\n
"
.
format
(
date_finished
)
)
def
display_skipped_hosts
(
self
):
pass
...
...
apps/ops/models/adhoc.py
View file @
178055eb
...
...
@@ -220,10 +220,10 @@ class AdHoc(models.Model):
time_start
=
time
.
time
()
try
:
date_start
=
datetime
.
datetime
.
now
()
.
strftime
(
'
%
Y-
%
m-
%
d
%
H:
%
M:
%
S'
)
print
(
"{} Start task: {}
\r\n
"
.
format
(
date_start
,
self
.
task
.
name
))
print
(
_
(
"{} Start task: {}"
)
.
format
(
date_start
,
self
.
task
.
name
))
raw
,
summary
=
self
.
_run_only
()
date_end
=
datetime
.
datetime
.
now
()
.
strftime
(
'
%
Y-
%
m-
%
d
%
H:
%
M:
%
S'
)
print
(
"
\r\n
{} Task finished"
.
format
(
date_end
))
print
(
_
(
"{} Task finish"
)
.
format
(
date_end
))
history
.
is_finished
=
True
if
summary
.
get
(
'dark'
):
history
.
is_success
=
False
...
...
@@ -235,7 +235,6 @@ class AdHoc(models.Model):
except
Exception
as
e
:
return
{},
{
"dark"
:
{
"all"
:
str
(
e
)},
"contacted"
:
[]}
finally
:
# f.close()
history
.
date_finished
=
timezone
.
now
()
history
.
timedelta
=
time
.
time
()
-
time_start
history
.
save
()
...
...
apps/ops/utils.py
View file @
178055eb
...
...
@@ -48,7 +48,7 @@ def update_or_create_ansible_task(
hosts_same
=
old_hosts
==
new_hosts
if
not
adhoc
or
adhoc
!=
new_adhoc
or
not
hosts_same
:
logger
.
info
(
_
(
"Update task content: {}"
)
.
format
(
task_name
))
logger
.
debug
(
_
(
"Update task content: {}"
)
.
format
(
task_name
))
new_adhoc
.
save
()
new_adhoc
.
hosts
.
set
(
hosts
)
task
.
latest_adhoc
=
new_adhoc
...
...
apps/terminal/serializers/v1.py
View file @
178055eb
...
...
@@ -9,7 +9,7 @@ from ..models import Terminal, Status, Session, Task
class
TerminalSerializer
(
serializers
.
ModelSerializer
):
session_online
=
serializers
.
SerializerMethodField
()
is_alive
=
serializers
.
BooleanField
()
is_alive
=
serializers
.
BooleanField
(
read_only
=
True
)
class
Meta
:
model
=
Terminal
...
...
@@ -25,7 +25,7 @@ class TerminalSerializer(serializers.ModelSerializer):
class
SessionSerializer
(
BulkSerializerMixin
,
serializers
.
ModelSerializer
):
command_amount
=
serializers
.
IntegerField
()
command_amount
=
serializers
.
IntegerField
(
read_only
=
True
)
class
Meta
:
model
=
Session
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment