From af8236b18948b083c408df39306fc36bc26b51b7 Mon Sep 17 00:00:00 2001 From: Alejandro Sirgo Rica Date: Wed, 19 Jun 2024 17:21:13 +0200 Subject: ogcp: add support to run scripts in clients Add view at /action/script/run to visualize the available scripts and run a single script file in the selected clients. Use shell/list to request the script list and shell/run API call to request the execution. --- ogcp/forms/action_forms.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'ogcp/forms/action_forms.py') diff --git a/ogcp/forms/action_forms.py b/ogcp/forms/action_forms.py index 9e3a9f6..d650506 100644 --- a/ogcp/forms/action_forms.py +++ b/ogcp/forms/action_forms.py @@ -147,6 +147,15 @@ class ClientMoveForm(FlaskForm): scopes = SelectField(label=_l('Scopes'), validate_choice=False) submit = SubmitField(label=_l('Submit')) +class RunScriptForm(FlaskForm): + ips = HiddenField() + script = SelectField(label=_l('Script'), + choices=[], + validators=[InputRequired()], + validate_choice=False) + arguments = StringField(label=_l('Arguments')) + submit = SubmitField(label=_l('Submit')) + class ImportClientsForm(FlaskForm): server = HiddenField() room = SelectField(label=_l('Room')) -- cgit v1.2.3-18-g5258