Dashboard Widgets
-
I am trying to make a carp status widget starting with the code from the interfaces widget and the carp status page and using the pdf as a guide.
I made something that I think might work and tried to get it to show on the dashboard. It is in the menu for adding but nothing happens it just stays the same.
So I guessed my code had bugs (normally does) so I tried a hello world widget
| Hello world | | Hello world |
same problem so I copied the Interfaces widget renaming it interfaces2 and this also wont show on the page.
the firefox error console saysError: element has no properties
Source File: https://pfwall.example.com/javascript/scriptaculous/effects.js
Line: 561Do I need to do something extra to make the widget show some config etc???
Thanks
-
Do I need to do something extra to make the widget show some config etc???
Yes. Here is the code that makes the traffic graphs widget configurable:
Refresh Interval:
<select name="refreshInterval" class="formfld" id="refreshInterval" onchange="updateGraphDisplays();"><option value="1" <?php="" if="" ($refreshinterval="=" "1")="" echo="" "selected";?="">>1</option> <option value="2" <?php="" if="" ($refreshinterval="=" "2")="" echo="" "selected";?="">>2</option> <option value="3" <?php="" if="" ($refreshinterval="=" "3")="" echo="" "selected";?="">>3</option> <option value="4" <?php="" if="" ($refreshinterval="=" "4")="" echo="" "selected";?="">>4</option> <option value="5" <?php="" if="" ($refreshinterval="=" "5")="" echo="" "selected";?="">>5</option></select> Seconds
Note: changing this settings can affect CPU Performance on the pfSense BoxYou have to have thein there with the -setting postfix. You also have to make sure the hidden shown below:
-
Sorry I may not have been clear in the last post. This widget doesn't need any config it just displays the carp status.
Actually yesterday I reinstalled the Dashboard package and the widget started displaying and working guess someone had made some changes.I posted it here http://forum.pfsense.org/index.php/topic,5407.0.html and sullrich has committed it ;D
Does the widget need config data even if it has no config options??
Thanks for the help
-
Does the widget need config data even if it has no config options??
Nope. Only if you have information you want to save and use for later.