1
|
<%@ page language="java" %>
|
2
|
<%@ page import="edu.ucsb.nceas.metacat.database.DBVersion,edu.ucsb.nceas.metacat.MetacatVersion" %>
|
3
|
<%@ page import="edu.ucsb.nceas.metacat.properties.PropertyService" %>
|
4
|
|
5
|
<%
|
6
|
/**
|
7
|
* '$RCSfile$'
|
8
|
* Copyright: 2008 Regents of the University of California and the
|
9
|
* National Center for Ecological Analysis and Synthesis
|
10
|
* For Details: http://www.nceas.ucsb.edu/
|
11
|
*
|
12
|
* '$Author: leinfelder $'
|
13
|
* '$Date: 2011-11-17 14:47:00 -0800 (Thu, 17 Nov 2011) $'
|
14
|
* '$Revision: 6672 $'
|
15
|
*
|
16
|
* This program is free software; you can redistribute it and/or modify
|
17
|
* it under the terms of the GNU General Public License as published by
|
18
|
* the Free Software Foundation; either version 2 of the License, or
|
19
|
* (at your option) any later version.
|
20
|
*
|
21
|
* This program is distributed in the hope that it will be useful,
|
22
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
23
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
24
|
* GNU General Public License for more details.
|
25
|
*
|
26
|
* You should have received a copy of the GNU General Public License
|
27
|
* along with this program; if not, write to the Free Software
|
28
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
29
|
*/
|
30
|
%>
|
31
|
|
32
|
<%
|
33
|
MetacatVersion metacatVersion = (MetacatVersion)request.getAttribute("metaCatVersion");
|
34
|
DBVersion databaseVersion = (DBVersion)request.getAttribute("databaseVersion");
|
35
|
Boolean propsConfigured = (Boolean)request.getAttribute("propsConfigured");
|
36
|
Boolean orgsConfigured = (Boolean)request.getAttribute("orgsConfigured");
|
37
|
Boolean authConfigured = (Boolean)request.getAttribute("authConfigured");
|
38
|
Boolean skinsConfigured = (Boolean)request.getAttribute("skinsConfigured");
|
39
|
Boolean dbConfigured = (Boolean)request.getAttribute("dbConfigured");
|
40
|
Boolean replicationConfigured = (Boolean)request.getAttribute("replicationConfigured");
|
41
|
String dataoneConfigured = (String)request.getAttribute("dataoneConfigured");
|
42
|
String geoserverConfigured = (String)request.getAttribute("geoserverConfigured");
|
43
|
Boolean metacatConfigured = (Boolean)request.getAttribute("metacatConfigured");
|
44
|
Boolean metacatServletInitialized = (Boolean)request.getAttribute("metcatServletInitialized");
|
45
|
String contextURL = (String)request.getAttribute("contextURL");
|
46
|
%>
|
47
|
|
48
|
<html>
|
49
|
<head>
|
50
|
<title>Metacat Configuration</title>
|
51
|
<link rel="stylesheet" type="text/css"
|
52
|
href="<%= request.getContextPath() %>/admin/admin.css"></link>
|
53
|
</head>
|
54
|
|
55
|
<body>
|
56
|
<%@ include file="./header-section.jsp"%>
|
57
|
<img src="<%= request.getContextPath() %>/metacat-logo.png" width="100px" align="right"/>
|
58
|
<h2>Metacat Configuration</h2>
|
59
|
|
60
|
All of the following sections must be in a configured state for Metacat to run properly:
|
61
|
<br class="main-header">
|
62
|
|
63
|
<%@ include file="page-message-section.jsp"%>
|
64
|
<hr class="config-line">
|
65
|
|
66
|
<table class="configuration-table">
|
67
|
|
68
|
<%
|
69
|
if (propsConfigured != null && propsConfigured) {
|
70
|
%>
|
71
|
<tr>
|
72
|
<td class="configured-tag">[configured] </td>
|
73
|
<td class="property-title"> Metacat Global Properties </td>
|
74
|
<td class="configure-link"> <a href="<%= request.getContextPath() %>/admin?configureType=properties">Reconfigure Now</a> </td>
|
75
|
</tr>
|
76
|
<%
|
77
|
} else {
|
78
|
%>
|
79
|
<tr>
|
80
|
<td class="unconfigured-tag">[unconfigured] </td>
|
81
|
<td class="property-title"> Metacat Global Properties </td>
|
82
|
<td class="configure-link"> <a href="<%= request.getContextPath() %>/admin?configureType=properties">Configure Now</a> </td>
|
83
|
</tr>
|
84
|
<%
|
85
|
}
|
86
|
|
87
|
if (authConfigured != null && authConfigured) {
|
88
|
%>
|
89
|
<tr>
|
90
|
<td class="configured-tag">[configured] </td>
|
91
|
<td class="property-title"> Authentication Configuration </td>
|
92
|
<td class="configure-link"> <a href="<%= request.getContextPath() %>/admin?configureType=auth">Reconfigure Now</a> </td>
|
93
|
</tr>
|
94
|
<%
|
95
|
} else {
|
96
|
%>
|
97
|
<tr>
|
98
|
<td class=unconfigured-tag>[unconfigured] </td>
|
99
|
<td class=property-title> Authentication Configuration </td>
|
100
|
<td class=configure-link> <a href="<%= request.getContextPath() %>/admin?configureType=auth">Configure Now</a> </td>
|
101
|
</tr>
|
102
|
<%
|
103
|
}
|
104
|
|
105
|
if (skinsConfigured != null && skinsConfigured) {
|
106
|
%>
|
107
|
<tr>
|
108
|
<td class="configured-tag">[configured] </td>
|
109
|
<td class="property-title"> Skins Specific Properties </td>
|
110
|
<td class="configure-link"> <a href="<%= request.getContextPath() %>/admin?configureType=skins">Reconfigure Now</a> </td>
|
111
|
</tr>
|
112
|
<%
|
113
|
} else {
|
114
|
%>
|
115
|
<tr>
|
116
|
<td class="unconfigured-tag">[unconfigured] </td>
|
117
|
<td class="property-title"> Skins Specific Properties </td>
|
118
|
<td class="configure-link"> <a href="<%= request.getContextPath() %>/admin?configureType=skins">Configure Now</a> </td>
|
119
|
</tr>
|
120
|
<%
|
121
|
}
|
122
|
|
123
|
if ((dbConfigured != null && dbConfigured) ||
|
124
|
(metacatVersion != null && databaseVersion != null &&
|
125
|
metacatVersion.compareTo(databaseVersion) == 0)) {
|
126
|
%>
|
127
|
<tr>
|
128
|
<td class="configured-tag">[configured] </td>
|
129
|
<td class="property-title"> Database Installation/Upgrade </td>
|
130
|
<td class="configure-link"> Version: <%=databaseVersion.getVersionString()%> </td>
|
131
|
</tr>
|
132
|
<%
|
133
|
} else {
|
134
|
%>
|
135
|
<tr>
|
136
|
<td class="unconfigured-tag">[unconfigured] </td>
|
137
|
<td class="property-title"> Database Installation/Upgrade </td>
|
138
|
<%
|
139
|
if (propsConfigured != null && propsConfigured) {
|
140
|
%>
|
141
|
|
142
|
<td class="configure-link"> <a href="<%= request.getContextPath() %>/admin?configureType=database">Configure Now</a> </td>
|
143
|
|
144
|
<%
|
145
|
} else {
|
146
|
%>
|
147
|
<td class="configure-link"> Configure Global Properties First </td>
|
148
|
<%
|
149
|
}
|
150
|
%>
|
151
|
</tr>
|
152
|
<%
|
153
|
}
|
154
|
|
155
|
if (geoserverConfigured != null && geoserverConfigured.equals(PropertyService.CONFIGURED)) {
|
156
|
%>
|
157
|
<tr>
|
158
|
<td class="configured-tag">[configured] </td>
|
159
|
<td class="property-title"> Geoserver Configuration </td>
|
160
|
<td class="configure-link"> <a href="<%= request.getContextPath() %>/admin?configureType=geoserver">Reconfigure Now</a> </td>
|
161
|
</tr>
|
162
|
<%
|
163
|
} else if (geoserverConfigured != null && geoserverConfigured.equals(PropertyService.BYPASSED)){
|
164
|
%>
|
165
|
<tr>
|
166
|
<td class="configured-tag">[bypassed] </td>
|
167
|
<td class="property-title"> Geoserver Configuration </td>
|
168
|
<%
|
169
|
if (propsConfigured != null && propsConfigured) {
|
170
|
%>
|
171
|
|
172
|
<td class="configure-link"> <a href="<%= request.getContextPath() %>/admin?configureType=geoserver">Reconfigure Now</a> </td>
|
173
|
<%
|
174
|
} else {
|
175
|
%>
|
176
|
<td class="configure-link"> Configure Global Properties First </td>
|
177
|
<%
|
178
|
}
|
179
|
%>
|
180
|
</tr>
|
181
|
<%
|
182
|
} else {
|
183
|
%>
|
184
|
<tr>
|
185
|
<td class="unconfigured-tag">[unconfigured] </td>
|
186
|
<td class="property-title"> Geoserver Configuration </td>
|
187
|
<%
|
188
|
if (propsConfigured != null && propsConfigured) {
|
189
|
%>
|
190
|
|
191
|
<td class="configure-link"> <a href="<%= request.getContextPath() %>/admin?configureType=geoserver">Configure Now</a> </td>
|
192
|
|
193
|
<%
|
194
|
} else {
|
195
|
%>
|
196
|
<td class="configure-link"> Configure Global Properties First </td>
|
197
|
<%
|
198
|
}
|
199
|
%>
|
200
|
</tr>
|
201
|
<%
|
202
|
}
|
203
|
%>
|
204
|
|
205
|
<%
|
206
|
|
207
|
if (dataoneConfigured != null && dataoneConfigured.equals(PropertyService.CONFIGURED)) {
|
208
|
%>
|
209
|
<tr>
|
210
|
<td class="configured-tag">[configured] </td>
|
211
|
<td class="property-title"> Dataone Configuration </td>
|
212
|
<td class="configure-link"> <a href="<%= request.getContextPath() %>/admin?configureType=dataone">Reconfigure Now</a> </td>
|
213
|
</tr>
|
214
|
<%
|
215
|
} else if (dataoneConfigured != null && dataoneConfigured.equals(PropertyService.BYPASSED)){
|
216
|
%>
|
217
|
<tr>
|
218
|
<td class="configured-tag">[bypassed] </td>
|
219
|
<td class="property-title"> Dataone Configuration </td>
|
220
|
<%
|
221
|
if (propsConfigured != null && propsConfigured) {
|
222
|
%>
|
223
|
|
224
|
<td class="configure-link"> <a href="<%= request.getContextPath() %>/admin?configureType=dataone">Reconfigure Now</a> </td>
|
225
|
<%
|
226
|
} else {
|
227
|
%>
|
228
|
<td class="configure-link"> Configure Global Properties First </td>
|
229
|
<%
|
230
|
}
|
231
|
%>
|
232
|
</tr>
|
233
|
<%
|
234
|
} else {
|
235
|
%>
|
236
|
<tr>
|
237
|
<td class="unconfigured-tag">[unconfigured] </td>
|
238
|
<td class="property-title"> Dataone Configuration </td>
|
239
|
<%
|
240
|
if (propsConfigured != null && propsConfigured) {
|
241
|
%>
|
242
|
|
243
|
<td class="configure-link"> <a href="<%= request.getContextPath() %>/admin?configureType=dataone">Configure Now</a> </td>
|
244
|
|
245
|
<%
|
246
|
} else {
|
247
|
%>
|
248
|
<td class="configure-link"> Configure Global Properties First </td>
|
249
|
<%
|
250
|
}
|
251
|
%>
|
252
|
</tr>
|
253
|
<%
|
254
|
}
|
255
|
%>
|
256
|
|
257
|
<!-- replication -->
|
258
|
<tr>
|
259
|
<td class="configured-tag">[configured] </td>
|
260
|
<td class="property-title"> Replication Configuration </td>
|
261
|
<%
|
262
|
if (propsConfigured != null && propsConfigured) {
|
263
|
%>
|
264
|
|
265
|
<td class="configure-link"> <a href="<%= request.getContextPath() %>/admin?configureType=replication">Reconfigure Now</a> </td>
|
266
|
|
267
|
<%
|
268
|
} else {
|
269
|
%>
|
270
|
<td class="configure-link"> Configure Global Properties First </td>
|
271
|
<%
|
272
|
}
|
273
|
%>
|
274
|
</tr>
|
275
|
|
276
|
|
277
|
|
278
|
<!-- -->
|
279
|
</table>
|
280
|
|
281
|
<%
|
282
|
if (metacatConfigured != null && metacatConfigured) {
|
283
|
%>
|
284
|
|
285
|
<hr class="config-line">
|
286
|
<br clear="right"/>
|
287
|
<%
|
288
|
if (metacatServletInitialized != null && metacatServletInitialized) {
|
289
|
%>
|
290
|
<h3>Restarting Metacat</h3>
|
291
|
<p> Since this is a reconfiguration, you will need to restart Metacat after any changes.</p>
|
292
|
|
293
|
<p>The simplest way to restart metacat is to restart the entire servlet engine.
|
294
|
For Tomcat, this would mean calling "sudo /etc/init.d/tomcat6 restart" or
|
295
|
an equivalent command appropriate to your operating system. After restarting,
|
296
|
you can access your new Metacat server at the URL:
|
297
|
<a href="<%= contextURL %>"><%= contextURL %></a>
|
298
|
</p>
|
299
|
<%
|
300
|
} else {
|
301
|
%>
|
302
|
Configuration of Metacat is complete. You can <a href="<%= request.getContextPath() %>">go to metacat</a>
|
303
|
now. Note that this may take some time while the system initializes with the new configuration values.
|
304
|
<%
|
305
|
}
|
306
|
}
|
307
|
%>
|
308
|
|
309
|
<%@ include file="./footer-section.jsp"%>
|
310
|
|
311
|
</body>
|
312
|
</html>
|