Project

General

Profile

1
<%@ page language="java" import="edu.ucsb.nceas.metacat.DBVersion,edu.ucsb.nceas.metacat.MetaCatVersion" %>
2

    
3
<%
4
	/**
5
 *  '$RCSfile$'
6
 *    Copyright: 2008 Regents of the University of California and the
7
 *               National Center for Ecological Analysis and Synthesis
8
 *  For Details: http://www.nceas.ucsb.edu/
9
 *
10
 *   '$Author: daigle $'
11
 *     '$Date: 2008-07-25 12:57:43 -0700 (Fri, 25 Jul 2008) $'
12
 * '$Revision: 4163 $'
13
 * 
14
 * This program is free software; you can redistribute it and/or modify
15
 * it under the terms of the GNU General Public License as published by
16
 * the Free Software Foundation; either version 2 of the License, or
17
 * (at your option) any later version.
18
 *
19
 * This program is distributed in the hope that it will be useful,
20
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22
 * GNU General Public License for more details.
23
 *
24
 * You should have received a copy of the GNU General Public License
25
 * along with this program; if not, write to the Free Software
26
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
27
 */
28
%>
29

    
30
<%
31
	MetaCatVersion metacatVersion = (MetaCatVersion)request.getAttribute("metaCatVersion"); 	
32
	DBVersion databaseVersion = (DBVersion)request.getAttribute("databaseVersion");		
33
    Boolean propsConfigured = (Boolean)request.getAttribute("propsConfigured");	
34
    Boolean orgsConfigured = (Boolean)request.getAttribute("orgsConfigured");	
35
    Boolean ldapConfigured = (Boolean)request.getAttribute("ldapConfigured");	
36
    Boolean skinsConfigured = (Boolean)request.getAttribute("skinsConfigured");	
37
    Boolean dbConfigured = (Boolean)request.getAttribute("dbConfigured");
38
    Boolean metacatConfigured = (Boolean)request.getAttribute("metacatConfigured");
39
%>
40

    
41
<html>
42
<head>
43
<title>Metacat Configuration</title>
44
<link rel="stylesheet" type="text/css" 
45
        href="<%= request.getContextPath() %>/admin/admin.css"></link>
46
</head>
47

    
48
<body>
49
<img src="<%= request.getContextPath() %>/metacat-logo.png" width="100px" align="right"/> 
50
<h2>MetaCat Configuration</h2>
51

    
52
All of the following sections must be in a configured state for Metacat to run properly:
53
<br class="main-header">
54

    
55
<%@ include file="page-message-section.jsp"%>
56
<hr class="config-line">
57

    
58
<table class="configuration-table">
59
<%
60
	if (ldapConfigured != null && ldapConfigured) {
61
%>
62
        <tr>
63
        <td class="configured-tag">[configured] </td>
64
		<td class="property-title"> LDAP Configuration </td> 
65
		<td class="configure-link"> <a href="<%= request.getContextPath() %>/admin?configureType=ldap">Reconfigure Now</a> </td>
66
        </tr>
67
<%
68
	} else {
69
%>    		
70
        <tr>
71
 		<td class=unconfigured-tag>[unconfigured] </td>  
72
 		<td class=property-title> LDAP Configuration </td>
73
		<td class=configure-link> <a href="<%= request.getContextPath() %>/admin?configureType=ldap">Configure Now</a> </td>			
74
    	</tr>
75
<%
76
	}
77
%>
78

    
79
<%
80
	if (orgsConfigured != null && orgsConfigured) {
81
%>
82
        <tr>
83
        <td class="configured-tag">[configured] </td>
84
		<td class="property-title"> Organization Configuration </td> 
85
		<td class="configure-link"> <a href="<%= request.getContextPath() %>/admin?configureType=organization">Reconfigure Now</a> </td>
86
        </tr>
87
<%
88
	} else {
89
%>    		
90
        <tr>
91
 		<td class=unconfigured-tag>[unconfigured] </td>  
92
 		<td class=property-title> Organization Configuration </td>
93
		<td class=configure-link> <a href="<%= request.getContextPath() %>/admin?configureType=organization">Configure Now</a> </td>			
94
    	</tr>
95
<%
96
	}
97
%>
98

    
99
<%
100
	if (propsConfigured != null && propsConfigured) {
101
%>
102
        <tr>
103
        <td class="configured-tag">[configured] </td>
104
		<td class="property-title"> Metacat Global Properties </td> 
105
		<td class="configure-link"> <a href="<%= request.getContextPath() %>/admin?configureType=properties">Reconfigure Now</a> </td>
106
        </tr>
107
<%
108
	} else {
109
%>    		
110
        <tr>
111
 		<td class="unconfigured-tag">[unconfigured] </td>  
112
 		<td class="property-title"> Metacat Global Properties </td>
113
		<td class="configure-link"> <a href="<%= request.getContextPath() %>/admin?configureType=properties">Configure Now</a> </td>			
114
    	</tr>
115
<%
116
	}
117

    
118
    if (skinsConfigured != null && skinsConfigured) {
119
%>
120
        <tr>
121
        <td class="configured-tag">[configured] </td>
122
		<td class="property-title"> Skins Specific Properties </td> 
123
		<td class="configure-link"> <a href="<%= request.getContextPath() %>/admin?configureType=skins">Reconfigure Now</a> </td>
124
        </tr>
125
<%
126
	} else {
127
%>    		
128
        <tr>
129
 		<td class="unconfigured-tag">[unconfigured] </td>  
130
 		<td class="property-title"> Skins Specific Properties </td>
131
		<td class="configure-link"> <a href="<%= request.getContextPath() %>/admin?configureType=skins">Configure Now</a> </td>			
132
    	</tr>
133
<%
134
	}
135
    
136
    if ((dbConfigured != null && dbConfigured) ||
137
    		(metacatVersion != null && databaseVersion != null && 
138
    				metacatVersion.compareTo(databaseVersion) == 0)) {
139
%>
140
    	<tr>
141
    	<td class="configured-tag">[configured] </td>
142
    	<td class="property-title"> Database Installation/Upgrade </td> 
143
		<td class="configure-link"> Version: <%= databaseVersion.getVersionString() %> </td>    		
144
    	</tr>
145
<%
146
	} else {
147
%>    		
148
    	<tr>
149
    	<td class="unconfigured-tag">[unconfigured] </td>  
150
    	<td class="property-title"> Database Installation/Upgrade </td>
151
<%
152
	if (propsConfigured != null && propsConfigured) {
153
%>
154
        	
155
		<td class="configure-link"> <a href="<%= request.getContextPath() %>/admin?configureType=database">Configure Now</a> </td>			
156
        	
157
<%
158
	} else {
159
%> 
160
		<td class="configure-link"> Configure System Properties First </td>
161
<%
162
				}
163
			%>     	
164
    	</tr>
165
<%
166
	}
167
%>
168
</table>
169
<hr class="config-line">
170

    
171
<%
172
	if (metacatConfigured != null && metacatConfigured) {
173
%>
174
	<br>
175
	<h3>Configuring Geoserver</h3>
176
	<p>Metacat ships with <a href="http://docs.codehaus.org/display/GEOS/Home">Geoserver</a> to handle the spatial functionality.
177
	   Regardless of whether you plan on using the spatial functionality you should,
178
	   for security purposes, configure geoserver initially so that it doesn't use
179
	   the default password.
180
	   To configure geoserver with a new admin password:
181
	   <ol>
182
	    <li> Point your browser to 
183
	     <a href="<%= request.getScheme() + "://" +
184
	       request.getServerName() + ":" + request.getServerPort() +
185
              request.getContextPath() %>/geoserver.jsp"><%= request.getScheme() + "://" +
186
	                      request.getServerName() + ":" + request.getServerPort() +
187
			                      request.getContextPath() %>/geoserver.jsp</a>. </li>
188
	     <li> Login using the default username and password ( <em>admin</em> / <em>geoserver</em> ) </li>
189
	    <li> Point your browser to 
190
	     <a href="<%= request.getScheme() + "://" +
191
	       request.getServerName() + ":" + request.getServerPort() +
192
              request.getContextPath() %>/config/loginEdit.do"><%= request.getScheme() + "://" +
193
	                      request.getServerName() + ":" + request.getServerPort() +
194
			                      request.getContextPath() %>/config/loginEdit.do</a>, enter a new user and password then submit. </li>
195
	     <li> In the upper-left, click <em>Apply</em> then <em>Save</em> to save your new password.
196

    
197

    
198
	    </ol>
199
	</p>
200
	
201
	<hr class="config-line">
202
	<br clear="right"/>
203
	<h3>Restarting Metacat</h3>
204
	<p>The simplest way to restart metacat is to restart the entire servlet engine.
205
	   For Tomcat, this would mean calling "$TOMCAT_HOME/bin/tomcat.sh restart" or
206
	   an equivalent command appropriate to your operating system. After restarting,
207
	   you can access your new Metacat server at the URL:
208
 	  <a href="<%= request.getScheme() + "://" + 
209
	       request.getServerName() + ":" + request.getServerPort() +
210
	       request.getContextPath() %>"><%= request.getScheme() + "://" + 
211
                request.getServerName() + ":" + request.getServerPort() +
212
                request.getContextPath() %></a>
213
	</p>
214

    
215
	<hr class="config-line">
216
	<%@ include file="./login-footer-section.jsp"%>
217

    
218
	</body>
219
	</html>
220
<%  	
221
    }
222
%>
(8-8/12)