forked from shaba/openuds
Added minimun number to show "filter" on service list
This commit is contained in:
parent
eec8588628
commit
582ba01014
@ -341,6 +341,7 @@ class GlobalConfig:
|
||||
SITE_CSS: Config.Value = Config.section(CUSTOM_SECTION).value('CSS', '', type=Config.LONGTEXT_FIELD)
|
||||
SITE_INFO: Config.Value = Config.section(CUSTOM_SECTION).value('Site information', '', type=Config.LONGTEXT_FIELD)
|
||||
SITE_FILTER_ONTOP: Config.Value = Config.section(CUSTOM_SECTION).value('Show Filter on Top', '0', type=Config.BOOLEAN_FIELD)
|
||||
SITE_FILTER_MIN: Config.Value = Config.section(CUSTOM_SECTION).value('Min. Services to show filter', '8', type=Config.NUMERIC_FIELD)
|
||||
|
||||
EXPERIMENTAL_FEATURES: Config.Value = Config.section(GLOBAL_SECTION).value('Experimental Features', '0', type=Config.BOOLEAN_FIELD)
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -49,7 +49,6 @@ from uds.models import Authenticator, Image, Network, Transport
|
||||
|
||||
# Not imported at runtime, just for type checking
|
||||
if typing.TYPE_CHECKING:
|
||||
from django.http import HttpRequest # pylint: disable=ungrouped-imports
|
||||
from uds.core.util.request import ExtendedHttpRequest
|
||||
from uds.models import User
|
||||
|
||||
@ -161,7 +160,8 @@ def udsJs(request: 'ExtendedHttpRequest') -> str:
|
||||
'clientDownload': reverse('page.client-download'),
|
||||
# Launcher URL if exists
|
||||
'launch': request.session.get('launch', ''),
|
||||
}
|
||||
},
|
||||
'min_for_filter': GlobalConfig.SITE_FILTER_MIN.getInt(True),
|
||||
}
|
||||
|
||||
info: typing.Optional[typing.MutableMapping] = None
|
||||
|
Loading…
Reference in New Issue
Block a user