mirror of https://github.com/jumpserver/jumpserver
parent
a20bd3acd4
commit
3ee2bfce9a
|
@ -148,7 +148,7 @@ class AppletMethod:
|
||||||
|
|
||||||
|
|
||||||
class ConnectMethodUtil:
|
class ConnectMethodUtil:
|
||||||
_all_methods = None
|
_all_methods = {}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def protocols(cls):
|
def protocols(cls):
|
||||||
|
@ -210,7 +210,7 @@ class ConnectMethodUtil:
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def refresh_methods(cls):
|
def refresh_methods(cls):
|
||||||
cls._all_methods = None
|
cls._all_methods = {}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_filtered_protocols_connect_methods(cls, os):
|
def get_filtered_protocols_connect_methods(cls, os):
|
||||||
|
@ -245,8 +245,8 @@ class ConnectMethodUtil:
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_protocols_connect_methods(cls, os):
|
def get_protocols_connect_methods(cls, os):
|
||||||
if cls._all_methods is not None:
|
if cls._all_methods.get('os'):
|
||||||
return cls._all_methods
|
return cls._all_methods['os']
|
||||||
|
|
||||||
methods = defaultdict(list)
|
methods = defaultdict(list)
|
||||||
web_methods = WebMethod.get_methods()
|
web_methods = WebMethod.get_methods()
|
||||||
|
@ -298,5 +298,5 @@ class ConnectMethodUtil:
|
||||||
method['component'] = TerminalType.tinker.value
|
method['component'] = TerminalType.tinker.value
|
||||||
methods[protocol].extend(applet_methods)
|
methods[protocol].extend(applet_methods)
|
||||||
|
|
||||||
cls._all_methods = methods
|
cls._all_methods[os] = methods
|
||||||
return methods
|
return methods
|
||||||
|
|
Loading…
Reference in New Issue