<%@ page contentType="text/html;charset=GBK" %>
<%@ page import="java.util.*" %>
<%@ page import="net.sz600.tool.SzConvert" %>
<%@ page import="net.sz600.tool.SzDateHelp" %>
<%@ page import="net.sz600.database.SzPageInfo" %>
<%@ page import="net.sz600.system.SzProperties" %>
<%@ page import="net.sz600.system.SzPageHelp" %>
<%@ page import="net.sz600.pro.RwProjectInfo" %>
<%@ page import="net.sz600.pro.RwProject" %>
<%@ page import="net.sz600.control.*" %>
<%@ include file="/sessionInfo.jsp"%>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
<link href="<%=strSkin_SESSION%>/css2007.css" rel="stylesheet" type="text/css">
<script language="javascript" src="../../share/js/commonTool.js"></script>
</head>

<!-----上面的工具栏------>
<%@ include file="title.jsp"%>
<%
  ControlTimer ct = ControlTimer.getControlTimer();
  boolean isRuning = ct.isRuning();
  long wait_time = ct.getWait_time();
  int Max_response_time = ct.getMax_response_time();
  long check_cycle = ct.getCheck_cycle();
  int max_overtime_times = ct.getMax_overtime_times();
  int port = ct.getPort();
  String spaceName = ct.getSpaceName();
  %>
  <%=SzPageHelp.button(isRuning?"重新启动":"启动监控", "FormSubmit(formInfo,'tomcatControl.jsp?open="+(isRuning?"3":"1")+"');")%>
  <%=isRuning?SzPageHelp.button("关闭监控", "FormSubmit(formInfo,'tomcatControl.jsp?open=2');"):""%>
<table width="400" border="1" bordercolorlight="#C0C0C0" bordercolordark="#FFFFFF" class="tableClass" cellpadding="1" cellspacing="0">
  <form name="formInfo" method="post">
  <input type="hidden" name="port" value="<%=sPort_SESSION%>">
  <input type="hidden" name="spaceName" value="<%=sContext_SESSION%>">
  <tr>
    <td width="150" align="left">启动状态</td>
    <td width="250" align="left"><%=isRuning?"已启动":"未启动" %></td>
  </tr>
  <tr>
    <td align="left">应用空间</td>
    <td align="left"><%=sContext_SESSION %>/</td>
  </tr>
  <tr>
    <td align="left">端口号</td>
    <td align="left"><%=sPort_SESSION %></td>
  </tr>
  <tr>
    <td align="left">检测频率</td>
    <td align="left"><input type="text" name="check_cycle" value="<%=check_cycle%>">毫秒</td>
  </tr>
  <tr>
    <td align="left">最大响应时间</td>
    <td align="left"><input type="text" name="Max_response_time" value="<%=Max_response_time%>">毫秒</td>
  </tr>
  <tr>
    <td align="left">启动缓冲时间</td>
    <td align="left"><input type="text" name="wait_time" value="<%=wait_time%>">毫秒</td>
  </tr>
  <tr>
    <td align="left">连续超时的最大次数</td>
    <td align="left"><input type="text" name="max_overtime_times" value="<%=max_overtime_times%>">次</td>
  </tr>
  </form>
</table>
<script type="text/javascript">

//第一个表示对象，form，第二个表示字符串
  function FormSubmit(oFormName, vUrl) {
  	var check_cycle = oFormName.check_cycle.value;
  	var Max_response_time = oFormName.Max_response_time.value;
  	var wait_time = oFormName.wait_time.value;
  	var max_overtime_times = oFormName.max_overtime_times.value;
  	if(ckIsNum(check_cycle)&&ckIsNum(Max_response_time)&&ckIsNum(wait_time)&&ckIsNum(max_overtime_times)){
  		oFormName.action = vUrl;
    	oFormName.submit();
  	}
  }
  //验证数字是不是整数
  function ckIsNum(namStr){
  	var cknum=/^[1-9]\d*$/;
  	if(!cknum.test(namStr)){
    	alert("请输入正整数!");
      	return false;
    }else{
    	return true;
    }
  }



<!--

//-->
</script>
