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
1233b998
Commit
1233b998
authored
Dec 18, 2018
by
xionghuistar
Committed by
老广
Dec 18, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support cmd r for refresh newest assets and nodes for request user (#143)
parent
beea715b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
0 deletions
+18
-0
interactive.py
coco/interactive.py
+8
-0
coco.po
locale/en/LC_MESSAGES/coco.po
+5
-0
coco.mo
locale/zh_CN/LC_MESSAGES/coco.mo
+0
-0
coco.po
locale/zh_CN/LC_MESSAGES/coco.po
+5
-0
No files found.
coco/interactive.py
View file @
1233b998
...
...
@@ -86,6 +86,7 @@ class InteractiveServer:
_
(
"{T}5) Enter {green}g{end} + {green}NodeID{end} to display the host under the node, such as g1.{R}"
),
_
(
"{T}6) Enter {green}s{end} Chinese-english switch.{R}"
),
_
(
"{T}7) Enter {green}h{end} help.{R}"
),
_
(
"{T}8) Enter {green}r{end} to refresh your assets and nodes.{R}"
),
_
(
"{T}0) Enter {green}q{end} exit.{R}"
)
]
self
.
client
.
send
(
header
.
format
(
...
...
@@ -114,11 +115,18 @@ class InteractiveServer:
elif
opt
in
[
's'
,
'S'
]:
switch_lang
()
self
.
display_banner
()
elif
opt
in
[
'r'
,
'R'
]:
self
.
refresh_assets_nodes
()
self
.
display_banner
()
elif
opt
in
[
'h'
,
'H'
]:
self
.
display_banner
()
else
:
self
.
search_and_proxy
(
opt
)
def
refresh_assets_nodes
(
self
):
self
.
get_user_assets_paging_async
()
self
.
get_user_nodes_async
()
def
search_assets
(
self
,
q
):
if
not
self
.
finish
:
assets
=
app_service
.
get_search_user_granted_assets
(
self
.
client
.
user
,
q
)
...
...
locale/en/LC_MESSAGES/coco.po
View file @
1233b998
...
...
@@ -72,6 +72,11 @@ msgstr ""
#: coco/interactive.py:89
#, python-brace-format
msgid "{T}8) Enter {green}r{end} to refresh your assets and nodes.{R}"
msgstr ""
#: coco/interactive.py:90
#, python-brace-format
msgid "{T}0) Enter {green}q{end} exit.{R}"
msgstr ""
...
...
locale/zh_CN/LC_MESSAGES/coco.mo
View file @
1233b998
No preview for this file type
locale/zh_CN/LC_MESSAGES/coco.po
View file @
1233b998
...
...
@@ -77,6 +77,11 @@ msgstr "{T}7) 输入 {green}h{end} 帮助.{R}"
#: coco/interactive.py:89
#, 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:90
#, python-brace-format
msgid "{T}0) Enter {green}q{end} exit.{R}"
msgstr "{T}0) 输入 {green}q{end} 退出.{R}"
...
...
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