mirror of https://github.com/jumpserver/jumpserver
perf: Remove applets, no longer display remote application connection methods
parent
7c6e83d124
commit
ec95d25704
|
@ -102,6 +102,8 @@ class AppletMethod:
|
||||||
|
|
||||||
methods = defaultdict(list)
|
methods = defaultdict(list)
|
||||||
has_applet_hosts = AppletHost.objects.filter(is_active=True).exists()
|
has_applet_hosts = AppletHost.objects.filter(is_active=True).exists()
|
||||||
|
if not has_applet_hosts:
|
||||||
|
return methods
|
||||||
applets = Applet.objects.filter(is_active=True)
|
applets = Applet.objects.filter(is_active=True)
|
||||||
for applet in applets:
|
for applet in applets:
|
||||||
for protocol in applet.protocols:
|
for protocol in applet.protocols:
|
||||||
|
@ -110,7 +112,7 @@ class AppletMethod:
|
||||||
'label': applet.display_name,
|
'label': applet.display_name,
|
||||||
'type': 'applet',
|
'type': 'applet',
|
||||||
'icon': applet.icon,
|
'icon': applet.icon,
|
||||||
'disabled': not applet.is_active or not has_applet_hosts,
|
'disabled': not applet.is_active,
|
||||||
})
|
})
|
||||||
return methods
|
return methods
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue