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