Commit 2fb47003 authored by ibuler's avatar ibuler

[Merge]

parents f6be91a2 d70526bf
...@@ -161,6 +161,8 @@ class ProxyNamespace(BaseNamespace): ...@@ -161,6 +161,8 @@ class ProxyNamespace(BaseNamespace):
logger.debug("On token trigger") logger.debug("On token trigger")
token = message.get('token', None) token = message.get('token', None)
secret = message.get('secret', None) secret = message.get('secret', None)
user_id = message.get('user', None)
self.current_user = self.app.service.get_user_profile(user_id)
host = self.app.service.get_token_asset(token).json() host = self.app.service.get_token_asset(token).json()
logger.debug(host) logger.debug(host)
# { # {
...@@ -168,6 +170,10 @@ class ProxyNamespace(BaseNamespace): ...@@ -168,6 +170,10 @@ class ProxyNamespace(BaseNamespace):
# "asset": {UUID}, # "asset": {UUID},
# "system_user": {UUID} # "system_user": {UUID}
# } # }
connection = str(uuid.uuid4())
self.emit('room', {'room': connection, 'secret': secret})
self.on_host({'secret': secret, 'uuid': host['asset'], 'userid': host['system_user']}) self.on_host({'secret': secret, 'uuid': host['asset'], 'userid': host['system_user']})
def on_resize(self, message): def on_resize(self, message):
......
...@@ -20,7 +20,7 @@ Jinja2==2.10 ...@@ -20,7 +20,7 @@ Jinja2==2.10
jmespath==0.9.3 jmespath==0.9.3
jms-es-sdk==0.5.2 jms-es-sdk==0.5.2
jms-storage==0.0.12 jms-storage==0.0.12
jumpserver-python-sdk==0.0.35 jumpserver-python-sdk==0.0.36
MarkupSafe==1.0 MarkupSafe==1.0
oss2==2.4.0 oss2==2.4.0
paramiko==2.4.0 paramiko==2.4.0
......
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