Project

General

Profile

1
<%@ 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

    
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: walbridge $'
13
 *     '$Date: 2008-11-20 16:54:43 -0800 (Thu, 20 Nov 2008) $'
14
 * '$Revision: 4605 $'
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
    Boolean orgsConfigured = (Boolean)request.getAttribute("orgsConfigured");	
37
    Boolean authConfigured = (Boolean)request.getAttribute("authConfigured");	
38
    Boolean skinsConfigured = (Boolean)request.getAttribute("skinsConfigured");	
39
    Boolean dbConfigured = (Boolean)request.getAttribute("dbConfigured");
40
    String geoserverConfigured = (String)request.getAttribute("geoserverConfigured");
41
    Boolean metacatConfigured = (Boolean)request.getAttribute("metacatConfigured");
42
    Boolean metacatServletInitialized = (Boolean)request.getAttribute("metcatServletInitialized");
43
%>
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
<%@ include file="./header-section.jsp"%>
54
<img src="<%= request.getContextPath() %>/metacat-logo.png" width="100px" align="right"/> 
55
<h2>Metacat Configuration</h2>
56

    
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
<hr class="config-line">
62

    
63
<table class="configuration-table">
64

    
65
<%
66
	if (propsConfigured != null && propsConfigured) {
67
%>
68
        <tr>
69
        <td class="configured-tag">[configured] </td>
70
		<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
        </tr>
73
<%
74
	} else {
75
%>    		
76
        <tr>
77
 		<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
    	</tr>
81
<%
82
	}
83

    
84
	if (authConfigured != null && authConfigured) {
85
%>
86
        <tr>
87
        <td class="configured-tag">[configured] </td>
88
		<td class="property-title"> Authentication Configuration </td> 
89
		<td class="configure-link"> <a href="<%= request.getContextPath() %>/admin?configureType=auth">Reconfigure Now</a> </td>
90
        </tr>
91
<%
92
	} else {
93
%>    		
94
        <tr>
95
 		<td class=unconfigured-tag>[unconfigured] </td>  
96
 		<td class=property-title> Authentication Configuration </td>
97
		<td class=configure-link> <a href="<%= request.getContextPath() %>/admin?configureType=auth">Configure Now</a> </td>			
98
    	</tr>
99
<%
100
	}
101
	
102
    if (skinsConfigured != null && skinsConfigured) {
103
%>
104
        <tr>
105
        <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
        </tr>
109
<%
110
	} else {
111
%>    		
112
        <tr>
113
 		<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
    	</tr>
117
<%
118
	}  
119
    
120
    if ((dbConfigured != null && dbConfigured) ||
121
    		(metacatVersion != null && databaseVersion != null && 
122
    				metacatVersion.compareTo(databaseVersion) == 0)) {
123
%>
124
    	<tr>
125
    	<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
    	</tr>
129
<%
130
	} else {
131
%>    		
132
    	<tr>
133
    	<td class="unconfigured-tag">[unconfigured] </td>  
134
    	<td class="property-title"> Database Installation/Upgrade </td>
135
<%
136
		if (propsConfigured != null && propsConfigured) {
137
%>
138
        	
139
		<td class="configure-link"> <a href="<%= request.getContextPath() %>/admin?configureType=database">Configure Now</a> </td>			
140
        	
141
<%
142
		} else {
143
%> 
144
		<td class="configure-link"> Configure Global Properties First </td>
145
<%
146
		}
147
			%>     	
148
    	</tr>
149
<%
150
	}
151

    
152
    if (geoserverConfigured != null && geoserverConfigured.equals(PropertyService.CONFIGURED)) {
153
%>
154
    	<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
		<td class="configure-link"> <a href="<%= request.getContextPath() %>/admin?configureType=geoserver">Reconfigure Now</a> </td>			       	
170
<%
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
</table>
203

    
204
<%
205
	if (metacatConfigured != null && metacatConfigured) {
206
%>
207
	
208
	<hr class="config-line">
209
	<br clear="right"/>
210
<%
211
		if (metacatServletInitialized != null && metacatServletInitialized) {
212
%>	
213
	<h3>Restarting Metacat</h3>
214
	<p> Since this is a reconfiguration, you will need to restart Metacat after any changes.</p>
215
	
216
	<p>The simplest way to restart metacat is to restart the entire servlet engine.
217
	   For Tomcat, this would mean calling "sudo /etc/init.d/tomcat5.5 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
<%
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
%>			
235

    
236
	<%@ include file="./footer-section.jsp"%>
237

    
238
</body>
239
</html>
(10-10/14)