From 76fe1b775a2fdad4ee7b8d04f2a71778f693d8e4 Mon Sep 17 00:00:00 2001 From: Alejandro Sirgo Rica Date: Tue, 26 Nov 2024 11:26:22 +0100 Subject: views: add direct cmd execution view MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reorganize "Run" section of Commands view as follows: Commands └── Run ├── Script: run script from folder ├── Cmd: direct command execution └── Display output: results of last execution Adapt API REST call to the new interface. Remove strange legacy ;|\n\r terminator. Remove "echo" field and add "inline" field. --- ogcp/forms/action_forms.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'ogcp/forms') diff --git a/ogcp/forms/action_forms.py b/ogcp/forms/action_forms.py index 49c9f60..24424a1 100644 --- a/ogcp/forms/action_forms.py +++ b/ogcp/forms/action_forms.py @@ -172,6 +172,11 @@ class RunScriptForm(FlaskForm): arguments = StringField(label=_l('Arguments')) submit = SubmitField(label=_l('Submit')) +class RunCmdForm(FlaskForm): + ips = HiddenField() + command = StringField(label=_l('Command')) + submit = SubmitField(label=_l('Submit')) + class ImportClientsForm(FlaskForm): server = HiddenField() room = SelectField(label=_l('Room')) -- cgit v1.2.3-18-g5258