mirror of https://github.com/jumpserver/jumpserver
roll back
parent
9c9390878e
commit
fe87e32e2b
|
@ -64,6 +64,7 @@ def get_asset_info(asset):
|
||||||
info = {'hostname': asset.hostname, 'ip': asset.ip}
|
info = {'hostname': asset.hostname, 'ip': asset.ip}
|
||||||
if asset.use_default_auth:
|
if asset.use_default_auth:
|
||||||
if default:
|
if default:
|
||||||
|
info['port'] = int(default.field2)
|
||||||
info['username'] = default.field1
|
info['username'] = default.field1
|
||||||
try:
|
try:
|
||||||
info['password'] = CRYPTOR.decrypt(default.field3)
|
info['password'] = CRYPTOR.decrypt(default.field3)
|
||||||
|
@ -74,8 +75,7 @@ def get_asset_info(asset):
|
||||||
else:
|
else:
|
||||||
info['username'] = asset.username
|
info['username'] = asset.username
|
||||||
info['password'] = CRYPTOR.decrypt(asset.password)
|
info['password'] = CRYPTOR.decrypt(asset.password)
|
||||||
|
info['port'] = int(asset.port)
|
||||||
info['port'] = int(asset.port)
|
|
||||||
|
|
||||||
return info
|
return info
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue