Commit 1233b998 authored by xionghuistar's avatar xionghuistar Committed by 老广

Support cmd r for refresh newest assets and nodes for request user (#143)

parent beea715b
......@@ -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)
......
......@@ -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 ""
......
......@@ -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}"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment