This widget is based on the standard Dashing Text widget. It adds a status management between three basic states : OK, ERROR and INFORMATION. The widget background, image and color, changes with the state.
With this widget, you can display the status of a single system. It can be used for servers, sites, etc. It lets you build status dashboards with a single system per tile. The widget will fade to green if the status is OK, red if ERROR, blue if INFORMATION. You can customize the text displayed and change it dynamically.
If you refer to the thumbnail, you'll see an example.
Copy
- textstatus.coffee
- textstatus.html
- textstatus.scss
in a "textstatus" folder in your dashing widget directory.
Its use is very close to the standard Text widget, with the added management of the status.
Add the declaration of the widget.
Examples :
For Dashing-js
li(data-row='1', data-col='2', data-sizex='1', data-sizey='1')
div(data-id='myid', data-view='Textstatus', data-title='A system', data-text='OK', data-moreinfo='Status')
For regular Dashing
<li data-row="1" data-col="1" data-sizex="1" data-sizey="1">
<div data-id="myid" data-view="Textstatus" data-title="A system", data-text="OK", data-moreinfo="Status"></div>
</li>
You have to send an event with two attributes :
- value : will hold the text displayed
- status : a boolean representing the status you want to display. True if OK (green status), false for error (red status), null for info (blue status).
Example for dashing-js :
send_event('myid', {value:text, status:statusBool});
Licenced under the Creative Commons Attribution 4.0