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 |
import="net.sf.basedb.util.formatter.DateFormatter" |
2303 |
02 Apr 14 |
olle |
13 |
import="java.util.Calendar" |
2303 |
02 Apr 14 |
olle |
14 |
import="java.util.Locale" |
2303 |
02 Apr 14 |
olle |
15 |
import="java.text.SimpleDateFormat" |
2303 |
02 Apr 14 |
olle |
16 |
%> |
2303 |
02 Apr 14 |
olle |
17 |
<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %> |
2303 |
02 Apr 14 |
olle |
18 |
<%@ taglib prefix="p" uri="/WEB-INF/path.tld" %> |
2303 |
02 Apr 14 |
olle |
19 |
<% |
2303 |
02 Apr 14 |
olle |
20 |
final SessionControl sc = Base.getExistingSessionControl(request, true); |
2303 |
02 Apr 14 |
olle |
21 |
final String ID = sc.getId(); |
2303 |
02 Apr 14 |
olle |
22 |
final float scale = Base.getScale(sc); |
2303 |
02 Apr 14 |
olle |
23 |
final String home = ExtensionsControl.getHomeUrl("net.sf.basedb.labenv"); |
2303 |
02 Apr 14 |
olle |
24 |
DbControl dc = null; |
2303 |
02 Apr 14 |
olle |
25 |
try |
2303 |
02 Apr 14 |
olle |
26 |
{ |
2303 |
02 Apr 14 |
olle |
27 |
dc = sc.newDbControl(); |
2303 |
02 Apr 14 |
olle |
28 |
final User user = User.getById(dc, sc.getLoggedInUserId()); |
2303 |
02 Apr 14 |
olle |
29 |
%> |
2303 |
02 Apr 14 |
olle |
30 |
<base:page type="default" > |
2989 |
02 Dec 14 |
olle |
31 |
<base:head |
3735 |
10 Feb 16 |
olle |
32 |
scripts="~../labenv.js,~labenvironmentdatabaseexport.js" |
3735 |
10 Feb 16 |
olle |
33 |
styles="path.css,~../css/labenv.css" |
2989 |
02 Dec 14 |
olle |
34 |
> |
3735 |
10 Feb 16 |
olle |
35 |
<link rel="stylesheet" type="text/css" href="../css/labenv.css"> |
2989 |
02 Dec 14 |
olle |
36 |
<style> |
2303 |
02 Apr 14 |
olle |
37 |
|
2989 |
02 Dec 14 |
olle |
38 |
.fullyear |
2303 |
02 Apr 14 |
olle |
39 |
{ |
2989 |
02 Dec 14 |
olle |
40 |
font-weight: bold; |
2303 |
02 Apr 14 |
olle |
41 |
} |
2303 |
02 Apr 14 |
olle |
42 |
|
2303 |
02 Apr 14 |
olle |
43 |
#previewWrapper |
2303 |
02 Apr 14 |
olle |
44 |
{ |
2303 |
02 Apr 14 |
olle |
45 |
position: absolute; |
2303 |
02 Apr 14 |
olle |
46 |
//top: 11em; |
2303 |
02 Apr 14 |
olle |
47 |
top: 15em; |
2303 |
02 Apr 14 |
olle |
48 |
bottom: 1em; |
2303 |
02 Apr 14 |
olle |
49 |
left: 20px; |
2303 |
02 Apr 14 |
olle |
50 |
width: 950px; |
2303 |
02 Apr 14 |
olle |
51 |
overflow: visible; |
2303 |
02 Apr 14 |
olle |
52 |
} |
2303 |
02 Apr 14 |
olle |
53 |
|
2303 |
02 Apr 14 |
olle |
54 |
#previewList |
2303 |
02 Apr 14 |
olle |
55 |
{ |
2303 |
02 Apr 14 |
olle |
56 |
position: absolute; |
2303 |
02 Apr 14 |
olle |
57 |
top: 1.5em; |
2303 |
02 Apr 14 |
olle |
58 |
bottom: 0px; |
2303 |
02 Apr 14 |
olle |
59 |
width: 950px; |
2303 |
02 Apr 14 |
olle |
60 |
overflow: auto; |
2303 |
02 Apr 14 |
olle |
61 |
white-space: pre; |
2303 |
02 Apr 14 |
olle |
62 |
font-family: monospace; |
2303 |
02 Apr 14 |
olle |
63 |
border: 1px dotted #A0A0A0; |
2303 |
02 Apr 14 |
olle |
64 |
border-radius: 4px; |
2303 |
02 Apr 14 |
olle |
65 |
background: #E8E8E8; |
2303 |
02 Apr 14 |
olle |
66 |
padding: 0.25em; |
2303 |
02 Apr 14 |
olle |
67 |
} |
2303 |
02 Apr 14 |
olle |
68 |
|
2303 |
02 Apr 14 |
olle |
69 |
#previewTitle |
2303 |
02 Apr 14 |
olle |
70 |
{ |
2303 |
02 Apr 14 |
olle |
71 |
font-weight: bold; |
2303 |
02 Apr 14 |
olle |
72 |
} |
2303 |
02 Apr 14 |
olle |
73 |
|
2303 |
02 Apr 14 |
olle |
74 |
#previewList th |
2303 |
02 Apr 14 |
olle |
75 |
{ |
2303 |
02 Apr 14 |
olle |
76 |
border-bottom: 1px dotted #A0A0A0; |
2303 |
02 Apr 14 |
olle |
77 |
} |
2303 |
02 Apr 14 |
olle |
78 |
|
2303 |
02 Apr 14 |
olle |
79 |
#previewList td, #previewList th |
2303 |
02 Apr 14 |
olle |
80 |
{ |
2303 |
02 Apr 14 |
olle |
81 |
text-align: left; |
2303 |
02 Apr 14 |
olle |
82 |
padding-right: 2em; |
2303 |
02 Apr 14 |
olle |
83 |
vertical-align: bottom; |
2303 |
02 Apr 14 |
olle |
84 |
} |
2303 |
02 Apr 14 |
olle |
85 |
|
2303 |
02 Apr 14 |
olle |
86 |
</style> |
2303 |
02 Apr 14 |
olle |
87 |
</base:head> |
2303 |
02 Apr 14 |
olle |
88 |
<base:body > |
2303 |
02 Apr 14 |
olle |
89 |
|
2303 |
02 Apr 14 |
olle |
90 |
<p:path><p:pathelement |
3011 |
05 Dec 14 |
nicklas |
91 |
title="LabEnv" href="<%="./labenvironmentdatabaseexport.jsp?ID="+ID%>" |
2303 |
02 Apr 14 |
olle |
92 |
/><p:pathelement title="Lab environment database export" |
2303 |
02 Apr 14 |
olle |
93 |
/></p:path> |
2303 |
02 Apr 14 |
olle |
94 |
|
2303 |
02 Apr 14 |
olle |
95 |
<div class="content"> |
2989 |
02 Dec 14 |
olle |
96 |
<form name="labenv" id="wizard" class="wizard"> |
2303 |
02 Apr 14 |
olle |
97 |
|
2303 |
02 Apr 14 |
olle |
<!-- 1. Select lab sensor --> |
2989 |
02 Dec 14 |
olle |
99 |
<div class="step" id="step-1"> |
2989 |
02 Dec 14 |
olle |
100 |
<div class="step-no">1</div> |
2989 |
02 Dec 14 |
olle |
101 |
<div class="step-title">Select lab sensor(s) and time period</div> |
2989 |
02 Dec 14 |
olle |
102 |
<div class="step-content"> |
2989 |
02 Dec 14 |
olle |
103 |
|
2989 |
02 Dec 14 |
olle |
104 |
<table class="step-form"> |
2303 |
02 Apr 14 |
olle |
105 |
<tr> |
2303 |
02 Apr 14 |
olle |
106 |
<td class="prompt">Sensor</td> |
2303 |
02 Apr 14 |
olle |
107 |
<td class="input"> |
2989 |
02 Dec 14 |
olle |
108 |
<select id="sensorSelectId" name="sensorSelect" style="width: 20em"> |
2303 |
02 Apr 14 |
olle |
109 |
<option value="all">All</option> |
2303 |
02 Apr 14 |
olle |
110 |
</select> |
2303 |
02 Apr 14 |
olle |
111 |
</td> |
2303 |
02 Apr 14 |
olle |
112 |
<td class="status" id="sensorSelect.status"></td> |
2989 |
02 Dec 14 |
olle |
113 |
<td class="help"> |
2989 |
02 Dec 14 |
olle |
114 |
<span id="sensor.message" class="message"></span> |
2989 |
02 Dec 14 |
olle |
115 |
</td> |
2303 |
02 Apr 14 |
olle |
116 |
</tr> |
2303 |
02 Apr 14 |
olle |
117 |
<tr id="fromDateTimeSection" valign="top"> |
2303 |
02 Apr 14 |
olle |
118 |
<td class="prompt">From</td> |
2989 |
02 Dec 14 |
olle |
119 |
<td class="input"> |
2989 |
02 Dec 14 |
olle |
120 |
Date <input type="text" name="fromDate" value="" |
2989 |
02 Dec 14 |
olle |
121 |
style="width: 10em" maxlength="10" |
2989 |
02 Dec 14 |
olle |
122 |
data-auto-init="focus-on-enter" data-next-focus="fromTime" |
2989 |
02 Dec 14 |
olle |
123 |
> |
2989 |
02 Dec 14 |
olle |
124 |
Time <input type="text" name="fromTime" 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="toDate" |
2989 |
02 Dec 14 |
olle |
127 |
> |
2989 |
02 Dec 14 |
olle |
128 |
</td> |
2303 |
02 Apr 14 |
olle |
129 |
<td class="status" id="fromDateTime.status"></td> |
2989 |
02 Dec 14 |
olle |
130 |
<td class="help"> |
2989 |
02 Dec 14 |
olle |
131 |
<span id="fromDateTime.message" class="message"></span> |
2989 |
02 Dec 14 |
olle |
132 |
Start date+time (YYYYMMDD, HHMM) Blank fields give data from start |
2989 |
02 Dec 14 |
olle |
133 |
</td> |
2303 |
02 Apr 14 |
olle |
134 |
</tr> |
2303 |
02 Apr 14 |
olle |
135 |
<tr id="toDateTimeSection" valign="top"> |
2303 |
02 Apr 14 |
olle |
136 |
<td class="prompt">To</td> |
2989 |
02 Dec 14 |
olle |
137 |
<td class="input"> |
2989 |
02 Dec 14 |
olle |
138 |
Date <input type="text" name="toDate" value="" |
2989 |
02 Dec 14 |
olle |
139 |
style="width: 10em" maxlength="10" |
2989 |
02 Dec 14 |
olle |
140 |
data-auto-init="focus-on-enter" data-next-focus="toTime" |
2989 |
02 Dec 14 |
olle |
141 |
> |
2989 |
02 Dec 14 |
olle |
142 |
Time <input type="text" name="toTime" value="" |
2989 |
02 Dec 14 |
olle |
143 |
style="width: 4em" maxlength="4" |
2989 |
02 Dec 14 |
olle |
144 |
data-auto-init="focus-on-enter" data-next-focus="displayIndexSelectId" |
2989 |
02 Dec 14 |
olle |
145 |
> |
2989 |
02 Dec 14 |
olle |
146 |
</td> |
2303 |
02 Apr 14 |
olle |
147 |
<td class="status" id="toDateTime.status"></td> |
2989 |
02 Dec 14 |
olle |
148 |
<td class="help"> |
2989 |
02 Dec 14 |
olle |
149 |
<span id="toDateTime.message" class="message"></span> |
2989 |
02 Dec 14 |
olle |
150 |
End date+time (YYYYMMDD, HHMM) Blank fields give data to end |
2989 |
02 Dec 14 |
olle |
151 |
</td> |
2303 |
02 Apr 14 |
olle |
152 |
</tr> |
2303 |
02 Apr 14 |
olle |
153 |
<tr id="displayIndexSection" valign="top"> |
2303 |
02 Apr 14 |
olle |
154 |
<td class="prompt">Display index values</td> |
2303 |
02 Apr 14 |
olle |
155 |
<td class="input"> |
2989 |
02 Dec 14 |
olle |
156 |
<select id="displayIndexSelectId" name="displayIndexSelect" style="width: 4em"> |
2303 |
02 Apr 14 |
olle |
157 |
<option value="true">Yes</option> |
2303 |
02 Apr 14 |
olle |
158 |
<option value="false" selected="yes">No</option> |
2303 |
02 Apr 14 |
olle |
159 |
</select> |
2303 |
02 Apr 14 |
olle |
160 |
</td> |
2303 |
02 Apr 14 |
olle |
161 |
<td class="status" id="displayIndex.status"></td> |
2989 |
02 Dec 14 |
olle |
162 |
<td class="help"> |
2989 |
02 Dec 14 |
olle |
163 |
<span id="displayIndex.message" class="message"></span> |
2989 |
02 Dec 14 |
olle |
164 |
Select if database indices should be displayed |
2989 |
02 Dec 14 |
olle |
165 |
</td> |
2303 |
02 Apr 14 |
olle |
166 |
</tr> |
2303 |
02 Apr 14 |
olle |
167 |
</table> |
2989 |
02 Dec 14 |
olle |
168 |
</div> |
2989 |
02 Dec 14 |
olle |
169 |
</div> |
2303 |
02 Apr 14 |
olle |
170 |
|
2989 |
02 Dec 14 |
olle |
171 |
<div id="wizard-status"></div> |
2989 |
02 Dec 14 |
olle |
172 |
|
2303 |
02 Apr 14 |
olle |
173 |
<div class="messagecontainer error" id="errorMessage" style="display: none; width: 950px; margin-left: 20px; margin-bottom: 0px;"></div> |
2303 |
02 Apr 14 |
olle |
174 |
|
2303 |
02 Apr 14 |
olle |
175 |
<div id="done" class="success" style="display: none; width: 950px; margin-left: 20px; margin-top: 20px;"></div> |
2303 |
02 Apr 14 |
olle |
176 |
|
2989 |
02 Dec 14 |
olle |
177 |
<table class="navigation" id="navigation"> |
2303 |
02 Apr 14 |
olle |
178 |
<tr> |
2989 |
02 Dec 14 |
olle |
179 |
<td><base:button id="gopreview" title="Preview" image="<%="export.png"%>" /></td> |
2989 |
02 Dec 14 |
olle |
180 |
<td><base:button id="goexport" title="Download" image="<%="download.png"%>" /></td> |
2303 |
02 Apr 14 |
olle |
181 |
</tr> |
2303 |
02 Apr 14 |
olle |
182 |
</table> |
2303 |
02 Apr 14 |
olle |
183 |
</form> |
2303 |
02 Apr 14 |
olle |
184 |
|
2303 |
02 Apr 14 |
olle |
185 |
<div class="loading" id="loading" style="display: none;"><table><tr><td><img src="../images/loading.gif"></td><td id="loading.msg">Please wait...</td></tr></table></div> |
2303 |
02 Apr 14 |
olle |
186 |
|
2303 |
02 Apr 14 |
olle |
187 |
<div id="previewWrapper" style="display: none;"> |
2303 |
02 Apr 14 |
olle |
188 |
<div> |
2303 |
02 Apr 14 |
olle |
189 |
<span id="previewTitle">Preview</span> |
2303 |
02 Apr 14 |
olle |
190 |
<span id="previewWarning"></span> |
2303 |
02 Apr 14 |
olle |
191 |
</div> |
2303 |
02 Apr 14 |
olle |
192 |
<div id="previewList"></div> |
2303 |
02 Apr 14 |
olle |
193 |
</div> |
2303 |
02 Apr 14 |
olle |
194 |
|
2303 |
02 Apr 14 |
olle |
195 |
</div> |
2303 |
02 Apr 14 |
olle |
196 |
|
2303 |
02 Apr 14 |
olle |
197 |
</base:body> |
2303 |
02 Apr 14 |
olle |
198 |
</base:page> |
2303 |
02 Apr 14 |
olle |
199 |
<% |
2303 |
02 Apr 14 |
olle |
200 |
} |
2303 |
02 Apr 14 |
olle |
201 |
finally |
2303 |
02 Apr 14 |
olle |
202 |
{ |
2303 |
02 Apr 14 |
olle |
203 |
if (dc != null) dc.close(); |
2303 |
02 Apr 14 |
olle |
204 |
} |
2303 |
02 Apr 14 |
olle |
205 |
%> |