Statistics
| Revision:

root / hci / trunk / eneraptor-web-app / grails-app / views / statistics / showGraph.gsp @ 69

History | View | Annotate | Download (1.52 KB)

1
<html>
2

    
3
<head>
4
	<title>Statistics &raquo; Graph view</title>
5
	<meta name="layout" content="main" />
6
	<flot:resources />
7
</head>
8

    
9
<body>
10

    
11
	<erptr:box title="Graph">
12
		<g:javascript>
13
			var data = [${data}];
14
			var options = {
15
				lines: { show: true },
16
				points: { show: true },
17
				xaxis: { mode: "time", timeformat: "%y/%m/%d %H:%M" },
18
				legend: { container: '#legendHolder' },
19
				grid: {
20
					markings: [
21
						<g:each in="${actionLog}" var="al">
22
							<g:if test="${al == actionLog[-1]}">
23
								{ color: 'red', lineWidth: 1, xaxis: { from: ${al.dateRecieved.time}, to: ${al.dateRecieved.time} } }
24
							</g:if>
25
							<g:else>
26
								{ color: 'red', lineWidth: 1, xaxis: { from: ${al.dateRecieved.time}, to: ${al.dateRecieved.time} } },
27
							</g:else>
28
						</g:each>
29
					]
30
				}
31
			};
32
		</g:javascript>
33
		<div class="chart">
34
			<flot:plot id="placeholder" style="width: 900px; height: 300px; padding:5px;" data="data" options="options" />
35
		</div>
36
		<br />
37
		<p>Legend:</p>
38
		<div id="legendHolder" name="legendHolder"></div>
39
		<br />
40
		<p>Display actions:</p>
41
		<g:form action="showGraph" method="GET">
42
			<g:hiddenField name="id" value="${params.id}" />
43
			<g:select name="outputDevice" from="${outputDevices}" optionKey="deviceId" optionValue="friendlyName" noSelection="['none':'- None -']" style="width:350px;" value="${params.outputDevice}" />
44
			&nbsp;&nbsp;&nbsp;
45
			<g:submitButton name="outputDeviceSubmit" value="Update" />
46
		</g:form>
47
		<br />
48
		
49
	</erptr:box>
50

    
51
</body>
52

    
53
</html>