MigrationResourceFile.jsp
14.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ page import="java.io.File" %>
<%@ page import="weaver.general.GCONST" %>
<%@ page import="weaver.upgradetool.dbupgrade.upgrade.PropUtil" %>
<%@ page import="com.alibaba.fastjson.JSONObject" %>
<%@ page import="weaver.upgradetool.dbupgrade.upgrade.ToolUtil" %>
<%@ page import="java.util.LinkedHashMap" %>
<%@ page import="weaver.upgradetool.dbupgrade.upgrade.DBUpgradeProcess" %>
<%@ page import="weaver.general.Util" %>
<%@ page import="weaver.conn.RecordSet" %>
<%@ include file="/system/upgradetoe9/DBUpgradeInit.jsp"%>
<html>
<%
String sqlconfigpath = GCONST.getRootPath() + "system" + File.separatorChar + "upgradetoe9" + File.separatorChar + "resource" + File.separatorChar + "migration.properties";
PropUtil propUtil = PropUtil.getInstance(sqlconfigpath);
String filelist1="";
String filelist2="";
String filelist3="";
filelist1= new String(Util.null2String(propUtil.getValues("filelist1")).getBytes(),"utf-8");
filelist2=Util.null2String(propUtil.getValues("filelist2"));
filelist3=Util.null2String(propUtil.getValues("filelist3"));
String e9migrationcheckstataus=Util.null2String(propUtil.getValues("e9_migrationcheckstataus"),"0");
String commonfile1="filesystem/layout";
RecordSet rs=new RecordSet();
rs.executeQuery("select filesystem from systemset");
if(rs.next()){
String zfilepath=Util.null2String(rs.getString("filesystem"));
if(!"".equalsIgnoreCase(zfilepath)&&zfilepath!=null){
commonfile1=zfilepath.replace("\\","\\\\");
}
}
%>
<script type="text/javascript" src="/system/upgradetoe9/js/jquery-1.8.3.min_wev8.js"></script>
<link rel="stylesheet" href="/system/upgradetoe9/css/seachBody_wev8.css" type="text/css"/>
<link type="text/css" rel="stylesheet" href="/system/upgradetoe9/css/dialog.css" />
<script type="text/javascript" src="/system/upgradetoe9/js/dialog.js"></script>
<script type="text/javascript">
$("document").ready(function () {
$.ajax({
url:'/system/upgradetoe9/MigrationResourceFileOperation.jsp',
type:'post',
dataType: "json",
success:function(data){
$("#fileinfo").html(data.fileinfo);
$("#filesystem").html(data.filesystem);
}
});
});
</script>
<head>
<title> E-cology迁移程序</title>
<style>
TABLE {
FONT-SIZE: 9pt;
FONT-FAMILY: Verdana;
}
BODY {
FONT-SIZE: 9pt;
MARGIN: 0px;
FONT-FAMILY: Verdana;
LIST-STYLE-TYPE: circle;
}
input, select, textarea {
/*border:#e7e7e7 1px solid;*/
vertical-align: middle;
}
input, select {
line-height: 24px;
height: 24px;
}
table input {
border: 1px solid #ccc !important;
border-radius: 3px; /* !*css3属性IE不支持*!*/
padding: 6px 0px 5px 10px;
}
.progressbar {
width: 98%;
/* margin-left: 10%;*/
border-radius: 7px;
border: 1px solid #008000;
float: left;
-webkit-box-shadow: 3px 3px 3px #ADADAD;
-moz-box-shadow: 3px 3px 3px #ADADAD;
box-shadow: 3px 3px 3px #ADADAD;
}
.btn-primary {
height: 25%;
text-decoration: none;
background: #337AB7;
color: #f2f2f2;
padding: 0 20px 0 20px;
font-size: 14px;
font-family: 微软雅黑, 宋体, Arial, Helvetica, Verdana, sans-serif;
/*font-weight:bold;*/
border-radius: 5px;
-webkit-transition: all linear 0.10s;
-moz-transition: all linear 0.10s;
transition: all linear 0.10s;
}
.btn-primary:hover {
background: #286090;
}
.btn-success {
height: 25%;
text-decoration: none;
background: #5CB85C;
color: #f2f2f2;
padding: 0 20px 0 20px;
font-size: 14px;
font-family: 微软雅黑, 宋体, Arial, Helvetica, Verdana, sans-serif;
/*font-weight:bold;*/
border-radius: 5px;
}
.btn-success:hover {
background: #b8b1b6;
}
.btn-success-disabled:hover {
background: #5CB85C;
}
.btn-success-disabled {
height: 25%;
text-decoration: none;
background: #b8b1b6;
color: #f2f2f2;
padding: 0 20px 0 20px;
font-size: 14px;
font-family: 微软雅黑, 宋体, Arial, Helvetica, Verdana, sans-serif;
/*font-weight:bold;*/
border-radius: 5px;
}
.e8_btn_disabled {
border: 0px;
cursor: pointer;
padding-left: 0;
padding-left: 10px;
padding-right: 10px;
height: 30px;
line-height: 30px;
background-color: #959595;
color: white;
width: auto;
}
.e8_btn_submit {
border: 0px;
cursor: pointer;
padding-left: 0;
padding-left: 10px;
padding-right: 10px;
height: 30px;
line-height: 30px;
background-color: #558ED5;
color: white;
width: auto;
}
.e8_btn_submit_hover {
background-color: #0170C1 !important;
color: white;
}
.redtextstep4{
color: #D35026;
font-size: 20px;
}
.ulliststep41{
list-style: decimal;
background-color: #fff3dc;
padding-bottom: 20px;
}
.ulliststep41{
list-style: none;
line-height: 13px;
color: red;
font-size: 15px;
}
.listyle1{
line-height: 30px;
color: #6c6c6c;
font-size: 15px;
}
.headerstep4{
padding-top:0px;
height: 40px;
background-color: #f1f1f1;
}
.headerstep4 td{
/*font-weight: bold;*/
color: black;
font-size: 16px;
}
.ulliststep4{
padding-top: 10px;
list-style: none;
padding-bottom: 20px;
}
.ulliststep4{
list-style: none;
line-height: 30px;
color: black;
font-size: 15px;
}
a{
text-decoration: none;
}
</style>
</head>
<%
%>
<jsp:include page="/system/upgradetoe9/CommonTabHead.jsp">
<jsp:param name="mouldID" value="upgrade"/>
<jsp:param name="step" value="<%=currentStep%>"/>
<jsp:param name="navName" value="数据库迁移工具"/>
</jsp:include>
<table id="topTitle" cellpadding="0" cellspacing="0">
<tr>
<td></td>
<td class="rightSearchSpan" style="text-align:right; width:500px!important">
<button style="margin-right:10px;" id="scanfile" type="button" name="scanfile" onclick="next()" class="e8_btn_submit">文件扫描</button>
<button style="margin-right:10px;" id="next" type="button" name="next" onclick="next1()" class="e8_btn_disabled">下一步</button>
</button>
</td>
</tr>
</table>
<body style="height:100%;width:100%;">
<iframe name="downiframe" id="downiframe" src="" style="display:none" ></iframe>
<div style="width:20%;height:100%;float:left;background:#fcfcfc;">
<jsp:include page="MigrationStep.jsp"></jsp:include>
</div>
<div style="width:80%;height:100%;float:right">
<%--<table style="width: 98%;padding-left:1%;padding-top:1%; height: auto;" cellspacing="0" cellpadding="0" class="showtable" >--%>
<%--<tr>--%>
<%--<td >--%>
<%--<p class="redtextstep4">请手动执行下列步骤</p>--%>
<%--</td>--%>
<%--</tr>--%>
<%--<tr>--%>
<%--<td>--%>
<%--<ul class="ulliststep4">--%>
<%--<li class="listyle1">任务一: 需要拿到源环境的HTML模板文件,放到目标对应的文件的目录下,一般文件路径为<%=commonfile1%></li>--%>
<%--<li class="listyle1">任务二: 请根据HTML实际目录修改WORKFLOW_NODEHTMLLAYOUT表的syspath</li>--%>
<%--<li class="listyle1">任务三: 请手动拿到E7/E8一下列表中的文件覆盖到E9文件系统中去</li>--%>
<%--</ul>--%>
<%--</td>--%>
<%--</tr>--%>
<%--</table>--%>
<table style="width: 98%;padding-left:1%;padding-top:1%; height:auto;" cellspacing="0" cellpadding="0" class="showtable" >
<tr class="headerstep4" style="width:100%;height:40px;">
<td style="line-height:40px;float:left;">
<div><img src="images/sysadmin_doc_wev8.png" style="height:40px;line-height:40px;float:left"><span style="height:40px;line-height:40px;float:left"> 迁移文件说明</span></div>
</td>
</tr>
<tr>
<td>
<ul class="ulliststep41" id="consoleshow1">
<li class="listyle1">任务一: 需要获取到源环境的HTML模板文件,放到目标环境对应的文件目录下,详细操作请参考:
<a href="javascript:void(0)" onclick="downDoc('MigrationRecourceFile.doc','文件迁移操作文档.doc')">文件迁移操作文档.doc</a>
</li>
<li class="listyle1">任务二: 请手动获取E7/E8以下列表中的文件覆盖到E9文件系统中</li>
<li class="listyle1" id="scanfile11"></li>
<li style="padding-left: 15px"><p>1.E7/E8的WEN-INF/service/里的所有xml</p></li>
<li style="padding-left: 15px"><p>2.目录:<%=filelist2%>下所有的文件</p></li>
<li style="padding-left: 15px"><p>3./WEB-INF/文件夹下的<%=filelist3%></p></li>
</ul>
</td>
</tr>
</table>
</div>
</body>
</html>
<script type="text/javascript">
jQuery(document).ready(function(){
<% if(e9migrationcheckstataus.equalsIgnoreCase("1")){%>
$("#next").removeClass("e8_btn_disabled");
$("#next").addClass("e8_btn_submit");
$("#next").attr('disabled',false);
<%}%>
});
function next() {
$.ajax({
sync:false,
dataType:'json',
type:'post',
url:'MigrationResourceFileOperation.jsp',
data:{
'method': "ScanXMlFile"
},
success:function(data){
if(data.status==1){
$("#scanfile").attr('disabled',true);
$("#scanfile").removeClass("e8_btn_submit");
$("#scanfile").addClass("e8_btn_disabled");
$("#next").removeClass("e8_btn_disabled");
$("#next").addClass("e8_btn_submit");
$("#next").attr('disabled',false);
$.DialogByZ.Confirm({Title: "提示", Content: "文件扫描完成",BtnL:"确定"});
}else{
$("#next").removeClass("e8_btn_disabled");
$("#next").addClass("e8_btn_submit");
$("#next").attr('disabled',false);
$.DialogByZ.Alert({Title: "提示", Content: "用户自定义开发的文件还未迁移,请下载Ecolog文件迁移工具包进行迁移操作",BtnL:"确定"});
$("#scanfile11").html("任务三: 请下载资源迁移工具包进行迁移<a href=\"javascript:void(0)\" onclick=\"downDoc2()\">Ecolog文件迁移工具包</a>");
}
},
error:function () {
$.DialogByZ.Alert({Title: "提示", Content: "用户自定义文件扫描失败",BtnL:"确定"});
$("#checkdbdate").removeClass("e8_btn_disabled");
$("#checkdbdate").addClass("e8_btn_submit");
$("#checkdbdate").attr('disabled',false);
}
});
}
function next1(){
$.ajax({
sync:false,
dataType:'json',
type:'post',
url:'MigrationResourceFileOperation.jsp',
data:{
'method': "initXMLToDB"
},
success:function(data){
$.DialogByZ.Confirm({Title: "提示", Content: "初始化XML配置文件成功",BtnL:"确定",FunL:next2,BtnR:"取消"})
},
error:function () {
$.DialogByZ.Alert({Title: "提示", Content: "初始化XML配置文件失败",BtnL:"确定"});
}
});
}
function next2(){
$.DialogByZ.Confirm({Title: "提示", Content: "确定已手动将需要迁移的文件迁移到E9环境?",BtnL:"确定",FunL:successfun,BtnR:"取消"})
}
//文件下载的方法
function downDoc() {//执行文件下载,文件实际的路径的名字,文件下载的名字
document.getElementById("downiframe").src = "/system/upgradetoe9/resource/MigrationRecourceFile.doc";
}
function successfun(){
$.ajax({
sync:false,
dataType:'json',
type:'post',
url:'MigrationMainOperation.jsp?method=updateMainStatus',
data:{
'currentStep': "<%=currentStep%>",
'status': "<%=ToolUtil.EXECUTE_STATUS_FIN%>",
},
success:function(data){
window.parent.location.href = "MigrationMain.jsp";
},
error:function () {
$.DialogByZ.Alert({Title: "提示", Content: "无法进入下一步操作",BtnL:"确定"});
}
});
}
function downDoc2() {//执行文件下载,文件实际的路径的名字,文件下载的名字
var url = "ScanFileDownLoadZip.jsp";
$.ajax({
url: url,
async: true,
success: function(){
document.getElementById("downiframe").src = "/system/upgradetoe9/resource/FileMigration.zip";
}
});
}
</script>