Tripp Lite B0930042E4U Owners Manual for B093- B097- and B098-Series Console S - Page 210
Creating Custom Widgets for the Dashboard
View all Tripp Lite B0930042E4U manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 210 highlights
12. Status Reports 12.5.2 Creating Custom Widgets for the Dashboard To run a custom script inside a dashboard widget: Create a file called widget-.sh in the folder /etc/config/scripts / , where can be of your choosing. You can have as many custom dashboard files as desired. Inside this file, you can use any code you wish. When configuring the dashboard, choose widget-.sh in the dropdown list. The dashboard will run the script and display the output of the script commands inside the specific widget. The best way to format the output is to send HTML commands back to the browser by adding echo commands in the script: echo '' You can run any command and its output will display in the widget window directly. Below is an example script writing the current date to a file and echoing HTML code back to the browser. The HTML code gets an image from a specific URL and displays it in the widget. #!/bin/sh date >> /tmp/test echo '' echo ' This is my custom script running ' echo '' echo '' echo '' echo '' exit 0 210