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