5361 |
14 Jun 10 |
nicklas |
1 |
<%-- $Id $ |
5361 |
14 Jun 10 |
nicklas |
2 |
------------------------------------------------------------------ |
5361 |
14 Jun 10 |
nicklas |
Copyright (C) 2010 Nicklas Nordborg |
5361 |
14 Jun 10 |
nicklas |
4 |
|
5361 |
14 Jun 10 |
nicklas |
5 |
This file is part of BASE - BioArray Software Environment. |
5361 |
14 Jun 10 |
nicklas |
6 |
Available at http://base.thep.lu.se/ |
5361 |
14 Jun 10 |
nicklas |
7 |
|
5361 |
14 Jun 10 |
nicklas |
8 |
BASE is free software; you can redistribute it and/or |
5361 |
14 Jun 10 |
nicklas |
9 |
modify it under the terms of the GNU General Public License |
5361 |
14 Jun 10 |
nicklas |
10 |
as published by the Free Software Foundation; either version 3 |
5361 |
14 Jun 10 |
nicklas |
11 |
of the License, or (at your option) any later version. |
5361 |
14 Jun 10 |
nicklas |
12 |
|
5361 |
14 Jun 10 |
nicklas |
13 |
BASE is distributed in the hope that it will be useful, |
5361 |
14 Jun 10 |
nicklas |
14 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
5361 |
14 Jun 10 |
nicklas |
15 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
5361 |
14 Jun 10 |
nicklas |
16 |
GNU General Public License for more details. |
5361 |
14 Jun 10 |
nicklas |
17 |
|
5361 |
14 Jun 10 |
nicklas |
18 |
You should have received a copy of the GNU General Public License |
5361 |
14 Jun 10 |
nicklas |
19 |
along with BASE. If not, see <http://www.gnu.org/licenses/>. |
5361 |
14 Jun 10 |
nicklas |
20 |
------------------------------------------------------------------ |
5361 |
14 Jun 10 |
nicklas |
21 |
--%> |
5426 |
24 Sep 10 |
nicklas |
22 |
<%@ page pageEncoding="UTF-8" session="false" |
5361 |
14 Jun 10 |
nicklas |
23 |
import="net.sf.basedb.core.SessionControl" |
5361 |
14 Jun 10 |
nicklas |
24 |
import="net.sf.basedb.core.DbControl" |
5361 |
14 Jun 10 |
nicklas |
25 |
import="net.sf.basedb.core.SystemItems" |
5361 |
14 Jun 10 |
nicklas |
26 |
import="net.sf.basedb.core.Group" |
5361 |
14 Jun 10 |
nicklas |
27 |
import="net.sf.basedb.core.Include" |
5361 |
14 Jun 10 |
nicklas |
28 |
import="net.sf.basedb.core.Item" |
5361 |
14 Jun 10 |
nicklas |
29 |
import="net.sf.basedb.core.ItemContext" |
5361 |
14 Jun 10 |
nicklas |
30 |
import="net.sf.basedb.core.ItemQuery" |
5361 |
14 Jun 10 |
nicklas |
31 |
import="net.sf.basedb.core.ItemResultList" |
5361 |
14 Jun 10 |
nicklas |
32 |
import="net.sf.basedb.core.Permission" |
5361 |
14 Jun 10 |
nicklas |
33 |
import="net.sf.basedb.core.FileServer" |
5361 |
14 Jun 10 |
nicklas |
34 |
import="net.sf.basedb.core.MultiPermissions" |
5361 |
14 Jun 10 |
nicklas |
35 |
import="net.sf.basedb.core.User" |
5361 |
14 Jun 10 |
nicklas |
36 |
import="net.sf.basedb.core.PermissionDeniedException" |
5361 |
14 Jun 10 |
nicklas |
37 |
import="net.sf.basedb.core.PluginDefinition" |
5361 |
14 Jun 10 |
nicklas |
38 |
import="net.sf.basedb.core.plugin.GuiContext" |
5361 |
14 Jun 10 |
nicklas |
39 |
import="net.sf.basedb.core.plugin.Plugin" |
5361 |
14 Jun 10 |
nicklas |
40 |
import="net.sf.basedb.core.Project" |
5361 |
14 Jun 10 |
nicklas |
41 |
import="net.sf.basedb.core.query.Orders" |
5361 |
14 Jun 10 |
nicklas |
42 |
import="net.sf.basedb.core.query.Hql" |
5361 |
14 Jun 10 |
nicklas |
43 |
import="net.sf.basedb.clients.web.Base" |
5361 |
14 Jun 10 |
nicklas |
44 |
import="net.sf.basedb.clients.web.PermissionUtil" |
5361 |
14 Jun 10 |
nicklas |
45 |
import="net.sf.basedb.clients.web.util.HTML" |
5361 |
14 Jun 10 |
nicklas |
46 |
import="net.sf.basedb.util.Values" |
5362 |
16 Jun 10 |
nicklas |
47 |
import="net.sf.basedb.util.MD5" |
5361 |
14 Jun 10 |
nicklas |
48 |
import="net.sf.basedb.util.formatter.Formatter" |
5618 |
28 Apr 11 |
nicklas |
49 |
import="net.sf.basedb.util.uri.ConnectionManagerFactory" |
8160 |
07 Jun 23 |
nicklas |
50 |
import="net.sf.basedb.clients.web.ChangeHistoryUtil" |
5361 |
14 Jun 10 |
nicklas |
51 |
import="net.sf.basedb.clients.web.formatter.FormatterFactory" |
5361 |
14 Jun 10 |
nicklas |
52 |
import="net.sf.basedb.clients.web.extensions.ExtensionsControl" |
5361 |
14 Jun 10 |
nicklas |
53 |
import="net.sf.basedb.clients.web.extensions.JspContext" |
5361 |
14 Jun 10 |
nicklas |
54 |
import="net.sf.basedb.clients.web.extensions.renderer.PrefixSuffixRenderer" |
7604 |
25 Feb 19 |
nicklas |
55 |
import="net.sf.basedb.clients.web.extensions.toolbar.ButtonAction" |
5361 |
14 Jun 10 |
nicklas |
56 |
import="net.sf.basedb.clients.web.extensions.toolbar.ToolbarUtil" |
5361 |
14 Jun 10 |
nicklas |
57 |
import="net.sf.basedb.util.extensions.ExtensionsInvoker" |
5599 |
31 Mar 11 |
nicklas |
58 |
import="net.sf.basedb.util.extensions.ExtensionsUtil" |
5599 |
31 Mar 11 |
nicklas |
59 |
import="net.sf.basedb.util.uri.ConnectionManagerUtil" |
5361 |
14 Jun 10 |
nicklas |
60 |
import="java.util.Date" |
5361 |
14 Jun 10 |
nicklas |
61 |
import="java.util.Collections" |
5361 |
14 Jun 10 |
nicklas |
62 |
import="java.util.Map" |
5361 |
14 Jun 10 |
nicklas |
63 |
import="java.util.Set" |
5362 |
16 Jun 10 |
nicklas |
64 |
import="java.security.cert.X509Certificate" |
5362 |
16 Jun 10 |
nicklas |
65 |
import="java.security.cert.CertificateExpiredException" |
5362 |
16 Jun 10 |
nicklas |
66 |
import="java.security.MessageDigest" |
5361 |
14 Jun 10 |
nicklas |
67 |
%> |
5361 |
14 Jun 10 |
nicklas |
68 |
<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %> |
5361 |
14 Jun 10 |
nicklas |
69 |
<%@ taglib prefix="tbl" uri="/WEB-INF/table.tld" %> |
5361 |
14 Jun 10 |
nicklas |
70 |
<%@ taglib prefix="t" uri="/WEB-INF/tab.tld" %> |
5361 |
14 Jun 10 |
nicklas |
71 |
<%@ taglib prefix="p" uri="/WEB-INF/path.tld" %> |
5361 |
14 Jun 10 |
nicklas |
72 |
<%@ taglib prefix="ext" uri="/WEB-INF/extensions.tld" %> |
5361 |
14 Jun 10 |
nicklas |
73 |
<%! |
5361 |
14 Jun 10 |
nicklas |
74 |
private static final Item itemType = Item.FILESERVER; |
5361 |
14 Jun 10 |
nicklas |
75 |
private static final GuiContext guiContext = new GuiContext(itemType, GuiContext.Type.ITEM); |
5362 |
16 Jun 10 |
nicklas |
76 |
|
5362 |
16 Jun 10 |
nicklas |
77 |
String getMd5FingerPrint(X509Certificate cert) |
5362 |
16 Jun 10 |
nicklas |
78 |
throws Exception |
5362 |
16 Jun 10 |
nicklas |
79 |
{ |
5362 |
16 Jun 10 |
nicklas |
80 |
MessageDigest md5 = MD5.newInstance(); |
5362 |
16 Jun 10 |
nicklas |
81 |
md5.update(cert.getEncoded()); |
5362 |
16 Jun 10 |
nicklas |
82 |
return formatFingerPrint(MD5.getHashString(md5)); |
5362 |
16 Jun 10 |
nicklas |
83 |
} |
5362 |
16 Jun 10 |
nicklas |
84 |
|
5362 |
16 Jun 10 |
nicklas |
85 |
String getSha1FingerPrint(X509Certificate cert) |
5362 |
16 Jun 10 |
nicklas |
86 |
throws Exception |
5362 |
16 Jun 10 |
nicklas |
87 |
{ |
5362 |
16 Jun 10 |
nicklas |
88 |
MessageDigest sha1 = MessageDigest.getInstance("SHA1"); |
5362 |
16 Jun 10 |
nicklas |
89 |
sha1.update(cert.getEncoded()); |
5362 |
16 Jun 10 |
nicklas |
90 |
return formatFingerPrint(MD5.getHashString(sha1)); |
5362 |
16 Jun 10 |
nicklas |
91 |
} |
5362 |
16 Jun 10 |
nicklas |
92 |
|
5362 |
16 Jun 10 |
nicklas |
93 |
/** |
5362 |
16 Jun 10 |
nicklas |
94 |
Puts a : between every two characters and convert to uppercase |
5362 |
16 Jun 10 |
nicklas |
95 |
*/ |
5362 |
16 Jun 10 |
nicklas |
96 |
String formatFingerPrint(String fingerPrint) |
5362 |
16 Jun 10 |
nicklas |
97 |
{ |
5362 |
16 Jun 10 |
nicklas |
98 |
return fingerPrint.replaceAll("(..)(?=.)", "$1:").toUpperCase(); |
5362 |
16 Jun 10 |
nicklas |
99 |
} |
5361 |
14 Jun 10 |
nicklas |
100 |
%> |
5361 |
14 Jun 10 |
nicklas |
101 |
<% |
5361 |
14 Jun 10 |
nicklas |
102 |
final SessionControl sc = Base.getExistingSessionControl(pageContext, true); |
5361 |
14 Jun 10 |
nicklas |
103 |
final String ID = sc.getId(); |
5361 |
14 Jun 10 |
nicklas |
104 |
final ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, null); |
5361 |
14 Jun 10 |
nicklas |
105 |
final int itemId = cc.getId(); |
5361 |
14 Jun 10 |
nicklas |
106 |
final float scale = Base.getScale(sc); |
7954 |
12 May 21 |
nicklas |
107 |
final DbControl dc = sc.newDbControl(":View "+itemType); |
5361 |
14 Jun 10 |
nicklas |
108 |
try |
5361 |
14 Jun 10 |
nicklas |
109 |
{ |
5361 |
14 Jun 10 |
nicklas |
110 |
Formatter<Date> dateFormatter = FormatterFactory.getDateFormatter(sc); |
5361 |
14 Jun 10 |
nicklas |
111 |
Map<Plugin.MainType, Integer> pluginCount = PluginDefinition.countPlugins(dc, guiContext); |
5361 |
14 Jun 10 |
nicklas |
112 |
|
5361 |
14 Jun 10 |
nicklas |
113 |
FileServer server = FileServer.getById(dc, itemId); |
6137 |
19 Sep 12 |
nicklas |
114 |
String title = "File server -- " + HTML.encodeTags(server.getName()); |
5361 |
14 Jun 10 |
nicklas |
115 |
|
5361 |
14 Jun 10 |
nicklas |
116 |
final boolean writePermission = server.hasPermission(Permission.WRITE); |
5361 |
14 Jun 10 |
nicklas |
117 |
final boolean deletePermission = server.hasPermission(Permission.DELETE); |
5361 |
14 Jun 10 |
nicklas |
118 |
final boolean sharePermission = server.hasPermission(Permission.SET_PERMISSION); |
5361 |
14 Jun 10 |
nicklas |
119 |
final boolean usePermission = server.hasPermission(Permission.USE); |
5361 |
14 Jun 10 |
nicklas |
120 |
final boolean setOwnerPermission = server.hasPermission(Permission.SET_OWNER); |
5361 |
14 Jun 10 |
nicklas |
121 |
final boolean isRemoved = server.isRemoved(); |
5361 |
14 Jun 10 |
nicklas |
122 |
final boolean isUsed = isRemoved && server.isUsed(); |
5361 |
14 Jun 10 |
nicklas |
123 |
final boolean deletePermanentlyPermission = deletePermission && !isUsed; |
5361 |
14 Jun 10 |
nicklas |
124 |
final boolean isOwner = server.isOwner(); |
5361 |
14 Jun 10 |
nicklas |
125 |
JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, guiContext, server); |
7604 |
25 Feb 19 |
nicklas |
126 |
ExtensionsInvoker<ButtonAction> invoker = ToolbarUtil.useExtensions(jspContext); |
5599 |
31 Mar 11 |
nicklas |
127 |
ConnectionManagerFactory cmf = ConnectionManagerUtil.getFactory(server.getConnectionManagerFactoryId()); |
5361 |
14 Jun 10 |
nicklas |
128 |
%> |
6308 |
20 Aug 13 |
nicklas |
129 |
<base:page title="<%=title%>" id="view-page"> |
6308 |
20 Aug 13 |
nicklas |
130 |
<base:head scripts="table.js,tabcontrol-2.js,~fileservers.js" styles="table.css,toolbar.css,headertabcontrol.css,path.css"> |
5361 |
14 Jun 10 |
nicklas |
131 |
<ext:scripts context="<%=jspContext%>" /> |
5361 |
14 Jun 10 |
nicklas |
132 |
<ext:stylesheets context="<%=jspContext%>" /> |
5361 |
14 Jun 10 |
nicklas |
133 |
</base:head> |
5361 |
14 Jun 10 |
nicklas |
134 |
<base:body> |
5939 |
30 Jan 12 |
nicklas |
135 |
<p:path><p:pathelement |
5939 |
30 Jan 12 |
nicklas |
136 |
title="File servers" href="<%="index.jsp?ID="+ID%>" |
5939 |
30 Jan 12 |
nicklas |
137 |
/><p:pathelement title="<%=HTML.encodeTags(server.getName())%>" |
5939 |
30 Jan 12 |
nicklas |
138 |
/></p:path> |
6308 |
20 Aug 13 |
nicklas |
139 |
<div id="page-data" data-item-id="<%=itemId%>"></div> |
5361 |
14 Jun 10 |
nicklas |
140 |
|
5939 |
30 Jan 12 |
nicklas |
141 |
<t:tabcontrol |
5939 |
30 Jan 12 |
nicklas |
142 |
id="main" |
5939 |
30 Jan 12 |
nicklas |
143 |
subclass="content mastertabcontrol" |
5939 |
30 Jan 12 |
nicklas |
144 |
active="properties"> |
5361 |
14 Jun 10 |
nicklas |
145 |
<t:tab id="properties" title="Properties"> |
5939 |
30 Jan 12 |
nicklas |
146 |
<div> |
5939 |
30 Jan 12 |
nicklas |
147 |
<table class="fullform bottomborder"> |
5939 |
30 Jan 12 |
nicklas |
148 |
<tr> |
5939 |
30 Jan 12 |
nicklas |
149 |
<th class="itemstatus"> |
5361 |
14 Jun 10 |
nicklas |
150 |
<base:icon |
5946 |
03 Feb 12 |
nicklas |
151 |
image="shared.png" |
5939 |
30 Jan 12 |
nicklas |
152 |
visible="<%=server.isShared()%>" |
5939 |
30 Jan 12 |
nicklas |
153 |
tooltip="This item is shared to other users, groups and/or projects" |
5939 |
30 Jan 12 |
nicklas |
154 |
/> |
5939 |
30 Jan 12 |
nicklas |
155 |
<base:icon |
6308 |
20 Aug 13 |
nicklas |
156 |
id="btnDeletePermanently" |
5946 |
03 Feb 12 |
nicklas |
157 |
image="deleted.png" |
5939 |
30 Jan 12 |
nicklas |
158 |
tooltip="This item has been flagged for deletion. Click to delete it now." |
5939 |
30 Jan 12 |
nicklas |
159 |
enabled="<%=deletePermanentlyPermission %>" |
5939 |
30 Jan 12 |
nicklas |
160 |
visible="<%=isRemoved%>" |
5939 |
30 Jan 12 |
nicklas |
161 |
/> |
6308 |
20 Aug 13 |
nicklas |
162 |
<base:icon |
6308 |
20 Aug 13 |
nicklas |
163 |
id="btnUsingItems" |
6308 |
20 Aug 13 |
nicklas |
164 |
image="used.png" |
5939 |
30 Jan 12 |
nicklas |
165 |
tooltip="This item is used by other items and can't be permanently deleted. Show the items that are using this one" |
5939 |
30 Jan 12 |
nicklas |
166 |
visible="<%=isRemoved && isUsed%>" /> |
5939 |
30 Jan 12 |
nicklas |
167 |
</th> |
5939 |
30 Jan 12 |
nicklas |
168 |
<td style="padding: 0px;"> |
6605 |
18 Nov 14 |
nicklas |
169 |
<tbl:toolbar subclass="bottomborder bg-filled-50"> |
5939 |
30 Jan 12 |
nicklas |
170 |
<tbl:button |
6308 |
20 Aug 13 |
nicklas |
171 |
id="btnEdit" |
5942 |
01 Feb 12 |
nicklas |
172 |
disabled="<%=!writePermission%>" |
5945 |
02 Feb 12 |
nicklas |
173 |
image="edit.png" |
5939 |
30 Jan 12 |
nicklas |
174 |
title="Edit…" |
5939 |
30 Jan 12 |
nicklas |
175 |
tooltip="<%=writePermission ? "Edit this file server" : "You do not have permission to edit this file server"%>" |
5939 |
30 Jan 12 |
nicklas |
176 |
/> |
5939 |
30 Jan 12 |
nicklas |
177 |
<tbl:button |
6308 |
20 Aug 13 |
nicklas |
178 |
id="btnDelete" |
5942 |
01 Feb 12 |
nicklas |
179 |
disabled="<%=!deletePermission%>" |
5946 |
03 Feb 12 |
nicklas |
180 |
image="delete.png" |
5939 |
30 Jan 12 |
nicklas |
181 |
title="Delete" |
5939 |
30 Jan 12 |
nicklas |
182 |
visible="<%=!server.isRemoved()%>" |
5939 |
30 Jan 12 |
nicklas |
183 |
tooltip="<%=deletePermission ? "Delete this file server" : "You do not have permission to delete this file server"%>" |
5939 |
30 Jan 12 |
nicklas |
184 |
/> |
5939 |
30 Jan 12 |
nicklas |
185 |
<tbl:button |
6308 |
20 Aug 13 |
nicklas |
186 |
id="btnRestore" |
5942 |
01 Feb 12 |
nicklas |
187 |
disabled="<%=!writePermission%>" |
5946 |
03 Feb 12 |
nicklas |
188 |
image="restore.png" |
5939 |
30 Jan 12 |
nicklas |
189 |
title="Restore" |
5939 |
30 Jan 12 |
nicklas |
190 |
visible="<%=server.isRemoved()%>" |
5939 |
30 Jan 12 |
nicklas |
191 |
tooltip="<%=writePermission ? "Restore this file server" : "You do not have permission to restore this file server"%>" |
5939 |
30 Jan 12 |
nicklas |
192 |
/> |
5939 |
30 Jan 12 |
nicklas |
193 |
<tbl:button |
6308 |
20 Aug 13 |
nicklas |
194 |
id="btnShare" |
5942 |
01 Feb 12 |
nicklas |
195 |
disabled="<%=!sharePermission%>" |
5945 |
02 Feb 12 |
nicklas |
196 |
image="share.png" |
5939 |
30 Jan 12 |
nicklas |
197 |
title="Share…" |
5939 |
30 Jan 12 |
nicklas |
198 |
tooltip="<%=sharePermission ? "Share this file server to other user, groups and projects" : "You do not have permission to share this file server"%>" |
5939 |
30 Jan 12 |
nicklas |
199 |
/> |
5939 |
30 Jan 12 |
nicklas |
200 |
<tbl:button |
6308 |
20 Aug 13 |
nicklas |
201 |
id="btnSetOwner" |
5942 |
01 Feb 12 |
nicklas |
202 |
disabled="<%=!setOwnerPermission%>" |
5939 |
30 Jan 12 |
nicklas |
203 |
image="take_ownership.png" |
5939 |
30 Jan 12 |
nicklas |
204 |
title="Set owner…" |
5939 |
30 Jan 12 |
nicklas |
205 |
tooltip="<%=setOwnerPermission ? "Change owner of this item" : "You do not have permission to change ownership of this item"%>" |
5939 |
30 Jan 12 |
nicklas |
206 |
/> |
5939 |
30 Jan 12 |
nicklas |
207 |
<tbl:button |
6308 |
20 Aug 13 |
nicklas |
208 |
id="btnImport" |
5946 |
03 Feb 12 |
nicklas |
209 |
image="import.png" |
6308 |
20 Aug 13 |
nicklas |
210 |
data-plugin-type="IMPORT" |
5939 |
30 Jan 12 |
nicklas |
211 |
title="Import…" |
5939 |
30 Jan 12 |
nicklas |
212 |
tooltip="Import data" |
5939 |
30 Jan 12 |
nicklas |
213 |
visible="<%=pluginCount.containsKey(Plugin.MainType.IMPORT)%>" |
5939 |
30 Jan 12 |
nicklas |
214 |
/> |
5939 |
30 Jan 12 |
nicklas |
215 |
<tbl:button |
6308 |
20 Aug 13 |
nicklas |
216 |
id="btnExport" |
6308 |
20 Aug 13 |
nicklas |
217 |
image="export.png" |
6308 |
20 Aug 13 |
nicklas |
218 |
data-plugin-type="EXPORT" |
5939 |
30 Jan 12 |
nicklas |
219 |
title="Export…" |
5939 |
30 Jan 12 |
nicklas |
220 |
tooltip="Export data" |
5939 |
30 Jan 12 |
nicklas |
221 |
visible="<%=pluginCount.containsKey(Plugin.MainType.EXPORT)%>" |
5939 |
30 Jan 12 |
nicklas |
222 |
/> |
5939 |
30 Jan 12 |
nicklas |
223 |
<tbl:button |
6308 |
20 Aug 13 |
nicklas |
224 |
id="btnRunPlugin" |
6308 |
20 Aug 13 |
nicklas |
225 |
image="runplugin.png" |
6308 |
20 Aug 13 |
nicklas |
226 |
data-plugin-type="OTHER" |
5939 |
30 Jan 12 |
nicklas |
227 |
title="Run plugin…" |
5939 |
30 Jan 12 |
nicklas |
228 |
tooltip="Run a plugin" |
5939 |
30 Jan 12 |
nicklas |
229 |
visible="<%=pluginCount.containsKey(Plugin.MainType.OTHER)%>" |
5939 |
30 Jan 12 |
nicklas |
230 |
/> |
5939 |
30 Jan 12 |
nicklas |
231 |
<ext:render extensions="<%=invoker%>" context="<%=jspContext%>" |
7604 |
25 Feb 19 |
nicklas |
232 |
wrapper="<%=new PrefixSuffixRenderer<ButtonAction>(jspContext, "<td>", "</td>") %>"/> |
5939 |
30 Jan 12 |
nicklas |
233 |
<tbl:button |
5939 |
30 Jan 12 |
nicklas |
234 |
image="help.png" |
6308 |
20 Aug 13 |
nicklas |
235 |
subclass="auto-init" |
6308 |
20 Aug 13 |
nicklas |
236 |
data-auto-init="help" |
6308 |
20 Aug 13 |
nicklas |
237 |
data-help-id="fileserver.view.properties" |
5939 |
30 Jan 12 |
nicklas |
238 |
title="Help…" |
5939 |
30 Jan 12 |
nicklas |
239 |
tooltip="Get help about this page" |
5939 |
30 Jan 12 |
nicklas |
240 |
/> |
5939 |
30 Jan 12 |
nicklas |
241 |
</tbl:toolbar> |
5939 |
30 Jan 12 |
nicklas |
242 |
</td> |
5939 |
30 Jan 12 |
nicklas |
243 |
</tr> |
5361 |
14 Jun 10 |
nicklas |
244 |
<tr> |
5939 |
30 Jan 12 |
nicklas |
245 |
<th>Name</th> |
5361 |
14 Jun 10 |
nicklas |
246 |
<td><%=HTML.encodeTags(server.getName())%></td> |
5361 |
14 Jun 10 |
nicklas |
247 |
</tr> |
5361 |
14 Jun 10 |
nicklas |
248 |
<tr> |
5939 |
30 Jan 12 |
nicklas |
249 |
<th>ConnectionManager</th> |
5599 |
31 Mar 11 |
nicklas |
250 |
<td><%=cmf == null ? "<i>- auto -</i>" : HTML.encodeTags(cmf.getDisplayName())%></td> |
5599 |
31 Mar 11 |
nicklas |
251 |
</tr> |
5599 |
31 Mar 11 |
nicklas |
252 |
<tr> |
5939 |
30 Jan 12 |
nicklas |
253 |
<th>Host</th> |
5618 |
28 Apr 11 |
nicklas |
254 |
<td><%=HTML.encodeTags(server.getHost())%></td> |
5618 |
28 Apr 11 |
nicklas |
255 |
</tr> |
5618 |
28 Apr 11 |
nicklas |
256 |
<tr> |
5939 |
30 Jan 12 |
nicklas |
257 |
<th>Username</th> |
5361 |
14 Jun 10 |
nicklas |
258 |
<td><%=HTML.encodeTags(server.getUsername())%></td> |
5361 |
14 Jun 10 |
nicklas |
259 |
</tr> |
5361 |
14 Jun 10 |
nicklas |
260 |
<tr> |
5939 |
30 Jan 12 |
nicklas |
261 |
<th>Has password</th> |
5362 |
16 Jun 10 |
nicklas |
262 |
<td><%=server.hasPassword() ? "yes" : "no"%></td> |
5361 |
14 Jun 10 |
nicklas |
263 |
</tr> |
5361 |
14 Jun 10 |
nicklas |
264 |
<tr> |
6497 |
26 Jun 14 |
nicklas |
265 |
<th>Root path</th> |
6497 |
26 Jun 14 |
nicklas |
266 |
<td><%=HTML.encodeTags(server.getRootPath()) %></td> |
6497 |
26 Jun 14 |
nicklas |
267 |
</tr> |
6497 |
26 Jun 14 |
nicklas |
268 |
<tr> |
6497 |
26 Jun 14 |
nicklas |
269 |
<th>SSH fingerprint</th> |
7333 |
11 Apr 17 |
nicklas |
270 |
<td><%=HTML.encodeTags(server.getFingerprintType()) + ": " + HTML.encodeTags(server.getSshFingerprint()) %></td> |
6497 |
26 Jun 14 |
nicklas |
271 |
</tr> |
6497 |
26 Jun 14 |
nicklas |
272 |
<tr> |
5939 |
30 Jan 12 |
nicklas |
273 |
<th>Owner</th> |
5361 |
14 Jun 10 |
nicklas |
274 |
<td><base:propertyvalue item="<%=server%>" property="owner"/></td> |
5361 |
14 Jun 10 |
nicklas |
275 |
</tr> |
5361 |
14 Jun 10 |
nicklas |
276 |
<tr> |
5939 |
30 Jan 12 |
nicklas |
277 |
<th>Permissions</th> |
5939 |
30 Jan 12 |
nicklas |
278 |
<td><%=PermissionUtil.getFullPermissionNames(server)%></td> |
5939 |
30 Jan 12 |
nicklas |
279 |
</tr> |
5939 |
30 Jan 12 |
nicklas |
280 |
<tr> |
5939 |
30 Jan 12 |
nicklas |
281 |
<th>Description</th> |
5361 |
14 Jun 10 |
nicklas |
282 |
<td><%=HTML.niceFormat(server.getDescription())%></td> |
5361 |
14 Jun 10 |
nicklas |
283 |
</tr> |
5362 |
16 Jun 10 |
nicklas |
284 |
|
5362 |
16 Jun 10 |
nicklas |
285 |
<% |
5362 |
16 Jun 10 |
nicklas |
286 |
String error = null; |
5362 |
16 Jun 10 |
nicklas |
287 |
X509Certificate cert = null; |
5362 |
16 Jun 10 |
nicklas |
288 |
try |
5362 |
16 Jun 10 |
nicklas |
289 |
{ |
5362 |
16 Jun 10 |
nicklas |
290 |
cert = server.getServerX509Certificate(); |
5362 |
16 Jun 10 |
nicklas |
291 |
if (cert != null) cert.checkValidity(); |
5362 |
16 Jun 10 |
nicklas |
292 |
} |
5362 |
16 Jun 10 |
nicklas |
293 |
catch (CertificateExpiredException ex) |
5362 |
16 Jun 10 |
nicklas |
294 |
{ |
5362 |
16 Jun 10 |
nicklas |
295 |
error = "This certificate has expired"; |
5362 |
16 Jun 10 |
nicklas |
296 |
} |
5362 |
16 Jun 10 |
nicklas |
297 |
catch (Exception ex) |
5362 |
16 Jun 10 |
nicklas |
298 |
{ |
5362 |
16 Jun 10 |
nicklas |
299 |
error = ex.getMessage(); |
5362 |
16 Jun 10 |
nicklas |
300 |
} |
5362 |
16 Jun 10 |
nicklas |
301 |
%> |
5362 |
16 Jun 10 |
nicklas |
302 |
<tr> |
5939 |
30 Jan 12 |
nicklas |
303 |
<th>Server certificate</th> |
5939 |
30 Jan 12 |
nicklas |
304 |
<% |
5939 |
30 Jan 12 |
nicklas |
305 |
if (error != null) |
5939 |
30 Jan 12 |
nicklas |
306 |
{ |
5939 |
30 Jan 12 |
nicklas |
307 |
%> |
5939 |
30 Jan 12 |
nicklas |
308 |
<td><div class="messagecontainer error"><%=HTML.encodeTags(error)%></div></td> |
5939 |
30 Jan 12 |
nicklas |
309 |
<% |
5939 |
30 Jan 12 |
nicklas |
310 |
} |
5939 |
30 Jan 12 |
nicklas |
311 |
else if (cert == null) |
5939 |
30 Jan 12 |
nicklas |
312 |
{ |
5939 |
30 Jan 12 |
nicklas |
313 |
%> |
5939 |
30 Jan 12 |
nicklas |
314 |
<td>no</td> |
5939 |
30 Jan 12 |
nicklas |
315 |
<% |
5939 |
30 Jan 12 |
nicklas |
316 |
} |
5939 |
30 Jan 12 |
nicklas |
317 |
%> |
5939 |
30 Jan 12 |
nicklas |
318 |
</tr> |
5362 |
16 Jun 10 |
nicklas |
319 |
<% |
5362 |
16 Jun 10 |
nicklas |
320 |
if (cert != null) |
5362 |
16 Jun 10 |
nicklas |
321 |
{ |
5362 |
16 Jun 10 |
nicklas |
322 |
%> |
5362 |
16 Jun 10 |
nicklas |
323 |
<tr> |
5939 |
30 Jan 12 |
nicklas |
324 |
<th class="subprompt">- issued to</th> |
5362 |
16 Jun 10 |
nicklas |
325 |
<td><%=cert.getSubjectX500Principal().getName() %></td> |
5362 |
16 Jun 10 |
nicklas |
326 |
</tr> |
5362 |
16 Jun 10 |
nicklas |
327 |
<tr> |
5939 |
30 Jan 12 |
nicklas |
328 |
<th class="subprompt">- issued by</th> |
5362 |
16 Jun 10 |
nicklas |
329 |
<td><%=cert.getIssuerX500Principal().getName() %></td> |
5362 |
16 Jun 10 |
nicklas |
330 |
</tr> |
5362 |
16 Jun 10 |
nicklas |
331 |
<tr> |
5939 |
30 Jan 12 |
nicklas |
332 |
<th class="subprompt">- valid between</th> |
5362 |
16 Jun 10 |
nicklas |
333 |
<td><%=dateFormatter.format(cert.getNotBefore()) %> — |
5362 |
16 Jun 10 |
nicklas |
334 |
<%=dateFormatter.format(cert.getNotAfter()) %></td> |
5362 |
16 Jun 10 |
nicklas |
335 |
</tr> |
5362 |
16 Jun 10 |
nicklas |
336 |
<tr> |
5939 |
30 Jan 12 |
nicklas |
337 |
<th class="subprompt">- serial number</th> |
5362 |
16 Jun 10 |
nicklas |
338 |
<td><%=cert.getSerialNumber() %></td> |
5362 |
16 Jun 10 |
nicklas |
339 |
</tr> |
5362 |
16 Jun 10 |
nicklas |
340 |
<tr> |
5939 |
30 Jan 12 |
nicklas |
341 |
<th class="subprompt">- MD5 fingerprint</th> |
5362 |
16 Jun 10 |
nicklas |
342 |
<td><%=getMd5FingerPrint(cert)%></td> |
5362 |
16 Jun 10 |
nicklas |
343 |
</tr> |
5362 |
16 Jun 10 |
nicklas |
344 |
<tr> |
5939 |
30 Jan 12 |
nicklas |
345 |
<th class="subprompt">- SHA1 fingerprint</th> |
5362 |
16 Jun 10 |
nicklas |
346 |
<td><%=getSha1FingerPrint(cert)%></td> |
5362 |
16 Jun 10 |
nicklas |
347 |
</tr> |
5362 |
16 Jun 10 |
nicklas |
348 |
<% |
5362 |
16 Jun 10 |
nicklas |
349 |
} |
5362 |
16 Jun 10 |
nicklas |
350 |
%> |
5362 |
16 Jun 10 |
nicklas |
351 |
<% |
5362 |
16 Jun 10 |
nicklas |
352 |
error = null; |
5362 |
16 Jun 10 |
nicklas |
353 |
cert = null; |
5362 |
16 Jun 10 |
nicklas |
354 |
try |
5362 |
16 Jun 10 |
nicklas |
355 |
{ |
5362 |
16 Jun 10 |
nicklas |
356 |
cert = server.getClientX509Certificate(); |
5362 |
16 Jun 10 |
nicklas |
357 |
if (cert != null) cert.checkValidity(); |
5362 |
16 Jun 10 |
nicklas |
358 |
} |
5362 |
16 Jun 10 |
nicklas |
359 |
catch (CertificateExpiredException ex) |
5362 |
16 Jun 10 |
nicklas |
360 |
{ |
5362 |
16 Jun 10 |
nicklas |
361 |
error = "This certificate has expired"; |
5362 |
16 Jun 10 |
nicklas |
362 |
} |
5362 |
16 Jun 10 |
nicklas |
363 |
catch (Exception ex) |
5362 |
16 Jun 10 |
nicklas |
364 |
{ |
5362 |
16 Jun 10 |
nicklas |
365 |
error = ex.getMessage(); |
5362 |
16 Jun 10 |
nicklas |
366 |
} |
5362 |
16 Jun 10 |
nicklas |
367 |
%> |
5362 |
16 Jun 10 |
nicklas |
368 |
<tr> |
5939 |
30 Jan 12 |
nicklas |
369 |
<th>Client certificate</th> |
5362 |
16 Jun 10 |
nicklas |
370 |
<% |
5939 |
30 Jan 12 |
nicklas |
371 |
if (error != null) |
5939 |
30 Jan 12 |
nicklas |
372 |
{ |
5939 |
30 Jan 12 |
nicklas |
373 |
%> |
5939 |
30 Jan 12 |
nicklas |
374 |
<td><div class="messagecontainer error"><%=HTML.encodeTags(error)%></div></td> |
5939 |
30 Jan 12 |
nicklas |
375 |
<% |
5939 |
30 Jan 12 |
nicklas |
376 |
} |
5939 |
30 Jan 12 |
nicklas |
377 |
else if (cert == null) |
5939 |
30 Jan 12 |
nicklas |
378 |
{ |
5939 |
30 Jan 12 |
nicklas |
379 |
%> |
5939 |
30 Jan 12 |
nicklas |
380 |
<td>no</td> |
5939 |
30 Jan 12 |
nicklas |
381 |
<% |
5939 |
30 Jan 12 |
nicklas |
382 |
} |
5362 |
16 Jun 10 |
nicklas |
383 |
%> |
5939 |
30 Jan 12 |
nicklas |
384 |
</tr> |
5939 |
30 Jan 12 |
nicklas |
385 |
<% |
5362 |
16 Jun 10 |
nicklas |
386 |
if (cert != null) |
5362 |
16 Jun 10 |
nicklas |
387 |
{ |
5362 |
16 Jun 10 |
nicklas |
388 |
%> |
5362 |
16 Jun 10 |
nicklas |
389 |
<tr> |
5939 |
30 Jan 12 |
nicklas |
390 |
<th class="subprompt">- issued to</th> |
5362 |
16 Jun 10 |
nicklas |
391 |
<td><%=cert.getSubjectX500Principal().getName() %></td> |
5362 |
16 Jun 10 |
nicklas |
392 |
</tr> |
5362 |
16 Jun 10 |
nicklas |
393 |
<tr> |
5939 |
30 Jan 12 |
nicklas |
394 |
<th class="subprompt">- issued by</th> |
5362 |
16 Jun 10 |
nicklas |
395 |
<td><%=cert.getIssuerX500Principal().getName() %></td> |
5362 |
16 Jun 10 |
nicklas |
396 |
</tr> |
5362 |
16 Jun 10 |
nicklas |
397 |
<tr> |
5939 |
30 Jan 12 |
nicklas |
398 |
<th class="subprompt">- valid between</th> |
5362 |
16 Jun 10 |
nicklas |
399 |
<td><%=dateFormatter.format(cert.getNotBefore()) %> — |
5362 |
16 Jun 10 |
nicklas |
400 |
<%=dateFormatter.format(cert.getNotAfter()) %></td> |
5362 |
16 Jun 10 |
nicklas |
401 |
</tr> |
5362 |
16 Jun 10 |
nicklas |
402 |
<tr> |
5939 |
30 Jan 12 |
nicklas |
403 |
<th class="subprompt">- serial number</th> |
5362 |
16 Jun 10 |
nicklas |
404 |
<td><%=cert.getSerialNumber() %></td> |
5362 |
16 Jun 10 |
nicklas |
405 |
</tr> |
5362 |
16 Jun 10 |
nicklas |
406 |
<tr> |
5939 |
30 Jan 12 |
nicklas |
407 |
<th class="subprompt">- MD5 fingerprint</th> |
5362 |
16 Jun 10 |
nicklas |
408 |
<td><%=getMd5FingerPrint(cert)%></td> |
5362 |
16 Jun 10 |
nicklas |
409 |
</tr> |
5362 |
16 Jun 10 |
nicklas |
410 |
<tr> |
5939 |
30 Jan 12 |
nicklas |
411 |
<th class="subprompt">- SHA1 fingerprint</th> |
5362 |
16 Jun 10 |
nicklas |
412 |
<td><%=getSha1FingerPrint(cert)%></td> |
5362 |
16 Jun 10 |
nicklas |
413 |
</tr> |
5362 |
16 Jun 10 |
nicklas |
414 |
<% |
5362 |
16 Jun 10 |
nicklas |
415 |
} |
5362 |
16 Jun 10 |
nicklas |
416 |
%> |
7472 |
10 Apr 18 |
nicklas |
417 |
<tr> |
7472 |
10 Apr 18 |
nicklas |
418 |
<th>SSH private key</th> |
7472 |
10 Apr 18 |
nicklas |
419 |
<td><%=server.hasSshPrivateKey() ? "yes (" + Values.getString(server.getSshPrivateKeyFormat(), "<i>- auto -</i>") + ")" : "no"%></td> |
7472 |
10 Apr 18 |
nicklas |
420 |
</tr> |
5361 |
14 Jun 10 |
nicklas |
421 |
</table> |
5939 |
30 Jan 12 |
nicklas |
422 |
</div> |
5502 |
18 Nov 10 |
nicklas |
423 |
<jsp:include page="../../common/anytoany/list_anytoany.jsp"> |
5502 |
18 Nov 10 |
nicklas |
424 |
<jsp:param name="ID" value="<%=ID%>" /> |
5502 |
18 Nov 10 |
nicklas |
425 |
<jsp:param name="item_type" value="<%=itemType.name()%>" /> |
5502 |
18 Nov 10 |
nicklas |
426 |
<jsp:param name="item_id" value="<%=itemId%>" /> |
5502 |
18 Nov 10 |
nicklas |
427 |
<jsp:param name="title" value="Other items related to this file server" /> |
5502 |
18 Nov 10 |
nicklas |
428 |
</jsp:include> |
5939 |
30 Jan 12 |
nicklas |
429 |
<jsp:include page="../../common/share/list_share.jsp"> |
5939 |
30 Jan 12 |
nicklas |
430 |
<jsp:param name="ID" value="<%=ID%>" /> |
5939 |
30 Jan 12 |
nicklas |
431 |
<jsp:param name="item_type" value="<%=itemType.name()%>" /> |
5939 |
30 Jan 12 |
nicklas |
432 |
<jsp:param name="item_id" value="<%=itemId%>" /> |
5939 |
30 Jan 12 |
nicklas |
433 |
<jsp:param name="title" value="Shared to" /> |
5939 |
30 Jan 12 |
nicklas |
434 |
</jsp:include> |
5361 |
14 Jun 10 |
nicklas |
435 |
</t:tab> |
8160 |
07 Jun 23 |
nicklas |
436 |
<t:tab id="annotations" title="Annotations" |
8160 |
07 Jun 23 |
nicklas |
437 |
tooltip="View annotation values" clazz="white"> |
8160 |
07 Jun 23 |
nicklas |
438 |
<jsp:include page="../../common/annotations/list_frameset.jsp"> |
8160 |
07 Jun 23 |
nicklas |
439 |
<jsp:param name="item_type" value="<%=itemType.name()%>" /> |
8160 |
07 Jun 23 |
nicklas |
440 |
<jsp:param name="item_id" value="<%=itemId%>" /> |
8160 |
07 Jun 23 |
nicklas |
441 |
<jsp:param name="ID" value="<%=ID%>" /> |
8160 |
07 Jun 23 |
nicklas |
442 |
</jsp:include> |
8160 |
07 Jun 23 |
nicklas |
443 |
</t:tab> |
8160 |
07 Jun 23 |
nicklas |
444 |
<t:tab id="history" title="History" |
8160 |
07 Jun 23 |
nicklas |
445 |
tooltip="Displays a log with the history of this item" |
8160 |
07 Jun 23 |
nicklas |
446 |
visible="<%=ChangeHistoryUtil.showChangeHistoryTab(sc)%>"> |
8160 |
07 Jun 23 |
nicklas |
447 |
<jsp:include page="../../common/history/frameset.jsp"> |
8160 |
07 Jun 23 |
nicklas |
448 |
<jsp:param name="item_type" value="<%=itemType.name()%>" /> |
8160 |
07 Jun 23 |
nicklas |
449 |
<jsp:param name="item_id" value="<%=itemId%>" /> |
8160 |
07 Jun 23 |
nicklas |
450 |
<jsp:param name="ID" value="<%=ID%>" /> |
8160 |
07 Jun 23 |
nicklas |
451 |
</jsp:include> |
8160 |
07 Jun 23 |
nicklas |
452 |
</t:tab> |
8160 |
07 Jun 23 |
nicklas |
453 |
|
5361 |
14 Jun 10 |
nicklas |
454 |
</t:tabcontrol> |
5361 |
14 Jun 10 |
nicklas |
455 |
|
5361 |
14 Jun 10 |
nicklas |
456 |
</base:body> |
5361 |
14 Jun 10 |
nicklas |
457 |
</base:page> |
5361 |
14 Jun 10 |
nicklas |
458 |
<% |
5361 |
14 Jun 10 |
nicklas |
459 |
} |
5361 |
14 Jun 10 |
nicklas |
460 |
finally |
5361 |
14 Jun 10 |
nicklas |
461 |
{ |
5361 |
14 Jun 10 |
nicklas |
462 |
if (dc != null) dc.close(); |
5361 |
14 Jun 10 |
nicklas |
463 |
} |
5361 |
14 Jun 10 |
nicklas |
464 |
|
5361 |
14 Jun 10 |
nicklas |
465 |
%> |