Script
The Script widget can be used to run, show the status, check the history of a script.
To use the script widget a user requires operator role or above.
Settings
Setting | Description |
---|---|
Script id | The script to use in this widget |
Title | A Title to show on the widget (defaulted to script’s name) |
Show latest status | Flag to show/hide the lightbulb indicating the status of the latest script run |
Include full history | Makes the full history of the script accessible from the widget (by clicking on the lightbulb or the title) |
Show latest job output | Shows the output of the latest Job in the widget |
Show code blocks only | Only include <markdown> and <html> tagged blocks in the output of the widget. |
Runnable | Enables running the script from the widget |
Use source file | Enables dropping / selecting source file to attach to script run |
Allow override Run Config | Enables the user to override the defaulte Run Configuration defined in the Widget Settings |
Output
If the Show latest job output
flag is ticked, the output of the latest run will be shown in the Widget.
Output can be of three types:
Text: Simple text, including the Logs printed on the console when running the script.
HTML formatted text.
Markdown text.
Make sure to mark your output with the respective tags:
<markdown> Your markdown output here </markdown>
<html> Your HTML content here </html>
Text | Html | markdown | |
---|---|---|---|
script’s main.py | |||
script’s output | |||
Widget’s output |
History Dialog
If the Include full history
flag is true, clicking on the lightbulb or title will open the following history dialog.
Running indicator
If there is a job running currently for the selected script, an indicator will be shown on the right side of the title.