root / hci / trunk / eneraptor-web-app / grails-app / views / pdf / reportToPdf.gsp @ 50
History | View | Annotate | Download (1.28 KB)
1 | 50 | alexbesir | <html> |
---|---|---|---|
2 | |||
3 | <head> |
||
4 | <title>Report</title> |
||
5 | <style> |
||
6 | body { |
||
7 | font-family: monospace; |
||
8 | font-size: small; |
||
9 | } |
||
10 | table { |
||
11 | width:100%; |
||
12 | } |
||
13 | </style> |
||
14 | </head> |
||
15 | |||
16 | <body> |
||
17 | |||
18 | <h1>${graph.name}</h1> |
||
19 | <h2>Report info</h2> |
||
20 | |||
21 | <p>Type: <b>${graph.type}</b> / <b>${graph.timeFrameType}</b><br /> |
||
22 | From <b>${graph.timeFrameStart}</b> till <b>${graph.timeFrameEnd}</b><br /> |
||
23 | Device ID: <b>${graph.deviceId}</b></p> |
||
24 | |||
25 | <h2>Report data</h2> |
||
26 | |||
27 | <g:if test="${graph.timeFrameType == 'custom'}"> |
||
28 | <table> |
||
29 | <thead> |
||
30 | <tr> |
||
31 | <th>From</th> |
||
32 | <th>Till</th> |
||
33 | <th>Value (${graph.type})</th> |
||
34 | <th>Rounded</th> |
||
35 | </tr> |
||
36 | </thead> |
||
37 | <tbody> |
||
38 | <g:each in="${detailedData}" var="dent"> |
||
39 | <tr> |
||
40 | <td>${dent[0]}</td> |
||
41 | <td>${dent[1]}</td> |
||
42 | <td>${dent[2]}</td> |
||
43 | <td>${((double)dent[2]).round(1)}</td> |
||
44 | </tr> |
||
45 | </g:each> |
||
46 | </tbody> |
||
47 | </table> |
||
48 | </g:if> |
||
49 | <g:else> |
||
50 | <table> |
||
51 | <thead> |
||
52 | <tr> |
||
53 | <th>Time</th> |
||
54 | <th>Value (${graph.type})</th> |
||
55 | <th>Rounded</th> |
||
56 | </tr> |
||
57 | </thead> |
||
58 | <tbody> |
||
59 | <g:each in="${detailedData}" var="dent"> |
||
60 | <tr> |
||
61 | <td>${dent[0]}</td> |
||
62 | <td>${dent[1]}</td> |
||
63 | <td>${((double)dent[1]).round(1)}</td> |
||
64 | </tr> |
||
65 | </g:each> |
||
66 | </tbody> |
||
67 | </table> |
||
68 | </g:else> |
||
69 | |||
70 | </body> |
||
71 | |||
72 | </html> |