Back to Home
Search:   

How to customize the dashboard

The dashboard feature in V2.8.1 firmware (and later) enables administrators to customize their Management Console home page (Status:Dashboard) so it displays a summary of the status of alerts and nominated devices.

Dashboard

Custom dashboards can be configured for each admin user and for the admin groups. However only users who are members of the admin group (and the root user) can configure the dashboard or access the dashboard.
  • From the System: Configure Dashboard screen you simply select the user (or group) you are configuring this custom dashboard layout for
  • On the Dashboard layout panel you then select which widget is to be displayed (i.e. the pdu status widget, or device, or alert ...) in each of the six display locations
  • Go to the Configure widgets panel and configure each selected widget (i.e. specify which particular ups status is to be displayed on the ups widget, or set the max number of devices to be displayed in the devices widget)
  • Click Apply
System:Configure Dashboard

You can also select to run a script with custom display inside a dashboard widget:
  • Create a file called "widget-<name> .sh" in the folder /etc/config/scripts/ where <name> can be anything. You can have as many custom dashboard files as you want.
  • Inside this file you can put any code you wish. When configuring the dashboard, choose "widget-<name> .sh" in the dropdown list. The dashboard will run the script and display the output of the script commands directly on the screen, inside the specific widget.
  • The best way to format the output would be to send HTML commands back to the browser by adding echo commands in the script echo '<table>''
  • You can of course run any command and its output will be displayed in the widget window directly
Below is an example script which writes the current date to a file, and then echo's 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 '<table>'
echo '<tr><td> This is my custom script running </td></tr>'
echo '<tr><td>'
echo '<img src="http://www.vinras.com/images/linux-online-inc.jpg">'
echo '</td></tr>'
echo '</table>'
exit 0