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.Item" |
5361 |
14 Jun 10 |
nicklas |
26 |
import="net.sf.basedb.core.ItemContext" |
5361 |
14 Jun 10 |
nicklas |
27 |
import="net.sf.basedb.core.Permission" |
5361 |
14 Jun 10 |
nicklas |
28 |
import="net.sf.basedb.core.FileServer" |
5361 |
14 Jun 10 |
nicklas |
29 |
import="net.sf.basedb.core.PermissionDeniedException" |
5361 |
14 Jun 10 |
nicklas |
30 |
import="net.sf.basedb.clients.web.Base" |
5361 |
14 Jun 10 |
nicklas |
31 |
import="net.sf.basedb.clients.web.util.HTML" |
5361 |
14 Jun 10 |
nicklas |
32 |
import="net.sf.basedb.util.Values" |
5599 |
31 Mar 11 |
nicklas |
33 |
import="net.sf.basedb.util.uri.ConnectionManagerUtil" |
5599 |
31 Mar 11 |
nicklas |
34 |
import="net.sf.basedb.util.uri.ConnectionManagerFactory" |
5501 |
18 Nov 10 |
nicklas |
35 |
import="net.sf.basedb.core.plugin.GuiContext" |
5501 |
18 Nov 10 |
nicklas |
36 |
import="net.sf.basedb.clients.web.extensions.ExtensionsControl" |
5501 |
18 Nov 10 |
nicklas |
37 |
import="net.sf.basedb.clients.web.extensions.JspContext" |
5501 |
18 Nov 10 |
nicklas |
38 |
import="net.sf.basedb.clients.web.extensions.edit.EditUtil" |
7604 |
25 Feb 19 |
nicklas |
39 |
import="net.sf.basedb.clients.web.extensions.tabcontrol.TabAction" |
5501 |
18 Nov 10 |
nicklas |
40 |
import="net.sf.basedb.util.extensions.ExtensionsInvoker" |
5599 |
31 Mar 11 |
nicklas |
41 |
import="java.util.List" |
5361 |
14 Jun 10 |
nicklas |
42 |
%> |
5361 |
14 Jun 10 |
nicklas |
43 |
<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %> |
5361 |
14 Jun 10 |
nicklas |
44 |
<%@ taglib prefix="t" uri="/WEB-INF/tab.tld" %> |
5618 |
28 Apr 11 |
nicklas |
45 |
<%@ taglib prefix="ext" uri="/WEB-INF/extensions.tld" %> |
5361 |
14 Jun 10 |
nicklas |
46 |
<% |
5361 |
14 Jun 10 |
nicklas |
47 |
final Item itemType = Item.FILESERVER; |
5361 |
14 Jun 10 |
nicklas |
48 |
final SessionControl sc = Base.getExistingSessionControl(pageContext, true); |
5361 |
14 Jun 10 |
nicklas |
49 |
final ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, null); |
5361 |
14 Jun 10 |
nicklas |
50 |
final int itemId = cc.getId(); |
5361 |
14 Jun 10 |
nicklas |
51 |
final String ID = sc.getId(); |
5361 |
14 Jun 10 |
nicklas |
52 |
final float scale = Base.getScale(sc); |
7954 |
12 May 21 |
nicklas |
53 |
final DbControl dc = sc.newDbControl(":Edit "+itemType); |
5361 |
14 Jun 10 |
nicklas |
54 |
try |
5361 |
14 Jun 10 |
nicklas |
55 |
{ |
5361 |
14 Jun 10 |
nicklas |
56 |
String title = null; |
5361 |
14 Jun 10 |
nicklas |
57 |
FileServer server = null; |
5361 |
14 Jun 10 |
nicklas |
58 |
|
5361 |
14 Jun 10 |
nicklas |
59 |
if (itemId == 0) |
5361 |
14 Jun 10 |
nicklas |
60 |
{ |
5361 |
14 Jun 10 |
nicklas |
61 |
title = "Create file server"; |
5361 |
14 Jun 10 |
nicklas |
62 |
cc.removeObject("item"); |
5361 |
14 Jun 10 |
nicklas |
63 |
} |
5361 |
14 Jun 10 |
nicklas |
64 |
else |
5361 |
14 Jun 10 |
nicklas |
65 |
{ |
5361 |
14 Jun 10 |
nicklas |
66 |
server = FileServer.getById(dc, itemId); |
5361 |
14 Jun 10 |
nicklas |
67 |
server.checkPermission(Permission.WRITE); |
5361 |
14 Jun 10 |
nicklas |
68 |
cc.setObject("item", server); |
5361 |
14 Jun 10 |
nicklas |
69 |
title = "Edit file server -- " + HTML.encodeTags(server.getName()); |
5361 |
14 Jun 10 |
nicklas |
70 |
} |
6308 |
20 Aug 13 |
nicklas |
71 |
|
5501 |
18 Nov 10 |
nicklas |
72 |
JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, GuiContext.item(itemType), server); |
7604 |
25 Feb 19 |
nicklas |
73 |
ExtensionsInvoker<TabAction> invoker = EditUtil.useEditExtensions(jspContext); |
5599 |
31 Mar 11 |
nicklas |
74 |
List<ConnectionManagerFactory> cmFactories = ConnectionManagerUtil.getFactories(); |
5361 |
14 Jun 10 |
nicklas |
75 |
%> |
6308 |
20 Aug 13 |
nicklas |
76 |
<base:page type="popup" title="<%=title%>" id="edit-page"> |
6308 |
20 Aug 13 |
nicklas |
77 |
<base:head scripts="tabcontrol-2.js,~fileservers.js" styles="tabcontrol.css"> |
5501 |
18 Nov 10 |
nicklas |
78 |
<ext:scripts context="<%=jspContext%>" /> |
5501 |
18 Nov 10 |
nicklas |
79 |
<ext:stylesheets context="<%=jspContext%>" /> |
5361 |
14 Jun 10 |
nicklas |
80 |
</base:head> |
6308 |
20 Aug 13 |
nicklas |
81 |
<base:body> |
5908 |
13 Dec 11 |
nicklas |
82 |
<h1><%=title%> <base:help tabcontrol="settings"/></h1> |
5908 |
13 Dec 11 |
nicklas |
83 |
|
6162 |
10 Oct 12 |
nicklas |
84 |
<form action="index.jsp?ID=<%=ID%>&cmd=UpdateItem" method="post" name="server" enctype="multipart/form-data"> |
5361 |
14 Jun 10 |
nicklas |
85 |
|
5908 |
13 Dec 11 |
nicklas |
86 |
<t:tabcontrol id="settings" |
5908 |
13 Dec 11 |
nicklas |
87 |
subclass="content dialogtabcontrol" |
5501 |
18 Nov 10 |
nicklas |
88 |
position="bottom" remember="<%=server != null%>" |
5501 |
18 Nov 10 |
nicklas |
89 |
extensions="<%=invoker%>"> |
6308 |
20 Aug 13 |
nicklas |
90 |
<t:tab id="info" title="File server" helpid="fileserver.edit"> |
7479 |
16 Apr 18 |
nicklas |
91 |
<table class="fullform input100 larger"> |
5361 |
14 Jun 10 |
nicklas |
92 |
<tr> |
5908 |
13 Dec 11 |
nicklas |
93 |
<th>Name</th> |
6308 |
20 Aug 13 |
nicklas |
94 |
<td><input class="text required auto-init" |
6308 |
20 Aug 13 |
nicklas |
95 |
data-auto-init="<%=server == null ? "focus-select" : "focus" %>" |
6308 |
20 Aug 13 |
nicklas |
96 |
type="text" name="name" |
5361 |
14 Jun 10 |
nicklas |
97 |
value="<%=HTML.encodeTags(server == null ? Values.getString(cc.getPropertyValue("name"), "New file server") : server.getName())%>" |
5908 |
13 Dec 11 |
nicklas |
98 |
maxlength="<%=FileServer.MAX_NAME_LENGTH%>"></td> |
5908 |
13 Dec 11 |
nicklas |
99 |
<td></td> |
5361 |
14 Jun 10 |
nicklas |
100 |
</tr> |
5361 |
14 Jun 10 |
nicklas |
101 |
<tr> |
5908 |
13 Dec 11 |
nicklas |
102 |
<th>Connection manager</th> |
5599 |
31 Mar 11 |
nicklas |
103 |
<td> |
6308 |
20 Aug 13 |
nicklas |
104 |
<select name="connectionManager" id="connectionManager"> |
5599 |
31 Mar 11 |
nicklas |
105 |
<option value="">- auto - |
5599 |
31 Mar 11 |
nicklas |
106 |
<% |
5599 |
31 Mar 11 |
nicklas |
107 |
String currentFactoryId = server == null ? cc.getPropertyValue("connectionManagerFactory") : server.getConnectionManagerFactoryId(); |
5599 |
31 Mar 11 |
nicklas |
108 |
for (ConnectionManagerFactory cmf : cmFactories) |
5599 |
31 Mar 11 |
nicklas |
109 |
{ |
5599 |
31 Mar 11 |
nicklas |
110 |
String cmfId = cmf.getId(); |
5599 |
31 Mar 11 |
nicklas |
111 |
String selected = cmfId.equals(currentFactoryId) ? "selected" : ""; |
5599 |
31 Mar 11 |
nicklas |
112 |
%> |
5599 |
31 Mar 11 |
nicklas |
113 |
<option value="<%=cmf.getId()%>" <%=selected%>><%=HTML.encodeTags(cmf.getDisplayName())%><%=cmf.useAutoDetection() ? " (•)" : "" %> |
5599 |
31 Mar 11 |
nicklas |
114 |
<% |
5599 |
31 Mar 11 |
nicklas |
115 |
} |
5599 |
31 Mar 11 |
nicklas |
116 |
%> |
5599 |
31 Mar 11 |
nicklas |
117 |
</select> |
5599 |
31 Mar 11 |
nicklas |
118 |
</td> |
5908 |
13 Dec 11 |
nicklas |
119 |
<td></td> |
5599 |
31 Mar 11 |
nicklas |
120 |
</tr> |
5599 |
31 Mar 11 |
nicklas |
121 |
<tr> |
5908 |
13 Dec 11 |
nicklas |
122 |
<th class="subprompt"></th> |
5599 |
31 Mar 11 |
nicklas |
123 |
<td> |
5921 |
10 Jan 12 |
nicklas |
124 |
<div class="messagecontainer help" style="margin: 0.5em 0px 0.5em 0px; height: <%=(int)(scale*70)%>px; overflow: auto;"> |
5599 |
31 Mar 11 |
nicklas |
125 |
<div id="cmf.auto.description" style="display: none;"> |
5599 |
31 Mar 11 |
nicklas |
126 |
Automatically select a connection manager among those |
5599 |
31 Mar 11 |
nicklas |
127 |
that supports auto-detection. |
5599 |
31 Mar 11 |
nicklas |
128 |
</div> |
5599 |
31 Mar 11 |
nicklas |
129 |
<% |
5599 |
31 Mar 11 |
nicklas |
130 |
for (ConnectionManagerFactory cmf : cmFactories) |
5599 |
31 Mar 11 |
nicklas |
131 |
{ |
5599 |
31 Mar 11 |
nicklas |
132 |
String cmfId = cmf.getId(); |
5599 |
31 Mar 11 |
nicklas |
133 |
%> |
5599 |
31 Mar 11 |
nicklas |
134 |
<div id="cmf.<%=cmfId%>.description" style="display: none;"> |
5599 |
31 Mar 11 |
nicklas |
135 |
<%=HTML.encodeTags(cmf.getDescription())%> |
5599 |
31 Mar 11 |
nicklas |
136 |
</div> |
5599 |
31 Mar 11 |
nicklas |
137 |
<% |
5599 |
31 Mar 11 |
nicklas |
138 |
} |
5599 |
31 Mar 11 |
nicklas |
139 |
%> |
5599 |
31 Mar 11 |
nicklas |
140 |
</div> |
5599 |
31 Mar 11 |
nicklas |
141 |
</td> |
5908 |
13 Dec 11 |
nicklas |
142 |
<td></td> |
5599 |
31 Mar 11 |
nicklas |
143 |
</tr> |
5599 |
31 Mar 11 |
nicklas |
144 |
<tr> |
5908 |
13 Dec 11 |
nicklas |
145 |
<th>Host</th> |
6217 |
14 Dec 12 |
nicklas |
146 |
<td><input class="text" type="text" name="host" |
5618 |
28 Apr 11 |
nicklas |
147 |
value="<%=HTML.encodeTags(server == null ? Values.getString(cc.getPropertyValue("host")) : server.getHost())%>" |
5908 |
13 Dec 11 |
nicklas |
148 |
maxlength="<%=FileServer.MAX_HOST_LENGTH%>"></td> |
5908 |
13 Dec 11 |
nicklas |
149 |
<td></td> |
5618 |
28 Apr 11 |
nicklas |
150 |
</tr> |
5618 |
28 Apr 11 |
nicklas |
151 |
<tr> |
5908 |
13 Dec 11 |
nicklas |
152 |
<th>Username</th> |
6217 |
14 Dec 12 |
nicklas |
153 |
<td><input class="text" type="text" name="username" |
5361 |
14 Jun 10 |
nicklas |
154 |
value="<%=HTML.encodeTags(server == null ? Values.getString(cc.getPropertyValue("username")) : server.getUsername())%>" |
5908 |
13 Dec 11 |
nicklas |
155 |
maxlength="<%=FileServer.MAX_USERNAME_LENGTH%>"></td> |
5908 |
13 Dec 11 |
nicklas |
156 |
<td></td> |
5361 |
14 Jun 10 |
nicklas |
157 |
</tr> |
5361 |
14 Jun 10 |
nicklas |
158 |
<tr> |
5908 |
13 Dec 11 |
nicklas |
159 |
<th>Password</th> |
6217 |
14 Dec 12 |
nicklas |
160 |
<td><input class="text" type="password" name="password" |
5908 |
13 Dec 11 |
nicklas |
161 |
value="" maxlength="<%=FileServer.MAX_PASSWORD_LENGTH%>" placeholder="leave empty to keep the password"></td> |
5908 |
13 Dec 11 |
nicklas |
162 |
<td></td> |
5361 |
14 Jun 10 |
nicklas |
163 |
</tr> |
6497 |
26 Jun 14 |
nicklas |
164 |
<tr> |
6497 |
26 Jun 14 |
nicklas |
165 |
<th>Root path</th> |
6497 |
26 Jun 14 |
nicklas |
166 |
<td><input class="text" type="text" name="rootPath" |
6497 |
26 Jun 14 |
nicklas |
167 |
value="<%=HTML.encodeTags(server == null ? Values.getString(cc.getPropertyValue("rootPath")) : server.getRootPath())%>" |
6497 |
26 Jun 14 |
nicklas |
168 |
maxlength="<%=FileServer.MAX_ROOT_PATH_LENGTH%>"></td> |
6497 |
26 Jun 14 |
nicklas |
169 |
<td></td> |
6497 |
26 Jun 14 |
nicklas |
170 |
</tr> |
5908 |
13 Dec 11 |
nicklas |
171 |
<tr class="dynamic"> |
5908 |
13 Dec 11 |
nicklas |
172 |
<th>Description</th> |
5908 |
13 Dec 11 |
nicklas |
173 |
<td> |
6217 |
14 Dec 12 |
nicklas |
174 |
<textarea class="text" rows="4" cols="40" name="description" id="description" |
5361 |
14 Jun 10 |
nicklas |
175 |
><%=HTML.encodeTags(server == null ? cc.getPropertyValue("description") : server.getDescription())%></textarea> |
5361 |
14 Jun 10 |
nicklas |
176 |
</td> |
5909 |
14 Dec 11 |
nicklas |
177 |
<td style="width: 20px;"> |
6215 |
13 Dec 12 |
nicklas |
178 |
<base:zoom textarea="description" title="Description" /> |
5908 |
13 Dec 11 |
nicklas |
179 |
</td> |
5361 |
14 Jun 10 |
nicklas |
180 |
</tr> |
5361 |
14 Jun 10 |
nicklas |
181 |
</table> |
5361 |
14 Jun 10 |
nicklas |
182 |
</t:tab> |
7479 |
16 Apr 18 |
nicklas |
183 |
<t:tab id="httpsOptions" title="HTTPS options" |
5362 |
16 Jun 10 |
nicklas |
184 |
helpid="fileserver.edit"> |
5362 |
16 Jun 10 |
nicklas |
185 |
|
7479 |
16 Apr 18 |
nicklas |
186 |
<table class="fullform input100 larger"> |
5908 |
13 Dec 11 |
nicklas |
187 |
<tr class="big"> |
5908 |
13 Dec 11 |
nicklas |
188 |
<th>Server certificate</th> |
5362 |
16 Jun 10 |
nicklas |
189 |
<td> |
6217 |
14 Dec 12 |
nicklas |
190 |
<input class="text" type="file" name="server_certificate" size="40"><br> |
5812 |
17 Oct 11 |
nicklas |
191 |
<input type="checkbox" name="remove_server_certificate" id="removeServerCertificate" value="1" |
6308 |
20 Aug 13 |
nicklas |
192 |
><label for="removeServerCertificate">Remove existing server certificate</label> |
6308 |
20 Aug 13 |
nicklas |
193 |
|
6308 |
20 Aug 13 |
nicklas |
194 |
<div class="messagecontainer help"> |
6308 |
20 Aug 13 |
nicklas |
195 |
A <b>server certificate</b> may be needed to access files with https on servers that |
6308 |
20 Aug 13 |
nicklas |
196 |
use self-signed certificates. You may select a file containing the server's X.509 certificate |
6308 |
20 Aug 13 |
nicklas |
197 |
in either binary or base64-encoded DER format. |
6308 |
20 Aug 13 |
nicklas |
198 |
</div> |
5362 |
16 Jun 10 |
nicklas |
199 |
</td> |
5362 |
16 Jun 10 |
nicklas |
200 |
</tr> |
5908 |
13 Dec 11 |
nicklas |
201 |
<tr> |
5908 |
13 Dec 11 |
nicklas |
202 |
<th>Client certificate</th> |
5908 |
13 Dec 11 |
nicklas |
203 |
<td> |
6217 |
14 Dec 12 |
nicklas |
204 |
<input class="text" type="file" name="client_certificate" size="40"> |
5908 |
13 Dec 11 |
nicklas |
205 |
</td> |
5362 |
16 Jun 10 |
nicklas |
206 |
</tr> |
5362 |
16 Jun 10 |
nicklas |
207 |
<tr> |
5908 |
13 Dec 11 |
nicklas |
208 |
<th class="subprompt">Password</th> |
5362 |
16 Jun 10 |
nicklas |
209 |
<td> |
6217 |
14 Dec 12 |
nicklas |
210 |
<input class="text" type="password" name="client_certificate_password"> |
5908 |
13 Dec 11 |
nicklas |
211 |
</td> |
5908 |
13 Dec 11 |
nicklas |
212 |
</tr> |
7472 |
10 Apr 18 |
nicklas |
213 |
<tr class="dynamic"> |
5908 |
13 Dec 11 |
nicklas |
214 |
<th class="subprompt"></th> |
5908 |
13 Dec 11 |
nicklas |
215 |
<td> |
5812 |
17 Oct 11 |
nicklas |
216 |
<input type="checkbox" name="remove_client_certificate" id="removeClientCertificate" value="1" |
6308 |
20 Aug 13 |
nicklas |
217 |
><label for="removeClientCertificate">Remove existing client certificate</label> |
6308 |
20 Aug 13 |
nicklas |
218 |
|
6308 |
20 Aug 13 |
nicklas |
219 |
<div class="messagecontainer help"> |
6308 |
20 Aug 13 |
nicklas |
220 |
A <b>client certificate</b> may be needed to access files with https on servers |
6308 |
20 Aug 13 |
nicklas |
221 |
that require client authentication using certificates. You should select a file |
6308 |
20 Aug 13 |
nicklas |
222 |
containing your key in PKCS #12 format. If the file is password-protected you must |
6308 |
20 Aug 13 |
nicklas |
223 |
enter the password as well. |
6308 |
20 Aug 13 |
nicklas |
224 |
</div> |
5908 |
13 Dec 11 |
nicklas |
225 |
</td> |
5908 |
13 Dec 11 |
nicklas |
226 |
</tr> |
7472 |
10 Apr 18 |
nicklas |
227 |
</table> |
7472 |
10 Apr 18 |
nicklas |
228 |
</t:tab> |
7472 |
10 Apr 18 |
nicklas |
229 |
<t:tab id="sshOptions" title="SSH options" |
7472 |
10 Apr 18 |
nicklas |
230 |
helpid="fileserver.edit"> |
7479 |
16 Apr 18 |
nicklas |
231 |
<table class="fullform input100 larger"> |
6497 |
26 Jun 14 |
nicklas |
232 |
<tr> |
6497 |
26 Jun 14 |
nicklas |
233 |
<th>SSH fingerprint</th> |
6497 |
26 Jun 14 |
nicklas |
234 |
<td><input class="text" type="text" name="sshFingerprint" |
6497 |
26 Jun 14 |
nicklas |
235 |
value="<%=HTML.encodeTags(server == null ? Values.getString(cc.getPropertyValue("sshFingerprint")) : server.getSshFingerprint())%>" |
7333 |
11 Apr 17 |
nicklas |
236 |
maxlength="<%=FileServer.FINGERPRINT_LENGTH%>"> |
7333 |
11 Apr 17 |
nicklas |
237 |
</td> |
6497 |
26 Jun 14 |
nicklas |
238 |
</tr> |
7472 |
10 Apr 18 |
nicklas |
239 |
<tr> |
7333 |
11 Apr 17 |
nicklas |
240 |
<th class="subprompt">(MD5 or SHA-256)</th> |
6497 |
26 Jun 14 |
nicklas |
241 |
<td> |
6497 |
26 Jun 14 |
nicklas |
242 |
<div class="messagecontainer help"> |
6497 |
26 Jun 14 |
nicklas |
243 |
A <b>fingerprint</b> is needed to access the server with SSH. The fingerprint is |
7333 |
11 Apr 17 |
nicklas |
244 |
a MD5 or SHA-256 hash of the public key. MD5 is typically formatted as pairs of |
7333 |
11 Apr 17 |
nicklas |
245 |
heaxdecimal numbers with colon separator while SHA-256 is Base64-encoded. |
6497 |
26 Jun 14 |
nicklas |
246 |
</div> |
6497 |
26 Jun 14 |
nicklas |
247 |
</td> |
6497 |
26 Jun 14 |
nicklas |
248 |
</tr> |
7472 |
10 Apr 18 |
nicklas |
249 |
<tr> |
7472 |
10 Apr 18 |
nicklas |
250 |
<th>SSH private key</th> |
7472 |
10 Apr 18 |
nicklas |
251 |
<td> |
7472 |
10 Apr 18 |
nicklas |
252 |
<input class="text" type="file" name="ssh_private_key" size="40"> |
7472 |
10 Apr 18 |
nicklas |
253 |
</td> |
7472 |
10 Apr 18 |
nicklas |
254 |
</tr> |
7472 |
10 Apr 18 |
nicklas |
255 |
<tr> |
7472 |
10 Apr 18 |
nicklas |
256 |
<th class="subprompt">Format</th> |
7472 |
10 Apr 18 |
nicklas |
257 |
<td> |
7472 |
10 Apr 18 |
nicklas |
258 |
<% |
7472 |
10 Apr 18 |
nicklas |
259 |
String currentFormat = server == null ? cc.getPropertyValue("sshPrivateKeyFormat") : server.getSshPrivateKeyFormat(); |
7472 |
10 Apr 18 |
nicklas |
260 |
String[] formats = { "OpenSSH", "OpenSSHv1", "PuTTY", "PKCS5", "PKCS8" }; |
7472 |
10 Apr 18 |
nicklas |
261 |
%> |
7472 |
10 Apr 18 |
nicklas |
262 |
<select name="ssh_private_key_format"> |
7472 |
10 Apr 18 |
nicklas |
263 |
<option value="">- auto - |
7472 |
10 Apr 18 |
nicklas |
264 |
<% |
7472 |
10 Apr 18 |
nicklas |
265 |
for (String f : formats) |
7472 |
10 Apr 18 |
nicklas |
266 |
{ |
7472 |
10 Apr 18 |
nicklas |
267 |
%> |
7472 |
10 Apr 18 |
nicklas |
268 |
<option value="<%=f%>" <%=f.equals(currentFormat) ? "selected" : "" %>><%=f%> |
7472 |
10 Apr 18 |
nicklas |
269 |
<% |
7472 |
10 Apr 18 |
nicklas |
270 |
} |
7472 |
10 Apr 18 |
nicklas |
271 |
%> |
7472 |
10 Apr 18 |
nicklas |
272 |
</select> |
7472 |
10 Apr 18 |
nicklas |
273 |
</td> |
7472 |
10 Apr 18 |
nicklas |
274 |
<td></td> |
7472 |
10 Apr 18 |
nicklas |
275 |
</tr> |
7472 |
10 Apr 18 |
nicklas |
276 |
<tr> |
7472 |
10 Apr 18 |
nicklas |
277 |
<th class="subprompt">Password</th> |
7472 |
10 Apr 18 |
nicklas |
278 |
<td> |
7472 |
10 Apr 18 |
nicklas |
279 |
<input class="text" type="password" name="ssh_private_key_password"> |
7472 |
10 Apr 18 |
nicklas |
280 |
</td> |
7472 |
10 Apr 18 |
nicklas |
281 |
</tr> |
7472 |
10 Apr 18 |
nicklas |
282 |
<tr class="dynamic"> |
7472 |
10 Apr 18 |
nicklas |
283 |
<th class="subprompt"></th> |
7472 |
10 Apr 18 |
nicklas |
284 |
<td> |
7472 |
10 Apr 18 |
nicklas |
285 |
<input type="checkbox" name="remove_ssh_private_key" id="removeSshPrivateKey" value="1" |
7472 |
10 Apr 18 |
nicklas |
286 |
><label for="removeSshPrivateKey">Remove existing private key</label> |
7472 |
10 Apr 18 |
nicklas |
287 |
|
7472 |
10 Apr 18 |
nicklas |
288 |
<div class="messagecontainer help"> |
7472 |
10 Apr 18 |
nicklas |
289 |
A <b>private key</b> can be used instead of a password to connect to a server. |
7472 |
10 Apr 18 |
nicklas |
290 |
|
7472 |
10 Apr 18 |
nicklas |
291 |
If the file is password-protected you must enter the password as well. |
7472 |
10 Apr 18 |
nicklas |
292 |
</div> |
7472 |
10 Apr 18 |
nicklas |
293 |
</td> |
7472 |
10 Apr 18 |
nicklas |
294 |
</tr> |
7472 |
10 Apr 18 |
nicklas |
295 |
|
5362 |
16 Jun 10 |
nicklas |
296 |
</table> |
5362 |
16 Jun 10 |
nicklas |
297 |
|
5362 |
16 Jun 10 |
nicklas |
298 |
</t:tab> |
8160 |
07 Jun 23 |
nicklas |
299 |
<t:tab id="annotations" title="Annotations" helpid="annotations.edit"> |
8160 |
07 Jun 23 |
nicklas |
300 |
<jsp:include page="../../common/annotations/annotate_frameset.jsp"> |
8160 |
07 Jun 23 |
nicklas |
301 |
<jsp:param name="item_type" value="<%=itemType.name()%>" /> |
8160 |
07 Jun 23 |
nicklas |
302 |
<jsp:param name="item_id" value="<%=itemId%>" /> |
8160 |
07 Jun 23 |
nicklas |
303 |
<jsp:param name="ID" value="<%=ID%>" /> |
8160 |
07 Jun 23 |
nicklas |
304 |
</jsp:include> |
8160 |
07 Jun 23 |
nicklas |
305 |
</t:tab> |
5361 |
14 Jun 10 |
nicklas |
306 |
</t:tabcontrol> |
5908 |
13 Dec 11 |
nicklas |
307 |
</form> |
5361 |
14 Jun 10 |
nicklas |
308 |
|
5908 |
13 Dec 11 |
nicklas |
309 |
<div class="legend"> |
5908 |
13 Dec 11 |
nicklas |
310 |
• = supports auto-detection<br> |
5946 |
03 Feb 12 |
nicklas |
311 |
<base:icon image="required.png" />= required information |
5908 |
13 Dec 11 |
nicklas |
312 |
</div> |
5908 |
13 Dec 11 |
nicklas |
313 |
|
5908 |
13 Dec 11 |
nicklas |
314 |
<base:buttongroup subclass="dialogbuttons"> |
6308 |
20 Aug 13 |
nicklas |
315 |
<base:button id="btnSave" title="Save" />> |
6308 |
20 Aug 13 |
nicklas |
316 |
<base:button id="close" title="Cancel" /> |
5908 |
13 Dec 11 |
nicklas |
317 |
</base:buttongroup> |
5361 |
14 Jun 10 |
nicklas |
318 |
</base:body> |
5361 |
14 Jun 10 |
nicklas |
319 |
</base:page> |
5361 |
14 Jun 10 |
nicklas |
320 |
<% |
5361 |
14 Jun 10 |
nicklas |
321 |
} |
5361 |
14 Jun 10 |
nicklas |
322 |
finally |
5361 |
14 Jun 10 |
nicklas |
323 |
{ |
5361 |
14 Jun 10 |
nicklas |
324 |
if (dc != null) dc.close(); |
5361 |
14 Jun 10 |
nicklas |
325 |
} |
5361 |
14 Jun 10 |
nicklas |
326 |
%> |