1993 |
15 Feb 06 |
nicklas |
1 |
<%-- $Id$ |
1993 |
15 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 Johan Enell, Martin Svensson |
1993 |
15 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/ |
1993 |
15 Feb 06 |
nicklas |
8 |
|
1993 |
15 Feb 06 |
nicklas |
9 |
BASE is free software; you can redistribute it and/or |
1993 |
15 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 |
1993 |
15 Feb 06 |
nicklas |
12 |
of the License, or (at your option) any later version. |
1993 |
15 Feb 06 |
nicklas |
13 |
|
1993 |
15 Feb 06 |
nicklas |
14 |
BASE is distributed in the hope that it will be useful, |
1993 |
15 Feb 06 |
nicklas |
15 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
1993 |
15 Feb 06 |
nicklas |
16 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1993 |
15 Feb 06 |
nicklas |
17 |
GNU General Public License for more details. |
1993 |
15 Feb 06 |
nicklas |
18 |
|
1993 |
15 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/>. |
1993 |
15 Feb 06 |
nicklas |
21 |
------------------------------------------------------------------ |
1993 |
15 Feb 06 |
nicklas |
22 |
|
1993 |
15 Feb 06 |
nicklas |
23 |
@author Nicklas |
1993 |
15 Feb 06 |
nicklas |
24 |
@version 2.0 |
1993 |
15 Feb 06 |
nicklas |
25 |
--%> |
5426 |
24 Sep 10 |
nicklas |
26 |
<%@ page pageEncoding="UTF-8" session="false" |
1993 |
15 Feb 06 |
nicklas |
27 |
import="net.sf.basedb.core.SessionControl" |
1993 |
15 Feb 06 |
nicklas |
28 |
import="net.sf.basedb.core.DbControl" |
1993 |
15 Feb 06 |
nicklas |
29 |
import="net.sf.basedb.core.SystemItems" |
1993 |
15 Feb 06 |
nicklas |
30 |
import="net.sf.basedb.core.Item" |
1993 |
15 Feb 06 |
nicklas |
31 |
import="net.sf.basedb.core.ItemContext" |
1993 |
15 Feb 06 |
nicklas |
32 |
import="net.sf.basedb.core.Permission" |
1993 |
15 Feb 06 |
nicklas |
33 |
import="net.sf.basedb.core.PluginDefinition" |
2436 |
28 Jun 06 |
nicklas |
34 |
import="net.sf.basedb.core.PluginConfiguration" |
3547 |
03 Jul 07 |
martin |
35 |
import="net.sf.basedb.core.Group" |
2631 |
08 Sep 06 |
nicklas |
36 |
import="net.sf.basedb.core.JobAgent" |
2631 |
08 Sep 06 |
nicklas |
37 |
import="net.sf.basedb.core.JobAgentSettings" |
1993 |
15 Feb 06 |
nicklas |
38 |
import="net.sf.basedb.core.User" |
2436 |
28 Jun 06 |
nicklas |
39 |
import="net.sf.basedb.core.Include" |
2436 |
28 Jun 06 |
nicklas |
40 |
import="net.sf.basedb.core.ItemQuery" |
3547 |
03 Jul 07 |
martin |
41 |
import="net.sf.basedb.core.ItemResultIterator" |
2436 |
28 Jun 06 |
nicklas |
42 |
import="net.sf.basedb.core.ItemResultList" |
3547 |
03 Jul 07 |
martin |
43 |
import="net.sf.basedb.core.MultiPermissions" |
1993 |
15 Feb 06 |
nicklas |
44 |
import="net.sf.basedb.core.PermissionDeniedException" |
3501 |
15 Jun 07 |
enell |
45 |
import="net.sf.basedb.core.BaseException" |
2675 |
28 Sep 06 |
martin |
46 |
import="net.sf.basedb.core.RoleKey" |
1993 |
15 Feb 06 |
nicklas |
47 |
import="net.sf.basedb.core.plugin.GuiContext" |
1993 |
15 Feb 06 |
nicklas |
48 |
import="net.sf.basedb.core.plugin.Plugin" |
3547 |
03 Jul 07 |
martin |
49 |
import="net.sf.basedb.core.Project" |
2631 |
08 Sep 06 |
nicklas |
50 |
import="net.sf.basedb.core.query.Restrictions" |
2436 |
28 Jun 06 |
nicklas |
51 |
import="net.sf.basedb.core.query.Orders" |
2436 |
28 Jun 06 |
nicklas |
52 |
import="net.sf.basedb.core.query.Hql" |
1993 |
15 Feb 06 |
nicklas |
53 |
import="net.sf.basedb.util.JarClassLoader" |
1993 |
15 Feb 06 |
nicklas |
54 |
import="net.sf.basedb.util.ToStringComparator" |
1993 |
15 Feb 06 |
nicklas |
55 |
import="net.sf.basedb.clients.web.Base" |
2386 |
15 Jun 06 |
martin |
56 |
import="net.sf.basedb.clients.web.PermissionUtil" |
1993 |
15 Feb 06 |
nicklas |
57 |
import="net.sf.basedb.clients.web.util.HTML" |
2753 |
20 Oct 06 |
nicklas |
58 |
import="net.sf.basedb.util.Values" |
4698 |
10 Dec 08 |
nicklas |
59 |
import="net.sf.basedb.util.formatter.Formatter" |
4698 |
10 Dec 08 |
nicklas |
60 |
import="net.sf.basedb.clients.web.formatter.FormatterFactory" |
4886 |
03 Apr 09 |
nicklas |
61 |
import="net.sf.basedb.clients.web.extensions.ExtensionsControl" |
4886 |
03 Apr 09 |
nicklas |
62 |
import="net.sf.basedb.clients.web.extensions.JspContext" |
4886 |
03 Apr 09 |
nicklas |
63 |
import="net.sf.basedb.clients.web.extensions.renderer.PrefixSuffixRenderer" |
7604 |
25 Feb 19 |
nicklas |
64 |
import="net.sf.basedb.clients.web.extensions.toolbar.ButtonAction" |
4886 |
03 Apr 09 |
nicklas |
65 |
import="net.sf.basedb.clients.web.extensions.toolbar.ToolbarUtil" |
4886 |
03 Apr 09 |
nicklas |
66 |
import="net.sf.basedb.util.extensions.ExtensionsInvoker" |
4698 |
10 Dec 08 |
nicklas |
67 |
import="java.util.Date" |
3547 |
03 Jul 07 |
martin |
68 |
import="java.util.Collections" |
2675 |
28 Sep 06 |
martin |
69 |
import="java.util.List" |
1993 |
15 Feb 06 |
nicklas |
70 |
import="java.util.Map" |
1993 |
15 Feb 06 |
nicklas |
71 |
import="java.util.Set" |
1993 |
15 Feb 06 |
nicklas |
72 |
import="java.util.TreeSet" |
1993 |
15 Feb 06 |
nicklas |
73 |
%> |
1993 |
15 Feb 06 |
nicklas |
74 |
<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %> |
1993 |
15 Feb 06 |
nicklas |
75 |
<%@ taglib prefix="tbl" uri="/WEB-INF/table.tld" %> |
1993 |
15 Feb 06 |
nicklas |
76 |
<%@ taglib prefix="t" uri="/WEB-INF/tab.tld" %> |
1993 |
15 Feb 06 |
nicklas |
77 |
<%@ taglib prefix="p" uri="/WEB-INF/path.tld" %> |
4886 |
03 Apr 09 |
nicklas |
78 |
<%@ taglib prefix="ext" uri="/WEB-INF/extensions.tld" %> |
1993 |
15 Feb 06 |
nicklas |
79 |
<%! |
1993 |
15 Feb 06 |
nicklas |
80 |
private static final Item itemType = Item.PLUGINDEFINITION; |
1993 |
15 Feb 06 |
nicklas |
81 |
private static final GuiContext guiContext = new GuiContext(itemType, GuiContext.Type.ITEM); |
2675 |
28 Sep 06 |
martin |
82 |
|
2722 |
11 Oct 06 |
nicklas |
83 |
private static final String getShortPermissions(Item itemType, Set<Permission> granted, Set<Permission> denied) |
2675 |
28 Sep 06 |
martin |
84 |
{ |
2675 |
28 Sep 06 |
martin |
85 |
Set<Permission> defined = itemType.getDefinedPermissions(); |
2675 |
28 Sep 06 |
martin |
86 |
StringBuilder sb = new StringBuilder(); |
2802 |
25 Oct 06 |
nicklas |
87 |
if (defined.contains(Permission.CREATE)) sb.append(granted.contains(Permission.CREATE) ? "C" : denied.contains(Permission.CREATE) ? "-" : "c"); |
2802 |
25 Oct 06 |
nicklas |
88 |
if (defined.contains(Permission.READ)) sb.append(granted.contains(Permission.READ) ? "R" : denied.contains(Permission.READ) ? "-" : "r"); |
2802 |
25 Oct 06 |
nicklas |
89 |
if (defined.contains(Permission.USE)) sb.append(granted.contains(Permission.USE) ? "U" : denied.contains(Permission.USE) ? "-" : "u"); |
7220 |
04 Nov 16 |
nicklas |
90 |
if (defined.contains(Permission.RESTRICTED_WRITE)) sb.append(granted.contains(Permission.RESTRICTED_WRITE) ? "A" : denied.contains(Permission.RESTRICTED_WRITE) ? "-" : "a"); |
2802 |
25 Oct 06 |
nicklas |
91 |
if (defined.contains(Permission.WRITE)) sb.append(granted.contains(Permission.WRITE) ? "W" : denied.contains(Permission.WRITE) ? "-" : "w"); |
2802 |
25 Oct 06 |
nicklas |
92 |
if (defined.contains(Permission.DELETE)) sb.append(granted.contains(Permission.DELETE) ? "D" : denied.contains(Permission.DELETE) ? "-" : "d"); |
2802 |
25 Oct 06 |
nicklas |
93 |
if (defined.contains(Permission.SET_OWNER)) sb.append(granted.contains(Permission.SET_OWNER) ? "O" : denied.contains(Permission.SET_OWNER) ? "-" : "o"); |
2802 |
25 Oct 06 |
nicklas |
94 |
if (defined.contains(Permission.SET_PERMISSION)) sb.append(granted.contains(Permission.SET_PERMISSION) ? "P" : denied.contains(Permission.SET_PERMISSION) ? "-" : "p"); |
2675 |
28 Sep 06 |
martin |
95 |
return sb.toString(); |
2675 |
28 Sep 06 |
martin |
96 |
} |
1993 |
15 Feb 06 |
nicklas |
97 |
%> |
1993 |
15 Feb 06 |
nicklas |
98 |
<% |
5615 |
19 Apr 11 |
nicklas |
99 |
final boolean iFrame = Values.getBoolean(request.getParameter("iframe")); |
1993 |
15 Feb 06 |
nicklas |
100 |
final SessionControl sc = Base.getExistingSessionControl(pageContext, true); |
1993 |
15 Feb 06 |
nicklas |
101 |
final String ID = sc.getId(); |
1993 |
15 Feb 06 |
nicklas |
102 |
final ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, null); |
1993 |
15 Feb 06 |
nicklas |
103 |
final int itemId = cc.getId(); |
6289 |
05 Jun 13 |
nicklas |
104 |
final String tab = Values.getStringOrNull(request.getParameter("tab")); |
1993 |
15 Feb 06 |
nicklas |
105 |
final float scale = Base.getScale(sc); |
7954 |
12 May 21 |
nicklas |
106 |
final DbControl dc = sc.newDbControl(":View "+itemType); |
1993 |
15 Feb 06 |
nicklas |
107 |
try |
1993 |
15 Feb 06 |
nicklas |
108 |
{ |
4698 |
10 Dec 08 |
nicklas |
109 |
Formatter<Date> dateFormatter = FormatterFactory.getDateFormatter(sc); |
1993 |
15 Feb 06 |
nicklas |
110 |
Map<Plugin.MainType, Integer> pluginCount = PluginDefinition.countPlugins(dc, guiContext); |
1993 |
15 Feb 06 |
nicklas |
111 |
|
1993 |
15 Feb 06 |
nicklas |
112 |
String title = null; |
3501 |
15 Jun 07 |
enell |
113 |
String warning = null; |
1993 |
15 Feb 06 |
nicklas |
114 |
PluginDefinition plugin = PluginDefinition.getById(dc, itemId); |
5595 |
17 Mar 11 |
nicklas |
115 |
final boolean internal = plugin.getJarFile() == null; |
1993 |
15 Feb 06 |
nicklas |
116 |
final boolean loaded = internal || JarClassLoader.exists(plugin.getJarPath()); |
2675 |
28 Sep 06 |
martin |
117 |
final boolean usePermissions = plugin.getUsePermissions(); |
1993 |
15 Feb 06 |
nicklas |
118 |
final Set<GuiContext> contexts = new TreeSet<GuiContext>(new ToStringComparator<GuiContext>(false)); |
1993 |
15 Feb 06 |
nicklas |
119 |
contexts.addAll(plugin.getGuiContexts()); |
1993 |
15 Feb 06 |
nicklas |
120 |
|
2436 |
28 Jun 06 |
nicklas |
121 |
final boolean usePermission = plugin.hasPermission(Permission.USE); |
1993 |
15 Feb 06 |
nicklas |
122 |
final boolean writePermission = plugin.hasPermission(Permission.WRITE); |
1993 |
15 Feb 06 |
nicklas |
123 |
final boolean deletePermission = plugin.hasPermission(Permission.DELETE); |
1993 |
15 Feb 06 |
nicklas |
124 |
final boolean sharePermission = plugin.hasPermission(Permission.SET_PERMISSION); |
2921 |
15 Nov 06 |
nicklas |
125 |
final boolean setOwnerPermission = plugin.hasPermission(Permission.SET_OWNER); |
4003 |
26 Nov 07 |
nicklas |
126 |
final boolean isRemoved = plugin.isRemoved(); |
4003 |
26 Nov 07 |
nicklas |
127 |
final boolean isUsed = isRemoved && plugin.isUsed(); |
4003 |
26 Nov 07 |
nicklas |
128 |
final boolean deletePermanentlyPermission = deletePermission && !isUsed; |
2921 |
15 Nov 06 |
nicklas |
129 |
final boolean isOwner = plugin.isOwner(); |
3501 |
15 Jun 07 |
enell |
130 |
|
3501 |
15 Jun 07 |
enell |
131 |
try |
3501 |
15 Jun 07 |
enell |
132 |
{ |
5615 |
19 Apr 11 |
nicklas |
133 |
if (plugin.isDisabled()) |
5615 |
19 Apr 11 |
nicklas |
134 |
{ |
5615 |
19 Apr 11 |
nicklas |
135 |
warning = "This plugin is disabled"; |
5615 |
19 Apr 11 |
nicklas |
136 |
} |
5615 |
19 Apr 11 |
nicklas |
137 |
else |
5615 |
19 Apr 11 |
nicklas |
138 |
{ |
5615 |
19 Apr 11 |
nicklas |
139 |
plugin.newInstance(Plugin.class, sc, null, null); |
5615 |
19 Apr 11 |
nicklas |
140 |
} |
3501 |
15 Jun 07 |
enell |
141 |
} |
5595 |
17 Mar 11 |
nicklas |
142 |
catch (RuntimeException ex) |
3501 |
15 Jun 07 |
enell |
143 |
{ |
3501 |
15 Jun 07 |
enell |
144 |
warning = ex.getMessage(); |
3501 |
15 Jun 07 |
enell |
145 |
} |
4886 |
03 Apr 09 |
nicklas |
146 |
JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, guiContext, plugin); |
7604 |
25 Feb 19 |
nicklas |
147 |
ExtensionsInvoker<ButtonAction> invoker = ToolbarUtil.useExtensions(jspContext); |
1993 |
15 Feb 06 |
nicklas |
148 |
%> |
6289 |
05 Jun 13 |
nicklas |
149 |
<base:page title="<%=title%>" type="<%=iFrame ? "iframe" : "default" %>" id="view-page"> |
6289 |
05 Jun 13 |
nicklas |
150 |
<base:head scripts="tabcontrol-2.js,table.js,~plugins.js" styles="toolbar.css,headertabcontrol.css,path.css,table.css"> |
4886 |
03 Apr 09 |
nicklas |
151 |
<ext:scripts context="<%=jspContext%>" /> |
4886 |
03 Apr 09 |
nicklas |
152 |
<ext:stylesheets context="<%=jspContext%>" /> |
1993 |
15 Feb 06 |
nicklas |
153 |
</base:head> |
1993 |
15 Feb 06 |
nicklas |
154 |
<base:body> |
5615 |
19 Apr 11 |
nicklas |
155 |
<% |
5615 |
19 Apr 11 |
nicklas |
156 |
if (!iFrame) |
5615 |
19 Apr 11 |
nicklas |
157 |
{ |
5615 |
19 Apr 11 |
nicklas |
158 |
%> |
5941 |
01 Feb 12 |
nicklas |
159 |
<p:path><p:pathelement |
5941 |
01 Feb 12 |
nicklas |
160 |
title="Plugins" href="<%="index.jsp?ID="+ID%>" |
5941 |
01 Feb 12 |
nicklas |
161 |
/><p:pathelement title="<%=HTML.encodeTags(plugin.getName())%>" |
5941 |
01 Feb 12 |
nicklas |
162 |
/></p:path> |
5615 |
19 Apr 11 |
nicklas |
163 |
<% |
5615 |
19 Apr 11 |
nicklas |
164 |
} |
5615 |
19 Apr 11 |
nicklas |
165 |
%> |
6289 |
05 Jun 13 |
nicklas |
166 |
<div id="page-data" data-item-id="<%=itemId%>" data-iframe="<%=iFrame ? 1 : 0%>"></div> |
5941 |
01 Feb 12 |
nicklas |
167 |
<t:tabcontrol |
5941 |
01 Feb 12 |
nicklas |
168 |
id="main" |
5941 |
01 Feb 12 |
nicklas |
169 |
subclass="content mastertabcontrol" |
6289 |
05 Jun 13 |
nicklas |
170 |
active="<%=tab%>" |
5941 |
01 Feb 12 |
nicklas |
171 |
notabs="<%=iFrame%>"> |
1993 |
15 Feb 06 |
nicklas |
172 |
<t:tab id="properties" title="Properties"> |
5941 |
01 Feb 12 |
nicklas |
173 |
<div> |
5941 |
01 Feb 12 |
nicklas |
174 |
<table class="fullform larger bottomborder"> |
5941 |
01 Feb 12 |
nicklas |
175 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
176 |
<th class="itemstatus"> |
4003 |
26 Nov 07 |
nicklas |
177 |
<base:icon |
5946 |
03 Feb 12 |
nicklas |
178 |
image="shared.png" |
5941 |
01 Feb 12 |
nicklas |
179 |
visible="<%=plugin.isShared()%>" |
5941 |
01 Feb 12 |
nicklas |
180 |
tooltip="This item is shared to other users, groups and/or projects" |
5941 |
01 Feb 12 |
nicklas |
181 |
/> |
5941 |
01 Feb 12 |
nicklas |
182 |
<base:icon |
6289 |
05 Jun 13 |
nicklas |
183 |
id="btnDeletePermanently" |
5946 |
03 Feb 12 |
nicklas |
184 |
image="deleted.png" |
5941 |
01 Feb 12 |
nicklas |
185 |
tooltip="This item has been flagged for deletion. Click to delete it now." |
5941 |
01 Feb 12 |
nicklas |
186 |
enabled="<%=deletePermanentlyPermission %>" |
5941 |
01 Feb 12 |
nicklas |
187 |
visible="<%=isRemoved%>" |
5941 |
01 Feb 12 |
nicklas |
188 |
/> |
6289 |
05 Jun 13 |
nicklas |
189 |
<base:icon |
6289 |
05 Jun 13 |
nicklas |
190 |
id="btnUsingItems" |
6289 |
05 Jun 13 |
nicklas |
191 |
image="used.png" |
5941 |
01 Feb 12 |
nicklas |
192 |
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 |
193 |
visible="<%=isRemoved && isUsed%>" /> |
5941 |
01 Feb 12 |
nicklas |
194 |
</th> |
5941 |
01 Feb 12 |
nicklas |
195 |
<td style="padding: 0px;"> |
6605 |
18 Nov 14 |
nicklas |
196 |
<tbl:toolbar subclass="bottomborder bg-filled-50"> |
5941 |
01 Feb 12 |
nicklas |
197 |
<tbl:button |
6289 |
05 Jun 13 |
nicklas |
198 |
id="btnEdit" |
5942 |
01 Feb 12 |
nicklas |
199 |
disabled="<%=!writePermission%>" |
5945 |
02 Feb 12 |
nicklas |
200 |
image="edit.png" |
5941 |
01 Feb 12 |
nicklas |
201 |
title="Edit…" |
5941 |
01 Feb 12 |
nicklas |
202 |
tooltip="<%=writePermission ? "Edit this plugin" : "You do not have permission to edit this plugin"%>" |
5941 |
01 Feb 12 |
nicklas |
203 |
/> |
5941 |
01 Feb 12 |
nicklas |
204 |
<tbl:button |
6289 |
05 Jun 13 |
nicklas |
205 |
id="btnToggleDisabled" |
6381 |
17 Dec 13 |
nicklas |
206 |
image="plugin.png" |
6289 |
05 Jun 13 |
nicklas |
207 |
data-enable="<%=plugin.isDisabled() ? 1 : 0%>" |
6289 |
05 Jun 13 |
nicklas |
208 |
data-plugin-class="<%=plugin.getClassName() %>" |
5941 |
01 Feb 12 |
nicklas |
209 |
title="<%=plugin.isDisabled() ? "Enable" : "Disable"%>" |
5941 |
01 Feb 12 |
nicklas |
210 |
visible="<%=writePermission%>" |
5941 |
01 Feb 12 |
nicklas |
211 |
tooltip="Disable/enable this plugin" |
5941 |
01 Feb 12 |
nicklas |
212 |
/> |
5941 |
01 Feb 12 |
nicklas |
213 |
<tbl:button |
6289 |
05 Jun 13 |
nicklas |
214 |
id="btnDelete" |
6289 |
05 Jun 13 |
nicklas |
215 |
data-extra-url="<%="&iframe="+iFrame%>" |
5942 |
01 Feb 12 |
nicklas |
216 |
disabled="<%=!deletePermission%>" |
5946 |
03 Feb 12 |
nicklas |
217 |
image="delete.png" |
5941 |
01 Feb 12 |
nicklas |
218 |
title="Delete" |
5941 |
01 Feb 12 |
nicklas |
219 |
visible="<%=!plugin.isRemoved()%>" |
5941 |
01 Feb 12 |
nicklas |
220 |
tooltip="<%=deletePermission ? "Delete this plugin" : "You do not have permission to delete this plugin"%>" |
5941 |
01 Feb 12 |
nicklas |
221 |
/> |
5941 |
01 Feb 12 |
nicklas |
222 |
<tbl:button |
6289 |
05 Jun 13 |
nicklas |
223 |
id="btnRestore" |
6289 |
05 Jun 13 |
nicklas |
224 |
data-extra-url="<%="&iframe="+iFrame%>" |
5942 |
01 Feb 12 |
nicklas |
225 |
disabled="<%=!writePermission%>" |
5946 |
03 Feb 12 |
nicklas |
226 |
image="restore.png" |
5941 |
01 Feb 12 |
nicklas |
227 |
title="Restore" |
5941 |
01 Feb 12 |
nicklas |
228 |
visible="<%=plugin.isRemoved()%>" |
5941 |
01 Feb 12 |
nicklas |
229 |
tooltip="<%=writePermission ? "Restore this plugin" : "You do not have permission to restore this plugin"%>" |
5941 |
01 Feb 12 |
nicklas |
230 |
/> |
5941 |
01 Feb 12 |
nicklas |
231 |
<tbl:button |
6289 |
05 Jun 13 |
nicklas |
232 |
id="btnShare" |
5942 |
01 Feb 12 |
nicklas |
233 |
disabled="<%=!sharePermission%>" |
5945 |
02 Feb 12 |
nicklas |
234 |
image="share.png" |
5941 |
01 Feb 12 |
nicklas |
235 |
title="Share…" |
5941 |
01 Feb 12 |
nicklas |
236 |
tooltip="<%=sharePermission ? "Share this plugin to other user, groups and projects" : "You do not have permission to share this plugin"%>" |
5941 |
01 Feb 12 |
nicklas |
237 |
/> |
5941 |
01 Feb 12 |
nicklas |
238 |
<tbl:button |
6289 |
05 Jun 13 |
nicklas |
239 |
id="btnSetOwner" |
5942 |
01 Feb 12 |
nicklas |
240 |
disabled="<%=!setOwnerPermission%>" |
5941 |
01 Feb 12 |
nicklas |
241 |
image="take_ownership.png" |
5941 |
01 Feb 12 |
nicklas |
242 |
title="Set owner…" |
5941 |
01 Feb 12 |
nicklas |
243 |
tooltip="<%=setOwnerPermission ? "Change owner of this item" : "You do not have permission to change ownership of this item"%>" |
5941 |
01 Feb 12 |
nicklas |
244 |
/> |
5941 |
01 Feb 12 |
nicklas |
245 |
<tbl:button |
6289 |
05 Jun 13 |
nicklas |
246 |
id="btnNewConfiguration" |
5941 |
01 Feb 12 |
nicklas |
247 |
image="add.png" |
5941 |
01 Feb 12 |
nicklas |
248 |
title="New configuration…" |
5941 |
01 Feb 12 |
nicklas |
249 |
tooltip="Create a new configuration for this plugin" |
5941 |
01 Feb 12 |
nicklas |
250 |
visible="<%=sc.hasPermission(Permission.CREATE, Item.PLUGINCONFIGURATION) && |
5941 |
01 Feb 12 |
nicklas |
251 |
usePermission && plugin.supportsConfigurations()%>" |
5941 |
01 Feb 12 |
nicklas |
252 |
/> |
5941 |
01 Feb 12 |
nicklas |
253 |
<tbl:button |
6289 |
05 Jun 13 |
nicklas |
254 |
id="btnImport" |
5946 |
03 Feb 12 |
nicklas |
255 |
image="import.png" |
6289 |
05 Jun 13 |
nicklas |
256 |
data-plugin-type="IMPORT" |
5941 |
01 Feb 12 |
nicklas |
257 |
title="Import…" |
5941 |
01 Feb 12 |
nicklas |
258 |
tooltip="Import data" |
5941 |
01 Feb 12 |
nicklas |
259 |
visible="<%=pluginCount.containsKey(Plugin.MainType.IMPORT)%>" |
5941 |
01 Feb 12 |
nicklas |
260 |
/> |
5941 |
01 Feb 12 |
nicklas |
261 |
<tbl:button |
6289 |
05 Jun 13 |
nicklas |
262 |
id="btnExport" |
6289 |
05 Jun 13 |
nicklas |
263 |
image="export.png" |
6289 |
05 Jun 13 |
nicklas |
264 |
data-plugin-type="EXPORT" |
5941 |
01 Feb 12 |
nicklas |
265 |
title="Export…" |
5941 |
01 Feb 12 |
nicklas |
266 |
tooltip="Export data" |
5941 |
01 Feb 12 |
nicklas |
267 |
visible="<%=pluginCount.containsKey(Plugin.MainType.EXPORT)%>" |
5941 |
01 Feb 12 |
nicklas |
268 |
/> |
5941 |
01 Feb 12 |
nicklas |
269 |
<tbl:button |
6289 |
05 Jun 13 |
nicklas |
270 |
id="btnRunPlugin" |
6289 |
05 Jun 13 |
nicklas |
271 |
image="runplugin.png" |
6289 |
05 Jun 13 |
nicklas |
272 |
data-plugin-type="OTHER" |
5941 |
01 Feb 12 |
nicklas |
273 |
title="Run plugin…" |
5941 |
01 Feb 12 |
nicklas |
274 |
tooltip="Run a plugin" |
5941 |
01 Feb 12 |
nicklas |
275 |
visible="<%=pluginCount.containsKey(Plugin.MainType.OTHER)%>" |
5941 |
01 Feb 12 |
nicklas |
276 |
/> |
5941 |
01 Feb 12 |
nicklas |
277 |
<ext:render extensions="<%=invoker%>" context="<%=jspContext%>" |
7604 |
25 Feb 19 |
nicklas |
278 |
wrapper="<%=new PrefixSuffixRenderer<ButtonAction>(jspContext, "<td>", "</td>") %>"/> |
5941 |
01 Feb 12 |
nicklas |
279 |
<tbl:button |
5941 |
01 Feb 12 |
nicklas |
280 |
image="help.png" |
6289 |
05 Jun 13 |
nicklas |
281 |
subclass="auto-init" |
6289 |
05 Jun 13 |
nicklas |
282 |
data-auto-init="help" |
6289 |
05 Jun 13 |
nicklas |
283 |
data-help-id="plugindefinition.view.properties" |
5941 |
01 Feb 12 |
nicklas |
284 |
title="Help…" |
5941 |
01 Feb 12 |
nicklas |
285 |
tooltip="Get help about this page" |
5941 |
01 Feb 12 |
nicklas |
286 |
/> |
5941 |
01 Feb 12 |
nicklas |
287 |
</tbl:toolbar> |
5941 |
01 Feb 12 |
nicklas |
288 |
</td> |
5941 |
01 Feb 12 |
nicklas |
289 |
</tr> |
1993 |
15 Feb 06 |
nicklas |
290 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
291 |
<th>Name</th> |
1993 |
15 Feb 06 |
nicklas |
292 |
<td><%=HTML.encodeTags(plugin.getName())%></td> |
1993 |
15 Feb 06 |
nicklas |
293 |
</tr> |
1993 |
15 Feb 06 |
nicklas |
294 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
295 |
<th>Registered</th> |
4698 |
10 Dec 08 |
nicklas |
296 |
<td><%=dateFormatter.format(plugin.getEntryDate())%></td> |
4698 |
10 Dec 08 |
nicklas |
297 |
</tr> |
4698 |
10 Dec 08 |
nicklas |
298 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
299 |
<th>Type</th> |
1993 |
15 Feb 06 |
nicklas |
300 |
<td><%=plugin.getMainType()%></td> |
1993 |
15 Feb 06 |
nicklas |
301 |
</tr> |
1993 |
15 Feb 06 |
nicklas |
302 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
303 |
<th>Class</th> |
1993 |
15 Feb 06 |
nicklas |
304 |
<td><%=plugin.getClassName()%></td> |
1993 |
15 Feb 06 |
nicklas |
305 |
</tr> |
1993 |
15 Feb 06 |
nicklas |
306 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
307 |
<th>JAR file</th> |
5595 |
17 Mar 11 |
nicklas |
308 |
<td><%=internal ? "<i>- internal -</i>" : plugin.getJarFile()%></td> |
1993 |
15 Feb 06 |
nicklas |
309 |
</tr> |
1993 |
15 Feb 06 |
nicklas |
310 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
311 |
<th>Version</th> |
1993 |
15 Feb 06 |
nicklas |
312 |
<td><%=plugin.getVersionString()%></td> |
1993 |
15 Feb 06 |
nicklas |
313 |
</tr> |
1993 |
15 Feb 06 |
nicklas |
314 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
315 |
<th>Max memory</th> |
2629 |
08 Sep 06 |
nicklas |
316 |
<td><%=Values.formatBytes(plugin.getMaxMemory())%></td> |
2629 |
08 Sep 06 |
nicklas |
317 |
</tr> |
2629 |
08 Sep 06 |
nicklas |
318 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
319 |
<th>Trusted</th> |
2629 |
08 Sep 06 |
nicklas |
320 |
<td><%=plugin.isTrusted() ? "yes" : "no"%></td> |
2629 |
08 Sep 06 |
nicklas |
321 |
</tr> |
2629 |
08 Sep 06 |
nicklas |
322 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
323 |
<th>Allow immediate execution</th> |
2854 |
02 Nov 06 |
nicklas |
324 |
<td><%=plugin.getAllowImmediateExecution() ? "yes" : "no"%></td> |
2854 |
02 Nov 06 |
nicklas |
325 |
</tr> |
2854 |
02 Nov 06 |
nicklas |
326 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
327 |
<th>Use internal job queue</th> |
3871 |
22 Oct 07 |
nicklas |
328 |
<td><%=plugin.getUseInternalJobQueue() ? "yes" : "no"%></td> |
3871 |
22 Oct 07 |
nicklas |
329 |
</tr> |
3871 |
22 Oct 07 |
nicklas |
330 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
331 |
<th>Items</th> |
1993 |
15 Feb 06 |
nicklas |
332 |
<td><%=Values.getString(contexts, ", ", true)%></td> |
1993 |
15 Feb 06 |
nicklas |
333 |
</tr> |
1993 |
15 Feb 06 |
nicklas |
334 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
335 |
<th>Contact</th> |
1993 |
15 Feb 06 |
nicklas |
336 |
<td><%=HTML.encodeTags(plugin.getContact())%></td> |
1993 |
15 Feb 06 |
nicklas |
337 |
</tr> |
1993 |
15 Feb 06 |
nicklas |
338 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
339 |
<th>Copyright</th> |
1993 |
15 Feb 06 |
nicklas |
340 |
<td><%=HTML.encodeTags(plugin.getCopyright())%></td> |
1993 |
15 Feb 06 |
nicklas |
341 |
</tr> |
1993 |
15 Feb 06 |
nicklas |
342 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
343 |
<th>Email</th> |
6139 |
19 Sep 12 |
nicklas |
344 |
<td><%=HTML.scanForLinks(plugin.getEmail(), HTML.LINK_EMAIL, "_blank")%></td> |
1993 |
15 Feb 06 |
nicklas |
345 |
</tr> |
1993 |
15 Feb 06 |
nicklas |
346 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
347 |
<th>Url</th> |
6139 |
19 Sep 12 |
nicklas |
348 |
<td><%=HTML.scanForLinks(plugin.getUrl(), HTML.LINK_URL, "_blank")%></td> |
1993 |
15 Feb 06 |
nicklas |
349 |
</tr> |
1993 |
15 Feb 06 |
nicklas |
350 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
351 |
<th>Owner</th> |
2436 |
28 Jun 06 |
nicklas |
352 |
<td><base:propertyvalue item="<%=plugin%>" property="owner" /></td> |
1993 |
15 Feb 06 |
nicklas |
353 |
</tr> |
5941 |
01 Feb 12 |
nicklas |
354 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
355 |
<th>Permissions</th> |
5941 |
01 Feb 12 |
nicklas |
356 |
<td><%=PermissionUtil.getFullPermissionNames(plugin)%></td> |
5941 |
01 Feb 12 |
nicklas |
357 |
</tr> |
5941 |
01 Feb 12 |
nicklas |
358 |
<tr class="big"> |
5941 |
01 Feb 12 |
nicklas |
359 |
<th>Description</th> |
1993 |
15 Feb 06 |
nicklas |
360 |
<td><%=HTML.niceFormat(plugin.getDescription())%></td> |
1993 |
15 Feb 06 |
nicklas |
361 |
</tr> |
1993 |
15 Feb 06 |
nicklas |
362 |
</table> |
5941 |
01 Feb 12 |
nicklas |
363 |
</div> |
5941 |
01 Feb 12 |
nicklas |
364 |
|
2436 |
28 Jun 06 |
nicklas |
365 |
<% |
5941 |
01 Feb 12 |
nicklas |
366 |
if (warning != null) |
2436 |
28 Jun 06 |
nicklas |
367 |
{ |
5941 |
01 Feb 12 |
nicklas |
368 |
%> |
5941 |
01 Feb 12 |
nicklas |
369 |
<div class="messagecontainer error"><%=warning%></div> |
5941 |
01 Feb 12 |
nicklas |
370 |
<% |
2436 |
28 Jun 06 |
nicklas |
371 |
} |
5941 |
01 Feb 12 |
nicklas |
372 |
%> |
5941 |
01 Feb 12 |
nicklas |
373 |
|
5941 |
01 Feb 12 |
nicklas |
374 |
<% |
5941 |
01 Feb 12 |
nicklas |
375 |
if (plugin.supportsConfigurations()) |
2436 |
28 Jun 06 |
nicklas |
376 |
{ |
5941 |
01 Feb 12 |
nicklas |
377 |
ItemQuery<PluginConfiguration> configQuery = plugin.getPluginConfigurations(); |
5941 |
01 Feb 12 |
nicklas |
378 |
configQuery.include(Include.ALL); |
5941 |
01 Feb 12 |
nicklas |
379 |
configQuery.order(Orders.asc(Hql.property("name"))); |
5941 |
01 Feb 12 |
nicklas |
380 |
ItemResultList<PluginConfiguration> configurations = configQuery.list(dc); |
2436 |
28 Jun 06 |
nicklas |
381 |
%> |
5040 |
10 Aug 09 |
martin |
382 |
<base:section |
2436 |
28 Jun 06 |
nicklas |
383 |
id="configurations" |
5040 |
10 Aug 09 |
martin |
384 |
title="<%="Configurations (" + configurations.size() + ")" %>" |
5040 |
10 Aug 09 |
martin |
385 |
context="<%=cc%>" |
2436 |
28 Jun 06 |
nicklas |
386 |
> |
5941 |
01 Feb 12 |
nicklas |
387 |
<% |
5941 |
01 Feb 12 |
nicklas |
388 |
if (configurations.size() == 0) |
5941 |
01 Feb 12 |
nicklas |
389 |
{ |
5941 |
01 Feb 12 |
nicklas |
390 |
%> |
5941 |
01 Feb 12 |
nicklas |
391 |
<div class="messagecontainer note"> |
5941 |
01 Feb 12 |
nicklas |
392 |
There are no configurations for this plugin (or, you don't have permission to view them). |
5941 |
01 Feb 12 |
nicklas |
393 |
</div> |
5040 |
10 Aug 09 |
martin |
394 |
<% |
5941 |
01 Feb 12 |
nicklas |
395 |
} |
5941 |
01 Feb 12 |
nicklas |
396 |
else |
5941 |
01 Feb 12 |
nicklas |
397 |
{ |
5941 |
01 Feb 12 |
nicklas |
398 |
%> |
5941 |
01 Feb 12 |
nicklas |
399 |
<tbl:table |
6147 |
21 Sep 12 |
nicklas |
400 |
id="tbl.configurations" |
5941 |
01 Feb 12 |
nicklas |
401 |
columns="all" |
5941 |
01 Feb 12 |
nicklas |
402 |
> |
5941 |
01 Feb 12 |
nicklas |
403 |
<tbl:columndef |
5941 |
01 Feb 12 |
nicklas |
404 |
id="name" |
5941 |
01 Feb 12 |
nicklas |
405 |
title="Name" |
5941 |
01 Feb 12 |
nicklas |
406 |
/> |
5941 |
01 Feb 12 |
nicklas |
407 |
<tbl:columndef |
5941 |
01 Feb 12 |
nicklas |
408 |
id="description" |
5941 |
01 Feb 12 |
nicklas |
409 |
title="Description" |
5941 |
01 Feb 12 |
nicklas |
410 |
/> |
5941 |
01 Feb 12 |
nicklas |
411 |
<tbl:columndef |
5941 |
01 Feb 12 |
nicklas |
412 |
id="configure" |
5941 |
01 Feb 12 |
nicklas |
413 |
title="Configure" |
5941 |
01 Feb 12 |
nicklas |
414 |
show="<%=plugin.supportsConfigurations() ? "always" : "never" %>" |
5941 |
01 Feb 12 |
nicklas |
415 |
/> |
5941 |
01 Feb 12 |
nicklas |
416 |
<tbl:data> |
5941 |
01 Feb 12 |
nicklas |
417 |
<tbl:headers> |
5941 |
01 Feb 12 |
nicklas |
418 |
<tbl:headerrow> |
5941 |
01 Feb 12 |
nicklas |
419 |
<tbl:columnheaders /> |
5941 |
01 Feb 12 |
nicklas |
420 |
</tbl:headerrow> |
5941 |
01 Feb 12 |
nicklas |
421 |
</tbl:headers> |
5941 |
01 Feb 12 |
nicklas |
422 |
<tbl:rows> |
5941 |
01 Feb 12 |
nicklas |
423 |
<% |
5941 |
01 Feb 12 |
nicklas |
424 |
for (PluginConfiguration pc : configurations) |
5941 |
01 Feb 12 |
nicklas |
425 |
{ |
5941 |
01 Feb 12 |
nicklas |
426 |
%> |
5941 |
01 Feb 12 |
nicklas |
427 |
<tbl:row> |
5941 |
01 Feb 12 |
nicklas |
428 |
<tbl:cell column="name"><base:icon |
5946 |
03 Feb 12 |
nicklas |
429 |
image="deleted.png" |
5941 |
01 Feb 12 |
nicklas |
430 |
tooltip="This item has been scheduled for deletion" |
5941 |
01 Feb 12 |
nicklas |
431 |
visible="<%=pc.isRemoved()%>" |
5941 |
01 Feb 12 |
nicklas |
432 |
/><%=Base.getLinkedName(ID, pc, false, true)%></tbl:cell> |
5941 |
01 Feb 12 |
nicklas |
433 |
<tbl:cell column="description"><%=HTML.niceFormat(pc.getDescription())%></tbl:cell> |
5941 |
01 Feb 12 |
nicklas |
434 |
<tbl:cell column="configure"> |
5941 |
01 Feb 12 |
nicklas |
435 |
<% |
5941 |
01 Feb 12 |
nicklas |
436 |
if (pc.hasPermission(Permission.WRITE)) |
5941 |
01 Feb 12 |
nicklas |
437 |
{ |
5941 |
01 Feb 12 |
nicklas |
438 |
%> |
6289 |
05 Jun 13 |
nicklas |
439 |
<base:icon |
6289 |
05 Jun 13 |
nicklas |
440 |
id="<%="configure-plugin."+pc.getId()%>" |
6289 |
05 Jun 13 |
nicklas |
441 |
subclass="auto-init" |
6289 |
05 Jun 13 |
nicklas |
442 |
data-auto-init="configure-plugin" |
6289 |
05 Jun 13 |
nicklas |
443 |
data-item-id="<%=pc.getId()%>" |
6289 |
05 Jun 13 |
nicklas |
444 |
image="runplugin.png" |
5941 |
01 Feb 12 |
nicklas |
445 |
tooltip="Configure this plugin "/> |
5941 |
01 Feb 12 |
nicklas |
446 |
<% |
5941 |
01 Feb 12 |
nicklas |
447 |
} |
5941 |
01 Feb 12 |
nicklas |
448 |
%> |
5941 |
01 Feb 12 |
nicklas |
449 |
</tbl:cell> |
5941 |
01 Feb 12 |
nicklas |
450 |
</tbl:row> |
5941 |
01 Feb 12 |
nicklas |
451 |
<% |
5941 |
01 Feb 12 |
nicklas |
452 |
} |
5040 |
10 Aug 09 |
martin |
453 |
%> |
5941 |
01 Feb 12 |
nicklas |
454 |
</tbl:rows> |
5941 |
01 Feb 12 |
nicklas |
455 |
</tbl:data> |
5941 |
01 Feb 12 |
nicklas |
456 |
</tbl:table> |
5941 |
01 Feb 12 |
nicklas |
457 |
<% |
5941 |
01 Feb 12 |
nicklas |
458 |
} |
5941 |
01 Feb 12 |
nicklas |
459 |
%> |
5040 |
10 Aug 09 |
martin |
460 |
</base:section> |
2436 |
28 Jun 06 |
nicklas |
461 |
<% |
2436 |
28 Jun 06 |
nicklas |
462 |
} |
2436 |
28 Jun 06 |
nicklas |
463 |
%> |
2631 |
08 Sep 06 |
nicklas |
464 |
<% |
2631 |
08 Sep 06 |
nicklas |
465 |
ItemQuery<JobAgent> agentQuery = JobAgent.getQuery(); |
3890 |
30 Oct 07 |
nicklas |
466 |
agentQuery.include(Include.ALL); |
2631 |
08 Sep 06 |
nicklas |
467 |
agentQuery.order(Orders.asc(Hql.property("name"))); |
2631 |
08 Sep 06 |
nicklas |
468 |
agentQuery.join(Hql.innerJoin("plugins", "p")); |
2631 |
08 Sep 06 |
nicklas |
469 |
agentQuery.restrict(Restrictions.eq(Hql.property("p", "pluginDefinition"), Hql.entity(plugin))); |
2631 |
08 Sep 06 |
nicklas |
470 |
ItemResultList<JobAgent> agents = agentQuery.list(dc); |
5941 |
01 Feb 12 |
nicklas |
471 |
%> |
5941 |
01 Feb 12 |
nicklas |
472 |
<base:section |
5941 |
01 Feb 12 |
nicklas |
473 |
id="jobagents" |
5941 |
01 Feb 12 |
nicklas |
474 |
title="<%="Installed on job agents (" + agents.size() + ")" %>" |
5941 |
01 Feb 12 |
nicklas |
475 |
context="<%=cc%>" |
5941 |
01 Feb 12 |
nicklas |
476 |
> |
2631 |
08 Sep 06 |
nicklas |
477 |
<% |
5941 |
01 Feb 12 |
nicklas |
478 |
if (agents.size() == 0) |
5941 |
01 Feb 12 |
nicklas |
479 |
{ |
5941 |
01 Feb 12 |
nicklas |
480 |
%> |
5941 |
01 Feb 12 |
nicklas |
481 |
<div class="messagecontainer note"> |
5941 |
01 Feb 12 |
nicklas |
482 |
This plugin isn't installed on any job agents (or, you don't have permission to view them). |
5941 |
01 Feb 12 |
nicklas |
483 |
</div> |
5941 |
01 Feb 12 |
nicklas |
484 |
<% |
5941 |
01 Feb 12 |
nicklas |
485 |
} |
5941 |
01 Feb 12 |
nicklas |
486 |
else |
5941 |
01 Feb 12 |
nicklas |
487 |
{ |
5941 |
01 Feb 12 |
nicklas |
488 |
%> |
5040 |
10 Aug 09 |
martin |
489 |
<tbl:table |
5040 |
10 Aug 09 |
martin |
490 |
id="agents" |
5040 |
10 Aug 09 |
martin |
491 |
columns="all" |
5040 |
10 Aug 09 |
martin |
492 |
> |
3547 |
03 Jul 07 |
martin |
493 |
<tbl:columndef |
3547 |
03 Jul 07 |
martin |
494 |
id="name" |
3547 |
03 Jul 07 |
martin |
495 |
title="Name" |
3547 |
03 Jul 07 |
martin |
496 |
/> |
3547 |
03 Jul 07 |
martin |
497 |
<tbl:columndef |
5040 |
10 Aug 09 |
martin |
498 |
id="server" |
5040 |
10 Aug 09 |
martin |
499 |
title="Server" |
3547 |
03 Jul 07 |
martin |
500 |
/> |
5040 |
10 Aug 09 |
martin |
501 |
<tbl:columndef |
5040 |
10 Aug 09 |
martin |
502 |
id="info" |
5040 |
10 Aug 09 |
martin |
503 |
title="CPU/Memory" |
5040 |
10 Aug 09 |
martin |
504 |
/> |
5040 |
10 Aug 09 |
martin |
505 |
<tbl:columndef |
5040 |
10 Aug 09 |
martin |
506 |
id="maxMemory" |
5040 |
10 Aug 09 |
martin |
507 |
title="Max memory" |
5040 |
10 Aug 09 |
martin |
508 |
/> |
5040 |
10 Aug 09 |
martin |
509 |
<tbl:columndef |
5040 |
10 Aug 09 |
martin |
510 |
id="trusted" |
5040 |
10 Aug 09 |
martin |
511 |
title="Trusted" |
5040 |
10 Aug 09 |
martin |
512 |
/> |
5040 |
10 Aug 09 |
martin |
513 |
<tbl:columndef |
5040 |
10 Aug 09 |
martin |
514 |
id="priorityBoost" |
5040 |
10 Aug 09 |
martin |
515 |
title="Priority boost" |
5040 |
10 Aug 09 |
martin |
516 |
/> |
5040 |
10 Aug 09 |
martin |
517 |
<tbl:columndef |
5040 |
10 Aug 09 |
martin |
518 |
id="configure" |
5040 |
10 Aug 09 |
martin |
519 |
title="" |
5040 |
10 Aug 09 |
martin |
520 |
/> |
3547 |
03 Jul 07 |
martin |
521 |
<tbl:data> |
5941 |
01 Feb 12 |
nicklas |
522 |
<tbl:headers> |
5941 |
01 Feb 12 |
nicklas |
523 |
<tbl:headerrow> |
5941 |
01 Feb 12 |
nicklas |
524 |
<tbl:columnheaders /> |
5941 |
01 Feb 12 |
nicklas |
525 |
</tbl:headerrow> |
5941 |
01 Feb 12 |
nicklas |
526 |
</tbl:headers> |
3547 |
03 Jul 07 |
martin |
527 |
<tbl:rows> |
3547 |
03 Jul 07 |
martin |
528 |
<% |
5040 |
10 Aug 09 |
martin |
529 |
for (JobAgent agent : agents) |
3547 |
03 Jul 07 |
martin |
530 |
{ |
5040 |
10 Aug 09 |
martin |
531 |
String server = agent.getServer(); |
5040 |
10 Aug 09 |
martin |
532 |
Integer port = agent.getPort(); |
5040 |
10 Aug 09 |
martin |
533 |
JobAgentSettings settings = agent.getSettings(plugin, false); |
5040 |
10 Aug 09 |
martin |
534 |
Long maxMemory = settings.getEffectiveMaxMemory(); |
5040 |
10 Aug 09 |
martin |
535 |
%> |
3547 |
03 Jul 07 |
martin |
536 |
<tbl:row> |
3890 |
30 Oct 07 |
nicklas |
537 |
<tbl:cell column="name"><base:icon |
5946 |
03 Feb 12 |
nicklas |
538 |
image="deleted.png" |
5040 |
10 Aug 09 |
martin |
539 |
tooltip="This item has been scheduled for deletion" |
5040 |
10 Aug 09 |
martin |
540 |
visible="<%=agent.isRemoved()%>" |
5040 |
10 Aug 09 |
martin |
541 |
/><%=Base.getLinkedName(ID, agent, false, true)%></tbl:cell> |
5040 |
10 Aug 09 |
martin |
542 |
<tbl:cell column="server"><%=server == null || port == null ? "" : server + ":" + port%></tbl:cell> |
5040 |
10 Aug 09 |
martin |
543 |
<tbl:cell column="info"> |
5040 |
10 Aug 09 |
martin |
544 |
CPU usage: <%=agent.getCpuUsage() == null ? "<i>- unknown -</i>" : agent.getCpuUsage()+"%" %><br> |
5040 |
10 Aug 09 |
martin |
545 |
Total memory: <%=agent.getTotalMemory() == null ? "<i>- unknown -</i>" : Values.formatBytes(agent.getTotalMemory()) %><br> |
5040 |
10 Aug 09 |
martin |
546 |
Used memory: <%=agent.getUsedMemory() == null ? "<i>- unknown -</i>" : Values.formatBytes(agent.getUsedMemory()) %> |
3547 |
03 Jul 07 |
martin |
547 |
</tbl:cell> |
5040 |
10 Aug 09 |
martin |
548 |
<tbl:cell column="maxMemory"><%=maxMemory == null ? "<i>- not specified -</i>" : Values.formatBytes(maxMemory)%></tbl:cell> |
5040 |
10 Aug 09 |
martin |
549 |
<tbl:cell column="trusted"><%=settings.isEffectivelyTrusted()%></tbl:cell> |
5040 |
10 Aug 09 |
martin |
550 |
<tbl:cell column="priorityBoost"><%=settings.getPriorityBoost()%></tbl:cell> |
5040 |
10 Aug 09 |
martin |
551 |
<tbl:cell column="configure"> |
5040 |
10 Aug 09 |
martin |
552 |
<% |
5040 |
10 Aug 09 |
martin |
553 |
if (agent.hasPermission(Permission.WRITE)) |
5040 |
10 Aug 09 |
martin |
554 |
{ |
5040 |
10 Aug 09 |
martin |
555 |
%> |
6289 |
05 Jun 13 |
nicklas |
556 |
<base:icon |
6289 |
05 Jun 13 |
nicklas |
557 |
id="<%="configure-agent."+agent.getId()%>" |
6289 |
05 Jun 13 |
nicklas |
558 |
subclass="auto-init" |
6289 |
05 Jun 13 |
nicklas |
559 |
data-auto-init="configure-agent" |
6289 |
05 Jun 13 |
nicklas |
560 |
data-item-id="<%=agent.getId()%>" |
6289 |
05 Jun 13 |
nicklas |
561 |
image="runplugin.png" |
5040 |
10 Aug 09 |
martin |
562 |
tooltip="Configure the settings for this plugin on the job agent "/> |
5040 |
10 Aug 09 |
martin |
563 |
<% |
5040 |
10 Aug 09 |
martin |
564 |
} |
5040 |
10 Aug 09 |
martin |
565 |
%> |
3547 |
03 Jul 07 |
martin |
566 |
</tbl:cell> |
3547 |
03 Jul 07 |
martin |
567 |
</tbl:row> |
3547 |
03 Jul 07 |
martin |
568 |
<% |
3547 |
03 Jul 07 |
martin |
569 |
} |
3547 |
03 Jul 07 |
martin |
570 |
%> |
3547 |
03 Jul 07 |
martin |
571 |
</tbl:rows> |
3547 |
03 Jul 07 |
martin |
572 |
</tbl:data> |
5040 |
10 Aug 09 |
martin |
573 |
</tbl:table> |
5941 |
01 Feb 12 |
nicklas |
574 |
<% |
5941 |
01 Feb 12 |
nicklas |
575 |
} |
5040 |
10 Aug 09 |
martin |
576 |
%> |
5941 |
01 Feb 12 |
nicklas |
577 |
</base:section> |
5040 |
10 Aug 09 |
martin |
578 |
<base:section |
5040 |
10 Aug 09 |
martin |
579 |
id="permissions" |
5040 |
10 Aug 09 |
martin |
580 |
title="<%="Permissions (using permissions: " + (usePermissions ? "yes" : "no") + ")" %>" |
5040 |
10 Aug 09 |
martin |
581 |
context="<%=cc%>" |
5040 |
10 Aug 09 |
martin |
582 |
> |
5941 |
01 Feb 12 |
nicklas |
583 |
<table class="fullform fullborder"> |
5941 |
01 Feb 12 |
nicklas |
584 |
<tbody class="sectionheader"> |
5941 |
01 Feb 12 |
nicklas |
585 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
586 |
<% |
5941 |
01 Feb 12 |
nicklas |
587 |
Map<String, List<Item>> permissionGroups = PermissionUtil.getPermissionGroups(); |
5941 |
01 Feb 12 |
nicklas |
588 |
for (String name : permissionGroups.keySet()) |
5941 |
01 Feb 12 |
nicklas |
589 |
{ |
5941 |
01 Feb 12 |
nicklas |
590 |
%> |
5941 |
01 Feb 12 |
nicklas |
591 |
<th class="columnheader" colspan="2"><b><%=name%></b></th> |
5941 |
01 Feb 12 |
nicklas |
592 |
<% |
5941 |
01 Feb 12 |
nicklas |
593 |
} |
5040 |
10 Aug 09 |
martin |
594 |
%> |
5941 |
01 Feb 12 |
nicklas |
595 |
</tr> |
5941 |
01 Feb 12 |
nicklas |
596 |
</tbody> |
5040 |
10 Aug 09 |
martin |
597 |
<% |
5040 |
10 Aug 09 |
martin |
598 |
int newItems = 0; |
5941 |
01 Feb 12 |
nicklas |
599 |
int rowIndex = 0; |
5040 |
10 Aug 09 |
martin |
600 |
do |
5040 |
10 Aug 09 |
martin |
601 |
{ |
5040 |
10 Aug 09 |
martin |
602 |
newItems = 0; |
5941 |
01 Feb 12 |
nicklas |
603 |
int colIndex = 0; |
5040 |
10 Aug 09 |
martin |
604 |
StringBuilder sb = new StringBuilder(); |
5941 |
01 Feb 12 |
nicklas |
605 |
sb.append("<tr>"); |
5040 |
10 Aug 09 |
martin |
606 |
for (String name : permissionGroups.keySet()) |
2675 |
28 Sep 06 |
martin |
607 |
{ |
5040 |
10 Aug 09 |
martin |
608 |
List<Item> items = permissionGroups.get(name); |
5941 |
01 Feb 12 |
nicklas |
609 |
if (items.size() > rowIndex) |
5040 |
10 Aug 09 |
martin |
610 |
{ |
5040 |
10 Aug 09 |
martin |
611 |
newItems++; |
5941 |
01 Feb 12 |
nicklas |
612 |
Item item = items.get(rowIndex); |
5040 |
10 Aug 09 |
martin |
613 |
int keyId = SystemItems.getRoleKeyId(item); |
5040 |
10 Aug 09 |
martin |
614 |
RoleKey key = RoleKey.getById(dc, keyId); |
5040 |
10 Aug 09 |
martin |
615 |
|
5941 |
01 Feb 12 |
nicklas |
616 |
sb.append("<th"); |
5941 |
01 Feb 12 |
nicklas |
617 |
if (colIndex > 0) sb.append(" class=\"leftborder\""); |
5941 |
01 Feb 12 |
nicklas |
618 |
sb.append(">").append(key.getName()).append("</th>"); |
5941 |
01 Feb 12 |
nicklas |
619 |
sb.append("<td>"); |
5941 |
01 Feb 12 |
nicklas |
620 |
|
5040 |
10 Aug 09 |
martin |
621 |
if (keyId != 0) |
5040 |
10 Aug 09 |
martin |
622 |
{ |
5040 |
10 Aug 09 |
martin |
623 |
Set<Permission> granted = plugin.getGranted(key); |
5040 |
10 Aug 09 |
martin |
624 |
Set<Permission> denied = plugin.getDenied(key); |
5040 |
10 Aug 09 |
martin |
625 |
sb.append(getShortPermissions(item, granted, denied)); |
5040 |
10 Aug 09 |
martin |
626 |
} |
5040 |
10 Aug 09 |
martin |
627 |
else |
5040 |
10 Aug 09 |
martin |
628 |
{ |
5040 |
10 Aug 09 |
martin |
629 |
sb.append("(undefined key)"); |
5040 |
10 Aug 09 |
martin |
630 |
} |
5040 |
10 Aug 09 |
martin |
631 |
sb.append("</td>"); |
2675 |
28 Sep 06 |
martin |
632 |
} |
2675 |
28 Sep 06 |
martin |
633 |
else |
2675 |
28 Sep 06 |
martin |
634 |
{ |
5941 |
01 Feb 12 |
nicklas |
635 |
sb.append("<th class=\"subprompt"); |
5941 |
01 Feb 12 |
nicklas |
636 |
if (colIndex > 0) sb.append(" leftborder"); |
5941 |
01 Feb 12 |
nicklas |
637 |
sb.append("\"></th><td></td>"); |
2675 |
28 Sep 06 |
martin |
638 |
} |
5941 |
01 Feb 12 |
nicklas |
639 |
colIndex++; |
2675 |
28 Sep 06 |
martin |
640 |
} |
5040 |
10 Aug 09 |
martin |
641 |
if (newItems > 0) |
2675 |
28 Sep 06 |
martin |
642 |
{ |
5040 |
10 Aug 09 |
martin |
643 |
%> |
5040 |
10 Aug 09 |
martin |
644 |
<%=sb.toString()%> |
5040 |
10 Aug 09 |
martin |
645 |
<% |
2675 |
28 Sep 06 |
martin |
646 |
} |
5941 |
01 Feb 12 |
nicklas |
647 |
rowIndex++; |
5040 |
10 Aug 09 |
martin |
648 |
} while (newItems > 0); |
5040 |
10 Aug 09 |
martin |
649 |
%> |
5941 |
01 Feb 12 |
nicklas |
650 |
</table> |
5941 |
01 Feb 12 |
nicklas |
651 |
Capital letters = Permission is always granted, Small letters = Permission is only granted if logged in user |
5941 |
01 Feb 12 |
nicklas |
652 |
has that permission<br> |
7220 |
04 Nov 16 |
nicklas |
653 |
<b>C/c</b> = Create, <b>R/r</b> = Read, <b>U/u</b> = Use, <b>A/a</b> = Annotate, |
5941 |
01 Feb 12 |
nicklas |
654 |
<b>W/w</b> = Write, <b>D/d</b> = Delete, <b>O/o</b> = Change owner, |
5941 |
01 Feb 12 |
nicklas |
655 |
<b>P/p</b> = Change permissions |
5941 |
01 Feb 12 |
nicklas |
656 |
|
5040 |
10 Aug 09 |
martin |
657 |
</base:section> |
5941 |
01 Feb 12 |
nicklas |
658 |
<jsp:include page="../../common/anytoany/list_anytoany.jsp"> |
5941 |
01 Feb 12 |
nicklas |
659 |
<jsp:param name="ID" value="<%=ID%>" /> |
5941 |
01 Feb 12 |
nicklas |
660 |
<jsp:param name="item_type" value="<%=itemType.name()%>" /> |
5941 |
01 Feb 12 |
nicklas |
661 |
<jsp:param name="item_id" value="<%=itemId%>" /> |
5941 |
01 Feb 12 |
nicklas |
662 |
<jsp:param name="title" value="Other items related to this plugin" /> |
5941 |
01 Feb 12 |
nicklas |
663 |
</jsp:include> |
5941 |
01 Feb 12 |
nicklas |
664 |
<jsp:include page="../../common/share/list_share.jsp"> |
5941 |
01 Feb 12 |
nicklas |
665 |
<jsp:param name="ID" value="<%=ID%>" /> |
5941 |
01 Feb 12 |
nicklas |
666 |
<jsp:param name="item_type" value="<%=itemType.name()%>" /> |
5941 |
01 Feb 12 |
nicklas |
667 |
<jsp:param name="item_id" value="<%=itemId%>" /> |
5941 |
01 Feb 12 |
nicklas |
668 |
<jsp:param name="title" value="Shared to" /> |
5941 |
01 Feb 12 |
nicklas |
669 |
</jsp:include> |
5941 |
01 Feb 12 |
nicklas |
670 |
</t:tab> |
5941 |
01 Feb 12 |
nicklas |
671 |
<t:tab id="annotations" title="Annotations" |
5941 |
01 Feb 12 |
nicklas |
672 |
tooltip="View annotation values" clazz="white" |
6600 |
17 Nov 14 |
nicklas |
673 |
visible="<%=!plugin.requiresConfiguration() && plugin.supports("net.sf.basedb.core.plugin.AnnotationSetterPlugin") %>"> |
6255 |
22 Mar 13 |
nicklas |
674 |
<jsp:include page="../../common/annotations/list_frameset.jsp"> |
6255 |
22 Mar 13 |
nicklas |
675 |
<jsp:param name="item_type" value="<%=itemType.name()%>" /> |
6255 |
22 Mar 13 |
nicklas |
676 |
<jsp:param name="item_id" value="<%=itemId%>" /> |
6255 |
22 Mar 13 |
nicklas |
677 |
<jsp:param name="ID" value="<%=ID%>" /> |
6255 |
22 Mar 13 |
nicklas |
678 |
</jsp:include> |
5941 |
01 Feb 12 |
nicklas |
679 |
</t:tab> |
5941 |
01 Feb 12 |
nicklas |
680 |
</t:tabcontrol> |
1993 |
15 Feb 06 |
nicklas |
681 |
</base:body> |
1993 |
15 Feb 06 |
nicklas |
682 |
</base:page> |
1993 |
15 Feb 06 |
nicklas |
683 |
<% |
1993 |
15 Feb 06 |
nicklas |
684 |
} |
1993 |
15 Feb 06 |
nicklas |
685 |
finally |
1993 |
15 Feb 06 |
nicklas |
686 |
{ |
1993 |
15 Feb 06 |
nicklas |
687 |
if (dc != null) dc.close(); |
1993 |
15 Feb 06 |
nicklas |
688 |
} |
1993 |
15 Feb 06 |
nicklas |
689 |
|
1993 |
15 Feb 06 |
nicklas |
690 |
%> |