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
<link rel="stylesheet" type="text/css"
52
        href="<%= request.getContextPath() %>/admin/admin.css"></link>
53
</head>
54
55
<body>
56 4557 daigle
<%@ include file="./header-section.jsp"%>
57 4080 daigle
<img src="<%= request.getContextPath() %>/metacat-logo.png" width="100px" align="right"/>
58 4557 daigle
<h2>Metacat Configuration</h2>
59 4080 daigle
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 4100 daigle
<hr class="config-line">
65 4080 daigle
66 4100 daigle
<table class="configuration-table">
67 4198 daigle
68 4080 daigle
<%
69 4198 daigle
	if (propsConfigured != null && propsConfigured) {
70 4080 daigle
%>
71
        <tr>
72 4100 daigle
        <td class="configured-tag">[configured] </td>
73 4198 daigle
		<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 4080 daigle
        </tr>
76
<%
77
	} else {
78
%>
79
        <tr>
80 4198 daigle
 		<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 4080 daigle
    	</tr>
84
<%
85
	}
86
87 4584 daigle
	if (authConfigured != null && authConfigured) {
88 4159 daigle
%>
89
        <tr>
90
        <td class="configured-tag">[configured] </td>
91 4584 daigle
		<td class="property-title"> Authentication Configuration </td>
92
		<td class="configure-link"> <a href="<%= request.getContextPath() %>/admin?configureType=auth">Reconfigure Now</a> </td>
93 4159 daigle
        </tr>
94
<%
95
	} else {
96
%>
97
        <tr>
98
 		<td class=unconfigured-tag>[unconfigured] </td>
99 4584 daigle
 		<td class=property-title> Authentication Configuration </td>
100
		<td class=configure-link> <a href="<%= request.getContextPath() %>/admin?configureType=auth">Configure Now</a> </td>
101 4159 daigle
    	</tr>
102
<%
103
	}
104 4198 daigle
105 4080 daigle
    if (skinsConfigured != null && skinsConfigured) {
106
%>
107
        <tr>
108 4100 daigle
        <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 4080 daigle
        </tr>
112
<%
113
	} else {
114
%>
115
        <tr>
116 4100 daigle
 		<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 4080 daigle
    	</tr>
120
<%
121 4198 daigle
	}
122 4080 daigle
123
    if ((dbConfigured != null && dbConfigured) ||
124
    		(metacatVersion != null && databaseVersion != null &&
125
    				metacatVersion.compareTo(databaseVersion) == 0)) {
126
%>
127
    	<tr>
128 4100 daigle
    	<td class="configured-tag">[configured] </td>
129
    	<td class="property-title"> Database Installation/Upgrade </td>
130 5031 daigle
		<td class="configure-link"> Version: <%=databaseVersion.getVersionString()%> </td>
131 4080 daigle
    	</tr>
132
<%
133
	} else {
134
%>
135
    	<tr>
136 4100 daigle
    	<td class="unconfigured-tag">[unconfigured] </td>
137
    	<td class="property-title"> Database Installation/Upgrade </td>
138 4080 daigle
<%
139 5031 daigle
	if (propsConfigured != null && propsConfigured) {
140 4080 daigle
%>
141
142 4100 daigle
		<td class="configure-link"> <a href="<%= request.getContextPath() %>/admin?configureType=database">Configure Now</a> </td>
143 4080 daigle
144
<%
145 5031 daigle
			        		} else {
146
			        	%>
147 4198 daigle
		<td class="configure-link"> Configure Global Properties First </td>
148 4080 daigle
<%
149 5031 daigle
	}
150
%>
151 4080 daigle
    	</tr>
152
<%
153
	}
154 4198 daigle
155
    if (geoserverConfigured != null && geoserverConfigured.equals(PropertyService.CONFIGURED)) {
156 4080 daigle
%>
157 4198 daigle
    	<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 4480 daigle
		<td class="configure-link"> <a href="<%= request.getContextPath() %>/admin?configureType=geoserver">Reconfigure Now</a> </td>
173 4198 daigle
<%
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 6635 leinfelder
<%
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 4080 daigle
</table>
258
259
<%
260
	if (metacatConfigured != null && metacatConfigured) {
261
%>
262
263 4100 daigle
	<hr class="config-line">
264 4080 daigle
	<br clear="right"/>
265 4198 daigle
<%
266
		if (metacatServletInitialized != null && metacatServletInitialized) {
267
%>
268 4080 daigle
	<h3>Restarting Metacat</h3>
269 4198 daigle
	<p> Since this is a reconfiguration, you will need to restart Metacat after any changes.</p>
270
271 4080 daigle
	<p>The simplest way to restart metacat is to restart the entire servlet engine.
272 6558 leinfelder
	   For Tomcat, this would mean calling "sudo /etc/init.d/tomcat6 restart" or
273 4080 daigle
	   an equivalent command appropriate to your operating system. After restarting,
274
	   you can access your new Metacat server at the URL:
275 5004 daigle
      <a href="<%= contextURL %>"><%= contextURL  %></a>
276 4080 daigle
	</p>
277 4198 daigle
<%
278
		} else {
279
%>
280 5027 daigle
			Configuration of Metacat is complete.  You can <a href="<%= request.getContextPath() %>">go to metacat</a>
281 4198 daigle
			now.  Note that this may take some time while the system initializes with the new configuration values.
282
<%
283
		}
284 4560 daigle
	}
285 4198 daigle
%>
286 4080 daigle
287 4557 daigle
	<%@ include file="./footer-section.jsp"%>
288 4080 daigle
289 4560 daigle
</body>
290
</html>