1995 |
16 Feb 06 |
nicklas |
1 |
<%-- $Id$ |
1995 |
16 Feb 06 |
nicklas |
2 |
------------------------------------------------------------------ |
5425 |
23 Sep 10 |
nicklas |
Copyright (C) 2006 Jari Häkkinen, Nicklas Nordborg, Martin Svensson |
3675 |
16 Aug 07 |
jari |
Copyright (C) 2007 Martin Svensson |
1995 |
16 Feb 06 |
nicklas |
5 |
|
2304 |
22 May 06 |
jari |
6 |
This file is part of BASE - BioArray Software Environment. |
2304 |
22 May 06 |
jari |
7 |
Available at http://base.thep.lu.se/ |
1995 |
16 Feb 06 |
nicklas |
8 |
|
1995 |
16 Feb 06 |
nicklas |
9 |
BASE is free software; you can redistribute it and/or |
1995 |
16 Feb 06 |
nicklas |
10 |
modify it under the terms of the GNU General Public License |
4476 |
05 Sep 08 |
jari |
11 |
as published by the Free Software Foundation; either version 3 |
1995 |
16 Feb 06 |
nicklas |
12 |
of the License, or (at your option) any later version. |
1995 |
16 Feb 06 |
nicklas |
13 |
|
1995 |
16 Feb 06 |
nicklas |
14 |
BASE is distributed in the hope that it will be useful, |
1995 |
16 Feb 06 |
nicklas |
15 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
1995 |
16 Feb 06 |
nicklas |
16 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1995 |
16 Feb 06 |
nicklas |
17 |
GNU General Public License for more details. |
1995 |
16 Feb 06 |
nicklas |
18 |
|
1995 |
16 Feb 06 |
nicklas |
19 |
You should have received a copy of the GNU General Public License |
4510 |
11 Sep 08 |
jari |
20 |
along with BASE. If not, see <http://www.gnu.org/licenses/>. |
1995 |
16 Feb 06 |
nicklas |
21 |
------------------------------------------------------------------ |
1995 |
16 Feb 06 |
nicklas |
22 |
|
1995 |
16 Feb 06 |
nicklas |
23 |
@author Nicklas |
1995 |
16 Feb 06 |
nicklas |
24 |
@version 2.0 |
1995 |
16 Feb 06 |
nicklas |
25 |
--%> |
5426 |
24 Sep 10 |
nicklas |
26 |
<%@ page pageEncoding="UTF-8" session="false" |
1995 |
16 Feb 06 |
nicklas |
27 |
import="net.sf.basedb.core.SessionControl" |
1995 |
16 Feb 06 |
nicklas |
28 |
import="net.sf.basedb.core.DbControl" |
1995 |
16 Feb 06 |
nicklas |
29 |
import="net.sf.basedb.core.SystemItems" |
3547 |
03 Jul 07 |
martin |
30 |
import="net.sf.basedb.core.Group" |
1995 |
16 Feb 06 |
nicklas |
31 |
import="net.sf.basedb.core.Item" |
1995 |
16 Feb 06 |
nicklas |
32 |
import="net.sf.basedb.core.ItemContext" |
3547 |
03 Jul 07 |
martin |
33 |
import="net.sf.basedb.core.ItemResultIterator" |
1995 |
16 Feb 06 |
nicklas |
34 |
import="net.sf.basedb.core.Permission" |
1995 |
16 Feb 06 |
nicklas |
35 |
import="net.sf.basedb.core.PluginDefinition" |
1995 |
16 Feb 06 |
nicklas |
36 |
import="net.sf.basedb.core.PluginConfiguration" |
2348 |
01 Jun 06 |
nicklas |
37 |
import="net.sf.basedb.core.ParameterInfo" |
1995 |
16 Feb 06 |
nicklas |
38 |
import="net.sf.basedb.core.User" |
2436 |
28 Jun 06 |
nicklas |
39 |
import="net.sf.basedb.core.BasicItem" |
2436 |
28 Jun 06 |
nicklas |
40 |
import="net.sf.basedb.core.File" |
3547 |
03 Jul 07 |
martin |
41 |
import="net.sf.basedb.core.MultiPermissions" |
2436 |
28 Jun 06 |
nicklas |
42 |
import="net.sf.basedb.core.Nameable" |
1995 |
16 Feb 06 |
nicklas |
43 |
import="net.sf.basedb.core.PermissionDeniedException" |
1995 |
16 Feb 06 |
nicklas |
44 |
import="net.sf.basedb.core.PluginDefinition" |
1995 |
16 Feb 06 |
nicklas |
45 |
import="net.sf.basedb.core.plugin.GuiContext" |
1995 |
16 Feb 06 |
nicklas |
46 |
import="net.sf.basedb.core.plugin.Plugin" |
3547 |
03 Jul 07 |
martin |
47 |
import="net.sf.basedb.core.Project" |
5941 |
01 Feb 12 |
nicklas |
48 |
import="net.sf.basedb.core.Type" |
1995 |
16 Feb 06 |
nicklas |
49 |
import="net.sf.basedb.util.JarClassLoader" |
1995 |
16 Feb 06 |
nicklas |
50 |
import="net.sf.basedb.util.ToStringComparator" |
1995 |
16 Feb 06 |
nicklas |
51 |
import="net.sf.basedb.clients.web.Base" |
5069 |
20 Aug 09 |
nicklas |
52 |
import="net.sf.basedb.clients.web.ChangeHistoryUtil" |
2386 |
15 Jun 06 |
martin |
53 |
import="net.sf.basedb.clients.web.PermissionUtil" |
1995 |
16 Feb 06 |
nicklas |
54 |
import="net.sf.basedb.clients.web.util.HTML" |
2753 |
20 Oct 06 |
nicklas |
55 |
import="net.sf.basedb.util.Values" |
2942 |
22 Nov 06 |
nicklas |
56 |
import="net.sf.basedb.util.formatter.Formatter" |
2942 |
22 Nov 06 |
nicklas |
57 |
import="net.sf.basedb.clients.web.formatter.FormatterFactory" |
4886 |
03 Apr 09 |
nicklas |
58 |
import="net.sf.basedb.clients.web.extensions.ExtensionsControl" |
4886 |
03 Apr 09 |
nicklas |
59 |
import="net.sf.basedb.clients.web.extensions.JspContext" |
4886 |
03 Apr 09 |
nicklas |
60 |
import="net.sf.basedb.clients.web.extensions.renderer.PrefixSuffixRenderer" |
7604 |
25 Feb 19 |
nicklas |
61 |
import="net.sf.basedb.clients.web.extensions.toolbar.ButtonAction" |
4886 |
03 Apr 09 |
nicklas |
62 |
import="net.sf.basedb.clients.web.extensions.toolbar.ToolbarUtil" |
4886 |
03 Apr 09 |
nicklas |
63 |
import="net.sf.basedb.util.extensions.ExtensionsInvoker" |
1995 |
16 Feb 06 |
nicklas |
64 |
import="java.util.Map" |
1995 |
16 Feb 06 |
nicklas |
65 |
import="java.util.Set" |
1995 |
16 Feb 06 |
nicklas |
66 |
import="java.util.TreeSet" |
1995 |
16 Feb 06 |
nicklas |
67 |
import="java.util.List" |
1995 |
16 Feb 06 |
nicklas |
68 |
import="java.util.Collections" |
2436 |
28 Jun 06 |
nicklas |
69 |
import="java.util.Date" |
1995 |
16 Feb 06 |
nicklas |
70 |
%> |
1995 |
16 Feb 06 |
nicklas |
71 |
<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %> |
1995 |
16 Feb 06 |
nicklas |
72 |
<%@ taglib prefix="tbl" uri="/WEB-INF/table.tld" %> |
1995 |
16 Feb 06 |
nicklas |
73 |
<%@ taglib prefix="t" uri="/WEB-INF/tab.tld" %> |
1995 |
16 Feb 06 |
nicklas |
74 |
<%@ taglib prefix="p" uri="/WEB-INF/path.tld" %> |
4886 |
03 Apr 09 |
nicklas |
75 |
<%@ taglib prefix="ext" uri="/WEB-INF/extensions.tld" %> |
1995 |
16 Feb 06 |
nicklas |
76 |
<%! |
1995 |
16 Feb 06 |
nicklas |
77 |
private static final Item itemType = Item.PLUGINCONFIGURATION; |
1995 |
16 Feb 06 |
nicklas |
78 |
private static final GuiContext guiContext = new GuiContext(itemType, GuiContext.Type.ITEM); |
1995 |
16 Feb 06 |
nicklas |
79 |
%> |
1995 |
16 Feb 06 |
nicklas |
80 |
<% |
1995 |
16 Feb 06 |
nicklas |
81 |
final SessionControl sc = Base.getExistingSessionControl(pageContext, true); |
1995 |
16 Feb 06 |
nicklas |
82 |
final String ID = sc.getId(); |
2436 |
28 Jun 06 |
nicklas |
83 |
final String root = request.getContextPath() + "/"; |
1995 |
16 Feb 06 |
nicklas |
84 |
final ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, null); |
1995 |
16 Feb 06 |
nicklas |
85 |
final int itemId = cc.getId(); |
6289 |
05 Jun 13 |
nicklas |
86 |
final String tab = Values.getString(request.getParameter("tab")); |
1995 |
16 Feb 06 |
nicklas |
87 |
final float scale = Base.getScale(sc); |
7954 |
12 May 21 |
nicklas |
88 |
final DbControl dc = sc.newDbControl(":View "+itemType); |
1995 |
16 Feb 06 |
nicklas |
89 |
try |
1995 |
16 Feb 06 |
nicklas |
90 |
{ |
1995 |
16 Feb 06 |
nicklas |
91 |
Map<Plugin.MainType, Integer> pluginCount = PluginDefinition.countPlugins(dc, guiContext); |
2942 |
22 Nov 06 |
nicklas |
92 |
Formatter<Date> dateFormatter = FormatterFactory.getDateFormatter(sc); |
5437 |
01 Oct 10 |
nicklas |
93 |
Formatter<Date> dateTimeFormatter = FormatterFactory.getDateTimeFormatter(sc); |
1995 |
16 Feb 06 |
nicklas |
94 |
|
1995 |
16 Feb 06 |
nicklas |
95 |
String title = null; |
1995 |
16 Feb 06 |
nicklas |
96 |
PluginConfiguration configuration = PluginConfiguration.getById(dc, itemId); |
1995 |
16 Feb 06 |
nicklas |
97 |
|
2575 |
23 Aug 06 |
nicklas |
98 |
final boolean createPermission = sc.hasPermission(Permission.CREATE, itemType); |
1995 |
16 Feb 06 |
nicklas |
99 |
final boolean writePermission = configuration.hasPermission(Permission.WRITE); |
1995 |
16 Feb 06 |
nicklas |
100 |
final boolean deletePermission = configuration.hasPermission(Permission.DELETE); |
1995 |
16 Feb 06 |
nicklas |
101 |
final boolean sharePermission = configuration.hasPermission(Permission.SET_PERMISSION); |
2921 |
15 Nov 06 |
nicklas |
102 |
final boolean setOwnerPermission = configuration.hasPermission(Permission.SET_OWNER); |
4003 |
26 Nov 07 |
nicklas |
103 |
final boolean isRemoved = configuration.isRemoved(); |
4003 |
26 Nov 07 |
nicklas |
104 |
final boolean isUsed = isRemoved && configuration.isUsed(); |
4003 |
26 Nov 07 |
nicklas |
105 |
final boolean deletePermanentlyPermission = deletePermission && !isUsed; |
2921 |
15 Nov 06 |
nicklas |
106 |
final boolean isOwner = configuration.isOwner(); |
1995 |
16 Feb 06 |
nicklas |
107 |
|
1995 |
16 Feb 06 |
nicklas |
108 |
final Set<GuiContext> contexts = new TreeSet<GuiContext>(new ToStringComparator<GuiContext>(false)); |
1995 |
16 Feb 06 |
nicklas |
109 |
PluginDefinition plugin = null; |
3775 |
25 Sep 07 |
enell |
110 |
Nameable nameableProxy = null; |
1995 |
16 Feb 06 |
nicklas |
111 |
boolean readPlugin = true; |
1995 |
16 Feb 06 |
nicklas |
112 |
boolean configurable = false; |
1995 |
16 Feb 06 |
nicklas |
113 |
try |
1995 |
16 Feb 06 |
nicklas |
114 |
{ |
1995 |
16 Feb 06 |
nicklas |
115 |
plugin = configuration.getPluginDefinition(); |
1995 |
16 Feb 06 |
nicklas |
116 |
contexts.addAll(plugin.getGuiContexts()); |
2512 |
10 Aug 06 |
nicklas |
117 |
configurable = plugin.isInteractive() && plugin.supportsConfigurations(); |
1995 |
16 Feb 06 |
nicklas |
118 |
} |
1995 |
16 Feb 06 |
nicklas |
119 |
catch (PermissionDeniedException ex) |
1995 |
16 Feb 06 |
nicklas |
120 |
{ |
1995 |
16 Feb 06 |
nicklas |
121 |
readPlugin = false; |
1995 |
16 Feb 06 |
nicklas |
122 |
} |
4886 |
03 Apr 09 |
nicklas |
123 |
JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, guiContext, configuration); |
7604 |
25 Feb 19 |
nicklas |
124 |
ExtensionsInvoker<ButtonAction> invoker = ToolbarUtil.useExtensions(jspContext); |
1995 |
16 Feb 06 |
nicklas |
125 |
%> |
6289 |
05 Jun 13 |
nicklas |
126 |
<base:page title="<%=title%>" id="view-page"> |
6289 |
05 Jun 13 |
nicklas |
127 |
<base:head scripts="table.js,tabcontrol-2.js,~configurations.js" styles="table.css,toolbar.css,headertabcontrol.css,path.css"> |
4886 |
03 Apr 09 |
nicklas |
128 |
<ext:scripts context="<%=jspContext%>" /> |
4886 |
03 Apr 09 |
nicklas |
129 |
<ext:stylesheets context="<%=jspContext%>" /> |
1995 |
16 Feb 06 |
nicklas |
130 |
</base:head> |
1995 |
16 Feb 06 |
nicklas |
131 |
<base:body> |
5941 |
01 Feb 12 |
nicklas |
132 |
<p:path><p:pathelement |
5941 |
01 Feb 12 |
nicklas |
133 |
title="Plugin configurations" href="<%="index.jsp?ID="+ID%>" |
5941 |
01 Feb 12 |
nicklas |
134 |
/><p:pathelement title="<%=HTML.encodeTags(configuration.getName())%>" |
5941 |
01 Feb 12 |
nicklas |
135 |
/></p:path> |
6289 |
05 Jun 13 |
nicklas |
136 |
<div id="page-data" data-item-id="<%=itemId%>"></div> |
1995 |
16 Feb 06 |
nicklas |
137 |
|
5941 |
01 Feb 12 |
nicklas |
138 |
<t:tabcontrol |
5941 |
01 Feb 12 |
nicklas |
139 |
id="main" |
5941 |
01 Feb 12 |
nicklas |
140 |
subclass="content mastertabcontrol" |
6244 |
25 Feb 13 |
nicklas |
141 |
active="<%=tab%>"> |
1995 |
16 Feb 06 |
nicklas |
142 |
<t:tab id="properties" title="Properties"> |
5941 |
01 Feb 12 |
nicklas |
143 |
<div> |
5941 |
01 Feb 12 |
nicklas |
144 |
<table class="fullform bottomborder"> |
5941 |
01 Feb 12 |
nicklas |
145 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
146 |
<th class="itemstatus"> |
4003 |
26 Nov 07 |
nicklas |
147 |
<base:icon |
5946 |
03 Feb 12 |
nicklas |
148 |
image="shared.png" |
5941 |
01 Feb 12 |
nicklas |
149 |
visible="<%=configuration.isShared()%>" |
5941 |
01 Feb 12 |
nicklas |
150 |
tooltip="This item is shared to other users, groups and/or projects" |
5941 |
01 Feb 12 |
nicklas |
151 |
/> |
5941 |
01 Feb 12 |
nicklas |
152 |
<base:icon |
6289 |
05 Jun 13 |
nicklas |
153 |
id="btnDeletePermanently" |
5946 |
03 Feb 12 |
nicklas |
154 |
image="deleted.png" |
5941 |
01 Feb 12 |
nicklas |
155 |
tooltip="This item has been flagged for deletion. Click to delete it now." |
5941 |
01 Feb 12 |
nicklas |
156 |
enabled="<%=deletePermanentlyPermission %>" |
5941 |
01 Feb 12 |
nicklas |
157 |
visible="<%=isRemoved%>" |
5941 |
01 Feb 12 |
nicklas |
158 |
/> |
6289 |
05 Jun 13 |
nicklas |
159 |
<base:icon |
6289 |
05 Jun 13 |
nicklas |
160 |
id="btnUsingItems" |
6289 |
05 Jun 13 |
nicklas |
161 |
image="used.png" |
5941 |
01 Feb 12 |
nicklas |
162 |
tooltip="This item is used by other items and can't be permanently deleted. Show the items that are using this one" |
5941 |
01 Feb 12 |
nicklas |
163 |
visible="<%=isRemoved && isUsed%>" /> |
5941 |
01 Feb 12 |
nicklas |
164 |
</th> |
5941 |
01 Feb 12 |
nicklas |
165 |
<td style="padding: 0px;"> |
6605 |
18 Nov 14 |
nicklas |
166 |
<tbl:toolbar subclass="bottomborder bg-filled-50"> |
5941 |
01 Feb 12 |
nicklas |
167 |
<tbl:button |
6289 |
05 Jun 13 |
nicklas |
168 |
id="btnEdit" |
5942 |
01 Feb 12 |
nicklas |
169 |
disabled="<%=!writePermission%>" |
5945 |
02 Feb 12 |
nicklas |
170 |
image="edit.png" |
5941 |
01 Feb 12 |
nicklas |
171 |
title="Edit…" |
5941 |
01 Feb 12 |
nicklas |
172 |
tooltip="<%=writePermission ? "Edit this plugin configuration" : "You do not have permission to edit this plugin configuration"%>" |
5941 |
01 Feb 12 |
nicklas |
173 |
/> |
5941 |
01 Feb 12 |
nicklas |
174 |
<tbl:button |
6289 |
05 Jun 13 |
nicklas |
175 |
id="btnCopy" |
5941 |
01 Feb 12 |
nicklas |
176 |
disabled="<%=!createPermission%>" |
5946 |
03 Feb 12 |
nicklas |
177 |
image="copy.png" |
5941 |
01 Feb 12 |
nicklas |
178 |
title="Copy…" |
5941 |
01 Feb 12 |
nicklas |
179 |
tooltip="<%=createPermission ? "Create a copy of this configuration" : "You do not have permission to create new configurations"%>" |
5941 |
01 Feb 12 |
nicklas |
180 |
/> |
5941 |
01 Feb 12 |
nicklas |
181 |
<tbl:button |
6289 |
05 Jun 13 |
nicklas |
182 |
id="btnDelete" |
5942 |
01 Feb 12 |
nicklas |
183 |
disabled="<%=!deletePermission%>" |
5946 |
03 Feb 12 |
nicklas |
184 |
image="delete.png" |
5941 |
01 Feb 12 |
nicklas |
185 |
title="Delete" |
5941 |
01 Feb 12 |
nicklas |
186 |
visible="<%=!configuration.isRemoved()%>" |
5941 |
01 Feb 12 |
nicklas |
187 |
tooltip="<%=deletePermission ? "Delete this plugin configuration" : "You do not have permission to delete this plugin configuration"%>" |
5941 |
01 Feb 12 |
nicklas |
188 |
/> |
5941 |
01 Feb 12 |
nicklas |
189 |
<tbl:button |
6289 |
05 Jun 13 |
nicklas |
190 |
id="btnRestore" |
5942 |
01 Feb 12 |
nicklas |
191 |
disabled="<%=!writePermission%>" |
5946 |
03 Feb 12 |
nicklas |
192 |
image="restore.png" |
5941 |
01 Feb 12 |
nicklas |
193 |
title="Restore" |
5941 |
01 Feb 12 |
nicklas |
194 |
visible="<%=configuration.isRemoved()%>" |
5941 |
01 Feb 12 |
nicklas |
195 |
tooltip="<%=writePermission ? "Restore this plugin configuration" : "You do not have permission to restore this plugin configuration"%>" |
5941 |
01 Feb 12 |
nicklas |
196 |
/> |
5941 |
01 Feb 12 |
nicklas |
197 |
<tbl:button |
6289 |
05 Jun 13 |
nicklas |
198 |
id="btnShare" |
5942 |
01 Feb 12 |
nicklas |
199 |
disabled="<%=!sharePermission%>" |
5945 |
02 Feb 12 |
nicklas |
200 |
image="share.png" |
5941 |
01 Feb 12 |
nicklas |
201 |
title="Share…" |
5941 |
01 Feb 12 |
nicklas |
202 |
tooltip="<%=sharePermission ? "Share this plugin configuration to other user, groups and projects" : "You do not have permission to share this plugin configuration"%>" |
5941 |
01 Feb 12 |
nicklas |
203 |
/> |
5941 |
01 Feb 12 |
nicklas |
204 |
<tbl:button |
6289 |
05 Jun 13 |
nicklas |
205 |
id="btnSetOwner" |
5942 |
01 Feb 12 |
nicklas |
206 |
disabled="<%=!setOwnerPermission%>" |
5941 |
01 Feb 12 |
nicklas |
207 |
image="take_ownership.png" |
5941 |
01 Feb 12 |
nicklas |
208 |
title="Set owner…" |
5941 |
01 Feb 12 |
nicklas |
209 |
tooltip="<%=setOwnerPermission ? "Change owner of this item" : "You do not have permission to change ownership of this item"%>" |
5941 |
01 Feb 12 |
nicklas |
210 |
/> |
5941 |
01 Feb 12 |
nicklas |
211 |
<tbl:button |
6289 |
05 Jun 13 |
nicklas |
212 |
id="btnImport" |
5946 |
03 Feb 12 |
nicklas |
213 |
image="import.png" |
6289 |
05 Jun 13 |
nicklas |
214 |
data-plugin-type="IMPORT" |
5941 |
01 Feb 12 |
nicklas |
215 |
title="Import…" |
5941 |
01 Feb 12 |
nicklas |
216 |
tooltip="Import data" |
5941 |
01 Feb 12 |
nicklas |
217 |
visible="<%=pluginCount.containsKey(Plugin.MainType.IMPORT)%>" |
5941 |
01 Feb 12 |
nicklas |
218 |
/> |
5941 |
01 Feb 12 |
nicklas |
219 |
<tbl:button |
6289 |
05 Jun 13 |
nicklas |
220 |
id="btnExport" |
6289 |
05 Jun 13 |
nicklas |
221 |
image="export.png" |
6289 |
05 Jun 13 |
nicklas |
222 |
data-plugin-type="EXPORT" |
5941 |
01 Feb 12 |
nicklas |
223 |
title="Export…" |
5941 |
01 Feb 12 |
nicklas |
224 |
tooltip="Export data" |
5941 |
01 Feb 12 |
nicklas |
225 |
visible="<%=pluginCount.containsKey(Plugin.MainType.EXPORT)%>" |
5941 |
01 Feb 12 |
nicklas |
226 |
/> |
5941 |
01 Feb 12 |
nicklas |
227 |
<tbl:button |
6289 |
05 Jun 13 |
nicklas |
228 |
id="btnRunPlugin" |
6289 |
05 Jun 13 |
nicklas |
229 |
image="runplugin.png" |
6289 |
05 Jun 13 |
nicklas |
230 |
data-plugin-type="OTHER" |
5941 |
01 Feb 12 |
nicklas |
231 |
title="Run plugin…" |
5941 |
01 Feb 12 |
nicklas |
232 |
tooltip="Run a plugin" |
5941 |
01 Feb 12 |
nicklas |
233 |
visible="<%=pluginCount.containsKey(Plugin.MainType.OTHER)%>" |
5941 |
01 Feb 12 |
nicklas |
234 |
/> |
5941 |
01 Feb 12 |
nicklas |
235 |
<tbl:button |
6289 |
05 Jun 13 |
nicklas |
236 |
id="btnConfigure" |
5945 |
02 Feb 12 |
nicklas |
237 |
image="runplugin.png" |
5941 |
01 Feb 12 |
nicklas |
238 |
title="Configure…" |
5941 |
01 Feb 12 |
nicklas |
239 |
tooltip="Configure this plugin" |
5941 |
01 Feb 12 |
nicklas |
240 |
visible="<%=configurable && writePermission%>" |
5941 |
01 Feb 12 |
nicklas |
241 |
/> |
5941 |
01 Feb 12 |
nicklas |
242 |
<ext:render extensions="<%=invoker%>" context="<%=jspContext%>" |
7604 |
25 Feb 19 |
nicklas |
243 |
wrapper="<%=new PrefixSuffixRenderer<ButtonAction>(jspContext, "<td>", "</td>") %>"/> |
5941 |
01 Feb 12 |
nicklas |
244 |
<tbl:button |
5941 |
01 Feb 12 |
nicklas |
245 |
image="help.png" |
6289 |
05 Jun 13 |
nicklas |
246 |
subclass="auto-init" |
6289 |
05 Jun 13 |
nicklas |
247 |
data-auto-init="help" |
6289 |
05 Jun 13 |
nicklas |
248 |
data-help-id="pluginconfiguration.view.properties" |
5941 |
01 Feb 12 |
nicklas |
249 |
title="Help…" |
5941 |
01 Feb 12 |
nicklas |
250 |
tooltip="Get help about this page" |
5941 |
01 Feb 12 |
nicklas |
251 |
/> |
5941 |
01 Feb 12 |
nicklas |
252 |
</tbl:toolbar> |
5941 |
01 Feb 12 |
nicklas |
253 |
</td> |
5941 |
01 Feb 12 |
nicklas |
254 |
</tr> |
1995 |
16 Feb 06 |
nicklas |
255 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
256 |
<th>Name</th> |
1995 |
16 Feb 06 |
nicklas |
257 |
<td><%=HTML.encodeTags(configuration.getName())%></td> |
1995 |
16 Feb 06 |
nicklas |
258 |
</tr> |
1995 |
16 Feb 06 |
nicklas |
259 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
260 |
<th>Registered</th> |
4698 |
10 Dec 08 |
nicklas |
261 |
<td><%=dateFormatter.format(configuration.getEntryDate())%></td> |
4698 |
10 Dec 08 |
nicklas |
262 |
</tr> |
4698 |
10 Dec 08 |
nicklas |
263 |
<tr> |
8107 |
23 Jan 23 |
nicklas |
264 |
<th>Disabled</th> |
8107 |
23 Jan 23 |
nicklas |
265 |
<td><%=configuration.isDisabled() ? "Yes" : "No"%></td> |
8107 |
23 Jan 23 |
nicklas |
266 |
</tr> |
8107 |
23 Jan 23 |
nicklas |
267 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
268 |
<th>Plugin</th> |
5941 |
01 Feb 12 |
nicklas |
269 |
<td><%=Base.getLinkedName(ID, plugin, plugin == null, true)%></td> |
1995 |
16 Feb 06 |
nicklas |
270 |
</tr> |
1995 |
16 Feb 06 |
nicklas |
271 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
272 |
<th>Type</th> |
1995 |
16 Feb 06 |
nicklas |
273 |
<td><%=plugin == null ? "<i>- denied -</i>" : plugin.getMainType().toString()%></td> |
1995 |
16 Feb 06 |
nicklas |
274 |
</tr> |
1995 |
16 Feb 06 |
nicklas |
275 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
276 |
<th>Owner</th> |
2436 |
28 Jun 06 |
nicklas |
277 |
<td><base:propertyvalue item="<%=configuration%>" property="owner" /></td> |
1995 |
16 Feb 06 |
nicklas |
278 |
</tr> |
5941 |
01 Feb 12 |
nicklas |
279 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
280 |
<th>Permissions</th> |
5941 |
01 Feb 12 |
nicklas |
281 |
<td><%=PermissionUtil.getFullPermissionNames(configuration)%></td> |
5941 |
01 Feb 12 |
nicklas |
282 |
</tr> |
5905 |
12 Dec 11 |
nicklas |
283 |
<tr > |
5941 |
01 Feb 12 |
nicklas |
284 |
<th>Description</th> |
2436 |
28 Jun 06 |
nicklas |
285 |
<td><%=HTML.niceFormat(configuration.getDescription())%></td> |
1995 |
16 Feb 06 |
nicklas |
286 |
</tr> |
1995 |
16 Feb 06 |
nicklas |
287 |
</table> |
5941 |
01 Feb 12 |
nicklas |
288 |
</div> |
3547 |
03 Jul 07 |
martin |
289 |
|
5941 |
01 Feb 12 |
nicklas |
290 |
<% |
5941 |
01 Feb 12 |
nicklas |
291 |
if (plugin != null) |
3547 |
03 Jul 07 |
martin |
292 |
{ |
5941 |
01 Feb 12 |
nicklas |
293 |
List<String> names = new java.util.ArrayList<String>(configuration.getParameterNames()); |
3547 |
03 Jul 07 |
martin |
294 |
%> |
5040 |
10 Aug 09 |
martin |
295 |
<base:section |
5941 |
01 Feb 12 |
nicklas |
296 |
id="parameters" |
5941 |
01 Feb 12 |
nicklas |
297 |
title="Configuration parameters" |
5941 |
01 Feb 12 |
nicklas |
298 |
context="<%=cc %>" |
5040 |
10 Aug 09 |
martin |
299 |
> |
1995 |
16 Feb 06 |
nicklas |
300 |
<% |
5941 |
01 Feb 12 |
nicklas |
301 |
if (names == null || names.size() == 0) |
1995 |
16 Feb 06 |
nicklas |
302 |
{ |
5941 |
01 Feb 12 |
nicklas |
303 |
%> |
5941 |
01 Feb 12 |
nicklas |
304 |
<div class="messagecontainer note"> |
5941 |
01 Feb 12 |
nicklas |
305 |
No parameters has been specified. |
5941 |
01 Feb 12 |
nicklas |
306 |
</div> |
5941 |
01 Feb 12 |
nicklas |
307 |
<% |
5941 |
01 Feb 12 |
nicklas |
308 |
} |
5941 |
01 Feb 12 |
nicklas |
309 |
else |
5941 |
01 Feb 12 |
nicklas |
310 |
{ |
5941 |
01 Feb 12 |
nicklas |
311 |
Collections.sort(names); |
5941 |
01 Feb 12 |
nicklas |
312 |
%> |
5941 |
01 Feb 12 |
nicklas |
313 |
<table class="fullform fullborder"> |
5941 |
01 Feb 12 |
nicklas |
314 |
<% |
5941 |
01 Feb 12 |
nicklas |
315 |
for (String name : names) |
2436 |
28 Jun 06 |
nicklas |
316 |
{ |
5941 |
01 Feb 12 |
nicklas |
317 |
StringBuilder sb = new StringBuilder(); |
5941 |
01 Feb 12 |
nicklas |
318 |
String displayValue = ""; |
5941 |
01 Feb 12 |
nicklas |
319 |
String description = ""; |
5941 |
01 Feb 12 |
nicklas |
320 |
try |
2436 |
28 Jun 06 |
nicklas |
321 |
{ |
5941 |
01 Feb 12 |
nicklas |
322 |
ParameterInfo pi = configuration.getParameterInfo(name); |
5941 |
01 Feb 12 |
nicklas |
323 |
if (pi.getLabel() != null) name = HTML.encodeTags(pi.getLabel()); |
5941 |
01 Feb 12 |
nicklas |
324 |
description = HTML.encodeTags(pi.getDescription()); |
6988 |
30 Oct 15 |
nicklas |
325 |
List<?> values = pi.getValuesOrMask(); |
5941 |
01 Feb 12 |
nicklas |
326 |
int i = 0; |
5941 |
01 Feb 12 |
nicklas |
327 |
for (Object value : values) |
2436 |
28 Jun 06 |
nicklas |
328 |
{ |
5941 |
01 Feb 12 |
nicklas |
329 |
if (value != null) |
2436 |
28 Jun 06 |
nicklas |
330 |
{ |
5941 |
01 Feb 12 |
nicklas |
331 |
if (i > 0) sb.append(", "); |
5941 |
01 Feb 12 |
nicklas |
332 |
i++; |
5941 |
01 Feb 12 |
nicklas |
333 |
if (value instanceof BasicItem) |
2436 |
28 Jun 06 |
nicklas |
334 |
{ |
5941 |
01 Feb 12 |
nicklas |
335 |
BasicItem item = (BasicItem)value; |
5941 |
01 Feb 12 |
nicklas |
336 |
String itemName = ""; |
5941 |
01 Feb 12 |
nicklas |
337 |
if (item instanceof File) |
5941 |
01 Feb 12 |
nicklas |
338 |
{ |
5941 |
01 Feb 12 |
nicklas |
339 |
sb.append(Base.getLinkedFile(ID, (File)item, false, true, true, root)); |
5941 |
01 Feb 12 |
nicklas |
340 |
} |
5941 |
01 Feb 12 |
nicklas |
341 |
else |
5941 |
01 Feb 12 |
nicklas |
342 |
{ |
5941 |
01 Feb 12 |
nicklas |
343 |
if (item instanceof Nameable) |
5941 |
01 Feb 12 |
nicklas |
344 |
{ |
5941 |
01 Feb 12 |
nicklas |
345 |
itemName = ((Nameable)item).getName(); |
5941 |
01 Feb 12 |
nicklas |
346 |
} |
5941 |
01 Feb 12 |
nicklas |
347 |
else |
5941 |
01 Feb 12 |
nicklas |
348 |
{ |
5941 |
01 Feb 12 |
nicklas |
349 |
itemName = item.toString(); |
5941 |
01 Feb 12 |
nicklas |
350 |
} |
5941 |
01 Feb 12 |
nicklas |
351 |
sb.append(Base.getLink(ID, HTML.encodeTags(itemName), |
5941 |
01 Feb 12 |
nicklas |
352 |
item.getType(), item.getId(), item.hasPermission(Permission.WRITE))); |
5941 |
01 Feb 12 |
nicklas |
353 |
} |
2436 |
28 Jun 06 |
nicklas |
354 |
} |
5941 |
01 Feb 12 |
nicklas |
355 |
else if (value instanceof Date) |
5941 |
01 Feb 12 |
nicklas |
356 |
{ |
5941 |
01 Feb 12 |
nicklas |
357 |
if (pi.getValueType() == Type.TIMESTAMP) |
5941 |
01 Feb 12 |
nicklas |
358 |
{ |
5941 |
01 Feb 12 |
nicklas |
359 |
sb.append(dateTimeFormatter.format((Date)value)); |
5941 |
01 Feb 12 |
nicklas |
360 |
} |
5941 |
01 Feb 12 |
nicklas |
361 |
else |
5941 |
01 Feb 12 |
nicklas |
362 |
{ |
5941 |
01 Feb 12 |
nicklas |
363 |
sb.append(dateFormatter.format((Date)value)); |
5941 |
01 Feb 12 |
nicklas |
364 |
} |
5941 |
01 Feb 12 |
nicklas |
365 |
} |
2436 |
28 Jun 06 |
nicklas |
366 |
else |
2436 |
28 Jun 06 |
nicklas |
367 |
{ |
5941 |
01 Feb 12 |
nicklas |
368 |
sb.append(HTML.encodeTags(value.toString())); |
2436 |
28 Jun 06 |
nicklas |
369 |
} |
2436 |
28 Jun 06 |
nicklas |
370 |
} |
2436 |
28 Jun 06 |
nicklas |
371 |
} |
5941 |
01 Feb 12 |
nicklas |
372 |
displayValue = sb.toString(); |
2436 |
28 Jun 06 |
nicklas |
373 |
} |
5941 |
01 Feb 12 |
nicklas |
374 |
catch (Throwable ex) |
5941 |
01 Feb 12 |
nicklas |
375 |
{ |
5941 |
01 Feb 12 |
nicklas |
376 |
displayValue = "<i>ERROR: "+ex.getMessage()+"</i>"; |
5941 |
01 Feb 12 |
nicklas |
377 |
} |
5941 |
01 Feb 12 |
nicklas |
378 |
%> |
5941 |
01 Feb 12 |
nicklas |
379 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
380 |
<th><span title="<%=description%>"><%=name%></span></th> |
5941 |
01 Feb 12 |
nicklas |
381 |
<td><%=displayValue%></td> |
5941 |
01 Feb 12 |
nicklas |
382 |
</tr> |
5941 |
01 Feb 12 |
nicklas |
383 |
<% |
2436 |
28 Jun 06 |
nicklas |
384 |
} |
5941 |
01 Feb 12 |
nicklas |
385 |
%> |
5941 |
01 Feb 12 |
nicklas |
386 |
</table> |
1995 |
16 Feb 06 |
nicklas |
387 |
<% |
1995 |
16 Feb 06 |
nicklas |
388 |
} |
5941 |
01 Feb 12 |
nicklas |
389 |
%> |
5941 |
01 Feb 12 |
nicklas |
390 |
</base:section> |
5941 |
01 Feb 12 |
nicklas |
391 |
<% |
1995 |
16 Feb 06 |
nicklas |
392 |
} |
1995 |
16 Feb 06 |
nicklas |
393 |
%> |
5941 |
01 Feb 12 |
nicklas |
394 |
|
5941 |
01 Feb 12 |
nicklas |
395 |
<jsp:include page="../../common/anytoany/list_anytoany.jsp"> |
5941 |
01 Feb 12 |
nicklas |
396 |
<jsp:param name="ID" value="<%=ID%>" /> |
5941 |
01 Feb 12 |
nicklas |
397 |
<jsp:param name="item_type" value="<%=itemType.name()%>" /> |
5941 |
01 Feb 12 |
nicklas |
398 |
<jsp:param name="item_id" value="<%=itemId%>" /> |
5941 |
01 Feb 12 |
nicklas |
399 |
<jsp:param name="title" value="Other items related to this plugin configuration" /> |
5941 |
01 Feb 12 |
nicklas |
400 |
</jsp:include> |
5941 |
01 Feb 12 |
nicklas |
401 |
<jsp:include page="../../common/share/list_share.jsp"> |
5941 |
01 Feb 12 |
nicklas |
402 |
<jsp:param name="ID" value="<%=ID%>" /> |
5941 |
01 Feb 12 |
nicklas |
403 |
<jsp:param name="item_type" value="<%=itemType.name()%>" /> |
5941 |
01 Feb 12 |
nicklas |
404 |
<jsp:param name="item_id" value="<%=itemId%>" /> |
5941 |
01 Feb 12 |
nicklas |
405 |
<jsp:param name="title" value="Shared to" /> |
5941 |
01 Feb 12 |
nicklas |
406 |
</jsp:include> |
3979 |
19 Nov 07 |
nicklas |
407 |
</t:tab> |
1995 |
16 Feb 06 |
nicklas |
408 |
|
3979 |
19 Nov 07 |
nicklas |
409 |
<t:tab id="annotations" title="Annotations" |
5941 |
01 Feb 12 |
nicklas |
410 |
tooltip="View annotation values" clazz="white" |
6600 |
17 Nov 14 |
nicklas |
411 |
visible="<%=plugin != null && plugin.supports("net.sf.basedb.core.plugin.AnnotationSetterPlugin") %>"> |
6255 |
22 Mar 13 |
nicklas |
412 |
<jsp:include page="../../common/annotations/list_frameset.jsp"> |
3979 |
19 Nov 07 |
nicklas |
413 |
<jsp:param name="item_type" value="<%=itemType.name()%>" /> |
3979 |
19 Nov 07 |
nicklas |
414 |
<jsp:param name="item_id" value="<%=itemId%>" /> |
3979 |
19 Nov 07 |
nicklas |
415 |
<jsp:param name="ID" value="<%=ID%>" /> |
3979 |
19 Nov 07 |
nicklas |
416 |
</jsp:include> |
1995 |
16 Feb 06 |
nicklas |
417 |
</t:tab> |
7166 |
07 Jun 16 |
nicklas |
418 |
<t:tab id="history" title="History" |
7166 |
07 Jun 16 |
nicklas |
419 |
tooltip="Displays a log with the history of this item" |
6289 |
05 Jun 13 |
nicklas |
420 |
visible="<%=ChangeHistoryUtil.showChangeHistoryTab(sc)%>"> |
6244 |
25 Feb 13 |
nicklas |
421 |
<jsp:include page="../../common/history/frameset.jsp"> |
6244 |
25 Feb 13 |
nicklas |
422 |
<jsp:param name="item_type" value="<%=itemType.name()%>" /> |
6244 |
25 Feb 13 |
nicklas |
423 |
<jsp:param name="item_id" value="<%=itemId%>" /> |
6244 |
25 Feb 13 |
nicklas |
424 |
<jsp:param name="ID" value="<%=ID%>" /> |
6244 |
25 Feb 13 |
nicklas |
425 |
</jsp:include> |
5069 |
20 Aug 09 |
nicklas |
426 |
</t:tab> |
1995 |
16 Feb 06 |
nicklas |
427 |
</t:tabcontrol> |
1995 |
16 Feb 06 |
nicklas |
428 |
|
1995 |
16 Feb 06 |
nicklas |
429 |
</base:body> |
1995 |
16 Feb 06 |
nicklas |
430 |
</base:page> |
1995 |
16 Feb 06 |
nicklas |
431 |
<% |
1995 |
16 Feb 06 |
nicklas |
432 |
} |
1995 |
16 Feb 06 |
nicklas |
433 |
finally |
1995 |
16 Feb 06 |
nicklas |
434 |
{ |
1995 |
16 Feb 06 |
nicklas |
435 |
if (dc != null) dc.close(); |
1995 |
16 Feb 06 |
nicklas |
436 |
} |
1995 |
16 Feb 06 |
nicklas |
437 |
|
1995 |
16 Feb 06 |
nicklas |
438 |
%> |