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