2305 |
22 May 06 |
jari |
1 |
<%-- $Id$ |
2305 |
22 May 06 |
jari |
2 |
------------------------------------------------------------------ |
5425 |
23 Sep 10 |
nicklas |
Copyright (C) 2006 Jari Häkkinen, Nicklas Nordborg, Martin Svensson |
2305 |
22 May 06 |
jari |
4 |
|
2304 |
22 May 06 |
jari |
5 |
This file is part of BASE - BioArray Software Environment. |
2304 |
22 May 06 |
jari |
6 |
Available at http://base.thep.lu.se/ |
2305 |
22 May 06 |
jari |
7 |
|
2305 |
22 May 06 |
jari |
8 |
BASE is free software; you can redistribute it and/or |
2305 |
22 May 06 |
jari |
9 |
modify it under the terms of the GNU General Public License |
4476 |
05 Sep 08 |
jari |
10 |
as published by the Free Software Foundation; either version 3 |
2305 |
22 May 06 |
jari |
11 |
of the License, or (at your option) any later version. |
2305 |
22 May 06 |
jari |
12 |
|
2305 |
22 May 06 |
jari |
13 |
BASE is distributed in the hope that it will be useful, |
2305 |
22 May 06 |
jari |
14 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
2305 |
22 May 06 |
jari |
15 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2305 |
22 May 06 |
jari |
16 |
GNU General Public License for more details. |
2305 |
22 May 06 |
jari |
17 |
|
2305 |
22 May 06 |
jari |
18 |
You should have received a copy of the GNU General Public License |
4511 |
11 Sep 08 |
jari |
19 |
along with BASE. If not, see <http://www.gnu.org/licenses/>. |
2305 |
22 May 06 |
jari |
20 |
------------------------------------------------------------------ |
2305 |
22 May 06 |
jari |
21 |
|
2305 |
22 May 06 |
jari |
22 |
@author Nicklas |
2305 |
22 May 06 |
jari |
23 |
@version 2.0 |
2305 |
22 May 06 |
jari |
24 |
--%> |
5426 |
24 Sep 10 |
nicklas |
25 |
<%@ page pageEncoding="UTF-8" session="false" |
2305 |
22 May 06 |
jari |
26 |
import="net.sf.basedb.core.SessionControl" |
2305 |
22 May 06 |
jari |
27 |
import="net.sf.basedb.core.DbControl" |
2305 |
22 May 06 |
jari |
28 |
import="net.sf.basedb.core.Item" |
2305 |
22 May 06 |
jari |
29 |
import="net.sf.basedb.core.ItemContext" |
2305 |
22 May 06 |
jari |
30 |
import="net.sf.basedb.core.Permission" |
2305 |
22 May 06 |
jari |
31 |
import="net.sf.basedb.core.Experiment" |
2305 |
22 May 06 |
jari |
32 |
import="net.sf.basedb.core.BioAssaySet" |
2210 |
03 May 06 |
nicklas |
33 |
import="net.sf.basedb.core.BioAssay" |
2210 |
03 May 06 |
nicklas |
34 |
import="net.sf.basedb.core.Transformation" |
2210 |
03 May 06 |
nicklas |
35 |
import="net.sf.basedb.core.Job" |
2210 |
03 May 06 |
nicklas |
36 |
import="net.sf.basedb.core.PluginDefinition" |
2210 |
03 May 06 |
nicklas |
37 |
import="net.sf.basedb.core.PluginConfiguration" |
2305 |
22 May 06 |
jari |
38 |
import="net.sf.basedb.core.User" |
2305 |
22 May 06 |
jari |
39 |
import="net.sf.basedb.core.ItemQuery" |
2305 |
22 May 06 |
jari |
40 |
import="net.sf.basedb.core.ItemResultList" |
2305 |
22 May 06 |
jari |
41 |
import="net.sf.basedb.core.Include" |
2305 |
22 May 06 |
jari |
42 |
import="net.sf.basedb.core.PermissionDeniedException" |
2305 |
22 May 06 |
jari |
43 |
import="net.sf.basedb.core.PluginDefinition" |
2348 |
01 Jun 06 |
nicklas |
44 |
import="net.sf.basedb.core.ParameterInfo" |
2210 |
03 May 06 |
nicklas |
45 |
import="net.sf.basedb.core.RawDataType" |
2216 |
05 May 06 |
nicklas |
46 |
import="net.sf.basedb.core.BasicItem" |
2216 |
05 May 06 |
nicklas |
47 |
import="net.sf.basedb.core.Nameable" |
2216 |
05 May 06 |
nicklas |
48 |
import="net.sf.basedb.core.File" |
2305 |
22 May 06 |
jari |
49 |
import="net.sf.basedb.core.plugin.GuiContext" |
2305 |
22 May 06 |
jari |
50 |
import="net.sf.basedb.core.plugin.Plugin" |
2305 |
22 May 06 |
jari |
51 |
import="net.sf.basedb.core.query.Orders" |
2305 |
22 May 06 |
jari |
52 |
import="net.sf.basedb.core.query.Hql" |
2305 |
22 May 06 |
jari |
53 |
import="net.sf.basedb.clients.web.Base" |
2386 |
15 Jun 06 |
martin |
54 |
import="net.sf.basedb.clients.web.PermissionUtil" |
2305 |
22 May 06 |
jari |
55 |
import="net.sf.basedb.clients.web.util.HTML" |
2753 |
20 Oct 06 |
nicklas |
56 |
import="net.sf.basedb.util.Values" |
2942 |
22 Nov 06 |
nicklas |
57 |
import="net.sf.basedb.util.formatter.Formatter" |
2942 |
22 Nov 06 |
nicklas |
58 |
import="net.sf.basedb.clients.web.formatter.FormatterFactory" |
4871 |
01 Apr 09 |
nicklas |
59 |
import="net.sf.basedb.clients.web.extensions.ExtensionsControl" |
4871 |
01 Apr 09 |
nicklas |
60 |
import="net.sf.basedb.clients.web.extensions.JspContext" |
4871 |
01 Apr 09 |
nicklas |
61 |
import="net.sf.basedb.clients.web.extensions.renderer.PrefixSuffixRenderer" |
7604 |
25 Feb 19 |
nicklas |
62 |
import="net.sf.basedb.clients.web.extensions.toolbar.ButtonAction" |
4871 |
01 Apr 09 |
nicklas |
63 |
import="net.sf.basedb.clients.web.extensions.toolbar.ToolbarUtil" |
4871 |
01 Apr 09 |
nicklas |
64 |
import="net.sf.basedb.util.extensions.ExtensionsInvoker" |
2305 |
22 May 06 |
jari |
65 |
import="java.util.Date" |
2305 |
22 May 06 |
jari |
66 |
import="java.util.Map" |
2305 |
22 May 06 |
jari |
67 |
import="java.util.Set" |
2210 |
03 May 06 |
nicklas |
68 |
import="java.util.List" |
2305 |
22 May 06 |
jari |
69 |
%> |
2305 |
22 May 06 |
jari |
70 |
<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %> |
2305 |
22 May 06 |
jari |
71 |
<%@ taglib prefix="tbl" uri="/WEB-INF/table.tld" %> |
2305 |
22 May 06 |
jari |
72 |
<%@ taglib prefix="t" uri="/WEB-INF/tab.tld" %> |
2305 |
22 May 06 |
jari |
73 |
<%@ taglib prefix="p" uri="/WEB-INF/path.tld" %> |
4871 |
01 Apr 09 |
nicklas |
74 |
<%@ taglib prefix="ext" uri="/WEB-INF/extensions.tld" %> |
2305 |
22 May 06 |
jari |
75 |
<%! |
2305 |
22 May 06 |
jari |
76 |
private static final Item itemType = Item.TRANSFORMATION; |
2305 |
22 May 06 |
jari |
77 |
private static final GuiContext guiContext = new GuiContext(itemType, GuiContext.Type.ITEM); |
2305 |
22 May 06 |
jari |
78 |
%> |
2305 |
22 May 06 |
jari |
79 |
<% |
2305 |
22 May 06 |
jari |
80 |
final SessionControl sc = Base.getExistingSessionControl(pageContext, true); |
2305 |
22 May 06 |
jari |
81 |
final String ID = sc.getId(); |
2305 |
22 May 06 |
jari |
82 |
final ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, null); |
2210 |
03 May 06 |
nicklas |
83 |
final int itemId = cc.getId(); |
2210 |
03 May 06 |
nicklas |
84 |
final String tabId = Values.getString(request.getParameter("tab"), "properties"); |
2305 |
22 May 06 |
jari |
85 |
|
2305 |
22 May 06 |
jari |
86 |
final float scale = Base.getScale(sc); |
2305 |
22 May 06 |
jari |
87 |
final String root = request.getContextPath(); |
7954 |
12 May 21 |
nicklas |
88 |
final DbControl dc = sc.newDbControl(":View "+itemType); |
2305 |
22 May 06 |
jari |
89 |
try |
2305 |
22 May 06 |
jari |
90 |
{ |
2942 |
22 Nov 06 |
nicklas |
91 |
Formatter<Date> dateFormatter = FormatterFactory.getDateFormatter(sc); |
2942 |
22 Nov 06 |
nicklas |
92 |
Formatter<Date> dateTimeFormatter = FormatterFactory.getDateTimeFormatter(sc); |
2305 |
22 May 06 |
jari |
93 |
Map<Plugin.MainType, Integer> pluginCount = PluginDefinition.countPlugins(dc, guiContext); |
2305 |
22 May 06 |
jari |
94 |
|
2210 |
03 May 06 |
nicklas |
95 |
String title = null; |
2210 |
03 May 06 |
nicklas |
96 |
Transformation transformation = Transformation.getById(dc, itemId); |
2216 |
05 May 06 |
nicklas |
97 |
Experiment experiment = transformation.getExperiment(); |
2216 |
05 May 06 |
nicklas |
98 |
int experimentId = experiment.getId(); |
2210 |
03 May 06 |
nicklas |
99 |
RawDataType rawDataType = experiment.getRawDataType(); |
2210 |
03 May 06 |
nicklas |
100 |
|
2210 |
03 May 06 |
nicklas |
101 |
Job job = null; |
2210 |
03 May 06 |
nicklas |
102 |
boolean readJob = true; |
2210 |
03 May 06 |
nicklas |
103 |
PluginDefinition plugin = null; |
2210 |
03 May 06 |
nicklas |
104 |
boolean readPlugin = true; |
2210 |
03 May 06 |
nicklas |
105 |
PluginConfiguration configuration = null; |
2210 |
03 May 06 |
nicklas |
106 |
boolean readConfiguration = true; |
2210 |
03 May 06 |
nicklas |
107 |
|
2210 |
03 May 06 |
nicklas |
108 |
try |
2210 |
03 May 06 |
nicklas |
109 |
{ |
2210 |
03 May 06 |
nicklas |
110 |
job = transformation.getJob(); |
2210 |
03 May 06 |
nicklas |
111 |
} |
2210 |
03 May 06 |
nicklas |
112 |
catch (PermissionDeniedException ex) |
2210 |
03 May 06 |
nicklas |
113 |
{ |
2210 |
03 May 06 |
nicklas |
114 |
readJob = false; |
2210 |
03 May 06 |
nicklas |
115 |
readPlugin = false; |
2210 |
03 May 06 |
nicklas |
116 |
readConfiguration = false; |
2210 |
03 May 06 |
nicklas |
117 |
} |
2210 |
03 May 06 |
nicklas |
118 |
if (job != null) |
2210 |
03 May 06 |
nicklas |
119 |
{ |
2210 |
03 May 06 |
nicklas |
120 |
try |
2210 |
03 May 06 |
nicklas |
121 |
{ |
2305 |
22 May 06 |
jari |
122 |
plugin = job.getPluginDefinition(); |
2210 |
03 May 06 |
nicklas |
123 |
} |
2210 |
03 May 06 |
nicklas |
124 |
catch (PermissionDeniedException ex) |
2210 |
03 May 06 |
nicklas |
125 |
{ |
2210 |
03 May 06 |
nicklas |
126 |
readPlugin = false; |
2210 |
03 May 06 |
nicklas |
127 |
} |
2210 |
03 May 06 |
nicklas |
128 |
try |
2210 |
03 May 06 |
nicklas |
129 |
{ |
2305 |
22 May 06 |
jari |
130 |
configuration = job.getPluginConfiguration(); |
2210 |
03 May 06 |
nicklas |
131 |
} |
2210 |
03 May 06 |
nicklas |
132 |
catch (PermissionDeniedException ex) |
2210 |
03 May 06 |
nicklas |
133 |
{ |
2210 |
03 May 06 |
nicklas |
134 |
readConfiguration = false; |
2210 |
03 May 06 |
nicklas |
135 |
} |
2305 |
22 May 06 |
jari |
136 |
} |
2305 |
22 May 06 |
jari |
137 |
|
2305 |
22 May 06 |
jari |
138 |
final boolean writePermission = transformation.hasPermission(Permission.WRITE); |
2305 |
22 May 06 |
jari |
139 |
final boolean deletePermission = transformation.hasPermission(Permission.DELETE); |
6372 |
06 Dec 13 |
nicklas |
140 |
boolean copyTransformationAllowed = false; |
6372 |
06 Dec 13 |
nicklas |
141 |
if (plugin != null && plugin.isInteractive() && plugin.hasPermission(Permission.USE)) |
6372 |
06 Dec 13 |
nicklas |
142 |
{ |
6372 |
06 Dec 13 |
nicklas |
143 |
if (configuration == null || configuration.hasPermission(Permission.USE)) |
6372 |
06 Dec 13 |
nicklas |
144 |
{ |
6372 |
06 Dec 13 |
nicklas |
145 |
copyTransformationAllowed = true; |
6372 |
06 Dec 13 |
nicklas |
146 |
} |
6372 |
06 Dec 13 |
nicklas |
147 |
} |
4872 |
02 Apr 09 |
nicklas |
148 |
JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, guiContext, transformation); |
7604 |
25 Feb 19 |
nicklas |
149 |
ExtensionsInvoker<ButtonAction> invoker = ToolbarUtil.useExtensions(jspContext); |
2305 |
22 May 06 |
jari |
150 |
%> |
6315 |
06 Sep 13 |
nicklas |
151 |
<base:page title="<%=title%>" id="view-page"> |
6388 |
07 Jan 14 |
nicklas |
152 |
<base:head scripts="table.js,tabcontrol-2.js,~transformations.js" styles="table.css,toolbar.css,headertabcontrol.css,path.css,joust-2.css"> |
4871 |
01 Apr 09 |
nicklas |
153 |
<ext:scripts context="<%=jspContext%>" /> |
4871 |
01 Apr 09 |
nicklas |
154 |
<ext:stylesheets context="<%=jspContext%>" /> |
2305 |
22 May 06 |
jari |
155 |
</base:head> |
2305 |
22 May 06 |
jari |
156 |
<base:body> |
5940 |
31 Jan 12 |
nicklas |
157 |
<p:path><p:pathelement |
5940 |
31 Jan 12 |
nicklas |
158 |
title="Experiments" href="<%="../index.jsp?ID="+ID%>" |
5940 |
31 Jan 12 |
nicklas |
159 |
/><p:pathelement title="<%=HTML.encodeTags(experiment.getName())%>" |
6143 |
20 Sep 12 |
nicklas |
160 |
href="<%="../bioassaysets/index.jsp?ID="+ID+"&experiment_id="+experimentId%>" |
5940 |
31 Jan 12 |
nicklas |
161 |
/><p:pathelement title="<%=HTML.encodeTags(transformation.getName())%>" |
5940 |
31 Jan 12 |
nicklas |
162 |
/></p:path> |
6315 |
06 Sep 13 |
nicklas |
163 |
<div id="page-data" |
6315 |
06 Sep 13 |
nicklas |
164 |
data-item-id="<%=itemId%>" |
6315 |
06 Sep 13 |
nicklas |
165 |
data-experiment-id="<%=experimentId%>" |
6315 |
06 Sep 13 |
nicklas |
166 |
data-job-id="<%=job != null ? job.getId() : ""%>" |
6315 |
06 Sep 13 |
nicklas |
167 |
></div> |
2305 |
22 May 06 |
jari |
168 |
|
5940 |
31 Jan 12 |
nicklas |
169 |
<t:tabcontrol |
5940 |
31 Jan 12 |
nicklas |
170 |
id="main" |
5940 |
31 Jan 12 |
nicklas |
171 |
subclass="content mastertabcontrol" |
6315 |
06 Sep 13 |
nicklas |
172 |
active="<%=tabId%>"> |
2305 |
22 May 06 |
jari |
173 |
<t:tab id="properties" title="Properties"> |
5940 |
31 Jan 12 |
nicklas |
174 |
<div> |
5940 |
31 Jan 12 |
nicklas |
175 |
<table class="fullform"> |
5940 |
31 Jan 12 |
nicklas |
176 |
<tr> |
5940 |
31 Jan 12 |
nicklas |
177 |
<th class="itemstatus"> |
5940 |
31 Jan 12 |
nicklas |
178 |
<base:icon |
6315 |
06 Sep 13 |
nicklas |
179 |
id="btnDeletePermanently" |
5946 |
03 Feb 12 |
nicklas |
180 |
image="deleted.png" |
5940 |
31 Jan 12 |
nicklas |
181 |
tooltip="This item has been flagged for deletion. Click to delete it now." |
5940 |
31 Jan 12 |
nicklas |
182 |
enabled="<%=deletePermission %>" |
5940 |
31 Jan 12 |
nicklas |
183 |
visible="<%=transformation.isRemoved()%>" |
5940 |
31 Jan 12 |
nicklas |
184 |
/> |
5940 |
31 Jan 12 |
nicklas |
185 |
</th> |
5940 |
31 Jan 12 |
nicklas |
186 |
<td style="padding: 0px;"> |
6605 |
18 Nov 14 |
nicklas |
187 |
<tbl:toolbar subclass="bottomborder bg-filled-50"> |
5940 |
31 Jan 12 |
nicklas |
188 |
<tbl:button |
6315 |
06 Sep 13 |
nicklas |
189 |
id="btnEdit" |
5942 |
01 Feb 12 |
nicklas |
190 |
disabled="<%=!writePermission%>" |
5945 |
02 Feb 12 |
nicklas |
191 |
image="edit.png" |
5940 |
31 Jan 12 |
nicklas |
192 |
title="Edit…" |
5940 |
31 Jan 12 |
nicklas |
193 |
tooltip="<%=writePermission ? "Edit this transformation" : "You do not have permission to edit this transformation"%>" |
5940 |
31 Jan 12 |
nicklas |
194 |
/> |
5940 |
31 Jan 12 |
nicklas |
195 |
<tbl:button |
6315 |
06 Sep 13 |
nicklas |
196 |
id="btnDelete" |
5942 |
01 Feb 12 |
nicklas |
197 |
disabled="<%=!deletePermission%>" |
5946 |
03 Feb 12 |
nicklas |
198 |
image="delete.png" |
5940 |
31 Jan 12 |
nicklas |
199 |
title="Delete" |
5940 |
31 Jan 12 |
nicklas |
200 |
visible="<%=!transformation.isRemoved()%>" |
5940 |
31 Jan 12 |
nicklas |
201 |
tooltip="<%=deletePermission ? "Delete this transformation" : "You do not have permission to delete this transformation"%>" |
5940 |
31 Jan 12 |
nicklas |
202 |
/> |
5940 |
31 Jan 12 |
nicklas |
203 |
<tbl:button |
6315 |
06 Sep 13 |
nicklas |
204 |
id="btnRestore" |
5942 |
01 Feb 12 |
nicklas |
205 |
disabled="<%=!writePermission%>" |
5946 |
03 Feb 12 |
nicklas |
206 |
image="restore.png" |
5940 |
31 Jan 12 |
nicklas |
207 |
title="Restore" |
5940 |
31 Jan 12 |
nicklas |
208 |
visible="<%=transformation.isRemoved()%>" |
5940 |
31 Jan 12 |
nicklas |
209 |
tooltip="<%=writePermission ? "Restore this transformation" : "You do not have permission to restore this transformation"%>" |
5940 |
31 Jan 12 |
nicklas |
210 |
/> |
5940 |
31 Jan 12 |
nicklas |
211 |
<tbl:button |
6315 |
06 Sep 13 |
nicklas |
212 |
id="btnCopyJob" |
6372 |
06 Dec 13 |
nicklas |
213 |
disabled="<%=!writePermission || !copyTransformationAllowed%>" |
5946 |
03 Feb 12 |
nicklas |
214 |
image="copy.png" |
5940 |
31 Jan 12 |
nicklas |
215 |
title="Copy…" |
5940 |
31 Jan 12 |
nicklas |
216 |
visible="<%=job != null && plugin != null && plugin.isInteractive() %>" |
5940 |
31 Jan 12 |
nicklas |
217 |
tooltip="<%=writePermission ? "Copy this transformation" : "You do not have permission to copy this transformation"%>" |
5940 |
31 Jan 12 |
nicklas |
218 |
/> |
5940 |
31 Jan 12 |
nicklas |
219 |
<tbl:button |
6315 |
06 Sep 13 |
nicklas |
220 |
id="btnImport" |
5946 |
03 Feb 12 |
nicklas |
221 |
image="import.png" |
6315 |
06 Sep 13 |
nicklas |
222 |
data-plugin-type="IMPORT" |
5940 |
31 Jan 12 |
nicklas |
223 |
title="Import…" |
5940 |
31 Jan 12 |
nicklas |
224 |
tooltip="Import data" |
5940 |
31 Jan 12 |
nicklas |
225 |
visible="<%=pluginCount.containsKey(Plugin.MainType.IMPORT)%>" |
5940 |
31 Jan 12 |
nicklas |
226 |
/> |
5940 |
31 Jan 12 |
nicklas |
227 |
<tbl:button |
6315 |
06 Sep 13 |
nicklas |
228 |
id="btnExport" |
6315 |
06 Sep 13 |
nicklas |
229 |
image="export.png" |
6315 |
06 Sep 13 |
nicklas |
230 |
data-plugin-type="EXPORT" |
5940 |
31 Jan 12 |
nicklas |
231 |
title="Export…" |
5940 |
31 Jan 12 |
nicklas |
232 |
tooltip="Export data" |
5940 |
31 Jan 12 |
nicklas |
233 |
visible="<%=pluginCount.containsKey(Plugin.MainType.EXPORT)%>" |
5940 |
31 Jan 12 |
nicklas |
234 |
/> |
5940 |
31 Jan 12 |
nicklas |
235 |
<tbl:button |
6315 |
06 Sep 13 |
nicklas |
236 |
id="btnRunPlugin" |
6315 |
06 Sep 13 |
nicklas |
237 |
image="runplugin.png" |
6315 |
06 Sep 13 |
nicklas |
238 |
data-plugin-type="OTHER" |
5940 |
31 Jan 12 |
nicklas |
239 |
title="Run plugin…" |
5940 |
31 Jan 12 |
nicklas |
240 |
tooltip="Run a plugin" |
5940 |
31 Jan 12 |
nicklas |
241 |
visible="<%=pluginCount.containsKey(Plugin.MainType.OTHER)%>" |
5940 |
31 Jan 12 |
nicklas |
242 |
/> |
5940 |
31 Jan 12 |
nicklas |
243 |
<ext:render extensions="<%=invoker%>" context="<%=jspContext%>" |
7604 |
25 Feb 19 |
nicklas |
244 |
wrapper="<%=new PrefixSuffixRenderer<ButtonAction>(jspContext, "<td>", "</td>") %>"/> |
5940 |
31 Jan 12 |
nicklas |
245 |
<tbl:button |
5940 |
31 Jan 12 |
nicklas |
246 |
image="help.png" |
6315 |
06 Sep 13 |
nicklas |
247 |
subclass="auto-init" |
6315 |
06 Sep 13 |
nicklas |
248 |
data-auto-init="help" |
6315 |
06 Sep 13 |
nicklas |
249 |
data-help-id="transformation.view.properties" |
5940 |
31 Jan 12 |
nicklas |
250 |
title="Help…" |
5940 |
31 Jan 12 |
nicklas |
251 |
tooltip="Get help about this page" |
5940 |
31 Jan 12 |
nicklas |
252 |
/> |
5940 |
31 Jan 12 |
nicklas |
253 |
</tbl:toolbar> |
5940 |
31 Jan 12 |
nicklas |
254 |
</td> |
5940 |
31 Jan 12 |
nicklas |
255 |
</tr> |
5940 |
31 Jan 12 |
nicklas |
256 |
</table> |
5940 |
31 Jan 12 |
nicklas |
257 |
<table style="width: 100%; height: 15em;" class="bottomborder"> |
6143 |
20 Sep 12 |
nicklas |
258 |
<tr> |
5940 |
31 Jan 12 |
nicklas |
259 |
<td style="width: 50%; height: 100%;"> |
5940 |
31 Jan 12 |
nicklas |
260 |
<table class="fullform" > |
2210 |
03 May 06 |
nicklas |
261 |
<tr> |
5940 |
31 Jan 12 |
nicklas |
262 |
<th>Name</th> |
2305 |
22 May 06 |
jari |
263 |
<td><%=HTML.encodeTags(transformation.getName())%></td> |
2305 |
22 May 06 |
jari |
264 |
</tr> |
2305 |
22 May 06 |
jari |
265 |
<tr> |
5940 |
31 Jan 12 |
nicklas |
266 |
<th>Experiment</th> |
2216 |
05 May 06 |
nicklas |
267 |
<td><%=Base.getLinkedName(ID, experiment, false, writePermission)%></td> |
2210 |
03 May 06 |
nicklas |
268 |
</tr> |
2305 |
22 May 06 |
jari |
269 |
<tr> |
5940 |
31 Jan 12 |
nicklas |
270 |
<th>Description</th> |
2305 |
22 May 06 |
jari |
271 |
<td><%=HTML.niceFormat(transformation.getDescription())%></td> |
2210 |
03 May 06 |
nicklas |
272 |
</tr> |
2210 |
03 May 06 |
nicklas |
273 |
<tr> |
5940 |
31 Jan 12 |
nicklas |
274 |
<th>Job</th> |
2216 |
05 May 06 |
nicklas |
275 |
<td><%=Base.getLinkedName(ID, job, !readJob, false)%></td> |
2210 |
03 May 06 |
nicklas |
276 |
</tr> |
5940 |
31 Jan 12 |
nicklas |
277 |
<tr> |
5940 |
31 Jan 12 |
nicklas |
278 |
<th class="subprompt">- started</th> |
2210 |
03 May 06 |
nicklas |
279 |
<td> |
2942 |
22 Nov 06 |
nicklas |
280 |
<%=job == null ? "" : dateTimeFormatter.format(job.getStarted())%> |
2210 |
03 May 06 |
nicklas |
281 |
</td> |
2210 |
03 May 06 |
nicklas |
282 |
</tr> |
5905 |
12 Dec 11 |
nicklas |
283 |
<tr > |
5940 |
31 Jan 12 |
nicklas |
284 |
<th class="subprompt">- ended</th> |
2210 |
03 May 06 |
nicklas |
285 |
<td> |
2942 |
22 Nov 06 |
nicklas |
286 |
<%=job == null ? "" : dateTimeFormatter.format(job.getEnded())%> |
2210 |
03 May 06 |
nicklas |
287 |
</td> |
2210 |
03 May 06 |
nicklas |
288 |
</tr> |
5940 |
31 Jan 12 |
nicklas |
289 |
<tr class="dynamic"> |
5940 |
31 Jan 12 |
nicklas |
290 |
<th class="subprompt">- server</th> |
2210 |
03 May 06 |
nicklas |
291 |
<td> |
7265 |
14 Dec 16 |
nicklas |
292 |
<%=job == null ? "" : HTML.encodeTags(job.getServerAndNode())%> |
2210 |
03 May 06 |
nicklas |
293 |
</td> |
2210 |
03 May 06 |
nicklas |
294 |
</tr> |
2210 |
03 May 06 |
nicklas |
295 |
</table> |
2210 |
03 May 06 |
nicklas |
296 |
</td> |
5940 |
31 Jan 12 |
nicklas |
297 |
<td style="width: 50%; height: 100%;" class="leftborder"> |
5940 |
31 Jan 12 |
nicklas |
298 |
<table class="fullform" > |
2210 |
03 May 06 |
nicklas |
299 |
<tr> |
5940 |
31 Jan 12 |
nicklas |
300 |
<th>Plugin</th> |
5610 |
15 Apr 11 |
nicklas |
301 |
<td><%=Base.getLinkedName(ID, plugin, |
2216 |
05 May 06 |
nicklas |
302 |
!readPlugin, plugin != null && plugin.hasPermission(Permission.WRITE))%></td> |
2210 |
03 May 06 |
nicklas |
303 |
</tr> |
2210 |
03 May 06 |
nicklas |
304 |
<tr> |
5940 |
31 Jan 12 |
nicklas |
305 |
<th>Plugin configuration</th> |
2216 |
05 May 06 |
nicklas |
306 |
<td><%=Base.getLinkedName(ID, configuration, !readConfiguration, |
2216 |
05 May 06 |
nicklas |
307 |
configuration != null && configuration.hasPermission(Permission.WRITE))%></td> |
2210 |
03 May 06 |
nicklas |
308 |
</tr> |
5940 |
31 Jan 12 |
nicklas |
309 |
<tbody class="sectionheader"> |
5940 |
31 Jan 12 |
nicklas |
310 |
<tr> |
5940 |
31 Jan 12 |
nicklas |
311 |
<th colspan="2">Plugin parameters</th> |
5940 |
31 Jan 12 |
nicklas |
312 |
</tr> |
5940 |
31 Jan 12 |
nicklas |
313 |
</tbody> |
2210 |
03 May 06 |
nicklas |
314 |
<% |
2210 |
03 May 06 |
nicklas |
315 |
if (job != null) |
2210 |
03 May 06 |
nicklas |
316 |
{ |
2210 |
03 May 06 |
nicklas |
317 |
for (String name : job.getParameterNames()) |
2210 |
03 May 06 |
nicklas |
318 |
{ |
2216 |
05 May 06 |
nicklas |
319 |
StringBuilder sb = new StringBuilder(); |
2210 |
03 May 06 |
nicklas |
320 |
String displayValue = ""; |
2348 |
01 Jun 06 |
nicklas |
321 |
String description = ""; |
2210 |
03 May 06 |
nicklas |
322 |
try |
2210 |
03 May 06 |
nicklas |
323 |
{ |
2348 |
01 Jun 06 |
nicklas |
324 |
ParameterInfo pi = job.getParameterInfo(name); |
2348 |
01 Jun 06 |
nicklas |
325 |
if (pi.getLabel() != null) name = HTML.encodeTags(pi.getLabel()); |
2348 |
01 Jun 06 |
nicklas |
326 |
description = HTML.encodeTags(pi.getDescription()); |
6988 |
30 Oct 15 |
nicklas |
327 |
List<?> values = pi.getValuesOrMask(); |
2216 |
05 May 06 |
nicklas |
328 |
int i = 0; |
2216 |
05 May 06 |
nicklas |
329 |
for (Object value : values) |
2216 |
05 May 06 |
nicklas |
330 |
{ |
2216 |
05 May 06 |
nicklas |
331 |
if (value != null) |
2216 |
05 May 06 |
nicklas |
332 |
{ |
2216 |
05 May 06 |
nicklas |
333 |
if (i > 0) sb.append(", "); |
2216 |
05 May 06 |
nicklas |
334 |
i++; |
2216 |
05 May 06 |
nicklas |
335 |
if (value instanceof BasicItem) |
2216 |
05 May 06 |
nicklas |
336 |
{ |
2216 |
05 May 06 |
nicklas |
337 |
BasicItem item = (BasicItem)value; |
2216 |
05 May 06 |
nicklas |
338 |
String itemName = ""; |
2216 |
05 May 06 |
nicklas |
339 |
if (item instanceof File) |
2216 |
05 May 06 |
nicklas |
340 |
{ |
2216 |
05 May 06 |
nicklas |
341 |
itemName = ((File)item).getPath().toString(); |
2216 |
05 May 06 |
nicklas |
342 |
} |
2216 |
05 May 06 |
nicklas |
343 |
else if (item instanceof Nameable) |
2216 |
05 May 06 |
nicklas |
344 |
{ |
2216 |
05 May 06 |
nicklas |
345 |
itemName = ((Nameable)item).getName(); |
2216 |
05 May 06 |
nicklas |
346 |
} |
2216 |
05 May 06 |
nicklas |
347 |
else |
2216 |
05 May 06 |
nicklas |
348 |
{ |
2216 |
05 May 06 |
nicklas |
349 |
itemName = item.toString(); |
2216 |
05 May 06 |
nicklas |
350 |
} |
2216 |
05 May 06 |
nicklas |
351 |
sb.append(Base.getLink(ID, HTML.encodeTags(itemName), |
2216 |
05 May 06 |
nicklas |
352 |
item.getType(), item.getId(), item.hasPermission(Permission.WRITE))); |
2216 |
05 May 06 |
nicklas |
353 |
} |
2216 |
05 May 06 |
nicklas |
354 |
else if (value instanceof Date) |
2216 |
05 May 06 |
nicklas |
355 |
{ |
2942 |
22 Nov 06 |
nicklas |
356 |
sb.append(dateFormatter.format((Date)value)); |
2216 |
05 May 06 |
nicklas |
357 |
} |
2216 |
05 May 06 |
nicklas |
358 |
else |
2216 |
05 May 06 |
nicklas |
359 |
{ |
2216 |
05 May 06 |
nicklas |
360 |
sb.append(HTML.encodeTags(value.toString())); |
2216 |
05 May 06 |
nicklas |
361 |
} |
2216 |
05 May 06 |
nicklas |
362 |
} |
2216 |
05 May 06 |
nicklas |
363 |
} |
2216 |
05 May 06 |
nicklas |
364 |
displayValue = sb.toString(); |
2210 |
03 May 06 |
nicklas |
365 |
} |
2210 |
03 May 06 |
nicklas |
366 |
catch (Throwable ex) |
2210 |
03 May 06 |
nicklas |
367 |
{ |
2216 |
05 May 06 |
nicklas |
368 |
displayValue = "<i>ERROR: "+ex.getMessage()+"</i>"; |
2210 |
03 May 06 |
nicklas |
369 |
} |
2210 |
03 May 06 |
nicklas |
370 |
%> |
2216 |
05 May 06 |
nicklas |
371 |
<tr> |
5940 |
31 Jan 12 |
nicklas |
372 |
<th class="subprompt"><span title="<%=description%>">- <%=name%></span></th> |
2210 |
03 May 06 |
nicklas |
373 |
<td> |
2210 |
03 May 06 |
nicklas |
374 |
<%=displayValue%> |
2210 |
03 May 06 |
nicklas |
375 |
</td> |
2210 |
03 May 06 |
nicklas |
376 |
</tr> |
2210 |
03 May 06 |
nicklas |
377 |
<% |
2210 |
03 May 06 |
nicklas |
378 |
} |
2210 |
03 May 06 |
nicklas |
379 |
} |
2210 |
03 May 06 |
nicklas |
380 |
%> |
5940 |
31 Jan 12 |
nicklas |
381 |
<tr class="dynamic"> |
5940 |
31 Jan 12 |
nicklas |
382 |
<th></th> |
5940 |
31 Jan 12 |
nicklas |
383 |
<td></td> |
5940 |
31 Jan 12 |
nicklas |
384 |
</tr> |
2210 |
03 May 06 |
nicklas |
385 |
</table> |
2210 |
03 May 06 |
nicklas |
386 |
</td> |
2210 |
03 May 06 |
nicklas |
387 |
</tr> |
2210 |
03 May 06 |
nicklas |
388 |
</table> |
6143 |
20 Sep 12 |
nicklas |
389 |
</div> |
2396 |
19 Jun 06 |
nicklas |
390 |
|
2396 |
19 Jun 06 |
nicklas |
391 |
<jsp:include page="../../../common/anytoany/list_anytoany.jsp"> |
2396 |
19 Jun 06 |
nicklas |
392 |
<jsp:param name="ID" value="<%=ID%>" /> |
2664 |
26 Sep 06 |
nicklas |
393 |
<jsp:param name="item_type" value="<%=itemType.name()%>" /> |
2396 |
19 Jun 06 |
nicklas |
394 |
<jsp:param name="item_id" value="<%=itemId%>" /> |
4942 |
20 May 09 |
nicklas |
395 |
<jsp:param name="title" value="Items related to this transformation" /> |
2396 |
19 Jun 06 |
nicklas |
396 |
</jsp:include> |
2298 |
19 May 06 |
nicklas |
397 |
|
5940 |
31 Jan 12 |
nicklas |
398 |
<base:section id="anaysis" title="Analysis subtree" context="<%=cc%>"> |
5940 |
31 Jan 12 |
nicklas |
399 |
<jsp:include page="../bioassaysets/analysis_tree.jsp"> |
5940 |
31 Jan 12 |
nicklas |
400 |
<jsp:param name="ID" value="<%=ID%>" /> |
5940 |
31 Jan 12 |
nicklas |
401 |
<jsp:param name="experiment_id" value="<%=experimentId%>" /> |
5940 |
31 Jan 12 |
nicklas |
402 |
<jsp:param name="transformation_id" value="<%=itemId%>" /> |
5940 |
31 Jan 12 |
nicklas |
403 |
</jsp:include> |
5940 |
31 Jan 12 |
nicklas |
404 |
</base:section> |
2210 |
03 May 06 |
nicklas |
405 |
</t:tab> |
2305 |
22 May 06 |
jari |
406 |
</t:tabcontrol> |
2305 |
22 May 06 |
jari |
407 |
</base:body> |
2305 |
22 May 06 |
jari |
408 |
</base:page> |
2305 |
22 May 06 |
jari |
409 |
<% |
2305 |
22 May 06 |
jari |
410 |
} |
2305 |
22 May 06 |
jari |
411 |
finally |
2305 |
22 May 06 |
jari |
412 |
{ |
2305 |
22 May 06 |
jari |
413 |
if (dc != null) dc.close(); |
2305 |
22 May 06 |
jari |
414 |
} |
2305 |
22 May 06 |
jari |
415 |
|
2305 |
22 May 06 |
jari |
416 |
%> |