clusterMain.jsp 27.4 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 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ include file="/updateclient/systeminfo/init_wev8.jsp"%> 
<%@ taglib uri="/WEB-INF/weaver.tld" prefix="wea"%> 
<%@ page import="weaver.upgradetool.upgrade.GCONSTUClient" %>
<%@ page import="weaver.upgradetool.upgrade.HttpClientUtils" %>
<%@ page import="weaver.conn.RecordSet" %>
<%@ page import="weaver.general.BaseBean" %>
<%@ page import="java.net.InetAddress" %>
<jsp:useBean id="ConfigInfo" class="com.weaver.function.ConfigInfo" scope="page"/>
<html>
<head>
<title><%=SystemEnv.getHtmlLabelName(384723,user.getLanguage())%></title>

<LINK href="/css/Weaver_wev8.css" type=text/css rel=STYLESHEET>
<link rel="stylesheet" href="/wui/theme/ecology8/weaveredittable/css/WeaverEditTable_wev8.css">
<script  src="/wui/theme/ecology8/weaveredittable/js/WeaverEditTable_wev8.js"></script>
<%
if(!ConfigInfo.isResin()){
	response.sendRedirect("/updateclient/message.jsp?errortype=5");
	return;
}	
String upecology = request.getParameter("upecology");
String upemobile = request.getParameter("upemobile");
String upemessage = request.getParameter("upemessage");
if(upecology == null || "".equals(upecology)) {
	upecology = "true";
}
if(upemobile == null || "".equals(upemobile)) {
	upemobile = "true";
}
if(upemessage == null || "".equals(upemessage)) {
	upemessage = "true";
}
//判断是否有集群自己节点未升级
boolean hassubnode = false;
boolean hassetednode = false;
boolean logempty = false;
RecordSet rs = new RecordSet();
rs.execute("select 1 from clustersetting t1 left join clusterupgradelog t2 on t1.id=t2.settingid where  ((t1.ismainnode='0' and t1.type='ecology') or (t1.type='emessage') or (t1.type='emobile')) and t2.status='0' order by t1.type");
if(rs.next()){
	hassubnode = true;
} else {
	hassubnode = false;
	//查询clusterupgradelog表是否有记录  如果一开始没设置节点,后续再追加节点设置clusterupgradelog是没有记录的
	rs.execute("select 1 from clusterupgradelog t1");
	if(rs.next()){
		logempty = false;
	} else {
		logempty = true; 
	}
}

rs.execute("select 1 from clustersetting t1");
if(rs.next()){
	hassetednode = true;
}

boolean ismainnode = true;
String hostaddr = "";  
String mainControlIp ="";
try{
 InetAddress ia = InetAddress.getLocalHost();
 hostaddr = ia.getHostAddress();
}catch(Exception e){

}
BaseBean basebean = new BaseBean();
mainControlIp = basebean.getPropValue(GCONST.getConfigFile() , "MainControlIP");
if((!"".equals(mainControlIp)&&hostaddr.equals(mainControlIp))||"".equals(mainControlIp)){

} else {
	ismainnode = false;
}
if(!ismainnode) {
	response.sendRedirect("/clusterupgrade/message.jsp");
}  
        

String uploadtype = HttpClientUtils.getType();
String filename = HttpClientUtils.getFilename();
 %>
<script type="text/javascript">
var timeout2;
var syncPackageflag = false;
var waitStatusRes = true;//等待获得节点的状态
var tuploadtype;
var tfilename;

var intervalobj = {};
var upgradestatus = {};
var errornode  = new Array();
var intervalcount = 0;//计算定时器的个数
var lockobj = new Object();
var getinfocount = 0;//计算getInfo的请求次数
var addinterval = false;
var monitorMousedDown = true;//对鼠标点击事件进行监控
var hasPrompt = false;//提示正在升级  只有在第一次离开页面并点击才会提示
var nodesuccess = false;

var upecology = "<%=upecology%>";
var upemobile = "<%=upemobile%>";
var upemessage = "<%=upemessage%>";
var hassubnode = "";
$(document).ready(function(){
	hassubnode = "<%=hassubnode%>";
	if(hassubnode == "true") {
		openDialog();
	}
	//第一次进入页面
	hideEle("localtd");
	showEle("uploadtd");
	$("input:radio[name='uploadzip']").click(function(){
		var checkval = $(this).val();
		if(checkval=="upload") {
			hideEle("localtd");
			showEle("uploadtd");
		} else {
			hideEle("uploadtd");
			showEle("localtd");
		}
	});
	//隐藏td
	$("#ecologylayout").find("tbody").find(".items").css("display","none");
	$("#emobilelayout").find("tbody").find(".items").css("display","none");
	$("#emessagelayout").find("tbody").find(".items").css("display","none");
	
	$(".hideBlockDiv").css("display","none");
		
	
	//定时器
	wait4IntervalFinished();
	addintervalobj();
	
	startMonitorMousedDown();
	//显示、隐藏emessage、emobile升级  --默认显示
	//changeEmobile();
	//changeEmessage();
});


function upgradepackage(type,filename) {
	//alert("type:"+type+"   filename:"+filename);
	$("input[name='uploadzip']").removeAttr("checked");
	$("input[name='localfile']").removeAttr("checked");
	$("input[name='uploadzip']").next().removeClass("jNiceChecked");
	$("input[name='localfile']").next().removeClass("jNiceChecked");
	
	if(type=="upload") {
		hideEle("localtd");
		showEle("uploadtd");
		$("input[name='uploadzip'][value='upload']").attr("checked","checked");
		$("input[name='uploadzip'][value='upload']").next().addClass("jNiceChecked");
		$("input[name='zipfile'][value='"+filename+"']").attr("checked","checked");
		$("input[name='zipfile'][value='"+filename+"']").next().addClass("jNiceChecked");
	} else if(type=="local"){
		hideEle("uploadtd");
		showEle("localtd");
		$("input[name='uploadzip'][value='local']").attr("checked","checked");
		$("input[name='uploadzip'][value='local']").next().addClass("jNiceChecked");
		
		$("input[name='localfile'][value='"+filename+"']").attr("checked","checked");
		$("input[name='localfile'][value='"+filename+"']").next().addClass("jNiceChecked");
	}
	

}

function changeEmobile(){
	if($("#emobile").attr("checked")) {
	$("#emobilelayoutdiv").show();
	} else {
	$("#emobilelayoutdiv").hide();
	}
}

function changeEmessage(){
	if($("#emessage").attr("checked")) {
	$("#emessagelayoutdiv").show();
	} else {
	$("#emessagelayoutdiv").hide();
	}
}

function syncPackage() {
	var checkres  = true;
		var prolength = $("div[name='pro']").length;
	
	var filename;
	uploadtype = $("input:radio[name='uploadzip']:checked").val();
	
	
    if(uploadtype=="local") {
   		var zipval = $("input:radio[name='localfile']:checked").val();
		if(zipval==undefined) {
			top.Dialog.alert("<%=SystemEnv.getHtmlLabelName(502182,user.getLanguage())%>");
       		return;
		}
       	if(zipval.indexOf(".zip") < 0) {
       		top.Dialog.alert("<%=SystemEnv.getHtmlLabelName(502183,user.getLanguage())%>");
       		return;
       	}
       	filename = zipval;
   		
   	} else {
   		var zipval = $("#zipfile").val();
   		var zips= $("input[name='zipfile']");
   		if(zips.length==1) {
   			zipval = $("#zipfile").val();
   		} else {
   			zipval = $("input:radio[name='zipfile']:checked").val();
   		}
   	
		if(zipval==undefined) {
			top.Dialog.alert("未选择补丁包");
       		return;
		}
       	if(zipval.indexOf(".zip") < 0) {
       		top.Dialog.alert("上传的升级包格式不对!");
       		return;
       	}
       	filename = zipval;
   	}
   	
	if("false" == "<%=hassetednode%>") {
		top.Dialog.alert("请先在“节点设置”中设置节点地址");
		return;
	}
	if("false" == hassubnode && "false" == "<%=logempty%>") {
		top.Dialog.alert("没有可以升级的节点");
		return;
	}
	if(nodesuccess) {
		top.Dialog.alert("存在升级后未重启的服务,请重启节点服务,再点击“同步升级”。");
		return;
	}
	//先判断是否已经点击
	if(syncPackageflag) {
		top.Dialog.alert("已点击“同步升级”。不能再次点击。如果需要再次升级,请刷新页面。");
		return;
	}
	
	$("input[name^='ecologynode']").each(function(){
		if($(this).val()=="error"|| $(this).val()=="checkerror") {
			top.Dialog.alert("节点存在异常,无法进行升级。");
			checkres  = false;
			return;
		}
	});
	
	if(!checkres) {
		return;
	}
	if(true) {
		$("input[name^='emobilenode']").each(function(){
			if($(this).val()=="error"|| $(this).val()=="checkerror") {
				top.Dialog.alert("节点存在异常,无法进行升级。");
				checkres  = false;
				return;
			}
		});
	}
	if(!checkres) {
		return;
	}
	if(true) {
		$("input[name^='emessagenode']").each(function(){
			if($(this).val()=="error"|| $(this).val()=="checkerror") {
				top.Dialog.alert("节点存在异常,无法进行升级。");
				checkres  = false;
				return;
			}
		});
	}
	
	if(!checkres) {
		return;
	}
	


	var errornodestr = errornode.toString();
	$.ajax({
		url:'/clusterupgrade/uploadFileServer.jsp',
		type:'post',
		async:true,
		dataType:'json',
		data:{
			"uploadtype":uploadtype,
			"filename":filename,
			"errornode":errornodestr
		},
		success:function(data){
			var res = data;
			if(res != null && res != "") {
				upecology = res.upecology;
				upemobile = res.upemobile;
				upemessage = res.upemessage;
			}
			wait4IntervalFinished();
		 	addintervalobj();
		 	//upgrade();
		},
		error:function(data) {
			alert("附件上传异常!");
		}
	});
	
    wait4IntervalFinished();
	addintervalobj();
	//默认显示
	//changeEmobile();
	//changeEmessage();
	syncPackageflag = true;
}

function addintervalobj() {
	//定时刷新
	addinterval = true;
	lockobj = new Object(); 
	//定时器
	$.ajax({
		url:"/clusterupgrade/clusterNodeOperation.jsp",
		type:'post',
		async:true,
		dataType:'json',
		data:{
			"freshnode":"1"
		},
		success:function(data){	
			var clusterids = data.clusterids;
			hassubnode = data.hassubnode;
			if(clusterids != undefined) {
				var clusteridarr = clusterids.split(",");
				for(var i = 0; i < clusteridarr.length; i++) {
					intervalcount++;
					var clusterid = clusteridarr[i];
					if(clusterid != undefined && clusterid != "") {
						clearInterval(intervalobj[clusterid]);
						intervalobj[clusterid] = setInterval("getInfo("+clusterid+")",1000);
					}
				}
			}

			addinterval = false;
		}
	});
}

function upgrade() {
	var errornodestr = errornode.toString();
	
	$.ajax({
		url:'/clusterupgrade/Upgrade.jsp',
		type:'post',
		dataType:'json',
		data:{
			"errornode":errornodestr,
		},
		success:function(data){
			//getInfo();
		}
	});
}


function getInfo(clusterid) {
	var firstrequest = false;//是否第一次请求
	if(lockobj[""+clusterid] == null || lockobj[""+clusterid]== undefined ||lockobj[""+clusterid] == "null") {
		firstrequest = true;
	} else if(lockobj[""+clusterid] == "true") {
		return;
	} else {
		//lockobj[""+clusterid] = "true";
	}
	lockobj[""+clusterid] = "true";
	$.ajax({
		url:'/clusterupgrade/getProcessInfo.jsp?clusterid='+clusterid,
		type:'post',
		dataType:'json',
		data:{
			"firstrequest":firstrequest,
			"upecology":upecology,
			"upemobile":upemobile,
			"upemessage":upemessage
		},
		success:function(data){

			for(var key in data) {
				var dataarr = data[""+key];
				if(dataarr == undefined) {
					continue;
				}

				for(var i=0,l=dataarr.length;i<l;i++){
					var obj = dataarr[i];
					var httpaddress  = obj.httpaddress;
					var msg  = obj.msg;
					var id  = obj.id;
					var process = obj.process;
					var uploadprocess  = obj.uploadprocess;
					var clusterlogid = obj.clusterlogid;
						
					if(process==undefined||process==undefined) {
						clearInterval(intervalobj[""+id]);//删除定时器
						$("#httpdiv"+id).html("节点:"+httpaddress);
						$("#processdiv"+id).html("<span style=\"color:red;font-weight:bold;\">进度信息:"+msg+"</span>");
						$("#node"+id).val("error");
						if(!errornode.contains(id)) {
							errornode.push(id);//记录有问题的节点
						}
						
						lockobj[""+clusterid] = "";

						continue;
					}
					process = process.replace(/^\s+|\s+$/gm,'');
					
					//接口无法接通 停止刷新
					if(process=="error"||process=="nodeerror"||process=="ignore"||process=="checkerror") {
						if(process!="nodeerror" && process != "checkerror") {
							clearInterval(intervalobj[""+id]);//删除定时器
						}
						//删除该节点
						lockobj[""+clusterid] = "";
						$("#httpdiv"+id).html("节点:"+httpaddress);
						if(process=="error" || process == "checkerror") {
							$("#processdiv"+id).html("<span style=\"color:red;font-weight:bold;\">进度信息:"+msg+"</span>");
						} else if(process=="ignore"){
							$("#processdiv"+id).html("<span style=\"color:green;font-weight:bold;\">进度信息:"+msg+"</span>");
						} else {
							$("#processdiv"+id).html("进度信息:"+msg);
						}
						
						$("#node"+id).val(process);
						if(!errornode.contains(id)) {
							errornode.push(id);//记录有问题的节点
						}
						$("#processbardiv"+id).html("");
						
						
						continue;
					}
					//未开始上传
					if(uploadprocess=="0"&&process=="0") {
						//clearInterval(intervalobj[""+id]);//删除定时器
						if(msg!=null && msg!=null && msg!=undefined) {
							$("#processdiv"+id).html("进度信息:"+msg);
						} else {
							$("#processdiv"+id).html("进度信息:无");
						}
						$("#processbardiv"+id).html("");
						lockobj[""+clusterid] = "";

						continue;
					}
					
					syncPackageflag = true;
					
					var processval = (parseInt(process)/5)*100+"%";
					
					if(tuploadtype != obj.uploadtype || tfilename != obj.filename) {
						tuploadtype = obj.uploadtype;
						tfilename = obj.filename;
						upgradepackage(tuploadtype,tfilename);
					}


					$("#httpdiv"+id).html("节点:"+httpaddress);
					$("#processdiv"+id).html("进度信息:"+msg);
					$("#node"+id).val(process);
					
					var processbarhtml = "<div style=\"width:100%;height:34px;\">";
					processbarhtml = processbarhtml + "<div name=\"bak\" style=\"height:34px;width:270px;background:url('/images/bak.png') no-repeat;\" > ";
					processbarhtml = processbarhtml + "<div name=\"pro\" style=\"height:33px;width:"+processval+";background:url('/images/process.png') no-repeat\"></div> ";
					processbarhtml = processbarhtml + "</div>";
					processbarhtml = processbarhtml + "</div>";
					
					if("0%"==processval) {
						$("#processbardiv"+id).html("");
					} else {
						$("#processbardiv"+id).html(processbarhtml);
					}
					
					
					if("100%"==processval) {
						nodesuccess = true;
						clearInterval(intervalobj[""+id]);//删除定时器
						updateclusterlog(clusterlogid);
					} else {
						lockobj[""+clusterid] = "";//重置锁定状态
					}
					
				}
			}
		}
	});
}

//更新集群升级记录表
function updateclusterlog(clusterlogid) {
	$.ajax({
		url:"/clusterupgrade/clusterNodeOperation.jsp",
		type:"post",
		data:{
			"clusterupgradelogid":""+clusterlogid,
			"success":"1",
			"uploadtype":tuploadtype,
			"filename":tfilename
		},
		success:function() {
		}
	});
}

function openDialog() {
		doOpen("/clusterupgrade/clusterNodeStatus.jsp","检测到以下节点未升级");
}

function viewConfigDetail() {
		doOpen("/clusterupgrade/clusterConfigDetail.jsp","其他节点升级配置说明");
}

var dWidth = 800;
var dHeight = 600;
function doOpen(url,title){
	if(typeof dialog  == 'undefined' || dialog==null){
		dialog = new window.top.Dialog();
	}
	dialog.currentWindow = window;
	dialog.Title = title;
	dialog.Width =  dWidth;
	dialog.Height =  dHeight;
	dialog.Drag = true;
	dialog.maxiumnable = true;
	dialog.CancelEvent = function(){ 
		wait4IntervalFinished();
		addintervalobj();
		dialog.close();
	}
	dialog.URL = url;
	
	dialog.show();
}

//重置节点回升级状态
function resetnode(clusterlogid,clusterid) {
	if(lockobj[""+clusterid] != null || lockobj[""+clusterid] != undefined) {
		delete lockobj[""+clusterid];
	} else {
		return;
	}
	if("" != clusterlogid) {
		$.ajax({
		url:"/clusterupgrade/clusterNodeOperation.jsp",
		type:"post",
		data:{
			"clusterupgradelogid":""+clusterlogid,
			"reset":"1",
		},
		success:function() {
		
			hassubnode = "true";//节点重置
			$("#syncBtn").attr("disabled",false);
				
			errornode.remove(clusterid);//记录有
			intervalobj[clusterid] = setInterval("getInfo("+clusterid+")",1000);
		}
		});
	}
}

//判断是否等待节点请求状态完成
function checkwait(intervalcount,getinfocount) {
	if(intervalcount<getinfocount) {
		waitStatusRes = true;
	} else {
		waitStatusRes = false;
	}
	waitStatusRes = false;
	return false;
}

function sleep(numberMillis) {    
	var now = new Date();    
	var exitTime = now.getTime() + numberMillis;   
	while (true) { 
		now = new Date();       
		if (now.getTime() > exitTime) 
		return;    
	} 
}

//等待上一个方法执行完成
function wait4IntervalFinished() {
	while(addinterval) {
		sleep(200);
	}
}


function startMonitorMousedDown(){
	$(window.document).mouseout(function(e){
   		var xx = e.originalEvent.x || e.originalEvent.layerX || 0;
        var yy = e.originalEvent.y || e.originalEvent.layerY || 0;
        if(!hasPrompt && (xx <= 0 || yy <= 0)) {
        	monitorMousedDown = true;
        } else {
        	monitorMousedDown = false;
        }
	});
	
	$(top.document).mousedown(function(e){
		if(monitorMousedDown) {
			monitorMousedDown = false;
			if(syncPackageflag) {
				$.ajax({
					url:"/clusterupgrade/checkUpgradeSuccess.jsp",
					type:"post",
					success:function(data) {
					
						if(data.indexOf("ok") < 0) {
							top.Dialog.confirm("系统正在升级,请确认是否离开升级页面?如果确认离开,请点击“确定”并再次点击目标菜单。",
								function(){
									monitorMousedDown = false;
									hasPrompt = true;
									$(top.document).unbind('mousedown',this);
								},
								function(){
									monitorMousedDown = true;
									hasPrompt = false;
								}	
							);
						}
					}
			});
		}
		}
	});
}

//页面手动刷新
function pageRefresh() {
	addintervalobj();
}

function downDoc(en_name,cn_name) {
	cn_name = encodeURIComponent(cn_name);
	document.getElementById("downiframe").src = "/upgradedoc/"+en_name+".doc?en_name="+en_name+"&cn_name="+cn_name;
}
</script>
</head>
<%
String titlename = SystemEnv.getHtmlLabelName(385152,user.getLanguage());

String packagepath  = GCONSTUClient.getPackagePath();
String uploadfilepath = GCONSTUClient.getUploadSysFilePath();

File packagefile = new File(packagepath);
String ziplist  = "";
String uploadlist = "";
if(packagefile.exists()) {
	File[] zips = packagefile.listFiles();
	for(int i = 0; i < zips.length; i++) {
		String zipname = zips[i].getName();
		if(!zipname.endsWith("zip")) {
			continue;
		}
		String fname = java.net.URLEncoder.encode(zipname,"UTF-8");
		ziplist = ziplist + "<span style='display:block;''><input name='localfile' type='radio' value='"+fname+"'>"+zips[i].getName()+"</input></span>";
	}
}

File uploadfile = new File(uploadfilepath);
if(uploadfile.exists()) {
	File[] zips = uploadfile.listFiles();
	if(zips.length==1&&zips[0].getName().endsWith("zip")) {
		uploadlist = "<input style=\"width:80%;height:25px;\" id=\"zipfile\" name='zipfile'  value="+zips[0].getPath()+" disabled>";
	}
	if("".equals(uploadlist)) {
		for(int i = 0; i < zips.length; i++) {
		String zipname = zips[i].getName();
		if(!zipname.endsWith("zip")) {
			continue;
		}
		String fname = java.net.URLEncoder.encode(zipname,"UTF-8");
		uploadlist = uploadlist + "<span style='display:block;''><input name='zipfile' type='radio' value='"+fname+"'>"+zips[i].getName()+"</input></span>";
		}
	}

}





 %>
<%@ include file="/systeminfo/TopTitle_wev8.jsp" %>
<%@ include file="/systeminfo/RightClickMenuConent_wev8.jsp" %>
<jsp:include page="/systeminfo/commonTabHead.jsp">
			<jsp:param name="mouldID" value="upgrade" />
			<jsp:param name="navName" value="<%=SystemEnv.getHtmlLabelName(385152,user.getLanguage()) %>" />
</jsp:include>
<table id="topTitle" cellpadding="0" cellspacing="0">
	<tr>
		<td></td>
		<td class="rightSearchSpan" style="text-align:right; width:500px!important;top:20px;">
			<input type="button" value="<%=SystemEnv.getHtmlLabelName(384723,user.getLanguage())%>" class="e8_btn_top" onclick="syncPackage()"/>
			<input type="button" value="<%=SystemEnv.getHtmlLabelName(354,user.getLanguage())%>" class="e8_btn_top" onclick="pageRefresh()"/>
		</td>
	</tr>
</table>
<%
RCMenu += "{"+SystemEnv.getHtmlLabelName(384723,user.getLanguage())+",javascript:syncPackage(),_self} " ;
RCMenu += "{"+SystemEnv.getHtmlLabelName(354,user.getLanguage())+",javascript:pageRefresh(),_self} " ;
RCMenuHeight += RCMenuHeightStep ;
%>
<%@ include file="/systeminfo/RightClickMenu_wev8.jsp" %>
<table id="topTitle" cellpadding="0" cellspacing="0">
	<tr>
		<td></td>
		<td class="rightSearchSpan" style="text-align:right; width:500px!important;top:20px;">
			<input type="button" value="<%=SystemEnv.getHtmlLabelName(384723,user.getLanguage())%>" class="e8_btn_top" onclick="syncPackage()"/>
		</td>
	</tr>
</table>

<div id="tabDiv" >
   <span style="font-size:14px;font-weight:bold;"><%=titlename%></span> 
</div> 
<body  style="height:100%;width:100%;">
<div style="width:99%;height:100%;float:right">
<form name="weaverform" action=""  method="post" enctype="multipart/form-data"> 
<input name="filename" id="filename" type="hidden"></input>
<input name="isfrom" id="isfrom" type="hidden"></input>
<wea:layout>
<wea:group context="<%=SystemEnv.getHtmlLabelName(502184,user.getLanguage())%>">
<wea:item><span style="font-size:15;font-weight:bold"><%=SystemEnv.getHtmlLabelName(502185,user.getLanguage())%></span></wea:item>
<wea:item>
<input type="radio" name="uploadzip" value="upload" checked><%=SystemEnv.getHtmlLabelName(127409,user.getLanguage())%></input>&nbsp;&nbsp;<input type="radio" name="uploadzip" value="local"><%=SystemEnv.getHtmlLabelName(502188,user.getLanguage())%></input>
</wea:item>
<wea:item attributes="{'samePair':'uploadtd'}"><span style="font-size:15;font-weight:bold"><%=SystemEnv.getHtmlLabelName(502186,user.getLanguage())%></span></wea:item>
<wea:item attributes="{'samePair':'uploadtd'}"><%=uploadlist %></wea:item>
<wea:item attributes="{'samePair':'localtd'}"><span style="font-size:15;font-weight:bold"><%=SystemEnv.getHtmlLabelName(502187,user.getLanguage())%></span></wea:item>
<wea:item attributes="{'samePair':'localtd'}"><%=ziplist %></wea:item>

<wea:item><span style="font-size:15;font-weight:bold"><%=SystemEnv.getHtmlLabelName(502195,user.getLanguage())%></span></wea:item>
<wea:item>	<%=SystemEnv.getHtmlLabelName(502189,user.getLanguage())%><br>
	<%=SystemEnv.getHtmlLabelName(502190,user.getLanguage())%><br>
	<%=SystemEnv.getHtmlLabelName(502191,user.getLanguage())%><br>
	<%=SystemEnv.getHtmlLabelName(502192,user.getLanguage())%><br>
	<%=SystemEnv.getHtmlLabelName(502193,user.getLanguage())%><a style="color:#2094ff" href="javascript:downDoc('ecology_upgrade','升级工具使用手册--客户端E9_v1')"><%=SystemEnv.getHtmlLabelName(504691,user.getLanguage())%>E9_v1》</a><br>

<span style="color:red"><%=SystemEnv.getHtmlLabelName(502196,user.getLanguage())%>:</span><br>
<span style="color:red"><%=SystemEnv.getHtmlLabelName(502197,user.getLanguage())%></span><br>
<%--<span style="color:red"><%=SystemEnv.getHtmlLabelName(502198,user.getLanguage())%></span><br/><!--不支持Emobile7升级-->--%>
</wea:item>
</wea:group>
</wea:layout>

<wea:layout attributes="{'layoutTableId':'ecologylayout'}">
<wea:group context="<%=SystemEnv.getHtmlLabelName(502199,user.getLanguage())%>" >
</wea:group>
</wea:layout>
<div style="border:1px solid black;margin:20px;background-color:lightgoldenrodyellow;" class="processdiv" id="ecologylayoutdiv">
<%
RecordSet rs1 = new RecordSet();
rs1.executeSql("select * from clustersetting where ismainnode='0' and type='ecology'");
int i = 0;
while(rs1.next()) {
String id = rs1.getString("id");
String httpid = "httpdiv"+id;
String processid = "processdiv"+id;
String processbardiv = "processbardiv"+id;
String httpaddress = rs1.getString("httpaddress");
String inputid = "node"+id;
String inputname = "ecologynode"+id;
i++;
 %>
<div style="height:34px;line-height:34px;padding:10px;border-bottom:1px solid #000;">
	<div id="<%=httpid%>" style="display:inline;height:34px;line-height:34px;width:10%;word-wrap:break-word!important;word-break:normal!important;"><%=SystemEnv.getHtmlLabelName(15586,user.getLanguage())%>:<%=httpaddress %></div>
	<div id="<%=processid%>" style="display:inline;height:34px;line-height:34px;padding-left:2%;width:20%;word-wrap:break-word!important;word-break:normal!important;"></div>
	<div id="<%=processbardiv%>" style="display:inline;height:34px;line-height:34px;width:50%;margin-right:0%;float:right;word-wrap:break-word;word-break:normal;">
	</div>
	<input type="hidden" id="<%=inputid%>" name="<%=inputname%>" value=""></input>
</div>
<%} %>
<%
if(i==0) {
%><%=SystemEnv.getHtmlLabelName(502200,user.getLanguage())%>
<%} 
%>
</div>
<%--<wea:layout attributes="{'layoutTableId':'emobilelayout'}">--%>
<%--<wea:group context="<%=SystemEnv.getHtmlLabelName(502201,user.getLanguage())%>" >--%>
<%--</wea:group>--%>
<%--</wea:layout>--%>

<%--<div style="border:1px solid black;margin:20px;background-color:lightgoldenrodyellow;" class="processdiv" id="emobilelayoutdiv">--%>
<%--<%--%>
<%--rs1.executeSql("select * from clustersetting where type='emobile'");--%>
<%--i = 0;--%>
<%--while(rs1.next()) {--%>
<%--String id = rs1.getString("id");--%>
<%--String httpid = "httpdiv"+id;--%>
<%--String processid = "processdiv"+id;--%>
<%--String processbardiv = "processbardiv"+id;--%>
<%--String httpaddress = rs1.getString("httpaddress");--%>
<%--String inputid = "node"+id;--%>
<%--String inputname = "emobilenode"+id;--%>
<%--i++;--%>
 <%--%>--%>
<%--<div style="height:34px;line-height:34px;padding:10px;border-bottom:1px solid #000;">--%>
	<%--<div id="<%=httpid%>" style="display:inline;height:34px;line-height:34px;width:10%;word-wrap:break-word!important;word-break:normal!important;"><%=SystemEnv.getHtmlLabelName(15586,user.getLanguage())%>:<%=httpaddress %></div>--%>
	<%--<div id="<%=processid%>" style="display:inline;height:34px;line-height:34px;padding-left:2%;width:20%;word-wrap:break-word!important;word-break:normal!important;"></div>--%>
	<%--<div id="<%=processbardiv%>" style="display:inline;height:34px;line-height:34px;width:50%;margin-right:0%;float:right;word-wrap:break-word;word-break:normal;">--%>
	<%--</div>--%>
	<%--<input type="hidden" id="<%=inputid%>"  name="<%=inputname%>" value=""></input>--%>
<%--</div>--%>
<%--<%} %>--%>
<%--<%--%>
<%--if(i==0) {--%>
<%--%><%=SystemEnv.getHtmlLabelName(502203,user.getLanguage())%>--%>
<%--<%}--%>
<%--%>--%>
<%--</div>--%>
<%--<wea:layout attributes="{'layoutTableId':'emessagelayout'}">--%>
<%--<wea:group context="<%=SystemEnv.getHtmlLabelName(502204,user.getLanguage())%>">--%>
<%--</wea:group>--%>
<%--</wea:layout>--%>
<%--<div style="border:1px solid black;margin:20px;background-color:lightgoldenrodyellow;" class="processdiv" id="emessagelayoutdiv">--%>
<%--<%--%>
<%--rs1.executeSql("select * from clustersetting where type='emessage'");--%>
<%--i = 0;--%>
<%--while(rs1.next()) {--%>
<%--String id = rs1.getString("id");--%>
<%--String httpid = "httpdiv"+id;--%>
<%--String processid = "processdiv"+id;--%>
<%--String processbardiv = "processbardiv"+id;--%>
<%--String httpaddress = rs1.getString("httpaddress");--%>
<%--String inputid = "node"+id;--%>
<%--String inputname = "emessagenode"+id;--%>
<%--i++;--%>
 <%--%>--%>
<%--<div style="height:34px;line-height:34px;padding:10px;border-bottom:1px solid #000;">--%>
	<%--<div id="<%=httpid%>" style="display:inline;height:34px;line-height:34px;width:10%;word-wrap:break-word!important;word-break:normal!important;"><%=SystemEnv.getHtmlLabelName(15586,user.getLanguage())%>:<%=httpaddress %></div>--%>
	<%--<div id="<%=processid%>" style="display:inline;height:34px;line-height:34px;padding-left:2%;width:20%;word-wrap:break-word!important;word-break:normal!important;"></div>--%>
	<%--<div id="<%=processbardiv%>" style="display:inline;height:34px;line-height:34px;width:50%;margin-right:0%;float:right;word-wrap:break-word;word-break:normal;">--%>
	<%--</div>--%>
	<%--<input type="hidden" id="<%=inputid%>"  name="<%=inputname%>" value=""></input>--%>
<%--</div>--%>
<%--<%} %>--%>
<%--<%--%>
<%--if(i==0) {--%>
<%--%>--%>
	<%--<%=SystemEnv.getHtmlLabelName(502202,user.getLanguage())%>--%>
<%--<%}--%>
<%--%>--%>
<%--</div>--%>
<iframe name="downiframe" id="downiframe" src="" style="display:none" ></iframe> 
</form>
</div>
</body>
</html>