summaryrefslogtreecommitdiffstats
path: root/ogcp/forms
diff options
context:
space:
mode:
authorAlejandro Sirgo Rica <asirgo@soleta.eu>2024-06-19 17:21:13 +0200
committerAlejandro Sirgo Rica <asirgo@soleta.eu>2024-06-25 13:53:04 +0200
commitaf8236b18948b083c408df39306fc36bc26b51b7 (patch)
tree69d5e2ba2ccee58601e61b0c902b4d0438798720 /ogcp/forms
parent8bcd8fd7a4c7d36a1bca2b3c36765fc773a1af78 (diff)
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.
Diffstat (limited to 'ogcp/forms')
-rw-r--r--ogcp/forms/action_forms.py9
1 files changed, 9 insertions, 0 deletions
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'))