mirror of https://github.com/jumpserver/jumpserver
perf: 修改 connect token 数据结构
parent
0981cd1ed1
commit
9412c5d42d
|
@ -140,7 +140,7 @@ class RDPFileClientProtocolURLMixin:
|
||||||
data = {
|
data = {
|
||||||
'id': str(token.id),
|
'id': str(token.id),
|
||||||
'value': token.value,
|
'value': token.value,
|
||||||
'cmd': '',
|
'command': '',
|
||||||
'file': {}
|
'file': {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -148,14 +148,14 @@ class RDPFileClientProtocolURLMixin:
|
||||||
filename, content = self.get_rdp_file_info(token)
|
filename, content = self.get_rdp_file_info(token)
|
||||||
data.update({
|
data.update({
|
||||||
'file': {
|
'file': {
|
||||||
'filename': filename,
|
'name': filename,
|
||||||
'content': content,
|
'content': content,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
else:
|
else:
|
||||||
endpoint = self.get_smart_endpoint(protocol=token.endpoint_protocol, asset=token.asset)
|
endpoint = self.get_smart_endpoint(protocol=token.endpoint_protocol, asset=token.asset)
|
||||||
cmd = NativeClient.get_launch_command(connect_method, token, endpoint)
|
cmd = NativeClient.get_launch_command(connect_method, token, endpoint)
|
||||||
data.update({'cmd': cmd})
|
data.update({'command': cmd})
|
||||||
return data
|
return data
|
||||||
|
|
||||||
def get_smart_endpoint(self, protocol, asset=None):
|
def get_smart_endpoint(self, protocol, asset=None):
|
||||||
|
|
Loading…
Reference in New Issue