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