1541 |
22 Feb 12 |
nicklas |
1 |
<%-- $Id$ |
974 |
26 Feb 09 |
nicklas |
2 |
------------------------------------------------------------------ |
978 |
27 Feb 09 |
nicklas |
Copyright (C) 2009 Nicklas Nordborg |
974 |
26 Feb 09 |
nicklas |
4 |
|
1416 |
20 Oct 11 |
nicklas |
5 |
This file is part of the MeV Launcher extension for BASE. |
1416 |
20 Oct 11 |
nicklas |
6 |
Available at http://baseplugins.thep.lu.se/ |
1416 |
20 Oct 11 |
nicklas |
7 |
BASE main site: http://base.thep.lu.se/ |
1416 |
20 Oct 11 |
nicklas |
8 |
----------------------------------------------------------- |
1416 |
20 Oct 11 |
nicklas |
9 |
|
1416 |
20 Oct 11 |
nicklas |
10 |
This is free software; you can redistribute it and/or |
974 |
26 Feb 09 |
nicklas |
11 |
modify it under the terms of the GNU General Public License |
1416 |
20 Oct 11 |
nicklas |
12 |
as published by the Free Software Foundation; either version 3 |
974 |
26 Feb 09 |
nicklas |
13 |
of the License, or (at your option) any later version. |
1416 |
20 Oct 11 |
nicklas |
14 |
|
1416 |
20 Oct 11 |
nicklas |
15 |
The software is distributed in the hope that it will be useful, |
974 |
26 Feb 09 |
nicklas |
16 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
1416 |
20 Oct 11 |
nicklas |
17 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
974 |
26 Feb 09 |
nicklas |
18 |
GNU General Public License for more details. |
1416 |
20 Oct 11 |
nicklas |
19 |
|
974 |
26 Feb 09 |
nicklas |
20 |
You should have received a copy of the GNU General Public License |
1416 |
20 Oct 11 |
nicklas |
21 |
along with BASE. If not, see <http://www.gnu.org/licenses/>. |
974 |
26 Feb 09 |
nicklas |
22 |
------------------------------------------------------------------ |
974 |
26 Feb 09 |
nicklas |
23 |
|
974 |
26 Feb 09 |
nicklas |
24 |
@author Jari, Nicklas |
974 |
26 Feb 09 |
nicklas |
25 |
--%> |
1026 |
07 Apr 09 |
nicklas |
26 |
<%@ page |
1026 |
07 Apr 09 |
nicklas |
27 |
pageEncoding="UTF-8" |
1026 |
07 Apr 09 |
nicklas |
28 |
session="false" |
974 |
26 Feb 09 |
nicklas |
29 |
import="net.sf.basedb.core.Application" |
974 |
26 Feb 09 |
nicklas |
30 |
import="net.sf.basedb.core.BioAssaySet" |
974 |
26 Feb 09 |
nicklas |
31 |
import="net.sf.basedb.core.Experiment" |
974 |
26 Feb 09 |
nicklas |
32 |
import="net.sf.basedb.core.Directory" |
1083 |
18 May 09 |
nicklas |
33 |
import="net.sf.basedb.core.File" |
974 |
26 Feb 09 |
nicklas |
34 |
import="net.sf.basedb.core.User" |
974 |
26 Feb 09 |
nicklas |
35 |
import="net.sf.basedb.core.DbControl" |
974 |
26 Feb 09 |
nicklas |
36 |
import="net.sf.basedb.core.SessionControl" |
1010 |
30 Mar 09 |
nicklas |
37 |
import="net.sf.basedb.core.ItemContext" |
1010 |
30 Mar 09 |
nicklas |
38 |
import="net.sf.basedb.core.Item" |
1083 |
18 May 09 |
nicklas |
39 |
import="net.sf.basedb.core.Include" |
1083 |
18 May 09 |
nicklas |
40 |
import="net.sf.basedb.core.Permission" |
974 |
26 Feb 09 |
nicklas |
41 |
import="net.sf.basedb.core.Path" |
1083 |
18 May 09 |
nicklas |
42 |
import="net.sf.basedb.core.FileStoreUtil" |
1083 |
18 May 09 |
nicklas |
43 |
import="net.sf.basedb.core.ItemQuery" |
1083 |
18 May 09 |
nicklas |
44 |
import="net.sf.basedb.core.PluginConfiguration" |
1083 |
18 May 09 |
nicklas |
45 |
import="net.sf.basedb.core.query.Restrictions" |
1083 |
18 May 09 |
nicklas |
46 |
import="net.sf.basedb.core.query.Expressions" |
1083 |
18 May 09 |
nicklas |
47 |
import="net.sf.basedb.core.query.Hql" |
1083 |
18 May 09 |
nicklas |
48 |
import="net.sf.basedb.core.query.Orders" |
974 |
26 Feb 09 |
nicklas |
49 |
import="net.sf.basedb.clients.web.Base" |
974 |
26 Feb 09 |
nicklas |
50 |
import="net.sf.basedb.clients.web.util.HTML" |
974 |
26 Feb 09 |
nicklas |
51 |
import="net.sf.basedb.clients.web.extensions.ExtensionsControl" |
974 |
26 Feb 09 |
nicklas |
52 |
import="net.sf.basedb.util.Values" |
1083 |
18 May 09 |
nicklas |
53 |
import="java.util.List" |
974 |
26 Feb 09 |
nicklas |
54 |
%> |
974 |
26 Feb 09 |
nicklas |
55 |
<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %> |
1181 |
22 Oct 09 |
nicklas |
56 |
<%! |
1181 |
22 Oct 09 |
nicklas |
57 |
// Get an attached file or null in case there is some kind of error |
1181 |
22 Oct 09 |
nicklas |
58 |
private File safeGetFile(DbControl dc, BioAssaySet bas, String fileType) |
1181 |
22 Oct 09 |
nicklas |
59 |
{ |
1181 |
22 Oct 09 |
nicklas |
60 |
File file = null; |
1181 |
22 Oct 09 |
nicklas |
61 |
try |
1181 |
22 Oct 09 |
nicklas |
62 |
{ |
1395 |
15 Sep 11 |
nicklas |
63 |
file = FileStoreUtil.getDataFile(dc, bas, fileType, false); |
1181 |
22 Oct 09 |
nicklas |
64 |
} |
1181 |
22 Oct 09 |
nicklas |
65 |
catch (Throwable t) |
1181 |
22 Oct 09 |
nicklas |
66 |
{} |
1181 |
22 Oct 09 |
nicklas |
67 |
return file; |
1181 |
22 Oct 09 |
nicklas |
68 |
} |
1181 |
22 Oct 09 |
nicklas |
69 |
%> |
974 |
26 Feb 09 |
nicklas |
70 |
<% |
974 |
26 Feb 09 |
nicklas |
71 |
final SessionControl sc = Base.getExistingSessionControl(request, true); |
974 |
26 Feb 09 |
nicklas |
72 |
final String ID = sc.getId(); |
974 |
26 Feb 09 |
nicklas |
73 |
final int bioAssaySetId = Values.getInt(request.getParameter("bioassayset_id")); |
1083 |
18 May 09 |
nicklas |
74 |
final String title = "Launch MeV"; |
1083 |
18 May 09 |
nicklas |
75 |
final String homeUrl = ExtensionsControl.getHomeUrl("net.sf.basedb.mev.launchmev"); |
1083 |
18 May 09 |
nicklas |
76 |
final String root = request.getContextPath()+"/"; |
1083 |
18 May 09 |
nicklas |
77 |
|
974 |
26 Feb 09 |
nicklas |
78 |
DbControl dc = null; |
974 |
26 Feb 09 |
nicklas |
79 |
String defaultPath = "/"; |
1083 |
18 May 09 |
nicklas |
80 |
|
974 |
26 Feb 09 |
nicklas |
81 |
try |
974 |
26 Feb 09 |
nicklas |
82 |
{ |
974 |
26 Feb 09 |
nicklas |
83 |
dc = sc.newDbControl(); |
974 |
26 Feb 09 |
nicklas |
84 |
BioAssaySet bas = BioAssaySet.getById(dc, bioAssaySetId); |
1010 |
30 Mar 09 |
nicklas |
85 |
ItemContext cc = sc.getCurrentContext(Item.BIOASSAYSET); |
1010 |
30 Mar 09 |
nicklas |
86 |
cc.setId(bioAssaySetId); |
1083 |
18 May 09 |
nicklas |
87 |
|
1083 |
18 May 09 |
nicklas |
88 |
// Get the current files |
1181 |
22 Oct 09 |
nicklas |
89 |
File tdmsFile = safeGetFile(dc, bas, "mev.tdms"); |
1181 |
22 Oct 09 |
nicklas |
90 |
File cghFile = safeGetFile(dc, bas, "mev.cgh"); |
1181 |
22 Oct 09 |
nicklas |
91 |
File anlFile = safeGetFile(dc, bas, "mev.anl"); |
1083 |
18 May 09 |
nicklas |
92 |
boolean allowCreateFile = bas.hasPermission(Permission.WRITE) |
1083 |
18 May 09 |
nicklas |
93 |
&& sc.hasPermission(Permission.CREATE, Item.FILE); |
1083 |
18 May 09 |
nicklas |
94 |
|
1083 |
18 May 09 |
nicklas |
95 |
// Get the avilable CGH export configurations |
1083 |
18 May 09 |
nicklas |
96 |
ItemQuery<PluginConfiguration> cghQuery = PluginConfiguration.getQuery(); |
1083 |
18 May 09 |
nicklas |
97 |
cghQuery.restrict(Restrictions.eq( |
1083 |
18 May 09 |
nicklas |
98 |
Hql.property("pluginDefinition.className"), |
1083 |
18 May 09 |
nicklas |
99 |
Expressions.string("net.sf.basedb.mev.plugin.CghExporterPlugin"))); |
1083 |
18 May 09 |
nicklas |
100 |
cghQuery.order(Orders.asc(Hql.property("name"))); |
1083 |
18 May 09 |
nicklas |
101 |
cghQuery.include(Include.MINE, Include.IN_PROJECT, Include.SHARED, Include.OTHERS); |
1083 |
18 May 09 |
nicklas |
102 |
List<PluginConfiguration> cghConfigurations = cghQuery.list(dc); |
1083 |
18 May 09 |
nicklas |
103 |
boolean canCreateCGHFile = cghConfigurations.size() > 0; |
1083 |
18 May 09 |
nicklas |
104 |
|
1083 |
18 May 09 |
nicklas |
105 |
// Default names of export files and export jobs |
1083 |
18 May 09 |
nicklas |
106 |
String defaultTdmsFileName = Path.makeSafeFilename(bas.getName() + "-" + bas.getId() + ".tdms.txt", ""); |
1083 |
18 May 09 |
nicklas |
107 |
String defaultCghFileName = Path.makeSafeFilename(bas.getName() + "-" + bas.getId() + ".cgh.txt", ""); |
1083 |
18 May 09 |
nicklas |
108 |
String tdmsJobName = "Create TDMS file for " + bas.getName(); |
1083 |
18 May 09 |
nicklas |
109 |
String cghJobName = "Create CGH file for " + bas.getName(); |
1083 |
18 May 09 |
nicklas |
110 |
|
1083 |
18 May 09 |
nicklas |
111 |
// Default home directory of either experiment or user |
974 |
26 Feb 09 |
nicklas |
112 |
try |
974 |
26 Feb 09 |
nicklas |
113 |
{ |
974 |
26 Feb 09 |
nicklas |
114 |
Experiment exp = bas.getExperiment(); |
974 |
26 Feb 09 |
nicklas |
115 |
Directory dir = exp.getDirectory(); |
974 |
26 Feb 09 |
nicklas |
116 |
if (dir == null) |
974 |
26 Feb 09 |
nicklas |
117 |
{ |
974 |
26 Feb 09 |
nicklas |
118 |
User user = User.getById(dc, sc.getLoggedInUserId()); |
974 |
26 Feb 09 |
nicklas |
119 |
dir = user.getHomeDirectory(); |
974 |
26 Feb 09 |
nicklas |
120 |
} |
974 |
26 Feb 09 |
nicklas |
121 |
if (dir != null) |
974 |
26 Feb 09 |
nicklas |
122 |
{ |
974 |
26 Feb 09 |
nicklas |
123 |
defaultPath = dir.getPath().toString() + "/"; |
974 |
26 Feb 09 |
nicklas |
124 |
} |
974 |
26 Feb 09 |
nicklas |
125 |
} |
974 |
26 Feb 09 |
nicklas |
126 |
catch (Throwable t) |
974 |
26 Feb 09 |
nicklas |
127 |
{} |
974 |
26 Feb 09 |
nicklas |
128 |
%> |
2209 |
03 Feb 14 |
nicklas |
129 |
<base:page type="popup" title="<%=title%>" id="mev-launch"> |
2209 |
03 Feb 14 |
nicklas |
130 |
<base:head scripts="~scripts/mev.js" /> |
974 |
26 Feb 09 |
nicklas |
131 |
<base:body> |
1541 |
22 Feb 12 |
nicklas |
132 |
<h1><%=title%></h1> |
2209 |
03 Feb 14 |
nicklas |
133 |
|
2209 |
03 Feb 14 |
nicklas |
134 |
<div id="page-data" class="datacontainer" |
2209 |
03 Feb 14 |
nicklas |
135 |
data-bioassayset-id="<%=bioAssaySetId%>" |
2209 |
03 Feb 14 |
nicklas |
136 |
></div> |
974 |
26 Feb 09 |
nicklas |
137 |
|
1083 |
18 May 09 |
nicklas |
138 |
<form name="mev"> |
1541 |
22 Feb 12 |
nicklas |
139 |
<div class="content bottomborder"> |
1541 |
22 Feb 12 |
nicklas |
140 |
|
1541 |
22 Feb 12 |
nicklas |
141 |
<table class="fullform"> |
1541 |
22 Feb 12 |
nicklas |
142 |
<tbody class="sectionheader"> |
1541 |
22 Feb 12 |
nicklas |
143 |
<tr> |
1541 |
22 Feb 12 |
nicklas |
144 |
<th colspan="2">MeV analysis file</th> |
1541 |
22 Feb 12 |
nicklas |
145 |
</tr> |
1541 |
22 Feb 12 |
nicklas |
146 |
</tbody> |
1541 |
22 Feb 12 |
nicklas |
147 |
<tbody> |
1541 |
22 Feb 12 |
nicklas |
148 |
<tr> |
2209 |
03 Feb 14 |
nicklas |
149 |
<td style="padding-bottom: 1em;"><base:button |
2209 |
03 Feb 14 |
nicklas |
150 |
title="Start MeV" |
2209 |
03 Feb 14 |
nicklas |
151 |
subclass="auto-init" |
2209 |
03 Feb 14 |
nicklas |
152 |
data-auto-init="start-mev" |
2209 |
03 Feb 14 |
nicklas |
153 |
data-mev-file-type="mev.anl" |
2209 |
03 Feb 14 |
nicklas |
154 |
image="<%=homeUrl + "/images/tm4.png" %>" |
1541 |
22 Feb 12 |
nicklas |
155 |
disabled="<%=anlFile == null%>"/></td> |
1541 |
22 Feb 12 |
nicklas |
156 |
<td style="padding-bottom: 1em;"> |
1083 |
18 May 09 |
nicklas |
157 |
<% |
1541 |
22 Feb 12 |
nicklas |
158 |
if (anlFile == null) |
1083 |
18 May 09 |
nicklas |
159 |
{ |
1083 |
18 May 09 |
nicklas |
160 |
%> |
1541 |
22 Feb 12 |
nicklas |
161 |
There is currently no MeV analysis file associated with the bioassay set. |
1083 |
18 May 09 |
nicklas |
162 |
<% |
1083 |
18 May 09 |
nicklas |
163 |
} |
1541 |
22 Feb 12 |
nicklas |
164 |
else |
1541 |
22 Feb 12 |
nicklas |
165 |
{ |
1541 |
22 Feb 12 |
nicklas |
166 |
%> |
1541 |
22 Feb 12 |
nicklas |
167 |
Start MeV with the current analysis file:<br> |
1541 |
22 Feb 12 |
nicklas |
168 |
<%=HTML.encodeTags(anlFile.getName())%> <%=Base.getFileLinks(ID, anlFile, root) %> |
1541 |
22 Feb 12 |
nicklas |
169 |
<% |
1541 |
22 Feb 12 |
nicklas |
170 |
} |
1083 |
18 May 09 |
nicklas |
171 |
%> |
1541 |
22 Feb 12 |
nicklas |
172 |
</td> |
1541 |
22 Feb 12 |
nicklas |
173 |
</tr> |
1541 |
22 Feb 12 |
nicklas |
174 |
</tbody> |
1541 |
22 Feb 12 |
nicklas |
175 |
<tbody class="sectionheader"> |
1541 |
22 Feb 12 |
nicklas |
176 |
<tr> |
1541 |
22 Feb 12 |
nicklas |
177 |
<th colspan="2">TDMS - Tab-delimited multiple sample</th> |
1541 |
22 Feb 12 |
nicklas |
178 |
</tr> |
1541 |
22 Feb 12 |
nicklas |
179 |
</tbody> |
1541 |
22 Feb 12 |
nicklas |
180 |
<tbody> |
1541 |
22 Feb 12 |
nicklas |
181 |
<tr> |
2209 |
03 Feb 14 |
nicklas |
182 |
<td><base:button |
2209 |
03 Feb 14 |
nicklas |
183 |
title="Start MeV" |
2209 |
03 Feb 14 |
nicklas |
184 |
subclass="auto-init" |
2209 |
03 Feb 14 |
nicklas |
185 |
data-auto-init="start-mev" |
2209 |
03 Feb 14 |
nicklas |
186 |
data-mev-file-type="mev.tdms" |
2209 |
03 Feb 14 |
nicklas |
187 |
image="<%=homeUrl + "/images/tm4.png" %>" |
1541 |
22 Feb 12 |
nicklas |
188 |
disabled="<%=tdmsFile == null%>"/></td> |
1541 |
22 Feb 12 |
nicklas |
189 |
<td> |
1541 |
22 Feb 12 |
nicklas |
190 |
<% |
1541 |
22 Feb 12 |
nicklas |
191 |
if (tdmsFile == null) |
1541 |
22 Feb 12 |
nicklas |
192 |
{ |
1541 |
22 Feb 12 |
nicklas |
193 |
%> |
1541 |
22 Feb 12 |
nicklas |
194 |
There is currently no TDMS file associated with the bioassay set. |
1541 |
22 Feb 12 |
nicklas |
195 |
<% |
1541 |
22 Feb 12 |
nicklas |
196 |
} |
1541 |
22 Feb 12 |
nicklas |
197 |
else |
1541 |
22 Feb 12 |
nicklas |
198 |
{ |
1541 |
22 Feb 12 |
nicklas |
199 |
%> |
1541 |
22 Feb 12 |
nicklas |
200 |
Start MeV with the current TDMS file:<br> |
1541 |
22 Feb 12 |
nicklas |
201 |
<%=HTML.encodeTags(tdmsFile.getName())%> <%=Base.getFileLinks(ID, tdmsFile, root) %> |
1541 |
22 Feb 12 |
nicklas |
202 |
<% |
1541 |
22 Feb 12 |
nicklas |
203 |
} |
1541 |
22 Feb 12 |
nicklas |
204 |
%> |
1541 |
22 Feb 12 |
nicklas |
205 |
</td> |
1541 |
22 Feb 12 |
nicklas |
206 |
</tr> |
1541 |
22 Feb 12 |
nicklas |
207 |
<tr> |
2209 |
03 Feb 14 |
nicklas |
208 |
<td style="padding-bottom: 1em;"><base:button |
2209 |
03 Feb 14 |
nicklas |
209 |
id="export-tdms" |
2209 |
03 Feb 14 |
nicklas |
210 |
title="Export" |
1541 |
22 Feb 12 |
nicklas |
211 |
disabled="<%=!allowCreateFile%>" |
2209 |
03 Feb 14 |
nicklas |
212 |
data-job-name="<%=HTML.encodeTags(tdmsJobName) %>" |
2209 |
03 Feb 14 |
nicklas |
213 |
data-save-as="<%=HTML.encodeTags(defaultPath+defaultTdmsFileName)%>" |
2209 |
03 Feb 14 |
nicklas |
214 |
image="export.png" /></td> |
1541 |
22 Feb 12 |
nicklas |
215 |
<td style="padding-bottom: 1em;"> |
1541 |
22 Feb 12 |
nicklas |
216 |
<% |
1541 |
22 Feb 12 |
nicklas |
217 |
if (allowCreateFile) |
1541 |
22 Feb 12 |
nicklas |
218 |
{ |
1541 |
22 Feb 12 |
nicklas |
219 |
%> |
1541 |
22 Feb 12 |
nicklas |
220 |
Export the spot data to a MeV TDMS file that can be opened with MeV. |
1541 |
22 Feb 12 |
nicklas |
221 |
<% |
1541 |
22 Feb 12 |
nicklas |
222 |
} |
1541 |
22 Feb 12 |
nicklas |
223 |
else |
1541 |
22 Feb 12 |
nicklas |
224 |
{ |
1541 |
22 Feb 12 |
nicklas |
225 |
%> |
1541 |
22 Feb 12 |
nicklas |
226 |
You don't have enough permissions to create a MeV TDSM file. |
1541 |
22 Feb 12 |
nicklas |
227 |
<% |
1541 |
22 Feb 12 |
nicklas |
228 |
} |
1541 |
22 Feb 12 |
nicklas |
229 |
%> |
1541 |
22 Feb 12 |
nicklas |
230 |
</td> |
1541 |
22 Feb 12 |
nicklas |
231 |
</tr> |
1541 |
22 Feb 12 |
nicklas |
232 |
</tbody> |
1541 |
22 Feb 12 |
nicklas |
233 |
<tbody class="sectionheader"> |
1541 |
22 Feb 12 |
nicklas |
234 |
<tr> |
1541 |
22 Feb 12 |
nicklas |
235 |
<th colspan="2">CGH - Comparative genomics hybridization</th> |
1541 |
22 Feb 12 |
nicklas |
236 |
</tr> |
1541 |
22 Feb 12 |
nicklas |
237 |
</tbody> |
1541 |
22 Feb 12 |
nicklas |
238 |
<tbody> |
1541 |
22 Feb 12 |
nicklas |
239 |
<tr> |
2209 |
03 Feb 14 |
nicklas |
240 |
<td><base:button |
2209 |
03 Feb 14 |
nicklas |
241 |
title="Start MeV" |
2209 |
03 Feb 14 |
nicklas |
242 |
subclass="auto-init" |
2209 |
03 Feb 14 |
nicklas |
243 |
data-auto-init="start-mev" |
2209 |
03 Feb 14 |
nicklas |
244 |
data-mev-file-type="mev.cgh" |
2209 |
03 Feb 14 |
nicklas |
245 |
image="<%=homeUrl + "/images/tm4.png" %>" |
1541 |
22 Feb 12 |
nicklas |
246 |
disabled="<%=cghFile == null%>"/></td> |
1541 |
22 Feb 12 |
nicklas |
247 |
<td> |
1541 |
22 Feb 12 |
nicklas |
248 |
<% |
1541 |
22 Feb 12 |
nicklas |
249 |
if (cghFile == null) |
1541 |
22 Feb 12 |
nicklas |
250 |
{ |
1541 |
22 Feb 12 |
nicklas |
251 |
%> |
1541 |
22 Feb 12 |
nicklas |
252 |
There is currently no CGH file associated with the bioassay set. |
1541 |
22 Feb 12 |
nicklas |
253 |
<% |
1541 |
22 Feb 12 |
nicklas |
254 |
} |
1541 |
22 Feb 12 |
nicklas |
255 |
else |
1541 |
22 Feb 12 |
nicklas |
256 |
{ |
1541 |
22 Feb 12 |
nicklas |
257 |
%> |
1541 |
22 Feb 12 |
nicklas |
258 |
Start MeV with the current CGH file:<br> |
1541 |
22 Feb 12 |
nicklas |
259 |
<%=HTML.encodeTags(cghFile.getName())%> <%=Base.getFileLinks(ID, cghFile, root) %> |
1541 |
22 Feb 12 |
nicklas |
260 |
<% |
1541 |
22 Feb 12 |
nicklas |
261 |
} |
1541 |
22 Feb 12 |
nicklas |
262 |
%> |
1541 |
22 Feb 12 |
nicklas |
263 |
</td> |
1541 |
22 Feb 12 |
nicklas |
264 |
</tr> |
1541 |
22 Feb 12 |
nicklas |
265 |
<tr> |
2209 |
03 Feb 14 |
nicklas |
266 |
<td><base:button |
2209 |
03 Feb 14 |
nicklas |
267 |
id="export-cgh" |
2209 |
03 Feb 14 |
nicklas |
268 |
title="Export" |
1541 |
22 Feb 12 |
nicklas |
269 |
disabled="<%=!canCreateCGHFile%>" |
2209 |
03 Feb 14 |
nicklas |
270 |
data-job-name="<%=HTML.encodeTags(cghJobName) %>" |
2209 |
03 Feb 14 |
nicklas |
271 |
data-save-as="<%=HTML.encodeTags(defaultPath+defaultCghFileName)%>" |
2209 |
03 Feb 14 |
nicklas |
272 |
image="export.png" /></td> |
1541 |
22 Feb 12 |
nicklas |
273 |
<td> |
1541 |
22 Feb 12 |
nicklas |
274 |
<% |
1541 |
22 Feb 12 |
nicklas |
275 |
if (canCreateCGHFile) |
1541 |
22 Feb 12 |
nicklas |
276 |
{ |
1541 |
22 Feb 12 |
nicklas |
277 |
%> |
1541 |
22 Feb 12 |
nicklas |
278 |
Export the spot data to a MeV CGH file that can be opened with MeV. |
1541 |
22 Feb 12 |
nicklas |
279 |
<% |
1541 |
22 Feb 12 |
nicklas |
280 |
} |
1541 |
22 Feb 12 |
nicklas |
281 |
else |
1541 |
22 Feb 12 |
nicklas |
282 |
{ |
1541 |
22 Feb 12 |
nicklas |
283 |
%> |
1541 |
22 Feb 12 |
nicklas |
284 |
You don't have enough permissions to create a MeV CGH file. |
1541 |
22 Feb 12 |
nicklas |
285 |
<% |
1541 |
22 Feb 12 |
nicklas |
286 |
} |
1541 |
22 Feb 12 |
nicklas |
287 |
%> |
1541 |
22 Feb 12 |
nicklas |
288 |
</td> |
1541 |
22 Feb 12 |
nicklas |
289 |
</tr> |
1541 |
22 Feb 12 |
nicklas |
290 |
<% |
1541 |
22 Feb 12 |
nicklas |
291 |
if (canCreateCGHFile) |
1541 |
22 Feb 12 |
nicklas |
292 |
{ |
1541 |
22 Feb 12 |
nicklas |
293 |
%> |
1541 |
22 Feb 12 |
nicklas |
294 |
<tr> |
1541 |
22 Feb 12 |
nicklas |
295 |
<td style="text-align: right;">-configuration</td> |
1541 |
22 Feb 12 |
nicklas |
296 |
<td> |
1541 |
22 Feb 12 |
nicklas |
297 |
<select name="cgh_configuration"> |
1541 |
22 Feb 12 |
nicklas |
298 |
<% |
1541 |
22 Feb 12 |
nicklas |
299 |
for (PluginConfiguration cfg : cghConfigurations) |
1541 |
22 Feb 12 |
nicklas |
300 |
{ |
1541 |
22 Feb 12 |
nicklas |
301 |
%> |
1541 |
22 Feb 12 |
nicklas |
302 |
<option value="<%=cfg.getId()%>"><%=HTML.encodeTags(cfg.getName())%> |
1541 |
22 Feb 12 |
nicklas |
303 |
<% |
1541 |
22 Feb 12 |
nicklas |
304 |
} |
1541 |
22 Feb 12 |
nicklas |
305 |
%> |
1541 |
22 Feb 12 |
nicklas |
306 |
</select> |
1541 |
22 Feb 12 |
nicklas |
307 |
</td> |
1541 |
22 Feb 12 |
nicklas |
308 |
</tr> |
1541 |
22 Feb 12 |
nicklas |
309 |
<% |
1541 |
22 Feb 12 |
nicklas |
310 |
} |
1541 |
22 Feb 12 |
nicklas |
311 |
%> |
1541 |
22 Feb 12 |
nicklas |
312 |
</tbody> |
1541 |
22 Feb 12 |
nicklas |
313 |
<tr class="dynamic"> |
1541 |
22 Feb 12 |
nicklas |
314 |
<td></td> |
1541 |
22 Feb 12 |
nicklas |
315 |
<td></td> |
974 |
26 Feb 09 |
nicklas |
316 |
</tr> |
1083 |
18 May 09 |
nicklas |
317 |
</table> |
974 |
26 Feb 09 |
nicklas |
318 |
</div> |
1083 |
18 May 09 |
nicklas |
319 |
</form> |
974 |
26 Feb 09 |
nicklas |
320 |
|
1541 |
22 Feb 12 |
nicklas |
321 |
<base:buttongroup subclass="dialogbuttons"> |
2209 |
03 Feb 14 |
nicklas |
322 |
<base:button id="close" title="Close" /> |
1541 |
22 Feb 12 |
nicklas |
323 |
</base:buttongroup> |
1083 |
18 May 09 |
nicklas |
324 |
|
974 |
26 Feb 09 |
nicklas |
325 |
</base:body> |
1083 |
18 May 09 |
nicklas |
326 |
</base:page> |
1083 |
18 May 09 |
nicklas |
327 |
<% |
1083 |
18 May 09 |
nicklas |
328 |
} |
1083 |
18 May 09 |
nicklas |
329 |
finally |
1083 |
18 May 09 |
nicklas |
330 |
{ |
1083 |
18 May 09 |
nicklas |
331 |
if (dc != null) dc.close(); |
1083 |
18 May 09 |
nicklas |
332 |
} |
1083 |
18 May 09 |
nicklas |
333 |
%> |