@@ -21,7 +21,7 @@
$("#serviceId").val($(this).attr("serviceId"));
$("#protocolId").val($(this).attr("protocolId"));
if($(this).val()==128){
$("#doLog").val($(".action:checked").attr("0") );
$("#doLog").val(0 );
$("input:radio[name='doLog']").attr("disabled",true);
$(".cacheAction").hide();
}else{
@@ -70,38 +70,71 @@
submitHandler : function(form) {
var flag = true;
var subscribeId=0;
var pinning_time=0;
var max_cache_size=0;
var inactive_time=0
if($("#pinning_time_hour").val()!=''){
pinning_time =pinning_time+parseInt($("#pinning_time_hour").val())*3600;
}
if($("#pinning_time_min").val()!=''){
pinning_time =pinning_time+parseInt($("#pinning_time_min").val())*60;
}
if($("#pinning_time_sec").val()!=''){
pinning_time =pinning_time+parseInt($("#pinning_time_sec").val());
}
if($("#inactive_time_hour").val()!=''){
inactive_time =inactive_time+parseInt($("#inactive_time_hour").val())*3600;
}
if($("#inactive_time_min").val()!=''){
inactive_time =inactive_time+parseInt($("#inactive_time_min").val())*60;
}
if($("#inactive_time_sec").val()!=''){
inactive_time =inactive_time+parseInt($("#inactive_time_sec").val());
}
if($("#max_cache_size_g").val()!=''){
max_cache_size =max_cache_size+parseInt($("#max_cache_size_g").val())*1024;
}
if($("#max_cache_size_m").val()!=''){
max_cache_size =max_cache_size+parseInt($("#max_cache_size_m").val());
}
alert(max_cache_size);
$("#pinning_time").val(pinning_time+"s");
$("#max_cache_size").val(max_cache_size+"m");
$("#inactive_time").val(inactive_time+"s");
if($("#pinning_time_unit").val()=='h'){
if(parseInt($("#pinning_time").val())>24){
alert($("#pinning_time").val());
return ;
}
}else if($("#pinning_time_unit").val()=='m'){
if(parseInt($("#pinning_time").val())>1440){
alert($("#pinning_time").val());
return ;
}
}else if($("#pinning_time_unit").val()=='s'){
if(parseInt($("#pinning_time").val())>86400){
alert($("#pinning_time").val());
return ;
}
}
if($("#inactive_time_unit").val()=='h'){
if(parseInt($("#inactive_time").val())>24){
alert($("#inactive_time").val());
return ;
}
}else if($("#inactive_time_unit").val()=='m'){
if(parseInt($("#inactive_time").val())>1440){
alert($("#inactive_time").val());
return ;
}
}else if($("#inactive_time_unit").val()=='s'){
if(parseInt($("#inactive_time").val())>86400){
alert($("#inactive_time").val());
return ;
}
}
if($("#max_cache_size_unit").val()=='t'){
if(parseInt($("#max_cache_size").val())>1024){
alert($("#max_cache_size").val());
return ;
}
}else if($("#max_cache_size_unit").val()=='g'){
if(parseInt($("#max_cache_size").val())>1048576){
alert($("#max_cache_size").val());
return ;
}
}else if($("#max_cache_size_unit").val()=='m'){
if(parseInt($("#max_cache_size").val())>1073741824){
alert($("#max_cache_size").val());
return ;
}
}
if($("#max_cache_obj_size_unit").val()=='t'){
if(parseInt($("#max_cache_obj_size").val())>1024){
alert($("#max_cache_obj_size").val());
return ;
}
}else if($("#max_cache_obj_size_unit").val()=='g'){
if(parseInt($("#max_cache_obj_size").val())>1048576){
alert($("#max_cache_obj_size").val());
return ;
}
}else if($("#max_cache_obj_size_unit").val()=='m'){
if(parseInt($("#max_cache_obj_size").val())>1073741824){
alert($("#max_cache_obj_size").val());
return ;
}
}
//存在隐藏的subscribeId, 不算进域配置
if($(".boxSolid.hidden").hasClass("subscribeId")){
subscribeId=1;
@@ -158,6 +191,10 @@
$(this).remove();
});
$("input[name$='exprType']").attr("disabled",false);
$("#pinning_time").val($("#pinning_time").val()+$("#pinning_time_unit").val());
$("#inactive_time").val($("#inactive_time").val()+$("#inactive_time_unit").val());
$("#max_cache_size").val($("#max_cache_size").val()+$("#max_cache_size_unit").val());
$("#max_cache_obj_size").val($("#max_cache_obj_size").val()+$("#max_cache_obj_size_unit").val());
loading('onloading...');
form.submit();
}else{
@@ -327,7 +364,8 @@
<spring:message code="ignore_query_string" />
</label>
<div class="col-md-6">
<input id="ignore_qs" name="ignore_qs" class="form-control invisibleChar" type="text" value="${fn:replace(fn:replace(_cfg.userRegion.cache_key.ignore_qs, '[',''),']','')}">
<input id="ignore_qs" name="ignore_qs" class="form-control invisibleChar" type="text"
value="${fn:replace(fn:replace(_cfg.userRegion.cache_key.ignore_qs, '[',''),']','')}">
</div>
<div for="ignore_qs"></div>
</div>
@@ -354,7 +392,10 @@
<select name="userRegion['no_revalidate']" id="no_revalidate"
class="selectpicker show-tick form-control">
<c:forEach items="${fns:getDictList('CACHE_NO_REVALIDATE')}" var="dict">
<option value="${dict.itemCode}" <c:if test="${_cfg.userRegion.no_revalidate eq dict.itemCode || (empty _cfg.userRegion.no_revalidate && dict.itemCode eq 1)}">selected</c:if>><spring:message code="${dict.itemValue}"/></option>
<option value="${dict.itemCode}"
<c:if test="${_cfg.userRegion.no_revalidate eq dict.itemCode
|| (empty _cfg.userRegion.no_revalidate && dict.itemCode eq 0)}">selected</c:if>>
<spring:message code="${dict.itemValue}"/></option>
</c:forEach>
</select>
<%-- <input id="revalidate" name="userRegion['no_revalidate']" class="form-control" type="text" value="${_cfg.userRegion.no_revalidate}"> --%>
@@ -474,8 +515,17 @@
<spring:message code="pinning_time" />
</label>
<div class="col-md-6">
<input type="hidden" id="pinning_time" name="userRegion['pinning_time']" value="${_cfg.userRegion.pinning_time }" />
<div class="input-group">
<input type="input" id="pinning_time" class="form-control input-small" name="userRegion['pinning_time']"
value="${fn:substring(_cfg.userRegion.pinning_time,0, fn:length(_cfg.userRegion.pinning_time)-1) }" />
<select id="pinning_time_unit"
class="selectpicker show-tick form-control input-small">
<c:forEach items="${fns:getDictList('CACHE_TIME_UNIT')}" var="dict">
<option value="${dict.itemCode}" <c:if test="${fns:endsWith(_cfg.userRegion.pinning_time,dict.itemCode)}">selected</c:if>><spring:message code="${dict.itemValue}"/></option>
</c:forEach>
</select>
</div>
<%-- <div class="input-group">
<input id="pinning_time_hour" class="form-control input-xsmall" type="text" />
<span class="input-group-btn">
<button class="btn" type="button">h</button>
@@ -488,7 +538,7 @@
<span class="input-group-btn">
<button class="btn" type="button">s</button>
</span>
</div>
</div> --%>
</div>
</div>
@@ -501,8 +551,17 @@
<spring:message code="max_cache_size" />
</label>
<div class="col-md-6">
<input type="hidden" id="max_cache_size" name="userRegion['max_cache_size']" value="${_cfg.userRegion.max_cache_size }" />
<div class="input-group">
<input type="input" id="max_cache_size" class="form-control input-small" name="userRegion['max_cache_size']"
value="${fn:substring(_cfg.userRegion.max_cache_size,0, fn:length(_cfg.userRegion.max_cache_size)-1) }" />
<select id="max_cache_size_unit"
class="selectpicker show-tick form-control input-small">
<c:forEach items="${fns:getDictList('CACHE_SIZE_UNIT')}" var="dict">
<option value="${dict.itemCode}" <c:if test="${fns:endsWith(_cfg.userRegion.max_cache_size,dict.itemCode)}">selected</c:if>><spring:message code="${dict.itemValue}"/></option>
</c:forEach>
</select>
</div>
<%-- <div class="input-group">
<input id="max_cache_size_g" class="form-control input-small" type="text" />
<span class="input-group-btn">
<button class="btn" type="button">G</button>
@@ -510,12 +569,7 @@
<input id="max_cache_size_m" class="form-control input-small" type="text" value="${fn:replace(_cfg.userRegion.max_cache_size, 'm', '')}" /> <span class="input-group-btn">
<button class="btn" type="button">M</button>
</span>
<!-- <input id="max_cache_size_k" class="form-control input-xsmall" type="text" >
<span class="input-group-btn">
<button class="btn" type="button">K</button>
</span> -->
</div>
<%-- <input id="max_cache_size" name="userRegion['max_cache_size']" class="form-control" type="text" value="${_cfg.userRegion.max_cache_size}"> --%>
</div> --% >
</div>
</div>
</div>
@@ -525,8 +579,17 @@
<spring:message code="inactive_time" />
</label>
<div class="col-md-6">
<input type="hidden" id="inactive_time" name="userRegion['inactive_time']" value="${_cfg.userRegion.inactive_time }" />
<div class="input-group">
<input type="input" id="inactive_time" class="form-control input-small" name="userRegion['inactive_time']"
value="${fn:substring(_cfg.userRegion.inactive_time,0, fn:length(_cfg.userRegion.inactive_time)-1) }" />
<select id="inactive_time_unit"
class="selectpicker show-tick form-control input-small">
<c:forEach items="${fns:getDictList('CACHE_TIME_UNIT')}" var="dict">
<option value="${dict.itemCode}" <c:if test="${fns:endsWith(_cfg.userRegion.inactive_time,dict.itemCode)}">selected</c:if>><spring:message code="${dict.itemValue}"/></option>
</c:forEach>
</select>
</div>
<%-- <div class="input-group">
<input id="inactive_time_hour" class="form-control input-xsmall" type="text" />
<span class="input-group-btn">
<button class="btn" type="button">h</button>
@@ -539,13 +602,35 @@
<span class="input-group-btn">
<button class="btn" type="button">s</button>
</span>
</div>
</div> --%>
<%-- <input id="inactive_time" name="userRegion['inactive_time']" class="form-control" type="text" value="${_cfg.userRegion.inactive_time}"> --%>
</div>
</div>
</div>
</div>
<div class="row cacheAction">
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3">
<spring:message code="max_cache_obj_size" />
</label>
<div class="col-md-6">
<div class="input-group">
<input type="input" id="max_cache_obj_size" class="form-control input-small"
name="userRegion['max_cache_obj_size']"
value="${fn:substring(_cfg.userRegion.max_cache_obj_size, 0,fn:length(_cfg.userRegion.max_cache_obj_size)-1) }" />
<select id="max_cache_obj_size_unit"
class="selectpicker show-tick form-control input-small">
<c:forEach items="${fns:getDictList('CACHE_SIZE_UNIT')}" var="dict">
<option value="${dict.itemCode}" <c:if test="${fns:endsWith(_cfg.userRegion.max_cache_obj_size,dict.itemCode)}">selected</c:if>><spring:message code="${dict.itemValue}"/></option>
</c:forEach>
</select>
</div>
</div>
</div>
</div>
</div>
<br>
<c:set var="strCfgIndex" value="0"></c:set>
<c:forEach items="${regionList}" var="region" varStatus="status">