<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="/struts-tags" prefix="s" %>

<html>
  <head>
    <title></title>

   <%--  富客户端环境引用文件  --%> 
<%@ include file="/gaowj/header-simple-app-1.0.jsp"%>
  </head>
  <body class="gaowj">
  <div class="easyui-layout" style="width:100%;height:90%;margin:0 0px;">
		
		<div data-options="region:'center',iconCls:'icon-ext-13_16'" title="系统缓存列表">
  <%@ include file="menuoperate.jsp"%>
  <table cellpadding="0" cellspacing="0">
   <tr class="clickable_t">
          <td colspan="14" align="left">&nbsp;&nbsp;</td>
        </tr>
        <tr><td>
  <table id="resizabletable" class="sortable"  border="0" cellpadding="0" cellspacing="1" bgcolor="#f4f4f4">
   <thead>
        
        <tr bgcolor="#c0c0c0">
          <th width="60" align="center" class="sort-alpha">序号</th>
          <th width="60" align="center" class="sort-alpha" title="缓存名称">缓存名称</th>
          <th width="60" align="center" class="sort-alpha" title="当前实际缓存数量">数量</th>
          <th width="108" align="center" class="sort-alpha">状态</th>
          <th width="80" align="center" class="sort-alpha" title="缓存最大个数">最大缓存数</th>
          <th width="96" align="center" class="sort-alpha" title="对象是否永久有效,一但设置了,timeout将不起作用">永久有效</th>
          <th width="108" align="center" class="sort-alpha" title="设置对象在失效前的允许闲置时间(单位:秒)。仅当eternal=false对象不是永久有效时使用,可选属性,默认值是0,也就是可闲置时间无穷大。">闲置时间(秒)</th>
          <th width="152" align="center" class="sort-alpha" title="设置对象在失效前允许存活时间(单位:秒)。最大时间介于创建时间和失效时间之间。仅当eternal=false对象不是永久有效时使用,默认是0.,也就是对象存活时间无穷大。">存活时间(秒)</th>
          <th width="108" align="center" class="sort-alpha" title="当内存中对象数量达到maxElementsInMemory时,Ehcache将会对象写到磁盘中。">可写磁盘</th>
          <th width="108" align="center" class="sort-alpha" title="硬盘最大缓存个数">硬盘最大个数</th>
          <th width="108" align="center" class="sort-alpha" title="磁盘存储是否在虚拟机重启后持续存在。默认只是false。">持续存在</th>
          <th width="108" align="center" class="sort-alpha" title="磁盘失效线程运行时间间隔,默认是120秒。">磁盘失效间隔</th>
          <th width="108" align="center" class="sort-alpha" title="当达到maxElementsInMemory限制时,Ehcache将会根据指定的策略去清理内存。默认策略是LRU(最近最少使用)。你可以设置为FIFO(先进先出)或是LFU(较少使用)。">清理策略</th>
          <th width="108" align="center" class="sort-alpha" >缓存类型</th>
        </tr>
        </thead>
        <tbody>
        <s:set name="j" value="0"></s:set>
        <s:iterator value="listdata">
        <s:set name="j" value="#j+1"></s:set>
        <tr  ondblclick="g_dbclick();" onclick="ls_choice('<s:property value="NAME"/>');" onMouseOver="this.style.backgroundColor='#D0E6EE';" onMouseOut="this.style.backgroundColor='#FFFFFF'" bgcolor="#FFFFFF">
          <td align="center">
          <input id="<s:property value="NAME"/>" type="checkbox" name="checkbox" value="checkbox"><span id="<s:property value="NAME"/>value"><s:property value='#j'/></span>
          </td>
          <td align="center"><s:property value="NAME"/></td>
          <td align="center"><s:property value="SIZE"/></td>
          <td align="center"><s:property value="STATUS"/></td>
          <td align="center"><s:property value="MAXELEMENTS"/></td>
          <td align="center"><s:property value="ETERNAL"/></td>
          <td align="center"><s:property value="TIMETOIDLESECONDS"/></td>
          <td align="center"><s:property value="TIMETOLIVESECONDS"/></td>
          <td align="center"><s:property value="OVERFLOWTODISK"/></td>
          <td align="center"><s:property value="MAXELEMENTSONDISK"/></td>
          <td align="center"><s:property value="DISKPERSISTENT"/></td>
          <td align="center"><s:property value="DISKEXPIRYTHREADINTERVALSECONDS"/></td>
          <td align="center"><s:property value="MEMORYSTOREEVICTIONPOLICY"/></td>
          <td align="center"><s:property value="CACHETYPE"/></td>
        </tr>
         </s:iterator>
         </tbody>
         <tfoot>
        <tr>
          <td colspan="14" align="right" bgcolor="#FFFFFF" height="25">    
         
          </td>
        </tr>
        </tfoot>
      </table>
  </td></tr></table>
  </div>
  </div>
  <div id="SendProduct" style="width:100px;height:100px;" >  
  </div>
  </body>
  <script type="text/javascript">
  document.getElementById("g_list").style.display='none';
  document.getElementById("g_password").style.display='none';
  document.getElementById("g_add").style.display='none';
  document.getElementById("g_open").style.display='';
  document.getElementById("g_copy").style.display='none';
  document.getElementById("g_delete").style.display='none';
  document.getElementById("g_preview").style.display='none';
  document.getElementById("g_taoda").style.display='none';
  document.getElementById("g_refresh").style.display='';
  document.getElementById("g_save").style.display='none';
  document.getElementById("g_return").style.display='none';
  document.getElementById("g_groupCmodule").style.display='none';
  document.getElementById("g_groupCuser").style.display='none';
  document.getElementById("g_userCuser").style.display='none';
  var ls_code;
  var ls_old,ls_new;
  function ls_choice(ls_current){
   if(ls_old!=null){
     ls_old.checked=false;
   }
   ls_new = document.getElementById(ls_current);
   ls_new.checked=true;
   ls_old = ls_new;
  }
    function g_refresh(){
        //document.body.execCommand('Refresh');
        window.location="cache_cache";
    }
    function g_dbclick(){
    	if(ls_new!=null){
          var modifyUrl = gaowj.WEB_APP_NAME+"/cache_cacheKeys?CACHENAME="+ls_new.id;
          $('#SendProduct').window({
			  title : "缓存详细",
			  iconCls:'icon-ext-05_41',
			  width : 1050,
			  height : 330,
			  content : '<iframe scrolling="yes" frameborder="0"  src="'+ modifyUrl+ '" style="width:100%;height:98%;"></iframe>',
			  modal : true,
			  minimizable : false,
			  maximizable : false,
			  shadow : false,
			  cache : false,
			  closed : false,
			  collapsible : false,
			  resizable : false,
			  loadingMessage : '正在加载数据,请稍等片刻......'
       });
    	}
       }
    function g_open(){
      if(ls_new!=null){
         var modifyUrl = gaowj.WEB_APP_NAME+"/cache_cacheKeys?CACHENAME="+ls_new.id;
         $('#SendProduct').window({
			  title : "缓存详细",
			  iconCls:'icon-ext-05_41',
			  width : 750,
			  height : 530,
			  content : '<iframe scrolling="yes" frameborder="0"  src="'+ modifyUrl+ '" style="width:100%;height:98%;"></iframe>',
			  modal : true,
			  minimizable : false,
			  maximizable : false,
			  shadow : false,
			  cache : false,
			  closed : false,
			  collapsible : false,
			  resizable : false,
			  loadingMessage : '正在加载数据,请稍等片刻......'
       });
      }
    }
    function g_delete(){
    	if(ls_new!=null){
            window.location="cache_cache_shutdown?CACHENAME="+ls_new.id;
      	}
    }
    function g_add(){
    	if(ls_new!=null){
            window.location="cache_cache_create?CACHENAME="+ls_new.id;
      	}
    }
  </script>

</html>