2018-06-03 22:26:41 +08:00

86 lines
2.9 KiB
Plaintext

<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/IncludeBegin.jsp"%>
<%@page import="com.amarsoft.awe.res.model.SkinItem"%>
<%@ page import="com.amarsoft.dict.als.cache.CacheLoaderFactory"%>
<%@ page import="com.amarsoft.dict.als.cache.CacheDefine"%>
<style>
li{
margin-left: 10px;
}
</style>
<body class="ListPage" leftmargin="0" topmargin="0" >
<div id="Layer1" style="position:absolute;width:100%; height:100%; z-index:1; overflow: auto">
<div class="strip_tit" >
<table border=1 cellspacing=0 cellpadding=0 bordercolordark="#FFFFFF" bordercolorlight="#666666" style='cursor: pointer;' width='100%'>
<tr bgcolor="#00659C" valign=center height="20">
<td><font color="#FFFFFF">缓存控制台</font></td>
</tr>
</table>
</div>
<div class="strip_doc" style="height: 40%;display: block">
<table style="width: 100%;border: 0;">
<tr>
<td>
<a href="javascript:AsDebug.reloadCacheAll()"><strong>刷新</strong>【所有参数】缓存</a>
</td>
</tr>
<%
Map<String,CacheDefine> cachesList = CacheLoaderFactory.getCachesList();
String [] keys = (String [])cachesList.keySet().toArray(new String[0]);
for (int iKey=0; iKey < keys.length; iKey ++) {
CacheDefine cache = cachesList.get(keys[iKey]);
%>
<tr>
<td>
<li><a href="javascript:AsDebug.reloadCache('<%=keys[iKey]%>')">刷新【<%=keys[iKey]%>】缓存</a><%=" 说明:装载类【"+cache.getLoadClass()+"】大小【"+cache.getSize()+"】有效期【"+cache.getExpireTime()/1000+"】秒"%></li>
</td>
</tr>
<%}%>
<tr>
<td>
<a href="javascript:AsDebug.reloadFixSkins()"><strong>刷新</strong>定制皮肤【<%=CurConfig.getParameter("SkinConfig")%>】</a>
</td>
</tr>
<tr>
<td>
<a href="javascript:AsDebug.reloadConfigFile()"><strong>刷新</strong>配置文件【<%=CurConfig.getConfigFile()%>】</a>
</td>
</tr>
</table>
</div>
<div class="strip_tit" >
<table style='cursor: pointer;border: 1;width: 100%'>
<tr bgcolor="#00659C" valign="middle" height="20">
<td><font color="#FFFFFF">&nbsp;&nbsp;集群缓存控制台</font></td>
</tr>
</table>
</div>
<div class="strip_doc" style="height: 40%;display: block">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<a href="javascript:reloadCacheAllServer()"><strong>刷新</strong>集群服务器缓存</a>
</td>
</tr>
<%
ArrayList<String> asList = CacheLoaderFactory.getAppServerList();
for (int iKey=0; iKey < asList.size(); iKey ++) {
%>
<tr>
<td>
<li>服务器【<%=asList.get(iKey)%>】</li>
</td>
</tr>
<%}%>
</table>
</div>
</div>
</body>
<script type="text/javascript">
function reloadCacheAllServer(){
var sReturn = RunJavaMethod("com.amarsoft.app.util.ReloadCacheConfigAction","reloadCacheAllServer","");
if(sReturn=="SUCCESS") alert("重载参数缓存成功!");
else alert("重载参数缓存失败!");
}
</script>
<%@ include file="/IncludeEnd.jsp"%>