2401 |
06 May 14 |
olle |
1 |
<%@ page |
2401 |
06 May 14 |
olle |
2 |
pageEncoding="UTF-8" |
2401 |
06 May 14 |
olle |
3 |
session="false" |
2401 |
06 May 14 |
olle |
4 |
import="net.sf.basedb.core.User" |
2401 |
06 May 14 |
olle |
5 |
import="net.sf.basedb.core.DbControl" |
2401 |
06 May 14 |
olle |
6 |
import="net.sf.basedb.core.SessionControl" |
2401 |
06 May 14 |
olle |
7 |
import="net.sf.basedb.core.Application" |
2401 |
06 May 14 |
olle |
8 |
import="net.sf.basedb.clients.web.Base" |
2401 |
06 May 14 |
olle |
9 |
import="net.sf.basedb.clients.web.extensions.ExtensionsControl" |
2401 |
06 May 14 |
olle |
10 |
%> |
2401 |
06 May 14 |
olle |
11 |
<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %> |
2401 |
06 May 14 |
olle |
12 |
<%@ taglib prefix="p" uri="/WEB-INF/path.tld" %> |
2401 |
06 May 14 |
olle |
13 |
<% |
2401 |
06 May 14 |
olle |
14 |
final SessionControl sc = Base.getExistingSessionControl(request, true); |
2401 |
06 May 14 |
olle |
15 |
final String ID = sc.getId(); |
2401 |
06 May 14 |
olle |
16 |
final float scale = Base.getScale(sc); |
2401 |
06 May 14 |
olle |
17 |
final String home = ExtensionsControl.getHomeUrl("net.sf.basedb.labenv"); |
2401 |
06 May 14 |
olle |
18 |
DbControl dc = null; |
2401 |
06 May 14 |
olle |
19 |
try |
2401 |
06 May 14 |
olle |
20 |
{ |
2401 |
06 May 14 |
olle |
21 |
dc = sc.newDbControl(); |
2401 |
06 May 14 |
olle |
22 |
final User user = User.getById(dc, sc.getLoggedInUserId()); |
2401 |
06 May 14 |
olle |
23 |
%> |
2401 |
06 May 14 |
olle |
24 |
<base:page type="default" > |
2989 |
02 Dec 14 |
olle |
25 |
<base:head |
3735 |
10 Feb 16 |
olle |
26 |
scripts="~../labenv.js,~labenvironmentdatabasedisplay.js,~boxplot.js" |
3735 |
10 Feb 16 |
olle |
27 |
styles="path.css,~../css/labenv.css,~../css/report.css" |
2989 |
02 Dec 14 |
olle |
28 |
> |
2401 |
06 May 14 |
olle |
29 |
|
2989 |
02 Dec 14 |
olle |
30 |
<style> |
2401 |
06 May 14 |
olle |
31 |
canvas |
2401 |
06 May 14 |
olle |
32 |
{ |
2401 |
06 May 14 |
olle |
33 |
width: 700px; |
2401 |
06 May 14 |
olle |
34 |
height: 550px; |
2401 |
06 May 14 |
olle |
35 |
} |
2989 |
02 Dec 14 |
olle |
36 |
.guide |
2989 |
02 Dec 14 |
olle |
37 |
{ |
2989 |
02 Dec 14 |
olle |
38 |
position: absolute; |
2989 |
02 Dec 14 |
olle |
39 |
z-index: 99; |
2989 |
02 Dec 14 |
olle |
40 |
display: none; |
2989 |
02 Dec 14 |
olle |
41 |
background-color: #224488; |
2989 |
02 Dec 14 |
olle |
42 |
} |
2401 |
06 May 14 |
olle |
43 |
</style> |
2401 |
06 May 14 |
olle |
44 |
</base:head> |
2989 |
02 Dec 14 |
olle |
45 |
<base:body> |
2401 |
06 May 14 |
olle |
46 |
<p:path><p:pathelement |
2401 |
06 May 14 |
olle |
47 |
title="LabEnv" href="<%="./labenvironmentdatabasedisplay.jsp?ID="+ID%>" |
2401 |
06 May 14 |
olle |
48 |
/><p:pathelement title="Lab environment display" |
2401 |
06 May 14 |
olle |
49 |
/></p:path> |
2989 |
02 Dec 14 |
olle |
50 |
<div id="x-guide" class="guide" style="width: 1px;"></div> |
2989 |
02 Dec 14 |
olle |
51 |
<div id="y-guide" class="guide" style="height: 1px;"></div> |
2401 |
06 May 14 |
olle |
52 |
<div class="content"> |
2989 |
02 Dec 14 |
olle |
53 |
<form name="labenv" id="wizard" class="wizard"> |
2989 |
02 Dec 14 |
olle |
54 |
|
2989 |
02 Dec 14 |
olle |
<!-- 1. Report type--> |
2989 |
02 Dec 14 |
olle |
56 |
<div class="step" id="step-1"> |
2989 |
02 Dec 14 |
olle |
57 |
<div class="step-no">1</div> |
2989 |
02 Dec 14 |
olle |
58 |
<div class="step-title">Report type</div> |
2989 |
02 Dec 14 |
olle |
59 |
<div class="step-content"> |
2401 |
06 May 14 |
olle |
60 |
|
2989 |
02 Dec 14 |
olle |
61 |
<table class="step-form"> |
2989 |
02 Dec 14 |
olle |
62 |
<tr> |
2401 |
06 May 14 |
olle |
63 |
<td class="prompt">Report</td> |
2401 |
06 May 14 |
olle |
64 |
<td class="input"> |
2989 |
02 Dec 14 |
olle |
65 |
<select name="reporttype" style="width: 20em"> |
2401 |
06 May 14 |
olle |
66 |
<option value="labenvironmentdailydisplay" selected="yes">Daily display</option> |
2401 |
06 May 14 |
olle |
67 |
<option value="labenvironmentweeklydisplay">Weekly display</option> |
2401 |
06 May 14 |
olle |
68 |
<option value="labenvironmentoverviewdisplay">Overview display</option> |
2401 |
06 May 14 |
olle |
69 |
</select> |
2401 |
06 May 14 |
olle |
70 |
</td> |
2401 |
06 May 14 |
olle |
71 |
<td class="status" id="report.status"></td> |
2401 |
06 May 14 |
olle |
72 |
<td class="help"> |
2989 |
02 Dec 14 |
olle |
73 |
<span id="report.message" class="message"></span> |
2401 |
06 May 14 |
olle |
74 |
Select which report to generate. |
2401 |
06 May 14 |
olle |
75 |
</td> |
2401 |
06 May 14 |
olle |
76 |
</tr> |
2401 |
06 May 14 |
olle |
77 |
</table> |
2989 |
02 Dec 14 |
olle |
78 |
</div> |
2989 |
02 Dec 14 |
olle |
79 |
</div> |
2401 |
06 May 14 |
olle |
80 |
|
2439 |
19 May 14 |
olle |
81 |
<div id="parameterSection" style="display:none;"> |
2401 |
06 May 14 |
olle |
82 |
<p></p> |
2401 |
06 May 14 |
olle |
<!-- 2. Report parameters--> |
2989 |
02 Dec 14 |
olle |
84 |
<div class="step" id="step-2"> |
2989 |
02 Dec 14 |
olle |
85 |
<div class="step-no">2</div> |
2989 |
02 Dec 14 |
olle |
86 |
<div class="step-title">Report parameters</div> |
2989 |
02 Dec 14 |
olle |
87 |
<div class="step-content"> |
2989 |
02 Dec 14 |
olle |
88 |
|
2989 |
02 Dec 14 |
olle |
89 |
<table class="step-form"> |
2401 |
06 May 14 |
olle |
90 |
<tr> |
2401 |
06 May 14 |
olle |
91 |
<td valign="top" class="prompt"> |
2401 |
06 May 14 |
olle |
92 |
<div id="reportPeriodSubSection01" style="display:none;"> |
2401 |
06 May 14 |
olle |
93 |
<text id="reportPeriodSubSection01Header">From</text> |
2401 |
06 May 14 |
olle |
94 |
</div> |
2401 |
06 May 14 |
olle |
95 |
</td> |
2401 |
06 May 14 |
olle |
96 |
<td valign="top" class="input"> |
2401 |
06 May 14 |
olle |
97 |
<div id="reportPeriodSubSection02" style="display:none;"> |
2989 |
02 Dec 14 |
olle |
98 |
Date <input type="text" name="fromdate" value="" |
2989 |
02 Dec 14 |
olle |
99 |
style="width: 10em" maxlength="10" |
2989 |
02 Dec 14 |
olle |
100 |
data-auto-init="focus-on-enter" data-next-focus="chartvariant" |
2989 |
02 Dec 14 |
olle |
101 |
> |
2401 |
06 May 14 |
olle |
102 |
</div> |
2401 |
06 May 14 |
olle |
103 |
</td> |
2401 |
06 May 14 |
olle |
104 |
<td valign="top" class="status" id="sensorSelect.status"></td> |
2401 |
06 May 14 |
olle |
105 |
<td class="help"> |
2401 |
06 May 14 |
olle |
106 |
<div id="reportPeriodSubSection04" style="display:none;"> |
2401 |
06 May 14 |
olle |
107 |
<span id="sensorSelect.message" class="message" style="display: none;"></span> |
2401 |
06 May 14 |
olle |
108 |
<text id="reportPeriodSubSection04HelpText">Select sensor(s)</text><br> |
2401 |
06 May 14 |
olle |
109 |
</div> |
2401 |
06 May 14 |
olle |
110 |
</td> |
2989 |
02 Dec 14 |
olle |
111 |
</tr> |
2401 |
06 May 14 |
olle |
112 |
<tr> |
2401 |
06 May 14 |
olle |
113 |
<td valign="top" class="prompt"> |
2401 |
06 May 14 |
olle |
114 |
<div id="dayTimeFilterSubSection01" style="display:none;"> |
2401 |
06 May 14 |
olle |
115 |
Daytime filter |
2401 |
06 May 14 |
olle |
116 |
</div> |
2401 |
06 May 14 |
olle |
117 |
</td> |
2401 |
06 May 14 |
olle |
118 |
<td valign="top" class="input"> |
2401 |
06 May 14 |
olle |
119 |
<div id="dayTimeFilterSubSection02" style="display:none;"> |
2989 |
02 Dec 14 |
olle |
120 |
From time <input type="text" name="filterfromtime" value="" |
2989 |
02 Dec 14 |
olle |
121 |
style="width: 4em" maxlength="4" |
2989 |
02 Dec 14 |
olle |
122 |
data-auto-init="focus-on-enter" data-next-focus="filtertotime" |
2989 |
02 Dec 14 |
olle |
123 |
> |
2989 |
02 Dec 14 |
olle |
124 |
To time <input type="text" name="filtertotime" value="" |
2989 |
02 Dec 14 |
olle |
125 |
style="width: 4em" maxlength="4" |
2989 |
02 Dec 14 |
olle |
126 |
data-auto-init="focus-on-enter" data-next-focus="weekdayfilter" |
2989 |
02 Dec 14 |
olle |
127 |
> |
2401 |
06 May 14 |
olle |
128 |
</div> |
2401 |
06 May 14 |
olle |
129 |
</td> |
2401 |
06 May 14 |
olle |
130 |
<td valign="top" class="status" id="dayTimeFilter.status"></td> |
2401 |
06 May 14 |
olle |
131 |
<td class="help"> |
2401 |
06 May 14 |
olle |
132 |
<div id="dayTimeFilterSubSection04" style="display:none;"> |
2401 |
06 May 14 |
olle |
133 |
<span id="dayTimeFilter.message" class="message" style="display: none;"></span> |
2401 |
06 May 14 |
olle |
134 |
Select what daytime interval to include in statistics (HHMM). Note that climate control in some labs are only active during day. Blank fields give data for full day. |
2401 |
06 May 14 |
olle |
135 |
</div> |
2401 |
06 May 14 |
olle |
136 |
</td> |
2401 |
06 May 14 |
olle |
137 |
</tr> |
2401 |
06 May 14 |
olle |
138 |
<tr> |
2401 |
06 May 14 |
olle |
139 |
<td valign="top" class="prompt"> |
2465 |
02 Jun 14 |
olle |
140 |
<div id="weekDayFilterSubSection01" style="display:none;"> |
2465 |
02 Jun 14 |
olle |
141 |
Week day filter |
2465 |
02 Jun 14 |
olle |
142 |
</div> |
2465 |
02 Jun 14 |
olle |
143 |
</td> |
2465 |
02 Jun 14 |
olle |
144 |
<td valign="top" class="input"> |
2465 |
02 Jun 14 |
olle |
145 |
<div id="weekDayFilterSubSection02" style="display:none;"> |
2989 |
02 Dec 14 |
olle |
146 |
<select id="weekDayFilterSelectId" name="weekdayfilter" style="width: 15em"> |
2465 |
02 Jun 14 |
olle |
147 |
<option value="all">All</option> |
2465 |
02 Jun 14 |
olle |
148 |
<option value="mondaytofriday">Mon-Fri only</option> |
2465 |
02 Jun 14 |
olle |
149 |
<option value="saturdaytosunday">Sat-Sun only</option> |
2465 |
02 Jun 14 |
olle |
150 |
<option value="workdays" selected="yes">Workdays</option> |
2465 |
02 Jun 14 |
olle |
151 |
<option value="nonworkdays">Non-workdays</option> |
2465 |
02 Jun 14 |
olle |
152 |
</select> |
2465 |
02 Jun 14 |
olle |
153 |
</div> |
2465 |
02 Jun 14 |
olle |
154 |
</td> |
2465 |
02 Jun 14 |
olle |
155 |
<td valign="top" class="status" id="weekDayFilter.status"></td> |
2465 |
02 Jun 14 |
olle |
156 |
<td class="help"> |
2465 |
02 Jun 14 |
olle |
157 |
<div id="weekDayFilterSubSection04" style="display:none;"> |
2465 |
02 Jun 14 |
olle |
158 |
<span id="weekDayFilter.message" class="message" style="display: none;"></span> |
2465 |
02 Jun 14 |
olle |
159 |
Select what weekdays to include in statistics. Note that climate control in some labs are shut down on non-workdays (Saturdays, Sundays and work-free days related to holidays). |
2465 |
02 Jun 14 |
olle |
160 |
</div> |
2465 |
02 Jun 14 |
olle |
161 |
</td> |
2465 |
02 Jun 14 |
olle |
162 |
</tr> |
2465 |
02 Jun 14 |
olle |
163 |
<tr> |
2465 |
02 Jun 14 |
olle |
164 |
<td valign="top" class="prompt"> |
2401 |
06 May 14 |
olle |
165 |
<div id="chartVariantSubSection01" style="display:none;"> |
2401 |
06 May 14 |
olle |
166 |
Chart data |
2401 |
06 May 14 |
olle |
167 |
</div> |
2401 |
06 May 14 |
olle |
168 |
</td> |
2401 |
06 May 14 |
olle |
169 |
<td valign="top" class="input"> |
2401 |
06 May 14 |
olle |
170 |
<div id="chartVariantSubSection02" style="display:none;"> |
2989 |
02 Dec 14 |
olle |
171 |
<select id="sensorSelectId" name="chartvariant" style="width: 20em"> |
2401 |
06 May 14 |
olle |
172 |
<option value="all">All</option> |
2401 |
06 May 14 |
olle |
173 |
</select> |
2401 |
06 May 14 |
olle |
174 |
</div> |
2401 |
06 May 14 |
olle |
175 |
</td> |
2401 |
06 May 14 |
olle |
176 |
<td valign="top" class="status" id="displaychartVariant.status"></td> |
2401 |
06 May 14 |
olle |
177 |
<td class="help"> |
2401 |
06 May 14 |
olle |
178 |
<div id="chartVariantSubSection04" style="display:none;"> |
2401 |
06 May 14 |
olle |
179 |
<span id="displaychartVariant.message" class="message" style="display: none;"></span> |
2401 |
06 May 14 |
olle |
180 |
Select what data to report. |
2401 |
06 May 14 |
olle |
181 |
</div> |
2401 |
06 May 14 |
olle |
182 |
</td> |
2401 |
06 May 14 |
olle |
183 |
</tr> |
2401 |
06 May 14 |
olle |
184 |
</table> |
2989 |
02 Dec 14 |
olle |
185 |
</div> |
2989 |
02 Dec 14 |
olle |
186 |
</div> |
2401 |
06 May 14 |
olle |
187 |
</div> |
2401 |
06 May 14 |
olle |
188 |
|
2989 |
02 Dec 14 |
olle |
189 |
<div class="step" id="step-3"> |
2989 |
02 Dec 14 |
olle |
190 |
<div class="step-no">3</div> |
2989 |
02 Dec 14 |
olle |
191 |
<div class="step-title">Generated report |
2989 |
02 Dec 14 |
olle |
192 |
<span id="printButton" class="link"><img src="../images/print.png">Print version…</span> |
2989 |
02 Dec 14 |
olle |
193 |
</div> |
2989 |
02 Dec 14 |
olle |
194 |
<div class="step-content" id="step-3-content"> |
2989 |
02 Dec 14 |
olle |
195 |
<div id="reportdiv" style="text-align: center;"></div> |
2989 |
02 Dec 14 |
olle |
196 |
</div> |
2989 |
02 Dec 14 |
olle |
197 |
</div> |
2989 |
02 Dec 14 |
olle |
198 |
|
2989 |
02 Dec 14 |
olle |
199 |
<div id="wizard-status"></div> |
2401 |
06 May 14 |
olle |
200 |
|
2401 |
06 May 14 |
olle |
201 |
<div class="messagecontainer error" id="errorMessage" style="display: none; width: 950px; margin-left: 20px; margin-bottom: 0px;"></div> |
2401 |
06 May 14 |
olle |
202 |
|
2989 |
02 Dec 14 |
olle |
203 |
<table class="navigation" id="navigation"> |
2401 |
06 May 14 |
olle |
204 |
<tr> |
2989 |
02 Dec 14 |
olle |
205 |
<td><base:button id="gocancel" title="Cancel" /></td> |
2989 |
02 Dec 14 |
olle |
206 |
<td><base:button id="gonext" title="Next" image="<%="gonext.png"%>" /></td> |
2989 |
02 Dec 14 |
olle |
207 |
<td><base:button id="gocreate" title="Generate" image="<%="gonext.png"%>" /></td> |
2989 |
02 Dec 14 |
olle |
208 |
<td><base:button id="gorestart" title="Restart" image="<%="goback.png"%>" /></td> |
2401 |
06 May 14 |
olle |
209 |
<td id="gonext.message" class="message"></td> |
2401 |
06 May 14 |
olle |
210 |
</tr> |
2401 |
06 May 14 |
olle |
211 |
</table> |
2401 |
06 May 14 |
olle |
212 |
</form> |
2401 |
06 May 14 |
olle |
213 |
</div> |
2401 |
06 May 14 |
olle |
214 |
|
2401 |
06 May 14 |
olle |
215 |
</base:body> |
2401 |
06 May 14 |
olle |
216 |
</base:page> |
2401 |
06 May 14 |
olle |
217 |
<% |
2401 |
06 May 14 |
olle |
218 |
} |
2401 |
06 May 14 |
olle |
219 |
finally |
2401 |
06 May 14 |
olle |
220 |
{ |
2401 |
06 May 14 |
olle |
221 |
if (dc != null) dc.close(); |
2401 |
06 May 14 |
olle |
222 |
} |
2401 |
06 May 14 |
olle |
223 |
%> |