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