Project

General

Profile

1 4198 daigle
<%@ page language="java"  %>
2
<%@ page import="edu.ucsb.nceas.metacat.DBVersion,edu.ucsb.nceas.metacat.MetaCatVersion" %>
3
<%@ page import="edu.ucsb.nceas.metacat.service.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
	MetaCatVersion metacatVersion = (MetaCatVersion)request.getAttribute("metaCatVersion");
34
	DBVersion databaseVersion = (DBVersion)request.getAttribute("databaseVersion");
35
    Boolean propsConfigured = (Boolean)request.getAttribute("propsConfigured");
36 4159 daigle
    Boolean orgsConfigured = (Boolean)request.getAttribute("orgsConfigured");
37 4080 daigle
    Boolean ldapConfigured = (Boolean)request.getAttribute("ldapConfigured");
38
    Boolean skinsConfigured = (Boolean)request.getAttribute("skinsConfigured");
39
    Boolean dbConfigured = (Boolean)request.getAttribute("dbConfigured");
40 4198 daigle
    String geoserverConfigured = (String)request.getAttribute("geoserverConfigured");
41 4080 daigle
    Boolean metacatConfigured = (Boolean)request.getAttribute("metacatConfigured");
42 4198 daigle
    Boolean metacatServletInitialized = (Boolean)request.getAttribute("metcatServletInitialized");
43 4080 daigle
%>
44
45
<html>
46
<head>
47
<title>Metacat Configuration</title>
48
<link rel="stylesheet" type="text/css"
49
        href="<%= request.getContextPath() %>/admin/admin.css"></link>
50
</head>
51
52
<body>
53
<img src="<%= request.getContextPath() %>/metacat-logo.png" width="100px" align="right"/>
54
<h2>MetaCat Configuration</h2>
55
56
All of the following sections must be in a configured state for Metacat to run properly:
57
<br class="main-header">
58
59
<%@ include file="page-message-section.jsp"%>
60 4100 daigle
<hr class="config-line">
61 4080 daigle
62 4100 daigle
<table class="configuration-table">
63 4198 daigle
64 4080 daigle
<%
65 4198 daigle
	if (propsConfigured != null && propsConfigured) {
66 4080 daigle
%>
67
        <tr>
68 4100 daigle
        <td class="configured-tag">[configured] </td>
69 4198 daigle
		<td class="property-title"> Metacat Global Properties </td>
70
		<td class="configure-link"> <a href="<%= request.getContextPath() %>/admin?configureType=properties">Reconfigure Now</a> </td>
71 4080 daigle
        </tr>
72
<%
73
	} else {
74
%>
75
        <tr>
76 4198 daigle
 		<td class="unconfigured-tag">[unconfigured] </td>
77
 		<td class="property-title"> Metacat Global Properties </td>
78
		<td class="configure-link"> <a href="<%= request.getContextPath() %>/admin?configureType=properties">Configure Now</a> </td>
79 4080 daigle
    	</tr>
80
<%
81
	}
82
83 4198 daigle
	if (ldapConfigured != null && ldapConfigured) {
84 4159 daigle
%>
85
        <tr>
86
        <td class="configured-tag">[configured] </td>
87 4198 daigle
		<td class="property-title"> LDAP Configuration </td>
88
		<td class="configure-link"> <a href="<%= request.getContextPath() %>/admin?configureType=ldap">Reconfigure Now</a> </td>
89 4159 daigle
        </tr>
90
<%
91
	} else {
92
%>
93
        <tr>
94
 		<td class=unconfigured-tag>[unconfigured] </td>
95 4198 daigle
 		<td class=property-title> LDAP Configuration </td>
96
		<td class=configure-link> <a href="<%= request.getContextPath() %>/admin?configureType=ldap">Configure Now</a> </td>
97 4159 daigle
    	</tr>
98
<%
99
	}
100 4198 daigle
101 4080 daigle
    if (skinsConfigured != null && skinsConfigured) {
102
%>
103
        <tr>
104 4100 daigle
        <td class="configured-tag">[configured] </td>
105
		<td class="property-title"> Skins Specific Properties </td>
106
		<td class="configure-link"> <a href="<%= request.getContextPath() %>/admin?configureType=skins">Reconfigure Now</a> </td>
107 4080 daigle
        </tr>
108
<%
109
	} else {
110
%>
111
        <tr>
112 4100 daigle
 		<td class="unconfigured-tag">[unconfigured] </td>
113
 		<td class="property-title"> Skins Specific Properties </td>
114
		<td class="configure-link"> <a href="<%= request.getContextPath() %>/admin?configureType=skins">Configure Now</a> </td>
115 4080 daigle
    	</tr>
116
<%
117 4198 daigle
	}
118 4080 daigle
119
    if ((dbConfigured != null && dbConfigured) ||
120
    		(metacatVersion != null && databaseVersion != null &&
121
    				metacatVersion.compareTo(databaseVersion) == 0)) {
122
%>
123
    	<tr>
124 4100 daigle
    	<td class="configured-tag">[configured] </td>
125
    	<td class="property-title"> Database Installation/Upgrade </td>
126
		<td class="configure-link"> Version: <%= databaseVersion.getVersionString() %> </td>
127 4080 daigle
    	</tr>
128
<%
129
	} else {
130
%>
131
    	<tr>
132 4100 daigle
    	<td class="unconfigured-tag">[unconfigured] </td>
133
    	<td class="property-title"> Database Installation/Upgrade </td>
134 4080 daigle
<%
135 4198 daigle
		if (propsConfigured != null && propsConfigured) {
136 4080 daigle
%>
137
138 4100 daigle
		<td class="configure-link"> <a href="<%= request.getContextPath() %>/admin?configureType=database">Configure Now</a> </td>
139 4080 daigle
140
<%
141 4198 daigle
		} else {
142 4080 daigle
%>
143 4198 daigle
		<td class="configure-link"> Configure Global Properties First </td>
144 4080 daigle
<%
145 4198 daigle
		}
146 4080 daigle
			%>
147
    	</tr>
148
<%
149
	}
150 4198 daigle
151
    if (geoserverConfigured != null && geoserverConfigured.equals(PropertyService.CONFIGURED)) {
152 4080 daigle
%>
153 4198 daigle
    	<tr>
154
    	<td class="configured-tag">[configured] </td>
155
    	<td class="property-title"> Geoserver Configuration </td>
156
		<td class="configure-link"> <a href="<%= request.getContextPath() %>/admin?configureType=geoserver">Reconfigure Now</a> </td>
157
    	</tr>
158
<%
159
	} else if (geoserverConfigured != null && geoserverConfigured.equals(PropertyService.BYPASSED)){
160
%>
161
    	<tr>
162
    	<td class="configured-tag">[bypassed] </td>
163
		<td class="property-title"> Geoserver Configuration </td>
164
<%
165
		if (propsConfigured != null && propsConfigured) {
166
%>
167
168 4480 daigle
		<td class="configure-link"> <a href="<%= request.getContextPath() %>/admin?configureType=geoserver">Reconfigure Now</a> </td>
169 4198 daigle
<%
170
		} else {
171
%>
172
		<td class="configure-link"> Configure Global Properties First </td>
173
<%
174
		}
175
			%>
176
    	</tr>
177
<%
178
	} else {
179
%>
180
    	<tr>
181
    	<td class="unconfigured-tag">[unconfigured] </td>
182
    	<td class="property-title"> Geoserver Configuration </td>
183
<%
184
		if (propsConfigured != null && propsConfigured) {
185
%>
186
187
		<td class="configure-link"> <a href="<%= request.getContextPath() %>/admin?configureType=geoserver">Configure Now</a> </td>
188
189
<%
190
		} else {
191
%>
192
		<td class="configure-link"> Configure Global Properties First </td>
193
<%
194
		}
195
%>
196
    	</tr>
197
<%
198
	}
199
%>
200
201 4080 daigle
</table>
202
203
<%
204
	if (metacatConfigured != null && metacatConfigured) {
205
%>
206
207 4100 daigle
	<hr class="config-line">
208 4080 daigle
	<br clear="right"/>
209 4198 daigle
<%
210
		if (metacatServletInitialized != null && metacatServletInitialized) {
211
%>
212 4080 daigle
	<h3>Restarting Metacat</h3>
213 4198 daigle
	<p> Since this is a reconfiguration, you will need to restart Metacat after any changes.</p>
214
215 4080 daigle
	<p>The simplest way to restart metacat is to restart the entire servlet engine.
216
	   For Tomcat, this would mean calling "$TOMCAT_HOME/bin/tomcat.sh restart" or
217
	   an equivalent command appropriate to your operating system. After restarting,
218
	   you can access your new Metacat server at the URL:
219
 	  <a href="<%= request.getScheme() + "://" +
220
	       request.getServerName() + ":" + request.getServerPort() +
221
	       request.getContextPath() %>"><%= request.getScheme() + "://" +
222
                request.getServerName() + ":" + request.getServerPort() +
223
                request.getContextPath() %></a>
224
	</p>
225 4198 daigle
<%
226
		} else {
227
%>
228
			Configuration of Metacat is complete.  You can <a href="<%= request.getContextPath() %>/metacat?action=gohome">go to metacat</a>
229
			now.  Note that this may take some time while the system initializes with the new configuration values.
230
<%
231
		}
232
%>
233 4080 daigle
234 4100 daigle
	<hr class="config-line">
235 4080 daigle
	<%@ include file="./login-footer-section.jsp"%>
236
237
	</body>
238
	</html>
239
<%
240
    }
241
%>