<%@page import="org.activiti.engine.repository.ProcessDefinition" %>
<%@page import="org.activiti.engine.impl.persistence.entity.*" %>
<%@page import="org.activiti.engine.repository.Deployment" %>
<%@page import="com.blueland.bpm.engine.config.model.*" %>
<%@page import="com.blueland.bpm.common.page.*" %>
<%@page import="com.blueland.bpm.common.util.*"%>
<%@page import="java.util.*" %>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib tagdir="/WEB-INF/tags/simpletable" prefix="simpletable"%>
<%@ include file="/commons/taglibs.jsp" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<%@ include file="/commons/meta.jsp" %>
<base href="<%=basePath%>">
<title>系统统计</title>
<script type="text/javascript" src="${ctx }/resource/js/jquery-1.8.3.min.js"></script>
	<script src="${ctx}/resource/js/plugins/highcharts/highcharts.js"></script>
     <script src="${ctx}/resource/js/plugins/highcharts/modules/exporting.js"></script>
      <script src="${ctx}/resource/js/common/processReport.js"></script>
     <script type="text/javascript">
     $(document).ready(function() {
    	 $.ajax({
  			url:"${ctx}/processReport/sysCount.do",
  			type:"GET",
  			dataType:"json",
  			beforeSend:function(){
  				$("#sysIndexCount").hide();
  				$("#sysCountLoading").append("<div id='sysCount' class='bigpic' style='position: absolute;margin: 0 auto;top: 75px;'></div>");
  			},
  			success:function(data){
  				//console.log("Resource:"+data);
  				$("#sysIndexCount").show();
  				$("#sysIndexCount").text(data.count);
  				//binderrorResource(data.page.result);
  			},
  			  complete:function(xhr){
  				  /*数据加载完成后，将蒙版移除*/
  		            $("#sysCount").fadeOut();
  			  },
  			  error:function(){
  					$("#sysIndexCount").show();  
  			  }
  		});
  		
  		
  		$.ajax({
  			url:"${ctx}/processReport/sysProcessDefCount.do",
  			type:"GET",
  			dataType:"json",
  			beforeSend:function(){
  				$("#sysProcessDef").hide();
  				 $("#sysProcessDefLoading").append("<div id='sysProcessDefCount' class='bigpic' style='position: absolute;margin: 0 auto;top: 75px;'></div>");
  			},
  			success:function(data){
  				//console.log("Resource:"+data);
  				$("#sysProcessDef").show();
  				$("#sysProcessDef").text(data.count);
  				//binderrorResource(data.page.result);
  			},
  			  complete:function(xhr){
  				  /*数据加载完成后，将蒙版移除*/
  		            $("#sysProcessDefCount").fadeOut();
  			  },
  			  error:function(){
  					$("#sysProcessDef").show();  
  			  }
  		});
  		
  		
  		$.ajax({
  			url:"${ctx}/processReport/sysProcessModelCount.do",
  			type:"GET",
  			dataType:"json",
  			beforeSend:function(){
  				$("#sysProcessModel").hide();
  				 $("#sysProcessModelLoading").append("<div id='sysProcessModelCount' class='bigpic' style='position: absolute;margin: 0 auto;top: 75px;'></div>");
  			},
  			success:function(data){
  				//console.log("Resource:"+data);
  				$("#sysProcessModel").show();
  				$("#sysProcessModel").text(data.count);
  				//binderrorResource(data.page.result);
  			},
  			  complete:function(xhr){
  				  /*数据加载完成后，将蒙版移除*/
  		            $("#sysProcessModelCount").fadeOut();
  			  },
  			  error:function(){
  					$("#sysProcessModel").show();  
  			  }
  		});
  		
  		
  		$.ajax({
  			url:"${ctx}/processReport/sysHistoryCount.do",
  			type:"GET",
  			dataType:"json",
  			beforeSend:function(){
  				$("#sysProcessHistory").hide();
  				 $("#sysProcessHistoryLoading").append("<div id='sysHistoryCount' class='bigpic' style='position: absolute;margin: 0 auto;top: 75px;'></div>");
  			},
  			success:function(data){
  				//console.log("Resource:"+data);
  				$("#sysProcessHistory").show();
  				$("#sysProcessHistory").text(data.count);
  				//binderrorResource(data.page.result);
  			},
  			  complete:function(xhr){
  				  /*数据加载完成后，将蒙版移除*/
  		            $("#sysHistoryCount").fadeOut();
  			  },
  			  error:function(){
  					$("#sysProcessHistory").show();  
  			  }
  		});
  		
  		
  		
  		$.ajax({
  			url:"${ctx}/processReport/sysTaskCount.do",
  			type:"GET",
  			dataType:"json",
  			beforeSend:function(){
  				$("#sysProcessTask").hide();
  				 $("#sysProcessTaskLoading").append("<div id='sysTaskCount'  class='bigpic' style='position: absolute;margin: 0 auto;top: 75px;'></div>");
  			},
  			success:function(data){
  				//console.log("Resource:"+data);
  				$("#sysProcessTask").show();
  				$("#sysProcessTask").text(data.count);
  				//binderrorResource(data.page.result);
  			},
  			  complete:function(xhr){
  				  /*数据加载完成后，将蒙版移除*/
  		            $("#sysTaskCount").fadeOut();
  			  },
  			  error:function(){
  					$("#sysProcessTask").show();  
  			  }
  		});
  		
  		$.ajax({
  			url:"${ctx}/processReport/sysInfoM.do",
  			type:"GET",
  			dataType:"json",
  			beforeSend:function(){
  				 $("#sysInfoM").append("<div id='sysInfoMCount' style='padding:0 5px;' class='bigpic' ></div>");
  			},
  			success:function(data){
  				
  				$("#sysInfoM").html(data.count);
  			
  			},
  			  complete:function(xhr){
  				  /*数据加载完成后，将蒙版移除*/
  		            $("#sysInfoMCount").fadeOut();
  			  }
  		});
  		
  		$.ajax({
  			url:"${ctx}/processReport/sysInfoD.do",
  			type:"GET",
  			dataType:"json",
  			beforeSend:function(){
  				 $("#sysInfoD").append("<div id='sysInfoDCount' style='padding:0 5px;'  class='bigpic' ></div>");
  			},
  			success:function(data){
  				
  				$("#sysInfoD").html(data.count);
  				
  			},
  			  complete:function(xhr){
  				  /*数据加载完成后，将蒙版移除*/
  		            $("#sysInfoDCount").fadeOut();
  			  }
  		});
  		
  		$.ajax({
  			url:"${ctx}/processReport/sysErrorM.do",
  			type:"GET",
  			dataType:"json",
  			beforeSend:function(){
  				 $("#sysErrorM").append("<div id='sysErrorMCount' style='padding:0 5px;'  class='bigpic' ></div>");
  			},
  			success:function(data){
  				
  				$("#sysErrorM").html(data.count);
  			
  			},
  			  complete:function(xhr){
  				  /*数据加载完成后，将蒙版移除*/
  		            $("#sysErrorMCount").fadeOut();
  			  }
  		});
  		
  		$.ajax({
  			url:"${ctx}/processReport/sysErrorD.do",
  			type:"GET",
  			dataType:"json",
  			beforeSend:function(){
  				 $("#sysErrorD").append("<div id='sysErrorDCount' style='padding:0 5px;' class='bigpic' ></div>");
  			},
  			success:function(data){
  				
  				$("#sysErrorD").html(data.count);
  				
  			},
  			  complete:function(xhr){
  				  /*数据加载完成后，将蒙版移除*/
  		            $("#sysErrorDCount").fadeOut();
  			  }
  		});
     });
     
   
 		
 		
 	
     
     </script> 
     <style type="text/css">
       /*等待进度大css*/
   .bigpic{
    width: 16px;
    height: 16px;
    background-image: url("${ctx}/resource/css/icons/loading.gif");
    position: absolute;
    top: 0px;
    bottom: 0px;
    right: 0px;
    left: 0px;
    margin: auto;
    
}
.col-xs-5ths, .col-sm-5ths, .col-md-5ths, .col-lg-5ths {
    width: 20%;
    float: left;
}
     </style>
      
</head>
<body>
 <div class="row" style="margin: 10px;">
 	<div class="col-xs-5ths" style="padding-left:  0;padding-right: 6px;">

      <div class="widget-box">
					<div class="widget-header">
						 <h5 class="widget-title">
								应用系统
						 </h5>
					 </div>

											<div class="widget-body" id="sysCountLoading" style="height: 170px;position:  relative;">
												
								
      <a id="sysIndexCount" href="${ctx }/applicationMgr/list.do" style="display: flex;justify-content: center;align-items: center;font-size: 50px;color: orange;line-height: 170px;">0</a>
     
      
      </div>
     
     
   
     </div>

		</div>
		
		<div class="col-xs-5ths" style="padding-left:  6px;padding-right: 6px;">
		         <div class="widget-box">
					<div class="widget-header">
						 <h5 class="widget-title">
								流程定义
						 </h5>
					 </div>
		          
		          <div class="widget-body" id="sysProcessDefLoading" style="height: 170px;position:  relative;">
											
		          <a id="sysProcessDef" href="${ctx }/procDefMgr/list.do" style="display: flex;justify-content: center;align-items: center;font-size: 50px;color: #438eb9;line-height: 170px;">0</a>
		                                       
		          </div>
		         </div>
		</div>
		
		<div class="col-xs-5ths" style="padding-left:  6px;padding-right: 6px;">
		         <div class="widget-box">
					<div class="widget-header">
						 <h5 class="widget-title">
								流程实例
						 </h5>
					 </div>
		          
		          <div class="widget-body" id="sysProcessModelLoading" style="height: 170px;position:  relative;">
											
		          <a id="sysProcessModel" href="${ctx }/procInstMgr/list.do" style="display: flex;justify-content: center;align-items: center;font-size: 50px;color: #438eb9;line-height: 170px;">0</a>
		                                       
		          </div>
		         </div>
		</div>
		
		<div class="col-xs-5ths" style="padding-left:  6px;padding-right: 6px;">
		         <div class="widget-box">
					<div class="widget-header">
						 <h5 class="widget-title">
								流程任务
						 </h5>
					 </div>
		          
		          <div class="widget-body" id="sysProcessTaskLoading" style="height: 170px;position:  relative;">
											
		           <a id="sysProcessTask" href="${ctx}/taskMgr/list.do" style="display: flex;justify-content: center;align-items: center;font-size: 50px;color: #438eb9;line-height: 170px;">0</a>
		                                       
		          </div>
		         </div>
		</div>
		
		<div class="col-xs-5ths" style="padding-left:  6px;padding-right: 0;">
		         <div class="widget-box">
					<div class="widget-header">
						 <h5 class="widget-title">
								流程历史
						 </h5>
					 </div>
		          
		          <div class="widget-body" id="sysProcessHistoryLoading" style="height: 170px;position:  relative;" >
											
		          <a id="sysProcessHistory" href="${ctx }/procInstMgr/historyList.do" style="display: flex;justify-content: center;align-items: center;font-size: 50px;color: #438eb9;line-height: 170px;">0</a>
           
		                                 
		          </div>
		         </div>
		</div>
		
   </div>
 	
 	<div class="row" style="margin: 10px;">
 	<div class="col-xs-6" style="padding-left:  0;padding-right: 6px;">
 	
<!--  	<h3>流程访问量 widget-box  widget-color-blue     widget-title lighter</h3> <br> -->

 <div class="widget-box ">
					<div class="widget-header">
												<h5 class="widget-title">
													
													流程访问量
												</h5>
											</div>

											<div class="widget-body">
							<div style="display:table;width:100%;padding: 20px;color: #555;font-size: 23px;">
                     <div style="display:table-cell;vertical-align:middle;width:50%;text-align:center;border-right:1px dotted #999;">上月访问量<b style="color: green;padding:0 5px;font-size:36px;" id="sysInfoM"></b>次</div>
         <div style="display:table-cell;vertical-align:middle;text-align:  center;">当日访问量<b style="color: green;padding:0 5px;font-size:36px;" id="sysInfoD" ></b>次</div>
                            </div>
											
											
<!-- 												<div class="widget-main no-padding"> -->

<!-- 											<table id="dynamic-table" class="table table-striped table-bordered table-hover"> -->
<!-- 												<thead class="thin-border-bottom"> -->

<!-- 													<tr> -->
<!-- 														<th>统计时间段</th> -->
<!-- 														<th>数量</th> -->
<!-- 													</tr> -->
<!-- 												</thead> -->

<!-- 												<tbody> -->
<!-- 													 	<tr> -->
<!--  															<td>上月访问量:</td> -->
<!--  															<td ></td> -->
<!--  														</tr> -->
<!--  														<tr> -->
<!--  															<td>当日访问量:</td> -->
<!--  															<td ></td> -->
<!--  														</tr> -->
<!-- 												</tbody> -->
<!-- 											</table> -->

<!-- 					</div> -->
				</div>
 	     </div>
 	</div>
 	<div class="col-xs-6" style="padding-left:  6px;padding-right: 0;">
 	         <div class="widget-box">
					<div class="widget-header">
							 <h5 class="widget-title">
									 流程异常
							 </h5>
					</div>

			<div class="widget-body">
			
			<div style="display:table;width:100%;padding: 20px;color: #555;font-size: 23px;">
                                 <div style="display:table-cell;vertical-align:middle;width:50%;text-align:center;border-right:1px dotted #999;">上月累计<b style="color: red;padding:0 5px;font-size:36px;" id="sysErrorM"></b></div>
         <div style="display:table-cell;vertical-align:middle;text-align:  center;">当日累计<b style="color: red;padding:0 5px;font-size:36px;" id="sysErrorD" ></b></div>
                            </div>
			
<!-- 					<div class="widget-main no-padding"> -->
<!-- 							<table id="dynamic-table" class="table table-striped table-bordered table-hover"> -->
<!-- 									<thead class="thin-border-bottom"> -->
<!--  										<tr> -->
<!-- 											<th>统计时间段</th> -->
<!-- 											<th>数量</th> -->
<!-- 										</tr> -->
<!-- 									</thead> -->
<!--  									<tbody> -->
<!-- 										<tr> -->
<!--  											<td>上月累计:</td> -->
<!--  											<td ></td> -->
 											
<!--  										</tr> -->
<!--  										<tr> -->
<!--  											<td>当日累计:</td> -->
<!--  											<td ></td> -->
 											
<!--  										</tr> -->
<!-- 									</tbody> -->
<!-- 							</table> -->

<!-- 					  </div> -->
					</div>		
 	           </div>
 	      </div>

      </div>


</body>
</html>