upgradesuccess.jsp 9.8 KB
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ include file="/updateclient/systeminfo/init_wev8.jsp"%> 
<%@ page import="weaver.general.*,com.weaver.entity.*"%>
<%@ page import="weaver.system.SysUpgradeCominfo"%>
<%@ page import="com.weaver.update.PackageUtil"%>
<%@ page import="com.weaver.function.ConfigInfo"%>
<jsp:useBean id="RecordSet" class="weaver.conn.RecordSet" scope="page" />
<%
String id = "";
String label = "";
LogInfo logInfo = LogInfo.getLog();
request.getSession(true).removeAttribute("LogInfo");
String titlename ="";
String updatetype = logInfo.getUpdatetype();
boolean ecologyuphistory_exists = SysUpgradeCominfo.isExistTable("ecologyuphistory");
if(ecologyuphistory_exists) {
	RecordSet.execute("select * from ecologyuphistory order by id desc");
	if(RecordSet.next()) {
		String packageno = ""+RecordSet.getString("packageno");
		if(packageno.indexOf(",") < 0) {
			label = packageno;
			id="0";
		} else {
			label = "0";
			id="0";
		}
	} else {
		RecordSet.execute("select id,label from ecologyuplist order by id desc");
		
		if(RecordSet.next()) {
			id = ""+RecordSet.getInt("id");
			label = ""+RecordSet.getString("label");
		}
		if(updatetype.indexOf("非通用")>=0) {
			
		} else {
			//通用包不会往ecologyuplist插值
			id="0";
			label = "0";
		}
	}
} else {
	RecordSet.execute("select id,label from ecologyuplist order by id desc");
	
	if(RecordSet.next()) {
		id = ""+RecordSet.getInt("id");
		label = ""+RecordSet.getString("label");
	}
	if(updatetype.indexOf("非通用")>=0) {
		
	} else {
		//通用包不会往ecologyuplist插值
		id="0";
		label = "0";
	}
}

PackageUtil pageutil = new PackageUtil();
String content1 = id+"+"+"1+"+"7+"+label+"+content";

String content = pageutil.getUpgradeMessage("",content1);
String config1 = id+"+"+"0+"+"7+"+label+"+config";;
String configcontent = pageutil.getUpgradeMessage("",config1);

String message = "";
String typemessage = "";
String clusterMessage = "";
SysUpgradeCominfo suc = new SysUpgradeCominfo();
boolean isClusterMainOrStandAlone = suc.isClusterMainOrStandAlone();
boolean isClusterMain = suc.isClusterMain();
if(isClusterMainOrStandAlone) {
	if(ConfigInfo.isUpEcology()) {
		if(isClusterMain){
			typemessage = typemessage + "Ecology子节点";
			RecordSet.executeSql("select * from clustersetting where ismainnode='0' and type='ecology'");
			if(RecordSet.next()) {
			} else {
				clusterMessage = clusterMessage+"Ecology子节点";
			}
		}

	}
//	if(ConfigInfo.isUpEmobile()) {
//		if(!"".equals(typemessage)) {
//			typemessage =  typemessage + "、";
//		}
//		if(!"".equals(clusterMessage)) {
//			clusterMessage =  clusterMessage + "、";
//		}
//		typemessage =  typemessage + "Emobile";
//
//		RecordSet.execute("select * from clustersetting where type='emobile'");
//		if(RecordSet.next()) {
//		} else {
//			clusterMessage = clusterMessage+"Emobile";
//		}
//	}
//	if(ConfigInfo.isUpEmessage()) {
//		if(!"".equals(typemessage)) {
//			typemessage =  typemessage + "、";
//		}
//		if(!"".equals(clusterMessage)) {
//			clusterMessage =  clusterMessage + "、";
//		}
//		typemessage =  typemessage + "Emessage";
//		RecordSet.execute("select * from clustersetting where type='emessage'");
//		if(RecordSet.next()) {
//		} else {
//			clusterMessage = clusterMessage+"Emessage";
//		}
//	}
//
	if(typemessage.endsWith("、")) {
		typemessage = typemessage.substring(0, typemessage.length()-1);
	}
	if(clusterMessage.endsWith("、")) {
		clusterMessage = clusterMessage.substring(0, clusterMessage.length()-1);
	}
	if(!"".equals(typemessage)) {
		message = "升级"+typemessage+",请点击<input type=\"button\" onclick=\"forward2ClusterUpgrade();\" class=\"e8_btn_top synbtnclass\"  value="+SystemEnv.getHtmlLabelName(385152,user.getLanguage())+">"+"</input>进行升级";
	
	}
//	if(!"".equals(clusterMessage)) {
//		clusterMessage = "如果"+clusterMessage+"在集群环境上,请先在<input type=\"button\" onclick=\"forward2ClusterUpgradeSet();\" class=\"e8_btn_top synbtnclass\"  value="+SystemEnv.getHtmlLabelName(385150,user.getLanguage())+">"+"</input>进行设置<br>";
//	}
		
}
%>
<html>
 <head>
	<title> E-cology升级程序</title>
	<script type="text/javascript" src="/js/jquery_wev8.js"></script>
	<link rel="stylesheet" href="/css/main_wev8.css" type="text/css">
	<style>
	.heightlight {
		/*color:red;*/
		font-size:16px;
		font-weight:bold;
	}
	.synbtnclass{
		margin:0
	}
	a{
		text-decoration:underline!important;
	}
	</style>
	<script type="text/javascript">
	var dWidth = 600;
	var dHeight = 500;
	
	function doOpen(url,title){
		if(typeof dialog  == 'undefined' || dialog==null){
			dialog = new window.top.Dialog();
		}
		dialog.currentWindow = window;
		dialog.Title = title;
		dialog.Width =  dWidth || 500;
		dialog.Height =  dWidth || 300;
		dialog.Drag = true;
		dialog.maxiumnable = true;
		dialog.URL = url;
		
		dialog.show();
	}
	function openMessage(id,flage,label) {
		var v = flage;
		if(v=="1") {
			doOpen("/updateclient/detail.jsp?message=content&id="+id+"&label="+label,"<%=SystemEnv.getHtmlLabelName(17530,user.getLanguage())%>"+"<%=SystemEnv.getHtmlLabelName(33368,user.getLanguage())%>");
		} else if(v=="0"){
			doOpen("/updateclient/detail.jsp?message=config&id="+id+"&label="+label,"<%=SystemEnv.getHtmlLabelName(724,user.getLanguage())%>");
		} else if(v=="2") {
			doOpen("/updateclient/detail.jsp?message=sqlcontent&id="+id+"&label="+label,"<%=SystemEnv.getHtmlLabelName(33361,user.getLanguage())%>");
		}
		
	}
	
	$(document).ready(function(){
		$.post('/changebeanname.do?time='+new Date().getTime(),function(data){
					var content = "";

					if(data.indexOf("1") > -1) {
						content = "请手动覆盖一次补丁包中的ecology/WEB-INF/lib文件夹";
					} else if(data.indexOf("2") > -1){
						content = content+"<br>请手动覆盖一次补丁包中的ecology/classbean文件夹";
					} else if(data.indexOf("3") > -1){
						content = content+"<br>请手动覆盖一次补丁包中的ecology/WEB-INF/resin-web.xml文件";
					}
					if(content!="") {
						top.Dialog.alert("文件被占用,无法自动覆盖 <br>"+content);
					}
		});	
		 
		<%if(!"".equals(typemessage)){%>
			top.Dialog.alert("Ecology主节点升级成功,升级<%=typemessage%>请点击“其他节点升级”按钮进行升级");
		<%}%>
	});
	
	function forward2ClusterUpgrade() {
		if(parent.parent.window.document.getElementById("num_10860")) {//E8主题
			$(parent.parent.window.document.getElementById("num_10860")).closest(".nameDiv").click();
		} else {//E9主题
			$(parent.parent.window.document).find(".ant-menu-item-selected").next().click();
		}
		
	}
	function forward2ClusterUpgradeSet() {
		if(parent.parent.window.document.getElementById("num_10859")) {//E8主题
			$(parent.parent.window.document.getElementById("num_10859")).closest(".nameDiv").click();
		} else {//E9主题
			$(parent.parent.window.document).find(".ant-menu-item-selected").prev().click();
		}
		
	}
	</script>
 </head>
<body style="height:100%;width:100%;">
<jsp:include page="/updateclient/systeminfo/commonTabHead.jsp?step=5">
			<jsp:param name="mouldID" value="upgrade" />
			<jsp:param name="navName" value="升级成功" />
</jsp:include>

<table id="topTitle" cellpadding="0" cellspacing="0">
</table>
<%@ include file="/updateclient/systeminfo/TopTitle_Upgrade.jsp" %>
<%@ include file="/updateclient/systeminfo/RightClickMenuConent_Upgrade.jsp" %>
<%

RCMenu += "{"+SystemEnv.getHtmlLabelName(33703,user.getLanguage())+",javascript:confirm(),_self} " ;
RCMenuHeight += RCMenuHeightStep ;
%>
<%@ include file="/updateclient/systeminfo/RightClickMenu_Upgrade.jsp" %>
<div style="width:24%;height:100%;float:left;background:#fcfcfc;">
<jsp:include page="step.jsp"></jsp:include>
</div>
<div style="width:75%;height:100%;float:right">
		<div  style="height:380px;">
			<div  style="height:370px;width:100%;float:right;">
				<div style="height:100%;width:100%;margin-left:-10px;" >
				     <div style="height:50px;font-size:25px;margin-left:20px;padding-top:10px;margin-top:10px;line-height:50px;">升级成功</div>
					 <div>
					 <div style="margin-top:10px;margin-left:20px;width:90%;word-break:break-all;font-size:16px;">
					 <%--<%=clusterMessage%>--%>
					 <%=message %>
					 </div>
						<%
						if(null!=logInfo)
						{
						%>
						
						<div style="margin-top:10px;margin-left:20px;width:90%;word-break:break-all;font-size:16px;">日志内容:<div>
						<div style="margin-top:10px;margin-left:40px;width:90%;word-break:break-all;font-size:16px;">升级时间:<%=logInfo.getDatetime() %></div>
						<div style="margin-top:10px;margin-left:40px;width:90%;word-break:break-all;font-size:16px;">升级类型:<%=logInfo.getUpdatetype() %></div>
						<div style="margin-top:10px;margin-left:40px;width:90%;word-break:break-all;font-size:16px;">备份目录:<%=logInfo.getBackuppath() %></div>
						<%
						}
						%>
			    	</div>
			    	<div class="heightlight" style="margin-top:10px;margin-left:0px;width:90%;word-break:break-all;">注意事项:</div>
			    	<div class="heightlight" style="margin-top:10px;margin-left:40px;width:90%;word-break:break-all;">请阅读下面相关升级内容,并配置相关项,若不配置可能导致系统功能不正常。确定升级成功后请重启一次服务,以保证系统高效运行。</div>
					<div class="heightlight" style="margin-top:10px;margin-left:40px;width:90%;word-break:break-all;">请查看升级包内容:<%=content %></div>
					<div class="heightlight" style="margin-top:10px;margin-left:40px;width:90%;word-break:break-all;">请查看升级相关配置:<%=configcontent %></div>
					<div class="heightlight" style="margin-top:10px;margin-left:40px;width:90%;word-break:break-all;">请查看升级脚本报错信息:<a href="javascript:openMessage('<%=id%>',2,'<%=label%>')"><%=SystemEnv.getHtmlLabelName(22045,user.getLanguage()) %></a></div>
					
		     </div>
			</div>
	  </div>
   </div>
		</div>
</div>
</body>
</html>