diff options
Diffstat (limited to 'htdocs/app/devices-monitor/index.html')
| -rw-r--r-- | htdocs/app/devices-monitor/index.html | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/htdocs/app/devices-monitor/index.html b/htdocs/app/devices-monitor/index.html new file mode 100644 index 0000000..6e969dc --- /dev/null +++ b/htdocs/app/devices-monitor/index.html | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | ||
| 2 | <html> | ||
| 3 | <head> | ||
| 4 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | ||
| 5 | <meta name="viewport" content = "height = device-height, width = 420, user-scalable = no" /> | ||
| 6 | <title>WebIOPi | Devices Monitor</title> | ||
| 7 | <script type="text/javascript" src="/webiopi.js"></script> | ||
| 8 | <script type="text/javascript"> | ||
| 9 | webiopi().ready(function() { | ||
| 10 | $.get("/devices/*", function(data) { | ||
| 11 | var content = $("#content"); | ||
| 12 | for (i in data) { | ||
| 13 | if (data[i].type != "Serial") { | ||
| 14 | var device = webiopi().newDevice(data[i].type, data[i].name); | ||
| 15 | if (device) { | ||
| 16 | device.element = $("<div>"); | ||
| 17 | content.append(device.element); | ||
| 18 | device.refreshUI(); | ||
| 19 | } | ||
| 20 | } | ||
| 21 | } | ||
| 22 | }); | ||
| 23 | }); | ||
| 24 | </script> | ||
| 25 | <style type="text/css"> | ||
| 26 | button, .FunctionBasic { | ||
| 27 | width: 50px; | ||
| 28 | } | ||
| 29 | </style> | ||
| 30 | </head> | ||
| 31 | <body> | ||
| 32 | <h1>Devices Monitor</h1> | ||
| 33 | <div id="content"> | ||
| 34 | </div> | ||
| 35 | </body> | ||
| 36 | </html> | ||
