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: daigle $'
13
 *     '$Date: 2008-10-22 14:44:51 -0700 (Wed, 22 Oct 2008) $'
14
 * '$Revision: 4480 $'
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 ldapConfigured = (Boolean)request.getAttribute("ldapConfigured");	
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
<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
<hr class="config-line">
61

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

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

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

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

    
203
<%
204
	if (metacatConfigured != null && metacatConfigured) {
205
%>
206
	
207
	<hr class="config-line">
208
	<br clear="right"/>
209
<%
210
		if (metacatServletInitialized != null && metacatServletInitialized) {
211
%>	
212
	<h3>Restarting Metacat</h3>
213
	<p> Since this is a reconfiguration, you will need to restart Metacat after any changes.</p>
214
	
215
	<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
<%
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

    
234
	<hr class="config-line">
235
	<%@ include file="./login-footer-section.jsp"%>
236

    
237
	</body>
238
	</html>
239
<%  	
240
    }
241
%>
(9-9/13)