1 |
4100
|
daigle
|
<%@ page language="java" %>
|
2 |
5027
|
daigle
|
<%@ page import="java.util.Vector,edu.ucsb.nceas.metacat.database.DBVersion,edu.ucsb.nceas.metacat.MetacatVersion" %>
|
3 |
4080
|
daigle
|
|
4 |
5027
|
daigle
|
<%
|
5 |
|
|
/**
|
6 |
4080
|
daigle
|
* '$RCSfile$'
|
7 |
|
|
* Copyright: 2008 Regents of the University of California and the
|
8 |
|
|
* National Center for Ecological Analysis and Synthesis
|
9 |
|
|
* For Details: http://www.nceas.ucsb.edu/
|
10 |
|
|
*
|
11 |
|
|
* '$Author$'
|
12 |
|
|
* '$Date$'
|
13 |
|
|
* '$Revision$'
|
14 |
|
|
*
|
15 |
|
|
* This program is free software; you can redistribute it and/or modify
|
16 |
|
|
* it under the terms of the GNU General Public License as published by
|
17 |
|
|
* the Free Software Foundation; either version 2 of the License, or
|
18 |
|
|
* (at your option) any later version.
|
19 |
|
|
*
|
20 |
|
|
* This program is distributed in the hope that it will be useful,
|
21 |
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
22 |
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
23 |
|
|
* GNU General Public License for more details.
|
24 |
|
|
*
|
25 |
|
|
* You should have received a copy of the GNU General Public License
|
26 |
|
|
* along with this program; if not, write to the Free Software
|
27 |
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
28 |
|
|
*/
|
29 |
|
|
%>
|
30 |
|
|
|
31 |
5027
|
daigle
|
<%
|
32 |
|
|
MetacatVersion metacatVersion = (MetacatVersion)request.getAttribute("metacatVersion");
|
33 |
4080
|
daigle
|
DBVersion databaseVersion = (DBVersion)request.getAttribute("databaseVersion");
|
34 |
|
|
Vector<String> updateScriptList = (Vector<String> )request.getAttribute("updateScriptList");
|
35 |
4406
|
daigle
|
String supportEmail = (String)request.getAttribute("supportEmail");
|
36 |
4080
|
daigle
|
%>
|
37 |
|
|
|
38 |
|
|
<html>
|
39 |
|
|
<head>
|
40 |
|
|
|
41 |
|
|
<title>Database Install/Upgrade Utility</title>
|
42 |
8240
|
walker
|
<%@ include file="./head-section.jsp"%>
|
43 |
4080
|
daigle
|
</head>
|
44 |
|
|
<body>
|
45 |
4557
|
daigle
|
<%@ include file="./header-section.jsp"%>
|
46 |
|
|
|
47 |
8222
|
walker
|
<div class="document">
|
48 |
|
|
<h2>Database Install/Upgrade Utility</h2>
|
49 |
|
|
|
50 |
|
|
<p><%@ include file="page-message-section.jsp"%></p>
|
51 |
|
|
|
52 |
|
|
<%
|
53 |
|
|
if (databaseVersion != null && databaseVersion.getVersionString().equals("0.0.0")) {
|
54 |
|
|
%>
|
55 |
|
|
The system has detected that this is a new database. <br><br>
|
56 |
|
|
Please hit the Continue button to upgrade your database to version: <%= metacatVersion.getVersionString() %>. <br><br>
|
57 |
|
|
<div class=warning>Warning: this will reinitialize your database. If this is not a new database, hit the Cancel button and contact support at <%= supportEmail %>. </div><br><br>
|
58 |
|
|
The following scripts will be run:
|
59 |
|
|
|
60 |
|
|
<ul>
|
61 |
|
|
<%
|
62 |
|
|
for (int i = 0; i < updateScriptList.size(); i++) {
|
63 |
|
|
%>
|
64 |
|
|
<li>
|
65 |
|
|
<%= updateScriptList.elementAt(i) %>
|
66 |
|
|
</li>
|
67 |
|
|
<%
|
68 |
|
|
}
|
69 |
|
|
%>
|
70 |
|
|
</ul>
|
71 |
|
|
<input class="button" type="button" value="Continue" onClick="forward('./admin?configureType=database&processForm=true')">
|
72 |
8203
|
walker
|
<input class="button" type="button" value="Cancel" onClick="forward('./admin?configureType=configure&processForm=false')">
|
73 |
8222
|
walker
|
<%
|
74 |
|
|
} else if (databaseVersion != null) {
|
75 |
|
|
%>
|
76 |
|
|
The system has detected the following database version: <%= databaseVersion.getVersionString() %> <br><br>
|
77 |
|
|
Please hit the Continue button to upgrade your database to version: <%= metacatVersion.getVersionString() %> <br>
|
78 |
|
|
<div class=warning>Warning: this will update your database. If the detected versions do not seem correct, hit the Cancel button and contact support at <%= supportEmail %> </div><br><br>
|
79 |
|
|
The following scripts will be run: <br>
|
80 |
|
|
<ul>
|
81 |
|
|
<%
|
82 |
|
|
for (int i = 0; i < updateScriptList.size(); i++) {
|
83 |
|
|
%>
|
84 |
|
|
<li>
|
85 |
|
|
<%= updateScriptList.elementAt(i) %>
|
86 |
|
|
</li>
|
87 |
|
|
<%
|
88 |
|
|
}
|
89 |
|
|
%>
|
90 |
|
|
</ul>
|
91 |
|
|
<div class="buttons-wrapper">
|
92 |
|
|
<input class="button" type="button" value="Continue" onClick="forward('./admin?configureType=database&processForm=true')">
|
93 |
|
|
<input class="button" type="button" value="Cancel" onClick="forward('./admin?configureType=configure&processForm=false')">
|
94 |
|
|
</div>
|
95 |
|
|
<%
|
96 |
|
|
} else {
|
97 |
|
|
%>
|
98 |
|
|
<div class="buttons-wrapper">
|
99 |
|
|
<input class="button" disabled type="button" value="Continue" onClick="forward('./admin?configureType=database&processForm=true')">
|
100 |
|
|
<input class="button" type="button" value="Cancel" onClick="forward('./admin?configureType=configure&processForm=false')">
|
101 |
|
|
</div>
|
102 |
|
|
<%
|
103 |
|
|
}
|
104 |
|
|
%>
|
105 |
|
|
</div>
|
106 |
4557
|
daigle
|
<%@ include file="./footer-section.jsp"%>
|
107 |
4080
|
daigle
|
|
108 |
|
|
</body>
|
109 |
|
|
</html>
|