2303 |
02 Apr 14 |
olle |
1 |
<%@ page |
2303 |
02 Apr 14 |
olle |
2 |
pageEncoding="UTF-8" |
2303 |
02 Apr 14 |
olle |
3 |
session="false" |
2303 |
02 Apr 14 |
olle |
4 |
import="net.sf.basedb.core.Application" |
2303 |
02 Apr 14 |
olle |
5 |
import="net.sf.basedb.core.User" |
2303 |
02 Apr 14 |
olle |
6 |
import="net.sf.basedb.core.DbControl" |
2303 |
02 Apr 14 |
olle |
7 |
import="net.sf.basedb.core.SessionControl" |
2303 |
02 Apr 14 |
olle |
8 |
import="net.sf.basedb.clients.web.Base" |
2303 |
02 Apr 14 |
olle |
9 |
import="net.sf.basedb.clients.web.util.HTML" |
2303 |
02 Apr 14 |
olle |
10 |
import="net.sf.basedb.clients.web.extensions.ExtensionsControl" |
2303 |
02 Apr 14 |
olle |
11 |
import="net.sf.basedb.util.Values" |
2303 |
02 Apr 14 |
olle |
12 |
%> |
2303 |
02 Apr 14 |
olle |
13 |
<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %> |
2303 |
02 Apr 14 |
olle |
14 |
<%@ taglib prefix="p" uri="/WEB-INF/path.tld" %> |
4524 |
15 Jun 17 |
nicklas |
15 |
<%@ taglib prefix="tbl" uri="/WEB-INF/table.tld" %> |
2303 |
02 Apr 14 |
olle |
16 |
<% |
2303 |
02 Apr 14 |
olle |
17 |
final SessionControl sc = Base.getExistingSessionControl(request, true); |
2303 |
02 Apr 14 |
olle |
18 |
final String ID = sc.getId(); |
2303 |
02 Apr 14 |
olle |
19 |
final float scale = Base.getScale(sc); |
2303 |
02 Apr 14 |
olle |
20 |
final String home = ExtensionsControl.getHomeUrl("net.sf.basedb.labenv"); |
2303 |
02 Apr 14 |
olle |
21 |
DbControl dc = null; |
2303 |
02 Apr 14 |
olle |
22 |
try |
2303 |
02 Apr 14 |
olle |
23 |
{ |
2303 |
02 Apr 14 |
olle |
24 |
dc = sc.newDbControl(); |
2303 |
02 Apr 14 |
olle |
25 |
final User user = User.getById(dc, sc.getLoggedInUserId()); |
2303 |
02 Apr 14 |
olle |
26 |
%> |
2303 |
02 Apr 14 |
olle |
27 |
<base:page type="default" > |
2989 |
02 Dec 14 |
olle |
28 |
<base:head |
3735 |
10 Feb 16 |
olle |
29 |
scripts="~../labenv.js,~labsensorinfo.js" |
4524 |
15 Jun 17 |
nicklas |
30 |
styles="path.css,table.css,~../css/labenv.css" |
2989 |
02 Dec 14 |
olle |
31 |
> |
2989 |
02 Dec 14 |
olle |
32 |
<style> |
2303 |
02 Apr 14 |
olle |
33 |
|
4524 |
15 Jun 17 |
nicklas |
34 |
#sensors div.data > table |
2303 |
02 Apr 14 |
olle |
35 |
{ |
4524 |
15 Jun 17 |
nicklas |
36 |
border-left: 0; |
4524 |
15 Jun 17 |
nicklas |
37 |
border-right: 0; |
2303 |
02 Apr 14 |
olle |
38 |
} |
4524 |
15 Jun 17 |
nicklas |
39 |
#sensors div.data > table td |
2303 |
02 Apr 14 |
olle |
40 |
{ |
4524 |
15 Jun 17 |
nicklas |
41 |
padding: 3px; |
2303 |
02 Apr 14 |
olle |
42 |
} |
2303 |
02 Apr 14 |
olle |
43 |
|
4524 |
15 Jun 17 |
nicklas |
44 |
#sensors div.data > table td.id-col, #sensors div.data > table th.id-col |
2303 |
02 Apr 14 |
olle |
45 |
{ |
4524 |
15 Jun 17 |
nicklas |
46 |
text-align: right; |
4524 |
15 Jun 17 |
nicklas |
47 |
width: 3em; |
4524 |
15 Jun 17 |
nicklas |
48 |
padding-right: 0.5em; |
2303 |
02 Apr 14 |
olle |
49 |
} |
2303 |
02 Apr 14 |
olle |
50 |
|
2303 |
02 Apr 14 |
olle |
51 |
</style> |
2303 |
02 Apr 14 |
olle |
52 |
</base:head> |
2989 |
02 Dec 14 |
olle |
53 |
<base:body> |
2303 |
02 Apr 14 |
olle |
54 |
|
4524 |
15 Jun 17 |
nicklas |
55 |
<p:path><p:pathelement title="Lab sensor info" /></p:path> |
2303 |
02 Apr 14 |
olle |
56 |
|
4524 |
15 Jun 17 |
nicklas |
57 |
<div class="content" id="wizard"> |
4524 |
15 Jun 17 |
nicklas |
58 |
<tbl:table id="sensors" style="display: none;"> |
4524 |
15 Jun 17 |
nicklas |
59 |
<tbl:columndef |
4524 |
15 Jun 17 |
nicklas |
60 |
id="sensorId" |
4524 |
15 Jun 17 |
nicklas |
61 |
title="##" |
4524 |
15 Jun 17 |
nicklas |
62 |
subclass="id-col" |
4524 |
15 Jun 17 |
nicklas |
63 |
/> |
4524 |
15 Jun 17 |
nicklas |
64 |
<tbl:columndef |
4524 |
15 Jun 17 |
nicklas |
65 |
id="sensorName" |
4524 |
15 Jun 17 |
nicklas |
66 |
title="Sensor" |
4524 |
15 Jun 17 |
nicklas |
67 |
/> |
4524 |
15 Jun 17 |
nicklas |
68 |
<tbl:columndef |
4524 |
15 Jun 17 |
nicklas |
69 |
id="url" |
4524 |
15 Jun 17 |
nicklas |
70 |
title="URL" |
4524 |
15 Jun 17 |
nicklas |
71 |
/> |
4524 |
15 Jun 17 |
nicklas |
72 |
<tbl:columndef |
4524 |
15 Jun 17 |
nicklas |
73 |
id="serial" |
4524 |
15 Jun 17 |
nicklas |
74 |
title="Serial Number" |
4524 |
15 Jun 17 |
nicklas |
75 |
/> |
4524 |
15 Jun 17 |
nicklas |
76 |
<tbl:columndef |
4524 |
15 Jun 17 |
nicklas |
77 |
id="time" |
4524 |
15 Jun 17 |
nicklas |
78 |
title="Time" |
4524 |
15 Jun 17 |
nicklas |
79 |
/> |
4524 |
15 Jun 17 |
nicklas |
80 |
<tbl:columndef |
4524 |
15 Jun 17 |
nicklas |
81 |
id="temperature" |
4534 |
21 Jun 17 |
nicklas |
82 |
title="Temp (°C)" |
4524 |
15 Jun 17 |
nicklas |
83 |
/> |
4524 |
15 Jun 17 |
nicklas |
84 |
<tbl:columndef |
4524 |
15 Jun 17 |
nicklas |
85 |
id="humidity" |
4524 |
15 Jun 17 |
nicklas |
86 |
title="Humidity (%)" |
4524 |
15 Jun 17 |
nicklas |
87 |
/> |
4534 |
21 Jun 17 |
nicklas |
88 |
<tbl:columndef |
4534 |
21 Jun 17 |
nicklas |
89 |
id="alarm" |
4534 |
21 Jun 17 |
nicklas |
90 |
title="Alarm" |
4534 |
21 Jun 17 |
nicklas |
91 |
/> |
4525 |
15 Jun 17 |
nicklas |
92 |
<tbl:columndef |
4525 |
15 Jun 17 |
nicklas |
93 |
id="actions" |
4525 |
15 Jun 17 |
nicklas |
94 |
title="" |
4525 |
15 Jun 17 |
nicklas |
95 |
/> |
4524 |
15 Jun 17 |
nicklas |
96 |
<tbl:data style="border-right: 0; border-left: 0;"> |
4524 |
15 Jun 17 |
nicklas |
97 |
<tbl:headers> |
4524 |
15 Jun 17 |
nicklas |
98 |
<tbl:headerrow id="row-template"> |
4524 |
15 Jun 17 |
nicklas |
99 |
<tbl:columnheaders /> |
4524 |
15 Jun 17 |
nicklas |
100 |
</tbl:headerrow> |
4524 |
15 Jun 17 |
nicklas |
101 |
</tbl:headers> |
4524 |
15 Jun 17 |
nicklas |
102 |
<tbl:rows id="all-rows"> |
4524 |
15 Jun 17 |
nicklas |
103 |
</tbl:rows> |
4524 |
15 Jun 17 |
nicklas |
104 |
</tbl:data> |
4524 |
15 Jun 17 |
nicklas |
105 |
</tbl:table> |
2989 |
02 Dec 14 |
olle |
106 |
|
4524 |
15 Jun 17 |
nicklas |
107 |
<div id="wizard-status"></div> |
4524 |
15 Jun 17 |
nicklas |
108 |
|
2989 |
02 Dec 14 |
olle |
109 |
</div> |
2303 |
02 Apr 14 |
olle |
110 |
|
2303 |
02 Apr 14 |
olle |
111 |
</base:body> |
2303 |
02 Apr 14 |
olle |
112 |
</base:page> |
2303 |
02 Apr 14 |
olle |
113 |
<% |
2303 |
02 Apr 14 |
olle |
114 |
} |
2303 |
02 Apr 14 |
olle |
115 |
finally |
2303 |
02 Apr 14 |
olle |
116 |
{ |
2303 |
02 Apr 14 |
olle |
117 |
if (dc != null) dc.close(); |
2303 |
02 Apr 14 |
olle |
118 |
} |
2303 |
02 Apr 14 |
olle |
119 |
%> |