From 1610c301cfe7cf28877057c23656c2edfc156088 Mon Sep 17 00:00:00 2001 From: jorgepastorr Date: Fri, 15 Dec 2023 10:16:56 +0100 Subject: [PATCH] filter servers on webalizer app, show only webservers --- orchestra/contrib/webapps/types/misc.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/orchestra/contrib/webapps/types/misc.py b/orchestra/contrib/webapps/types/misc.py index 98a0aae7..bb845493 100644 --- a/orchestra/contrib/webapps/types/misc.py +++ b/orchestra/contrib/webapps/types/misc.py @@ -8,7 +8,7 @@ from orchestra.plugins.forms import ExtendedPluginDataForm, PluginDataForm from ..options import AppOption from . import AppType from .php import PHPApp, PHPAppForm, PHPAppSerializer - +from orchestra.settings import WEB_SERVERS class StaticApp(AppType): name = 'static' @@ -27,6 +27,8 @@ class WebalizerAppform(PluginDataForm): def __init__(self, *args, **kwargs): super(WebalizerAppform, self).__init__(*args, **kwargs) self.fields['sftpuser'].widget = forms.HiddenInput() + qsServer = self.fields['target_server'].queryset.filter(name__in=WEB_SERVERS) + self.fields['target_server'].queryset = qsServer class WebalizerApp(AppType): name = 'webalizer'