Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
coco
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
coco
Commits
eb0ab56c
Unverified
Commit
eb0ab56c
authored
Feb 22, 2019
by
老广
Committed by
GitHub
Feb 22, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #189 from jumpserver/dev
Dev
parents
4b14b524
8154d9c6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
117 additions
and
101 deletions
+117
-101
interactive.py
coco/interactive.py
+5
-2
coco.mo
locale/en/LC_MESSAGES/coco.mo
+0
-0
coco.po
locale/en/LC_MESSAGES/coco.po
+54
-47
coco.mo
locale/zh_CN/LC_MESSAGES/coco.mo
+0
-0
coco.po
locale/zh_CN/LC_MESSAGES/coco.po
+57
-51
requirements.txt
requirements/requirements.txt
+1
-1
No files found.
coco/interactive.py
View file @
eb0ab56c
...
...
@@ -80,9 +80,11 @@ class InteractiveServer:
#
def
display_banner
(
self
):
default_title
=
_
(
'Welcome to use Jumpserver open source fortress system'
)
header_title
=
config
.
get
(
'HEADER_TITLE'
)
or
default_title
self
.
client
.
send
(
char
.
CLEAR_CHAR
)
self
.
display_logo
()
header
=
_
(
"
\n
{T}{T}{title} {user},
Welcome to use Jumpserver open source fortress system
{end}{R}{R}"
)
header
=
_
(
"
\n
{T}{T}{title} {user},
{header_title}
{end}{R}{R}"
)
menu
=
[
_
(
"{T}1) Enter {green}ID{end} directly login or enter {green}part IP, Hostname, Comment{end} to search login(if unique).{R}"
),
_
(
"{T}2) Enter {green}/{end} + {green}IP, Hostname{end} or {green}Comment {end} search, such as: /ip.{R}"
),
...
...
@@ -95,7 +97,8 @@ class InteractiveServer:
_
(
"{T}0) Enter {green}q{end} exit.{R}"
)
]
self
.
client
.
send_unicode
(
header
.
format
(
title
=
"
\033
[1;32m"
,
user
=
self
.
client
.
user
,
end
=
"
\033
[0m"
,
title
=
"
\033
[1;32m"
,
user
=
self
.
client
.
user
,
header_title
=
header_title
,
end
=
"
\033
[0m"
,
T
=
'
\t
'
,
R
=
'
\r\n\r
'
))
for
item
in
menu
:
...
...
locale/en/LC_MESSAGES/coco.mo
View file @
eb0ab56c
No preview for this file type
locale/en/LC_MESSAGES/coco.po
View file @
eb0ab56c
...
...
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 201
8-12-21 16:48
+0800\n"
"POT-Creation-Date: 201
9-02-21 20:00
+0800\n"
"PO-Revision-Date: 2018-08-10 10:42+0800\n"
"Last-Translator: BaiJiangjie <bugatti_it@163.com>\n"
"Language-Team: Language locale/en/LC\n"
...
...
@@ -16,159 +16,166 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: coco/app.py:1
45
#: coco/app.py:1
80
msgid "Connect idle more than {} minutes, disconnect"
msgstr ""
#: coco/interactive.py:84
#: coco/interactive.py:83
msgid "Welcome to use Jumpserver open source fortress system"
msgstr ""
#: coco/interactive.py:87
#, python-brace-format
msgid ""
"\n"
"{T}{T}{title} {user}, Welcome to use Jumpserver open source fortress system "
"{end}{R}{R}"
"{T}{T}{title} {user}, {header_title} {end}{R}{R}"
msgstr ""
#: coco/interactive.py:8
6
#: coco/interactive.py:8
9
#, python-brace-format
msgid ""
"{T}1) Enter {green}ID{end} directly login or enter {green}part IP, Hostname, "
"Comment{end} to search login(if unique).{R}"
msgstr ""
#: coco/interactive.py:
87
#: coco/interactive.py:
90
#, python-brace-format
msgid ""
"{T}2) Enter {green}/{end} + {green}IP, Hostname{end} or {green}Comment {end} "
"search, such as: /ip.{R}"
msgstr ""
#: coco/interactive.py:
88
#: coco/interactive.py:
91
#, python-brace-format
msgid "{T}3) Enter {green}p{end} to display the host you have permission.{R}"
msgstr ""
#: coco/interactive.py:
89
#: coco/interactive.py:
92
#, python-brace-format
msgid ""
"{T}4) Enter {green}g{end} to display the node that you have permission.{R}"
msgstr ""
#: coco/interactive.py:9
0
#: coco/interactive.py:9
3
#, python-brace-format
msgid ""
"{T}5) Enter {green}g{end} + {green}NodeID{end} to display the host under the "
"node, such as g1.{R}"
msgstr ""
#: coco/interactive.py:9
1
#: coco/interactive.py:9
4
#, python-brace-format
msgid "{T}6) Enter {green}s{end} Chinese-english switch.{R}"
msgstr ""
#: coco/interactive.py:9
2
#: coco/interactive.py:9
5
#, python-brace-format
msgid "{T}7) Enter {green}h{end} help.{R}"
msgstr ""
#: coco/interactive.py:9
3
#: coco/interactive.py:9
6
#, python-brace-format
msgid "{T}8) Enter {green}r{end} to refresh your assets and nodes.{R}"
msgstr ""
#: coco/interactive.py:9
4
#: coco/interactive.py:9
7
#, python-brace-format
msgid "{T}0) Enter {green}q{end} exit.{R}"
msgstr ""
#: coco/interactive.py:15
5
#: coco/interactive.py:15
9
msgid "Terminal does not support login rdp, please use web terminal to access"
msgstr ""
#: coco/interactive.py:21
7
#: coco/interactive.py:21
1
msgid "No Assets"
msgstr ""
#: coco/interactive.py:2
80
msgid "
Tips: Enter the asset ID and log directly into the asset.
"
#: coco/interactive.py:2
66
msgid "
ID
"
msgstr ""
#: coco/interactive.py:2
81
msgid "
Page up: P/p
"
#: coco/interactive.py:2
66
msgid "
Hostname
"
msgstr ""
#: coco/interactive.py:2
82
msgid "
Page down: Enter|N/n
"
#: coco/interactive.py:2
66
msgid "
IP
"
msgstr ""
#: coco/interactive.py:2
83
msgid "
BACK: b/q
"
#: coco/interactive.py:2
66
msgid "
LoginAs
"
msgstr ""
#: coco/interactive.py:
303
msgid "
ID
"
#: coco/interactive.py:
280
msgid "
Comment
"
msgstr ""
#: coco/interactive.py:
303
msgid "
Hostname
"
#: coco/interactive.py:
290
msgid "
Page: {}, Count: {}, Total Page: {}, Total Count: {}
"
msgstr ""
#: coco/interactive.py:
303
msgid "
IP
"
#: coco/interactive.py:
296
msgid "
Tips: Enter the asset ID and log directly into the asset.
"
msgstr ""
#: coco/interactive.py:
303
msgid "
LoginAs
"
#: coco/interactive.py:
298
msgid "
Page up: P/p
"
msgstr ""
#: coco/interactive.py:
317
msgid "
Comment
"
#: coco/interactive.py:
299
msgid "
Page down: Enter|N/n
"
msgstr ""
#: coco/interactive.py:3
26
msgid "
Page: {}, Count: {}, Total Page: {}, Total Count: {}
"
#: coco/interactive.py:3
00
msgid "
BACK: b/q
"
msgstr ""
#: coco/interactive.py:3
98
#: coco/interactive.py:3
73
msgid "No Nodes"
msgstr ""
#: coco/interactive.py:
402
#: coco/interactive.py:
377
msgid "Node: [ ID.Name(Asset amount) ]"
msgstr ""
#: coco/interactive.py:
404
#: coco/interactive.py:
379
msgid "Tips: Enter g+NodeID to display the host under the node, such as g1"
msgstr ""
#: coco/interactive.py:
412
#: coco/interactive.py:
387
msgid "There is no matched node, please re-enter"
msgstr ""
#: coco/interactive.py:4
42
#: coco/interactive.py:4
17
msgid "Select a login:: "
msgstr ""
#: coco/interactive.py:4
65
#: coco/interactive.py:4
40
msgid "No system user"
msgstr ""
#: coco/models.py:2
4
2
#: coco/models.py:2
5
2
msgid ""
"Warning: Failed to load filter rule, please press Ctrl + D to exit retry."
msgstr ""
#: coco/models.py:2
5
1
#: coco/models.py:2
6
1
msgid "Command `{}` is forbidden ........"
msgstr ""
#: coco/proxy.py:89
#: coco/proxy.py:76
msgid "Connect with api server failed"
msgstr ""
#: coco/proxy.py:104
msgid "No permission"
msgstr ""
#: coco/proxy.py:1
31
#: coco/proxy.py:1
47
msgid "Connecting to {}@{} {:.1f}"
msgstr ""
#: coco/session.py:1
43
#: coco/session.py:1
54
msgid "Terminated by administrator"
msgstr ""
locale/zh_CN/LC_MESSAGES/coco.mo
View file @
eb0ab56c
No preview for this file type
locale/zh_CN/LC_MESSAGES/coco.po
View file @
eb0ab56c
...
...
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 201
8-12-21 16:48
+0800\n"
"POT-Creation-Date: 201
9-02-21 20:00
+0800\n"
"PO-Revision-Date: 2018-08-10 10:42+0800\n"
"Last-Translator: BaiJiangjie <bugatti_it@163.com>\n"
"Language-Team: Language locale/zh\n"
...
...
@@ -16,21 +16,23 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: coco/app.py:1
45
#: coco/app.py:1
80
msgid "Connect idle more than {} minutes, disconnect"
msgstr "空闲时间超过 {} 分钟,断开连接"
#: coco/interactive.py:84
#, python-brace-format
#: coco/interactive.py:83
msgid "Welcome to use Jumpserver open source fortress system"
msgstr "欢迎使用Jumpserver开源跳板机系统"
#: coco/interactive.py:87
msgid ""
"\n"
"{T}{T}{title} {user}, Welcome to use Jumpserver open source fortress system "
"{end}{R}{R}"
"{T}{T}{title} {user}, {header_title} {end}{R}{R}"
msgstr ""
"\n"
"{T}{T}{title} {user},
欢迎使用Jumpserver开源跳板机系统
{end}{R}{R}"
"{T}{T}{title} {user},
{header_title}
{end}{R}{R}"
#: coco/interactive.py:8
6
#: coco/interactive.py:8
9
#, python-brace-format
msgid ""
"{T}1) Enter {green}ID{end} directly login or enter {green}part IP, Hostname, "
...
...
@@ -39,7 +41,7 @@ msgstr ""
"{T}1) 输入 {green}ID{end} 直接登录 或 输入{green}部分 IP,主机名,备注{end} 进"
"行搜索登录(如果唯一).{R}"
#: coco/interactive.py:
87
#: coco/interactive.py:
90
#, python-brace-format
msgid ""
"{T}2) Enter {green}/{end} + {green}IP, Hostname{end} or {green}Comment {end} "
...
...
@@ -48,18 +50,18 @@ msgstr ""
"{T}2) 输入 {green}/{end} + {green}IP, 主机名{end} or {green}备注 {end}搜索. "
"如: /ip{R}"
#: coco/interactive.py:
88
#: coco/interactive.py:
91
#, python-brace-format
msgid "{T}3) Enter {green}p{end} to display the host you have permission.{R}"
msgstr "{T}3) 输入 {green}p{end} 显示您有权限的主机.{R}"
#: coco/interactive.py:
89
#: coco/interactive.py:
92
#, python-brace-format
msgid ""
"{T}4) Enter {green}g{end} to display the node that you have permission.{R}"
msgstr "{T}4) 输入 {green}g{end} 显示您有权限的节点.{R}"
#: coco/interactive.py:9
0
#: coco/interactive.py:9
3
#, python-brace-format
msgid ""
"{T}5) Enter {green}g{end} + {green}NodeID{end} to display the host under the "
...
...
@@ -67,116 +69,120 @@ msgid ""
msgstr ""
"{T}5) 输入 {green}g{end} + {green}节点ID{end} 显示节点下主机. 如: g1{R}"
#: coco/interactive.py:9
1
#: coco/interactive.py:9
4
#, python-brace-format
msgid "{T}6) Enter {green}s{end} Chinese-english switch.{R}"
msgstr "{T}6) 输入 {green}s{end} 中/英文切换.{R}"
#: coco/interactive.py:9
2
#: coco/interactive.py:9
5
#, python-brace-format
msgid "{T}7) Enter {green}h{end} help.{R}"
msgstr "{T}7) 输入 {green}h{end} 帮助.{R}"
#: coco/interactive.py:9
3
#: coco/interactive.py:9
6
#, python-brace-format
msgid "{T}8) Enter {green}r{end} to refresh your assets and nodes.{R}"
msgstr "{T}0) 输入 {green}r{end} 刷新最新的机器和节点信息.{R}"
#: coco/interactive.py:9
4
#: coco/interactive.py:9
7
#, python-brace-format
msgid "{T}0) Enter {green}q{end} exit.{R}"
msgstr "{T}0) 输入 {green}q{end} 退出.{R}"
#: coco/interactive.py:15
5
#: coco/interactive.py:15
9
msgid "Terminal does not support login rdp, please use web terminal to access"
msgstr "终端不支持登录windows, 请使用web terminal访问"
#: coco/interactive.py:21
7
#: coco/interactive.py:21
1
msgid "No Assets"
msgstr "没有资产"
#: coco/interactive.py:280
msgid "Tips: Enter the asset ID and log directly into the asset."
msgstr "提示: 输入资产ID,直接登录资产."
#: coco/interactive.py:281
msgid "Page up: P/p"
msgstr "上一页: P/p"
#: coco/interactive.py:282
msgid "Page down: Enter|N/n"
msgstr "下一页: Enter|N/n"
#: coco/interactive.py:283
msgid "BACK: b/q"
msgstr "返回: B/b"
#: coco/interactive.py:303
#: coco/interactive.py:266
msgid "ID"
msgstr ""
#: coco/interactive.py:
303
#: coco/interactive.py:
266
msgid "Hostname"
msgstr "主机名"
#: coco/interactive.py:
303
#: coco/interactive.py:
266
msgid "IP"
msgstr ""
#: coco/interactive.py:
303
#: coco/interactive.py:
266
msgid "LoginAs"
msgstr "登录用户"
#: coco/interactive.py:
317
#: coco/interactive.py:
280
msgid "Comment"
msgstr "备注"
#: coco/interactive.py:
326
#: coco/interactive.py:
290
msgid "Page: {}, Count: {}, Total Page: {}, Total Count: {}"
msgstr "页码: {}, 数量: {}, 总页数: {}, 总数量: {}"
#: coco/interactive.py:398
#: coco/interactive.py:296
msgid "Tips: Enter the asset ID and log directly into the asset."
msgstr "提示: 输入资产ID,直接登录资产."
#: coco/interactive.py:298
msgid "Page up: P/p"
msgstr "上一页: P/p"
#: coco/interactive.py:299
msgid "Page down: Enter|N/n"
msgstr "下一页: Enter|N/n"
#: coco/interactive.py:300
msgid "BACK: b/q"
msgstr "返回: B/b"
#: coco/interactive.py:373
msgid "No Nodes"
msgstr "没有节点"
#: coco/interactive.py:
402
#: coco/interactive.py:
377
msgid "Node: [ ID.Name(Asset amount) ]"
msgstr "节点: [ ID.名称(资产数量) ]"
#: coco/interactive.py:
404
#: coco/interactive.py:
379
msgid "Tips: Enter g+NodeID to display the host under the node, such as g1"
msgstr "提示: 输入 g+节点ID 显示节点下主机. 如: g1"
#: coco/interactive.py:
412
#: coco/interactive.py:
387
msgid "There is no matched node, please re-enter"
msgstr "没有匹配分组,请重新输入"
#: coco/interactive.py:4
42
#: coco/interactive.py:4
17
msgid "Select a login:: "
msgstr "选择一个登录:"
#: coco/interactive.py:4
65
#: coco/interactive.py:4
40
msgid "No system user"
msgstr "没有系统用户"
#: coco/models.py:2
4
2
#: coco/models.py:2
5
2
msgid ""
"Warning: Failed to load filter rule, please press Ctrl + D to exit retry."
msgstr "警告: 加载过滤规则失败,请按 Ctrl + D 退出重试."
#: coco/models.py:2
5
1
#: coco/models.py:2
6
1
msgid "Command `{}` is forbidden ........"
msgstr "命令 `{}` 是被禁止的 ..."
#: coco/proxy.py:89
#: coco/proxy.py:76
msgid "Connect with api server failed"
msgstr ""
#: coco/proxy.py:104
msgid "No permission"
msgstr "没有权限"
#: coco/proxy.py:1
31
#: coco/proxy.py:1
47
msgid "Connecting to {}@{} {:.1f}"
msgstr "开始连接到 {}@{} {:.1f}"
#: coco/session.py:1
43
#: coco/session.py:1
54
msgid "Terminated by administrator"
msgstr "被管理员中断"
...
...
requirements/requirements.txt
View file @
eb0ab56c
...
...
@@ -18,7 +18,7 @@ idna==2.6
itsdangerous==0.24
Jinja2==2.10
jmespath==0.9.3
jms-storage==0.0.2
0
jms-storage==0.0.2
2
jumpserver-python-sdk==0.0.56
MarkupSafe==1.0
oss2==2.4.0
...
...
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