Project

General

Profile

1 4198 daigle
<%@ page language="java"  %>
2 5027 daigle
<%@ page import="edu.ucsb.nceas.metacat.database.DBVersion,edu.ucsb.nceas.metacat.MetacatVersion" %>
3 5031 daigle
<%@ page import="edu.ucsb.nceas.metacat.properties.PropertyService" %>
4 4080 daigle
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$'
13
 *     '$Date$'
14
 * '$Revision$'
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 5027 daigle
	MetacatVersion metacatVersion = (MetacatVersion)request.getAttribute("metaCatVersion");
34 4080 daigle
	DBVersion databaseVersion = (DBVersion)request.getAttribute("databaseVersion");
35
    Boolean propsConfigured = (Boolean)request.getAttribute("propsConfigured");
36 4159 daigle
    Boolean orgsConfigured = (Boolean)request.getAttribute("orgsConfigured");
37 4584 daigle
    Boolean authConfigured = (Boolean)request.getAttribute("authConfigured");
38 4080 daigle
    Boolean skinsConfigured = (Boolean)request.getAttribute("skinsConfigured");
39
    Boolean dbConfigured = (Boolean)request.getAttribute("dbConfigured");
40 6635 leinfelder
    Boolean replicationConfigured = (Boolean)request.getAttribute("replicationConfigured");
41
    String dataoneConfigured = (String)request.getAttribute("dataoneConfigured");
42 4198 daigle
    String geoserverConfigured = (String)request.getAttribute("geoserverConfigured");
43 9498 tao
    String ezidConfigured = (String)request.getAttribute("ezidConfigured");
44 4080 daigle
    Boolean metacatConfigured = (Boolean)request.getAttribute("metacatConfigured");
45 4198 daigle
    Boolean metacatServletInitialized = (Boolean)request.getAttribute("metcatServletInitialized");
46 5004 daigle
    String contextURL = (String)request.getAttribute("contextURL");
47 4080 daigle
%>
48
49
<html>
50
<head>
51
<title>Metacat Configuration</title>
52 8245 walker
<%@ include file="./head-section.jsp"%>
53 4080 daigle
</head>
54
55
<body>
56 4557 daigle
<%@ include file="./header-section.jsp"%>
57 8222 walker
<div class="document">
58
	<h2>Metacat Configuration</h2>
59 4198 daigle
60 8222 walker
	<p>All of the following sections must be in a configured state for Metacat to run properly:</p>
61
	<br class="main-header">
62
63
	<%@ include file="page-message-section.jsp"%>
64
65
	<table class="configuration-table">
66
67
	<%
68 4198 daigle
		if (propsConfigured != null && propsConfigured) {
69 8222 walker
	%>
70
	        <tr>
71 8245 walker
	        <td class="configured-tag"><i class="icon-ok"></i> configured </td>
72 8222 walker
			<td class="property-title"> Metacat Global Properties </td>
73 8627 walker
			<td class="configure-link"><a href="<%= request.getContextPath() %>/admin?configureType=properties"> <i class="icon-cogs"></i>Reconfigure Now</a> </td>
74 8222 walker
	        </tr>
75
	<%
76 4198 daigle
		} else {
77 8222 walker
	%>
78
	        <tr>
79 8245 walker
	 		<td class="unconfigured-tag">unconfigured </td>
80 8222 walker
	 		<td class="property-title"> Metacat Global Properties </td>
81 8627 walker
			<td class="configure-link"> <a href="<%= request.getContextPath() %>/admin?configureType=properties"><i class="icon-cogs"></i> Configure Now</a> </td>
82 8222 walker
	    	</tr>
83
	<%
84 4198 daigle
		}
85 8222 walker
86
		if (authConfigured != null && authConfigured) {
87
	%>
88
	        <tr>
89 8245 walker
	        <td class="configured-tag"><i class="icon-ok"></i>configured </td>
90 8222 walker
			<td class="property-title"> Authentication Configuration </td>
91 8627 walker
			<td class="configure-link"><a href="<%= request.getContextPath() %>/admin?configureType=auth"><i class="icon-cogs"></i>Reconfigure Now</a> </td>
92 8222 walker
	        </tr>
93
	<%
94 4198 daigle
		} else {
95 8222 walker
	%>
96
	        <tr>
97 8245 walker
	 		<td class=unconfigured-tag>unconfigured</td>
98 8222 walker
	 		<td class=property-title> Authentication Configuration </td>
99 8627 walker
			<td class=configure-link><a href="<%= request.getContextPath() %>/admin?configureType=auth"><i class="icon-cogs"></i>Configure Now</a> </td>
100 8222 walker
	    	</tr>
101
	<%
102 4198 daigle
		}
103 8222 walker
104
	    if (skinsConfigured != null && skinsConfigured) {
105
	%>
106
	        <tr>
107 8245 walker
	        <td class="configured-tag"><i class="icon-ok"></i>configured</td>
108 8222 walker
			<td class="property-title"> Skins Specific Properties </td>
109 8627 walker
			<td class="configure-link"><a href="<%= request.getContextPath() %>/admin?configureType=skins"><i class="icon-cogs"></i>Reconfigure Now</a> </td>
110 8222 walker
	        </tr>
111
	<%
112
		} else {
113
	%>
114
	        <tr>
115 8245 walker
	 		<td class="unconfigured-tag">unconfigured </td>
116 8222 walker
	 		<td class="property-title"> Skins Specific Properties </td>
117 8627 walker
			<td class="configure-link"><a href="<%= request.getContextPath() %>/admin?configureType=skins"><i class="icon-cogs"></i>Configure Now</a> </td>
118 8222 walker
	    	</tr>
119
	<%
120
		}
121
122
	    if ((dbConfigured != null && dbConfigured) ||
123
	    		(metacatVersion != null && databaseVersion != null &&
124
	    				metacatVersion.compareTo(databaseVersion) == 0)) {
125
	%>
126
	    	<tr>
127 8245 walker
	    	<td class="configured-tag"><i class="icon-ok"></i> configured </td>
128 8222 walker
	    	<td class="property-title"> Database Installation/Upgrade </td>
129 8231 walker
			<td class="configure-link inactive"> Version: <%=databaseVersion.getVersionString()%> </td>
130 8222 walker
	    	</tr>
131
	<%
132
		} else {
133
	%>
134
	    	<tr>
135 8245 walker
	    	<td class="unconfigured-tag">unconfigured </td>
136 8222 walker
	    	<td class="property-title"> Database Installation/Upgrade </td>
137
	<%
138 6635 leinfelder
		if (propsConfigured != null && propsConfigured) {
139 8222 walker
	%>
140
141 8627 walker
			<td class="configure-link"><a href="<%= request.getContextPath() %>/admin?configureType=database"><i class="icon-cogs"></i> Configure Now</a> </td>
142 8222 walker
143
	<%
144
				        		} else {
145
				        	%>
146 8231 walker
			<td class="configure-link inactive"> Configure Global Properties First </td>
147 8222 walker
	<%
148
		}
149
	%>
150
	    	</tr>
151
	<%
152
		}
153
154
	    if (geoserverConfigured != null && geoserverConfigured.equals(PropertyService.CONFIGURED)) {
155
	%>
156
	    	<tr>
157 8245 walker
	    	<td class="configured-tag"><i class="icon-ok"></i> configured </td>
158 8222 walker
	    	<td class="property-title"> Geoserver Configuration </td>
159 8627 walker
			<td class="configure-link"> <a href="<%= request.getContextPath() %>/admin?configureType=geoserver"><i class="icon-cogs"></i> Reconfigure Now</a> </td>
160 8222 walker
	    	</tr>
161
	<%
162
		} else if (geoserverConfigured != null && geoserverConfigured.equals(PropertyService.BYPASSED)){
163
	%>
164
	    	<tr>
165 8245 walker
	    	<td class="configured-tag"><i class="icon-ok"></i> bypassed </td>
166 8222 walker
			<td class="property-title"> Geoserver Configuration </td>
167
	<%
168
			if (propsConfigured != null && propsConfigured) {
169
	%>
170
171 8627 walker
			<td class="configure-link"><a href="<%= request.getContextPath() %>/admin?configureType=geoserver"><i class="icon-cogs"></i>Reconfigure Now</a> </td>
172 8222 walker
	<%
173
			} else {
174
	%>
175 8231 walker
			<td class="configure-link inactive"> Configure Global Properties First </td>
176 8222 walker
	<%
177
			}
178
				%>
179
	    	</tr>
180
	<%
181 6635 leinfelder
		} else {
182 8222 walker
	%>
183
	    	<tr>
184 8245 walker
	    	<td class="unconfigured-tag">unconfigured </td>
185 8222 walker
	    	<td class="property-title"> Geoserver Configuration </td>
186
	<%
187
			if (propsConfigured != null && propsConfigured) {
188
	%>
189
190 8627 walker
			<td class="configure-link"><a href="<%= request.getContextPath() %>/admin?configureType=geoserver"><i class="icon-cogs"></i> Configure Now</a> </td>
191 8222 walker
192
	<%
193
			} else {
194
	%>
195 8231 walker
			<td class="configure-link inactive"> Configure Global Properties First </td>
196 8222 walker
	<%
197
			}
198
	%>
199
	    	</tr>
200
	<%
201 6635 leinfelder
		}
202 8222 walker
	%>
203
204
	<%
205
206
	    if (dataoneConfigured != null && dataoneConfigured.equals(PropertyService.CONFIGURED)) {
207
	%>
208
	    	<tr>
209 8245 walker
	    	<td class="configured-tag"><i class="icon-ok"></i> configured</td>
210 8222 walker
	    	<td class="property-title"> Dataone Configuration </td>
211 8627 walker
			<td class="configure-link"><a href="<%= request.getContextPath() %>/admin?configureType=dataone"><i class="icon-cogs"></i>Reconfigure Now</a> </td>
212 8222 walker
	    	</tr>
213
	<%
214
		} else if (dataoneConfigured != null && dataoneConfigured.equals(PropertyService.BYPASSED)){
215
	%>
216
	    	<tr>
217 8245 walker
	    	<td class="configured-tag"><i class="icon-ok"></i> bypassed </td>
218 8222 walker
			<td class="property-title"> Dataone Configuration </td>
219
	<%
220
			if (propsConfigured != null && propsConfigured) {
221
	%>
222
223 8627 walker
			<td class="configure-link"> <a href="<%= request.getContextPath() %>/admin?configureType=dataone"><i class="icon-cogs"></i> Reconfigure Now</a> </td>
224 8222 walker
	<%
225
			} else {
226
	%>
227 8231 walker
			<td class="configure-link inactive"> Configure Global Properties First </td>
228 8222 walker
	<%
229
			}
230
				%>
231
	    	</tr>
232
	<%
233
		} else {
234
	%>
235
	    	<tr>
236 8245 walker
	    	<td class="unconfigured-tag">unconfigured </td>
237 8222 walker
	    	<td class="property-title"> Dataone Configuration </td>
238
	<%
239
			if (propsConfigured != null && propsConfigured) {
240
	%>
241
242 8627 walker
			<td class="configure-link"><a href="<%= request.getContextPath() %>/admin?configureType=dataone"> <i class="icon-cogs"></i> Configure Now</a> </td>
243 8222 walker
244
	<%
245
			} else {
246
	%>
247 8231 walker
			<td class="configure-link inactive"> Configure Global Properties First </td>
248 8222 walker
	<%
249
			}
250
	%>
251
	    	</tr>
252
	<%
253
		}
254
	%>
255
256
	<!-- replication -->
257
	   	<tr>
258 8245 walker
	   	<td class="configured-tag"><i class="icon-ok"></i> configured </td>
259 8222 walker
	   	<td class="property-title"> Replication Configuration </td>
260
	<%
261 6635 leinfelder
		if (propsConfigured != null && propsConfigured) {
262 8222 walker
	%>
263
264 8627 walker
		<td class="configure-link"><a href="<%= request.getContextPath() %>/admin?configureType=replication"> <i class="icon-cogs"></i> Reconfigure Now</a> </td>
265 8222 walker
266
	<%
267 6635 leinfelder
		} else {
268 8222 walker
	%>
269 8231 walker
		<td class="configure-link inactive"> Configure Global Properties First </td>
270 8222 walker
	<%
271 6635 leinfelder
		}
272 8222 walker
	%>
273
	   	</tr>
274 4198 daigle
275 9498 tao
	<!-- ezid -->
276
     <%
277
278
        if (ezidConfigured != null && ezidConfigured.equals(PropertyService.CONFIGURED)) {
279
    %>
280
            <tr>
281
            <td class="configured-tag"><i class="icon-ok"></i> configured</td>
282 9501 tao
            <td class="property-title"> EZID Configuration for DOIs </td>
283 9498 tao
            <td class="configure-link"><a href="<%= request.getContextPath() %>/admin?configureType=ezid"><i class="icon-cogs"></i>Reconfigure Now</a> </td>
284
            </tr>
285
    <%
286
        } else if (ezidConfigured != null && ezidConfigured.equals(PropertyService.BYPASSED)){
287
    %>
288
            <tr>
289
            <td class="configured-tag"><i class="icon-ok"></i> bypassed </td>
290
            <td class="property-title">EZID Configuration for DOIs</td>
291
    <%
292
            if (propsConfigured != null && propsConfigured) {
293
    %>
294
295
            <td class="configure-link"> <a href="<%= request.getContextPath() %>/admin?configureType=ezid"><i class="icon-cogs"></i> Reconfigure Now</a> </td>
296
    <%
297
            } else {
298
    %>
299
            <td class="configure-link inactive"> Configure Global Properties First </td>
300
    <%
301
            }
302
                %>
303
            </tr>
304
    <%
305
        } else {
306
    %>
307
            <tr>
308
            <td class="unconfigured-tag">unconfigured </td>
309 9501 tao
            <td class="property-title"> EZID Configuration for DOIs </td>
310 9498 tao
    <%
311
            if (propsConfigured != null && propsConfigured) {
312
    %>
313
314
            <td class="configure-link"><a href="<%= request.getContextPath() %>/admin?configureType=ezid"> <i class="icon-cogs"></i> Configure Now</a> </td>
315
316
    <%
317
            } else {
318
    %>
319
            <td class="configure-link inactive"> Configure Global Properties First </td>
320
    <%
321
            }
322
    %>
323
            </tr>
324
    <%
325
        }
326
    %>
327 8222 walker
328
	<!--  -->
329
	</table>
330
331
	<%
332
		if (metacatConfigured != null && metacatConfigured) {
333
	%>
334
		<br clear="right"/>
335
	<%
336
			if (metacatServletInitialized != null && metacatServletInitialized) {
337
	%>
338
		<h3>Restarting Metacat</h3>
339
		<p> Since this is a reconfiguration, you will need to restart Metacat after any changes.</p>
340
341
		<p>The simplest way to restart metacat is to restart the entire servlet engine.
342
		   For Tomcat, this would mean calling "sudo /etc/init.d/tomcat6 restart" or
343
		   an equivalent command appropriate to your operating system. After restarting,
344
		   you can access your new Metacat server at the URL:
345
	      <a href="<%= contextURL %>"><%= contextURL  %></a>
346
		</p>
347
	<%
348
			} else {
349
	%>
350 8231 walker
				<div class="alert alert-success"><i class="icon-thumbs-up"></i>Configuration of Metacat is complete.  You can <a href="<%= request.getContextPath() %>">go to metacat</a>
351 8266 leinfelder
				now, or, if you are using the Metacat indexing component, restart Tomcat so that both webapps are initialized with these settings.
352
				Note that this may take some time while the system initializes with the new configuration values.</div>
353 8222 walker
	<%
354
			}
355 4198 daigle
		}
356 8222 walker
	%>
357
</div>
358 4080 daigle
359 4557 daigle
	<%@ include file="./footer-section.jsp"%>
360 4080 daigle
361 4560 daigle
</body>
362
</html>