5616 |
27 Apr 11 |
nicklas |
1 |
<%-- $Id:manual_scan.jsp 4187 2008-03-20 11:15:25Z nicklas $ |
5616 |
27 Apr 11 |
nicklas |
2 |
------------------------------------------------------------------ |
5616 |
27 Apr 11 |
nicklas |
Copyright (C) 2005 Nicklas Nordborg |
5616 |
27 Apr 11 |
nicklas |
Copyright (C) 2006 Jari Häkkinen, Nicklas Nordborg |
5616 |
27 Apr 11 |
nicklas |
Copyright (C) 2007 Martin Svensson |
5616 |
27 Apr 11 |
nicklas |
6 |
|
5616 |
27 Apr 11 |
nicklas |
7 |
This file is part of BASE - BioArray Software Environment. |
5616 |
27 Apr 11 |
nicklas |
8 |
Available at http://base.thep.lu.se/ |
5616 |
27 Apr 11 |
nicklas |
9 |
|
5616 |
27 Apr 11 |
nicklas |
10 |
BASE is free software; you can redistribute it and/or |
5616 |
27 Apr 11 |
nicklas |
11 |
modify it under the terms of the GNU General Public License |
5616 |
27 Apr 11 |
nicklas |
12 |
as published by the Free Software Foundation; either version 3 |
5616 |
27 Apr 11 |
nicklas |
13 |
of the License, or (at your option) any later version. |
5616 |
27 Apr 11 |
nicklas |
14 |
|
5616 |
27 Apr 11 |
nicklas |
15 |
BASE is distributed in the hope that it will be useful, |
5616 |
27 Apr 11 |
nicklas |
16 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
5616 |
27 Apr 11 |
nicklas |
17 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
5616 |
27 Apr 11 |
nicklas |
18 |
GNU General Public License for more details. |
5616 |
27 Apr 11 |
nicklas |
19 |
|
5616 |
27 Apr 11 |
nicklas |
20 |
You should have received a copy of the GNU General Public License |
5616 |
27 Apr 11 |
nicklas |
21 |
along with BASE. If not, see <http://www.gnu.org/licenses/>. |
5616 |
27 Apr 11 |
nicklas |
22 |
------------------------------------------------------------------ |
5616 |
27 Apr 11 |
nicklas |
23 |
|
5616 |
27 Apr 11 |
nicklas |
24 |
@author Nicklas |
5616 |
27 Apr 11 |
nicklas |
25 |
@version 2.0 |
5616 |
27 Apr 11 |
nicklas |
26 |
--%> |
5616 |
27 Apr 11 |
nicklas |
27 |
<%@ page pageEncoding="UTF-8" session="false" |
5616 |
27 Apr 11 |
nicklas |
28 |
import="net.sf.basedb.core.Application" |
5616 |
27 Apr 11 |
nicklas |
29 |
import="net.sf.basedb.core.SessionControl" |
5616 |
27 Apr 11 |
nicklas |
30 |
import="net.sf.basedb.core.DbControl" |
5616 |
27 Apr 11 |
nicklas |
31 |
import="net.sf.basedb.core.Item" |
5616 |
27 Apr 11 |
nicklas |
32 |
import="net.sf.basedb.core.Permission" |
5616 |
27 Apr 11 |
nicklas |
33 |
import="net.sf.basedb.core.plugin.About" |
5616 |
27 Apr 11 |
nicklas |
34 |
import="net.sf.basedb.clients.web.Base" |
5616 |
27 Apr 11 |
nicklas |
35 |
import="net.sf.basedb.clients.web.WebException" |
5616 |
27 Apr 11 |
nicklas |
36 |
import="net.sf.basedb.util.Values" |
5616 |
27 Apr 11 |
nicklas |
37 |
import="net.sf.basedb.clients.web.util.HTML" |
7233 |
17 Nov 16 |
nicklas |
38 |
import="net.sf.basedb.util.formatter.Formatter" |
5616 |
27 Apr 11 |
nicklas |
39 |
import="net.sf.basedb.util.extensions.ExtensionPoint" |
5616 |
27 Apr 11 |
nicklas |
40 |
import="net.sf.basedb.util.extensions.Extension" |
7232 |
17 Nov 16 |
nicklas |
41 |
import="net.sf.basedb.util.extensions.ExtendedAbout" |
5616 |
27 Apr 11 |
nicklas |
42 |
import="net.sf.basedb.util.extensions.manager.ExtensionsManager" |
5616 |
27 Apr 11 |
nicklas |
43 |
import="net.sf.basedb.util.extensions.manager.ExtensionsFile" |
5616 |
27 Apr 11 |
nicklas |
44 |
import="net.sf.basedb.clients.web.extensions.ExtensionsControl" |
7232 |
17 Nov 16 |
nicklas |
45 |
import="net.sf.basedb.clients.web.extensions.UnsafeScriptable" |
7233 |
17 Nov 16 |
nicklas |
46 |
import="net.sf.basedb.clients.web.formatter.FormatterFactory" |
7232 |
17 Nov 16 |
nicklas |
47 |
import="net.sf.basedb.clients.web.servlet.ContentSecurityPolicyFilter" |
5616 |
27 Apr 11 |
nicklas |
48 |
import="java.util.List" |
8032 |
01 Feb 22 |
nicklas |
49 |
import="java.util.Comparator" |
8032 |
01 Feb 22 |
nicklas |
50 |
import="java.util.Collections" |
7564 |
08 Jan 19 |
nicklas |
51 |
import="java.util.Date" |
7233 |
17 Nov 16 |
nicklas |
52 |
import="java.io.File" |
7564 |
08 Jan 19 |
nicklas |
53 |
import="java.io.FileNotFoundException" |
5616 |
27 Apr 11 |
nicklas |
54 |
%> |
5616 |
27 Apr 11 |
nicklas |
55 |
<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %> |
5616 |
27 Apr 11 |
nicklas |
56 |
<%@ taglib prefix="tbl" uri="/WEB-INF/table.tld" %> |
5616 |
27 Apr 11 |
nicklas |
57 |
<% |
5616 |
27 Apr 11 |
nicklas |
58 |
final SessionControl sc = Base.getExistingSessionControl(pageContext, true); |
5616 |
27 Apr 11 |
nicklas |
59 |
final String ID = sc.getId(); |
5616 |
27 Apr 11 |
nicklas |
60 |
final float scale = Base.getScale(sc); |
5616 |
27 Apr 11 |
nicklas |
61 |
DbControl dc = null; |
5616 |
27 Apr 11 |
nicklas |
62 |
try |
5616 |
27 Apr 11 |
nicklas |
63 |
{ |
7233 |
17 Nov 16 |
nicklas |
64 |
Formatter<Date> dateFormatter = FormatterFactory.getDateTimeFormatter(sc); |
7233 |
17 Nov 16 |
nicklas |
65 |
|
7954 |
12 May 21 |
nicklas |
66 |
dc = sc.newDbControl(":Extensions installation wizard"); |
5616 |
27 Apr 11 |
nicklas |
67 |
ExtensionsControl ec = ExtensionsControl.get(dc); |
5616 |
27 Apr 11 |
nicklas |
68 |
ec.checkPermission(Permission.WRITE); |
5616 |
27 Apr 11 |
nicklas |
69 |
ec.scanForChanges(); |
5616 |
27 Apr 11 |
nicklas |
70 |
List<ExtensionsFile> xtFiles = ec.getFiles(); |
8032 |
01 Feb 22 |
nicklas |
71 |
|
8032 |
01 Feb 22 |
nicklas |
72 |
// Re-order extensions |
8032 |
01 Feb 22 |
nicklas |
73 |
Collections.sort(xtFiles, |
8032 |
01 Feb 22 |
nicklas |
74 |
new Comparator<ExtensionsFile>() |
8032 |
01 Feb 22 |
nicklas |
75 |
{ |
8032 |
01 Feb 22 |
nicklas |
76 |
public int compare(ExtensionsFile f1, ExtensionsFile f2) |
8032 |
01 Feb 22 |
nicklas |
77 |
{ |
8032 |
01 Feb 22 |
nicklas |
78 |
// Sort new or modified extensions first... |
8032 |
01 Feb 22 |
nicklas |
79 |
boolean p1 = f1.isNew() || f1.wasModified(); |
8032 |
01 Feb 22 |
nicklas |
80 |
boolean p2 = f2.isNew() || f2.wasModified(); |
8032 |
01 Feb 22 |
nicklas |
81 |
if (p1 != p2) return p1 ? -1 : 1; |
8032 |
01 Feb 22 |
nicklas |
82 |
|
8032 |
01 Feb 22 |
nicklas |
83 |
// ...then deleted and invalid extensions... |
8032 |
01 Feb 22 |
nicklas |
84 |
p1 = f1.hasError() || !f1.exists() || !f1.isValid(); |
8032 |
01 Feb 22 |
nicklas |
85 |
p2 = f2.hasError() || !f2.exists() || !f2.isValid(); |
8032 |
01 Feb 22 |
nicklas |
86 |
if (p1 != p2) return p1 ? -1 : 1; |
8032 |
01 Feb 22 |
nicklas |
87 |
|
8032 |
01 Feb 22 |
nicklas |
88 |
// ...and finally all other extensions |
8032 |
01 Feb 22 |
nicklas |
89 |
return f1.getName().compareTo(f2.getName()); |
8032 |
01 Feb 22 |
nicklas |
90 |
} |
8032 |
01 Feb 22 |
nicklas |
91 |
}); |
8032 |
01 Feb 22 |
nicklas |
92 |
|
7233 |
17 Nov 16 |
nicklas |
93 |
List<File> ignoredFiles = ec.getIgnoredFiles(); |
5616 |
27 Apr 11 |
nicklas |
94 |
%> |
5616 |
27 Apr 11 |
nicklas |
95 |
<base:page type="popup" title="Extensions and plug-ins installation wizard"> |
7233 |
17 Nov 16 |
nicklas |
96 |
<base:head scripts="table.js,~wizard.js" styles="table.css"> |
7233 |
17 Nov 16 |
nicklas |
97 |
<style> |
7943 |
04 May 21 |
nicklas |
98 |
#ignored-header td |
7233 |
17 Nov 16 |
nicklas |
99 |
{ |
7233 |
17 Nov 16 |
nicklas |
100 |
font-weight: bold; |
7233 |
17 Nov 16 |
nicklas |
101 |
border-top-style: solid; |
7233 |
17 Nov 16 |
nicklas |
102 |
border-bottom-style: solid; |
7233 |
17 Nov 16 |
nicklas |
103 |
border-top-width: 1px; |
7233 |
17 Nov 16 |
nicklas |
104 |
border-bottom-width: 1px; |
7943 |
04 May 21 |
nicklas |
105 |
border-top-color: inherit; |
7943 |
04 May 21 |
nicklas |
106 |
border-bottom-color: inherit; |
7233 |
17 Nov 16 |
nicklas |
107 |
padding: 1px 2px; |
7233 |
17 Nov 16 |
nicklas |
108 |
} |
7233 |
17 Nov 16 |
nicklas |
109 |
.ignored-file td |
7233 |
17 Nov 16 |
nicklas |
110 |
{ |
8032 |
01 Feb 22 |
nicklas |
111 |
color: #666666; |
7233 |
17 Nov 16 |
nicklas |
112 |
} |
7233 |
17 Nov 16 |
nicklas |
113 |
</style> |
7233 |
17 Nov 16 |
nicklas |
114 |
</base:head> |
5616 |
27 Apr 11 |
nicklas |
115 |
<base:body> |
5918 |
21 Dec 11 |
nicklas |
116 |
<h1>Extensions and plug-ins installation wizard <base:help helpid="extensions.install-wizard" /></h1> |
5960 |
15 Feb 12 |
nicklas |
117 |
<div class="content"> |
7943 |
04 May 21 |
nicklas |
118 |
<tbl:table id="scan" subclass="fulltable" stickyheaders="<%=null%>" action="index.jsp" > |
5616 |
27 Apr 11 |
nicklas |
119 |
<tbl:columndef id="file" title="File" /> |
7233 |
17 Nov 16 |
nicklas |
120 |
<tbl:columndef id="status" title="Status" style="text-align: center;"/> |
7233 |
17 Nov 16 |
nicklas |
121 |
<tbl:columndef id="install" title="Install" style="text-align: center;"/> |
7233 |
17 Nov 16 |
nicklas |
122 |
<tbl:columndef id="uninstall" title="Uninstall" style="text-align: center;"/> |
7233 |
17 Nov 16 |
nicklas |
123 |
<tbl:columndef id="ignore" title="Ignore" style="text-align: center;" /> |
5616 |
27 Apr 11 |
nicklas |
124 |
<tbl:columndef id="about" title="About" /> |
5616 |
27 Apr 11 |
nicklas |
125 |
|
5949 |
08 Feb 12 |
nicklas |
126 |
<tbl:data style="top: 0px; margin-top: 0px;"> |
5949 |
08 Feb 12 |
nicklas |
127 |
<tbl:headers> |
5949 |
08 Feb 12 |
nicklas |
128 |
<tbl:headerrow> |
5949 |
08 Feb 12 |
nicklas |
129 |
<tbl:columnheaders /> |
5949 |
08 Feb 12 |
nicklas |
130 |
</tbl:headerrow> |
5949 |
08 Feb 12 |
nicklas |
131 |
</tbl:headers> |
5616 |
27 Apr 11 |
nicklas |
132 |
<tbl:rows> |
5616 |
27 Apr 11 |
nicklas |
133 |
<% |
5616 |
27 Apr 11 |
nicklas |
134 |
for (ExtensionsFile xtFile : xtFiles) |
5616 |
27 Apr 11 |
nicklas |
135 |
{ |
5616 |
27 Apr 11 |
nicklas |
136 |
if (xtFile.getFile() == null) continue; // We skip internal extensions/plug-ins files |
6986 |
19 Oct 15 |
nicklas |
137 |
List<Extension<?>> unsafeExtensions = ec.checkUnsafeScriptableUsage(xtFile); |
5616 |
27 Apr 11 |
nicklas |
138 |
|
6409 |
31 Jan 14 |
nicklas |
139 |
About about = xtFile.getAbout(); |
6409 |
31 Jan 14 |
nicklas |
140 |
ExtendedAbout xtAbout = about instanceof ExtendedAbout ? (ExtendedAbout)about : null; |
5616 |
27 Apr 11 |
nicklas |
141 |
Throwable error = null; |
5616 |
27 Apr 11 |
nicklas |
142 |
String name = xtFile.getName(); |
5616 |
27 Apr 11 |
nicklas |
143 |
String status = ""; |
5616 |
27 Apr 11 |
nicklas |
144 |
String icon = ""; |
5616 |
27 Apr 11 |
nicklas |
145 |
boolean allowInstall = false; |
5616 |
27 Apr 11 |
nicklas |
146 |
boolean allowUninstall = false; |
7232 |
17 Nov 16 |
nicklas |
147 |
boolean allowIgnore = false; |
5616 |
27 Apr 11 |
nicklas |
148 |
boolean checkInstall = false; |
5616 |
27 Apr 11 |
nicklas |
149 |
boolean checkUninstall = false; |
7232 |
17 Nov 16 |
nicklas |
150 |
boolean checkIgnore = false; |
5616 |
27 Apr 11 |
nicklas |
151 |
if (!xtFile.exists()) |
5616 |
27 Apr 11 |
nicklas |
152 |
{ |
5616 |
27 Apr 11 |
nicklas |
153 |
status = "Deleted"; |
5616 |
27 Apr 11 |
nicklas |
154 |
allowUninstall = true; |
5616 |
27 Apr 11 |
nicklas |
155 |
checkUninstall = true; |
7564 |
08 Jan 19 |
nicklas |
156 |
error = new FileNotFoundException(xtFile.getFile() + " doesn't exist or is not readable."); |
5616 |
27 Apr 11 |
nicklas |
157 |
} |
5616 |
27 Apr 11 |
nicklas |
158 |
else if (!xtFile.isValid()) |
5616 |
27 Apr 11 |
nicklas |
159 |
{ |
5616 |
27 Apr 11 |
nicklas |
160 |
status = "Invalid"; |
5616 |
27 Apr 11 |
nicklas |
161 |
error = xtFile.getValidationError(); |
5616 |
27 Apr 11 |
nicklas |
162 |
if (xtFile.isInstalled()) |
5616 |
27 Apr 11 |
nicklas |
163 |
{ |
5616 |
27 Apr 11 |
nicklas |
164 |
allowUninstall = true; |
5616 |
27 Apr 11 |
nicklas |
165 |
checkUninstall = true; |
5616 |
27 Apr 11 |
nicklas |
166 |
} |
7232 |
17 Nov 16 |
nicklas |
167 |
allowIgnore = true; |
7232 |
17 Nov 16 |
nicklas |
168 |
checkIgnore = true; |
5616 |
27 Apr 11 |
nicklas |
169 |
} |
5616 |
27 Apr 11 |
nicklas |
170 |
else if (xtFile.isNew()) |
5616 |
27 Apr 11 |
nicklas |
171 |
{ |
5616 |
27 Apr 11 |
nicklas |
172 |
status = "New"; |
5616 |
27 Apr 11 |
nicklas |
173 |
allowInstall = true; |
7232 |
17 Nov 16 |
nicklas |
174 |
allowIgnore = true; |
5616 |
27 Apr 11 |
nicklas |
175 |
checkInstall = true; |
5616 |
27 Apr 11 |
nicklas |
176 |
} |
7226 |
15 Nov 16 |
nicklas |
177 |
else if (xtFile.wasModified()) |
5616 |
27 Apr 11 |
nicklas |
178 |
{ |
5616 |
27 Apr 11 |
nicklas |
179 |
status = "Modified"; |
5616 |
27 Apr 11 |
nicklas |
180 |
allowInstall = true; |
5616 |
27 Apr 11 |
nicklas |
181 |
allowUninstall = true; |
7235 |
18 Nov 16 |
nicklas |
182 |
allowIgnore = true; |
5616 |
27 Apr 11 |
nicklas |
183 |
checkInstall = true; |
5616 |
27 Apr 11 |
nicklas |
184 |
} |
6372 |
06 Dec 13 |
nicklas |
185 |
else if (xtFile.hasError()) |
6372 |
06 Dec 13 |
nicklas |
186 |
{ |
6372 |
06 Dec 13 |
nicklas |
187 |
status = "Error"; |
6372 |
06 Dec 13 |
nicklas |
188 |
allowInstall = true; |
6372 |
06 Dec 13 |
nicklas |
189 |
allowUninstall = true; |
7232 |
17 Nov 16 |
nicklas |
190 |
allowIgnore = true; |
6372 |
06 Dec 13 |
nicklas |
191 |
} |
5616 |
27 Apr 11 |
nicklas |
192 |
else |
5616 |
27 Apr 11 |
nicklas |
193 |
{ |
5616 |
27 Apr 11 |
nicklas |
194 |
status = "Already installed"; |
5616 |
27 Apr 11 |
nicklas |
195 |
allowInstall = true; |
5616 |
27 Apr 11 |
nicklas |
196 |
allowUninstall = true; |
7232 |
17 Nov 16 |
nicklas |
197 |
allowIgnore = true; |
5616 |
27 Apr 11 |
nicklas |
198 |
} |
5616 |
27 Apr 11 |
nicklas |
199 |
%> |
5616 |
27 Apr 11 |
nicklas |
200 |
<tbl:row> |
7232 |
17 Nov 16 |
nicklas |
201 |
<tbl:cell column="file" style="white-space: nowrap;"><%=name%></tbl:cell> |
7234 |
17 Nov 16 |
nicklas |
202 |
<tbl:cell column="status" style="text-align: center;"><%=status%></tbl:cell> |
7233 |
17 Nov 16 |
nicklas |
203 |
<tbl:cell column="install" style="text-align: center;"> |
5616 |
27 Apr 11 |
nicklas |
204 |
<% |
5616 |
27 Apr 11 |
nicklas |
205 |
if (allowInstall) |
5616 |
27 Apr 11 |
nicklas |
206 |
{ |
5616 |
27 Apr 11 |
nicklas |
207 |
%> |
6259 |
25 Mar 13 |
nicklas |
208 |
<input type="checkbox" class="auto-init" data-auto-init="install" |
6259 |
25 Mar 13 |
nicklas |
209 |
name="<%=name%>.install" value="1" <%=checkInstall ? "checked" : "" %> |
6259 |
25 Mar 13 |
nicklas |
210 |
> |
5616 |
27 Apr 11 |
nicklas |
211 |
<% |
5616 |
27 Apr 11 |
nicklas |
212 |
} |
5616 |
27 Apr 11 |
nicklas |
213 |
%> |
5616 |
27 Apr 11 |
nicklas |
214 |
</tbl:cell> |
5616 |
27 Apr 11 |
nicklas |
215 |
<tbl:cell column="uninstall" style="text-align: center;"> |
5616 |
27 Apr 11 |
nicklas |
216 |
<% |
5616 |
27 Apr 11 |
nicklas |
217 |
if (allowUninstall) |
5616 |
27 Apr 11 |
nicklas |
218 |
{ |
5616 |
27 Apr 11 |
nicklas |
219 |
%> |
6259 |
25 Mar 13 |
nicklas |
220 |
<input type="checkbox" class="auto-init" data-auto-init="uninstall" |
6259 |
25 Mar 13 |
nicklas |
221 |
name="<%=name%>.uninstall" value="1" <%=checkUninstall ? "checked" : "" %> |
6259 |
25 Mar 13 |
nicklas |
222 |
> |
5616 |
27 Apr 11 |
nicklas |
223 |
<% |
5616 |
27 Apr 11 |
nicklas |
224 |
} |
5616 |
27 Apr 11 |
nicklas |
225 |
%> |
5616 |
27 Apr 11 |
nicklas |
226 |
</tbl:cell> |
7232 |
17 Nov 16 |
nicklas |
227 |
<tbl:cell column="ignore" style="text-align: center;"> |
7232 |
17 Nov 16 |
nicklas |
228 |
<% |
7232 |
17 Nov 16 |
nicklas |
229 |
if (allowIgnore) |
7232 |
17 Nov 16 |
nicklas |
230 |
{ |
7232 |
17 Nov 16 |
nicklas |
231 |
%> |
7232 |
17 Nov 16 |
nicklas |
232 |
<input type="checkbox" class="auto-init" data-auto-init="ignore" |
7232 |
17 Nov 16 |
nicklas |
233 |
name="<%=name%>.ignore" value="1" <%=checkIgnore ? "checked" : "" %> |
7232 |
17 Nov 16 |
nicklas |
234 |
> |
7232 |
17 Nov 16 |
nicklas |
235 |
<% |
7232 |
17 Nov 16 |
nicklas |
236 |
} |
7232 |
17 Nov 16 |
nicklas |
237 |
%> |
7232 |
17 Nov 16 |
nicklas |
238 |
</tbl:cell> |
5616 |
27 Apr 11 |
nicklas |
239 |
<tbl:cell column="about"> |
5616 |
27 Apr 11 |
nicklas |
240 |
<% |
5616 |
27 Apr 11 |
nicklas |
241 |
if (about != null) |
5616 |
27 Apr 11 |
nicklas |
242 |
{ |
5616 |
27 Apr 11 |
nicklas |
243 |
%> |
6381 |
17 Dec 13 |
nicklas |
244 |
<b><%=HTML.encodeTags(about.getName())%></b> <%=about.getVersion() == null ? "" : "(v" + about.getVersion() + ")"%><br> |
5616 |
27 Apr 11 |
nicklas |
245 |
<%=HTML.encodeTags(about.getDescription())%><br> |
5616 |
27 Apr 11 |
nicklas |
246 |
<%=HTML.niceFormat(about.getUrl())%> |
5616 |
27 Apr 11 |
nicklas |
247 |
<% |
5616 |
27 Apr 11 |
nicklas |
248 |
} |
6409 |
31 Jan 14 |
nicklas |
249 |
if (unsafeExtensions.size() > 0) |
6409 |
31 Jan 14 |
nicklas |
250 |
{ |
6409 |
31 Jan 14 |
nicklas |
251 |
%> |
6409 |
31 Jan 14 |
nicklas |
252 |
<div class="messagecontainer note"> |
6409 |
31 Jan 14 |
nicklas |
253 |
<base:icon image="warning.png" /> |
6409 |
31 Jan 14 |
nicklas |
254 |
This plug-in contain <%=unsafeExtensions.size()%> extension(s) that |
6409 |
31 Jan 14 |
nicklas |
255 |
may violate the <b>Content Security Policy</b> setting on this server. |
6409 |
31 Jan 14 |
nicklas |
256 |
See BASE documentation for more information. |
6409 |
31 Jan 14 |
nicklas |
257 |
</div> |
6409 |
31 Jan 14 |
nicklas |
258 |
<% |
6409 |
31 Jan 14 |
nicklas |
259 |
} |
5616 |
27 Apr 11 |
nicklas |
260 |
if (error != null) |
5616 |
27 Apr 11 |
nicklas |
261 |
{ |
5616 |
27 Apr 11 |
nicklas |
262 |
%> |
5949 |
08 Feb 12 |
nicklas |
263 |
<div class="messagecontainer error"> |
5616 |
27 Apr 11 |
nicklas |
264 |
<%=error.getClass().getSimpleName()%>: <%=HTML.encodeTags(error.getMessage())%> |
5616 |
27 Apr 11 |
nicklas |
265 |
</div> |
5616 |
27 Apr 11 |
nicklas |
266 |
<% |
5616 |
27 Apr 11 |
nicklas |
267 |
} |
5616 |
27 Apr 11 |
nicklas |
268 |
%> |
5616 |
27 Apr 11 |
nicklas |
269 |
</tbl:cell> |
5616 |
27 Apr 11 |
nicklas |
270 |
|
5616 |
27 Apr 11 |
nicklas |
271 |
</tbl:row> |
5616 |
27 Apr 11 |
nicklas |
272 |
<% |
5616 |
27 Apr 11 |
nicklas |
273 |
} |
7233 |
17 Nov 16 |
nicklas |
274 |
if (ignoredFiles.size() > 0) |
7233 |
17 Nov 16 |
nicklas |
275 |
{ |
7233 |
17 Nov 16 |
nicklas |
276 |
%> |
7943 |
04 May 21 |
nicklas |
277 |
<tr id="ignored-header" class="ignored-header bg-filled-100"> |
7233 |
17 Nov 16 |
nicklas |
278 |
<td colspan="2">Ignored files (<%=ignoredFiles.size() %>)</td> |
7233 |
17 Nov 16 |
nicklas |
279 |
<td class="cell" style="text-align: center;">Install</td> |
7233 |
17 Nov 16 |
nicklas |
280 |
<td class="cell" ></td> |
7233 |
17 Nov 16 |
nicklas |
281 |
<td class="cell" style="text-align: center;">Stop ignoring</td> |
7233 |
17 Nov 16 |
nicklas |
282 |
<td class="cell"></td> |
7233 |
17 Nov 16 |
nicklas |
283 |
</tr> |
8032 |
01 Feb 22 |
nicklas |
284 |
<tbody class="rows"> |
7233 |
17 Nov 16 |
nicklas |
285 |
<% |
7233 |
17 Nov 16 |
nicklas |
286 |
for (File ignoredFile : ignoredFiles) |
7233 |
17 Nov 16 |
nicklas |
287 |
{ |
7233 |
17 Nov 16 |
nicklas |
288 |
String name = ignoredFile.getName(); |
7233 |
17 Nov 16 |
nicklas |
289 |
String fileInfo = ""; |
7233 |
17 Nov 16 |
nicklas |
290 |
boolean checkStopIgnore = false; |
7233 |
17 Nov 16 |
nicklas |
291 |
boolean allowInstall = true; |
7233 |
17 Nov 16 |
nicklas |
292 |
if (ignoredFile.isFile()) |
7233 |
17 Nov 16 |
nicklas |
293 |
{ |
7233 |
17 Nov 16 |
nicklas |
294 |
fileInfo = Values.formatBytes(ignoredFile.length()); |
7233 |
17 Nov 16 |
nicklas |
295 |
fileInfo += "; " + dateFormatter.format(new Date(ignoredFile.lastModified())); |
7233 |
17 Nov 16 |
nicklas |
296 |
} |
7233 |
17 Nov 16 |
nicklas |
297 |
else |
7233 |
17 Nov 16 |
nicklas |
298 |
{ |
7233 |
17 Nov 16 |
nicklas |
299 |
fileInfo = "File does not exist."; |
7233 |
17 Nov 16 |
nicklas |
300 |
checkStopIgnore = true; |
7233 |
17 Nov 16 |
nicklas |
301 |
allowInstall = false; |
7233 |
17 Nov 16 |
nicklas |
302 |
} |
7233 |
17 Nov 16 |
nicklas |
303 |
%> |
8032 |
01 Feb 22 |
nicklas |
304 |
<tbl:row subclass="ignored-file"> |
7233 |
17 Nov 16 |
nicklas |
305 |
<tbl:cell column="file" style="white-space: nowrap;"><%=name%></tbl:cell> |
7234 |
17 Nov 16 |
nicklas |
306 |
<tbl:cell column="status" style="text-align: center;">Ignored</tbl:cell> |
8032 |
01 Feb 22 |
nicklas |
307 |
<tbl:cell column="install" style="text-align: center;"> |
7233 |
17 Nov 16 |
nicklas |
308 |
<% |
7233 |
17 Nov 16 |
nicklas |
309 |
if (allowInstall) |
7233 |
17 Nov 16 |
nicklas |
310 |
{ |
7233 |
17 Nov 16 |
nicklas |
311 |
%> |
7233 |
17 Nov 16 |
nicklas |
312 |
<input type="checkbox" class="auto-init" data-auto-init="install" |
7233 |
17 Nov 16 |
nicklas |
313 |
name="<%=name%>.install" value="1"> |
7233 |
17 Nov 16 |
nicklas |
314 |
<% |
7233 |
17 Nov 16 |
nicklas |
315 |
} |
7233 |
17 Nov 16 |
nicklas |
316 |
%> |
7233 |
17 Nov 16 |
nicklas |
317 |
</tbl:cell> |
8032 |
01 Feb 22 |
nicklas |
318 |
<tbl:cell subclass="cell input" column="ignore" style="text-align: center;"> |
7233 |
17 Nov 16 |
nicklas |
319 |
<input type="checkbox" class="auto-init" data-auto-init="stop-ignore" |
7233 |
17 Nov 16 |
nicklas |
320 |
name="<%=name%>.stopignore" value="1" <%=checkStopIgnore ? "checked" : "" %>> |
7233 |
17 Nov 16 |
nicklas |
321 |
</tbl:cell> |
7233 |
17 Nov 16 |
nicklas |
322 |
<tbl:cell column="about"><%=HTML.encodeTags(fileInfo) %></tbl:cell> |
7233 |
17 Nov 16 |
nicklas |
323 |
</tbl:row> |
7233 |
17 Nov 16 |
nicklas |
324 |
<% |
7233 |
17 Nov 16 |
nicklas |
325 |
} |
8032 |
01 Feb 22 |
nicklas |
326 |
%> |
8032 |
01 Feb 22 |
nicklas |
327 |
</tbody> |
8032 |
01 Feb 22 |
nicklas |
328 |
<% |
7233 |
17 Nov 16 |
nicklas |
329 |
} |
5616 |
27 Apr 11 |
nicklas |
330 |
%> |
5616 |
27 Apr 11 |
nicklas |
331 |
</tbl:rows> |
5616 |
27 Apr 11 |
nicklas |
332 |
</tbl:data> |
5616 |
27 Apr 11 |
nicklas |
333 |
</tbl:table> |
5835 |
28 Oct 11 |
nicklas |
334 |
</div> |
5616 |
27 Apr 11 |
nicklas |
335 |
|
5918 |
21 Dec 11 |
nicklas |
336 |
<base:buttongroup subclass="dialogbuttons"> |
6259 |
25 Mar 13 |
nicklas |
337 |
<base:button id="startScan" title="Next" /> |
6259 |
25 Mar 13 |
nicklas |
338 |
<base:button id="close" title="Cancel" /> |
5918 |
21 Dec 11 |
nicklas |
339 |
</base:buttongroup> |
5918 |
21 Dec 11 |
nicklas |
340 |
|
5616 |
27 Apr 11 |
nicklas |
341 |
</base:body> |
5616 |
27 Apr 11 |
nicklas |
342 |
</base:page> |
5616 |
27 Apr 11 |
nicklas |
343 |
<% |
5616 |
27 Apr 11 |
nicklas |
344 |
} |
5616 |
27 Apr 11 |
nicklas |
345 |
finally |
5616 |
27 Apr 11 |
nicklas |
346 |
{ |
5616 |
27 Apr 11 |
nicklas |
347 |
if (dc != null) dc.close(); |
5616 |
27 Apr 11 |
nicklas |
348 |
} |
5616 |
27 Apr 11 |
nicklas |
349 |
%> |