Project

General

Profile

1
<%@ page language="java"  %>
2
<%@ page import="edu.ucsb.nceas.metacat.database.DBVersion,edu.ucsb.nceas.metacat.MetacatVersion" %>
3
<%@ page import="edu.ucsb.nceas.metacat.properties.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: walker $'
13
 *     '$Date: 2013-09-19 11:59:52 -0700 (Thu, 19 Sep 2013) $'
14
 * '$Revision: 8245 $'
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
    Boolean replicationConfigured = (Boolean)request.getAttribute("replicationConfigured");
41
    String dataoneConfigured = (String)request.getAttribute("dataoneConfigured");
42
    String geoserverConfigured = (String)request.getAttribute("geoserverConfigured");
43
    Boolean metacatConfigured = (Boolean)request.getAttribute("metacatConfigured");
44
    Boolean metacatServletInitialized = (Boolean)request.getAttribute("metcatServletInitialized");
45
    String contextURL = (String)request.getAttribute("contextURL");
46
%>
47

    
48
<html>
49
<head>
50
<title>Metacat Configuration</title>
51
<%@ include file="./head-section.jsp"%>
52
</head>
53

    
54
<body>
55
<%@ include file="./header-section.jsp"%>
56
<div class="document">
57
	<h2>Metacat Configuration</h2>
58
	
59
	<p>All of the following sections must be in a configured state for Metacat to run properly:</p>
60
	<br class="main-header">
61
	
62
	<%@ include file="page-message-section.jsp"%>
63
	
64
	<table class="configuration-table">
65
	
66
	<%
67
		if (propsConfigured != null && propsConfigured) {
68
	%>
69
	        <tr>
70
	        <td class="configured-tag"><i class="icon-ok"></i> configured </td>
71
			<td class="property-title"> Metacat Global Properties </td> 
72
			<td class="configure-link"> <i class="icon-cogs"></i><a href="<%= request.getContextPath() %>/admin?configureType=properties">Reconfigure Now</a> </td>
73
	        </tr>
74
	<%
75
		} else {
76
	%>    		
77
	        <tr>
78
	 		<td class="unconfigured-tag">unconfigured </td>  
79
	 		<td class="property-title"> Metacat Global Properties </td>
80
			<td class="configure-link"> <i class="icon-cogs"></i><a href="<%= request.getContextPath() %>/admin?configureType=properties">Configure Now</a> </td>			
81
	    	</tr>
82
	<%
83
		}
84
	
85
		if (authConfigured != null && authConfigured) {
86
	%>
87
	        <tr>
88
	        <td class="configured-tag"><i class="icon-ok"></i>configured </td>
89
			<td class="property-title"> Authentication Configuration </td> 
90
			<td class="configure-link"> <i class="icon-cogs"></i><a href="<%= request.getContextPath() %>/admin?configureType=auth">Reconfigure Now</a> </td>
91
	        </tr>
92
	<%
93
		} else {
94
	%>    		
95
	        <tr>
96
	 		<td class=unconfigured-tag>unconfigured</td>  
97
	 		<td class=property-title> Authentication Configuration </td>
98
			<td class=configure-link> <i class="icon-cogs"></i><a href="<%= request.getContextPath() %>/admin?configureType=auth">Configure Now</a> </td>			
99
	    	</tr>
100
	<%
101
		}
102
		
103
	    if (skinsConfigured != null && skinsConfigured) {
104
	%>
105
	        <tr>
106
	        <td class="configured-tag"><i class="icon-ok"></i>configured</td>
107
			<td class="property-title"> Skins Specific Properties </td> 
108
			<td class="configure-link"> <i class="icon-cogs"></i><a href="<%= request.getContextPath() %>/admin?configureType=skins">Reconfigure Now</a> </td>
109
	        </tr>
110
	<%
111
		} else {
112
	%>    		
113
	        <tr>
114
	 		<td class="unconfigured-tag">unconfigured </td>  
115
	 		<td class="property-title"> Skins Specific Properties </td>
116
			<td class="configure-link"> <i class="icon-cogs"></i><a href="<%= request.getContextPath() %>/admin?configureType=skins">Configure Now</a> </td>			
117
	    	</tr>
118
	<%
119
		}  
120
	    
121
	    if ((dbConfigured != null && dbConfigured) ||
122
	    		(metacatVersion != null && databaseVersion != null && 
123
	    				metacatVersion.compareTo(databaseVersion) == 0)) {
124
	%>
125
	    	<tr>
126
	    	<td class="configured-tag"><i class="icon-ok"></i> configured </td>
127
	    	<td class="property-title"> Database Installation/Upgrade </td> 
128
			<td class="configure-link inactive"> Version: <%=databaseVersion.getVersionString()%> </td>    		
129
	    	</tr>
130
	<%
131
		} else {
132
	%>    		
133
	    	<tr>
134
	    	<td class="unconfigured-tag">unconfigured </td>  
135
	    	<td class="property-title"> Database Installation/Upgrade </td>
136
	<%
137
		if (propsConfigured != null && propsConfigured) {
138
	%>
139
	        	
140
			<td class="configure-link"> <i class="icon-cogs"></i><a href="<%= request.getContextPath() %>/admin?configureType=database">Configure Now</a> </td>			
141
	        	
142
	<%
143
				        		} else {
144
				        	%> 
145
			<td class="configure-link inactive"> Configure Global Properties First </td>
146
	<%
147
		}
148
	%>     	
149
	    	</tr>
150
	<%
151
		}
152
	
153
	    if (geoserverConfigured != null && geoserverConfigured.equals(PropertyService.CONFIGURED)) {
154
	%>
155
	    	<tr>
156
	    	<td class="configured-tag"><i class="icon-ok"></i> configured </td>
157
	    	<td class="property-title"> Geoserver Configuration </td> 
158
			<td class="configure-link"> <i class="icon-cogs"></i> <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"><i class="icon-ok"></i> bypassed </td>  
165
			<td class="property-title"> Geoserver Configuration </td>  
166
	<%
167
			if (propsConfigured != null && propsConfigured) {
168
	%>
169
	        	
170
			<td class="configure-link"> <i class="icon-cogs"></i><a href="<%= request.getContextPath() %>/admin?configureType=geoserver">Reconfigure Now</a> </td>			       	
171
	<%
172
			} else {
173
	%> 
174
			<td class="configure-link inactive"> 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"> <i class="icon-cogs"></i><a href="<%= request.getContextPath() %>/admin?configureType=geoserver">Configure Now</a> </td>			
190
	        	
191
	<%
192
			} else {
193
	%> 
194
			<td class="configure-link inactive"> Configure Global Properties First </td>
195
	<%
196
			}
197
	%>     	
198
	    	</tr>
199
	<%
200
		}
201
	%>
202
	
203
	<%
204
	
205
	    if (dataoneConfigured != null && dataoneConfigured.equals(PropertyService.CONFIGURED)) {
206
	%>
207
	    	<tr>
208
	    	<td class="configured-tag"><i class="icon-ok"></i> configured</td>
209
	    	<td class="property-title"> Dataone Configuration </td> 
210
			<td class="configure-link"> <i class="icon-cogs"></i><a href="<%= request.getContextPath() %>/admin?configureType=dataone">Reconfigure Now</a> </td>   		
211
	    	</tr>
212
	<%
213
		} else if (dataoneConfigured != null && dataoneConfigured.equals(PropertyService.BYPASSED)){
214
	%>    		
215
	    	<tr>
216
	    	<td class="configured-tag"><i class="icon-ok"></i> bypassed </td>  
217
			<td class="property-title"> Dataone Configuration </td>  
218
	<%
219
			if (propsConfigured != null && propsConfigured) {
220
	%>
221
	        	
222
			<td class="configure-link"> <i class="icon-cogs"></i> <a href="<%= request.getContextPath() %>/admin?configureType=dataone">Reconfigure Now</a> </td>			       	
223
	<%
224
			} else {
225
	%> 
226
			<td class="configure-link inactive"> Configure Global Properties First </td>
227
	<%
228
			}
229
				%>     	
230
	    	</tr>
231
	<%
232
		} else {
233
	%>    		
234
	    	<tr>
235
	    	<td class="unconfigured-tag">unconfigured </td>  
236
	    	<td class="property-title"> Dataone Configuration </td>   
237
	<%
238
			if (propsConfigured != null && propsConfigured) {
239
	%>
240
	        	
241
			<td class="configure-link"> <i class="icon-cogs"></i><a href="<%= request.getContextPath() %>/admin?configureType=dataone">Configure Now</a> </td>			
242
	        	
243
	<%
244
			} else {
245
	%> 
246
			<td class="configure-link inactive"> Configure Global Properties First </td>
247
	<%
248
			}
249
	%>     	
250
	    	</tr>
251
	<%
252
		}
253
	%>
254
	
255
	<!-- replication -->
256
	   	<tr>
257
	   	<td class="configured-tag"><i class="icon-ok"></i> configured </td>  
258
	   	<td class="property-title"> Replication Configuration </td>   
259
	<%
260
		if (propsConfigured != null && propsConfigured) {
261
	%>
262
	        	
263
		<td class="configure-link"> <i class="icon-cogs"></i><a href="<%= request.getContextPath() %>/admin?configureType=replication">Reconfigure Now</a> </td>			
264
	        	
265
	<%
266
		} else {
267
	%> 
268
		<td class="configure-link inactive"> Configure Global Properties First </td>
269
	<%
270
		}
271
	%>     	
272
	   	</tr>
273
	
274
	
275
	
276
	<!--  -->
277
	</table>
278
	
279
	<%
280
		if (metacatConfigured != null && metacatConfigured) {
281
	%>
282
		<br clear="right"/>
283
	<%
284
			if (metacatServletInitialized != null && metacatServletInitialized) {
285
	%>	
286
		<h3>Restarting Metacat</h3>
287
		<p> Since this is a reconfiguration, you will need to restart Metacat after any changes.</p>
288
		
289
		<p>The simplest way to restart metacat is to restart the entire servlet engine.
290
		   For Tomcat, this would mean calling "sudo /etc/init.d/tomcat6 restart" or
291
		   an equivalent command appropriate to your operating system. After restarting,
292
		   you can access your new Metacat server at the URL:
293
	      <a href="<%= contextURL %>"><%= contextURL  %></a>
294
		</p>
295
	<%
296
			} else {
297
	%> 	
298
				<div class="alert alert-success"><i class="icon-thumbs-up"></i>Configuration of Metacat is complete.  You can <a href="<%= request.getContextPath() %>">go to metacat</a> 
299
				now.  Note that this may take some time while the system initializes with the new configuration values.</div>
300
	<%
301
			}
302
		}
303
	%>			
304
</div>
305

    
306
	<%@ include file="./footer-section.jsp"%>
307

    
308
</body>
309
</html>
(13-13/19)