缓存策略界面样式修改,以及设置部分参数缺省值。
This commit is contained in:
@@ -13,6 +13,34 @@
|
||||
$(document)
|
||||
.ready(
|
||||
function() {
|
||||
$(".switch").bootstrapSwitch({
|
||||
/* onText:"<spring:message code='ON'/>",
|
||||
offText:"<spring:message code='OFF'/>", */
|
||||
onColor:"info",
|
||||
offColor:"default",
|
||||
size:"small",
|
||||
onInit: function() {
|
||||
if($(this).val()==''){
|
||||
$(this).val(0);
|
||||
}
|
||||
},
|
||||
onSwitchChange:function(event,state){
|
||||
if(state==true){
|
||||
$(this).val("1");
|
||||
}else{
|
||||
$(this).val("0");
|
||||
}
|
||||
}
|
||||
});
|
||||
/* $("#no_revalidate").each(function(){
|
||||
$(this).on("switchChange.bootstrapSwitch",function(event,state){
|
||||
if(state){
|
||||
$(this).val(1);
|
||||
}else{
|
||||
$(this).val(0);
|
||||
}
|
||||
})
|
||||
}); */
|
||||
$("#ignore_qs").tagsInput({
|
||||
width:$("#ignore_qs").find(".form-control").width(),
|
||||
defaultText:'please input ignore query string in URL',
|
||||
@@ -221,10 +249,36 @@
|
||||
$(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());
|
||||
|
||||
if($("#pinning_time").val()==''){
|
||||
$("#pinning_time").val(0+$("#pinning_time_unit").val());
|
||||
}else{
|
||||
$("#pinning_time").val($("#pinning_time").val()+$("#pinning_time_unit").val());
|
||||
}
|
||||
if($("#inactive_time").val()==''){
|
||||
$("#inactive_time").val(0+$("#inactive_time_unit").val());
|
||||
}else{
|
||||
$("#inactive_time").val($("#inactive_time").val()+$("#inactive_time_unit").val());
|
||||
}
|
||||
if($("#max_cache_size").val()==''){
|
||||
$("#max_cache_size").val(0+$("#max_cache_size_unit").val());
|
||||
}else{
|
||||
$("#max_cache_size").val($("#max_cache_size").val()+$("#max_cache_size_unit").val());
|
||||
}
|
||||
if($("#max_cache_obj_size").val()==''){
|
||||
$("#max_cache_obj_size").val(0+$("#max_cache_obj_size_unit").val());
|
||||
}else{
|
||||
$("#max_cache_obj_size").val($("#max_cache_obj_size").val()+$("#max_cache_obj_size_unit").val());
|
||||
}
|
||||
if($("#min_use").val()==''){
|
||||
$("#min_use").val(0);
|
||||
}
|
||||
$(".userRegion").each(function(){
|
||||
$(this).attr("name","userRegion['"+$(this).attr("id")+"']");
|
||||
if($(this).is(":checkbox") && $(this).hasClass("switch")){
|
||||
$(this).attr("checked","checked");
|
||||
}
|
||||
});
|
||||
loading('onloading...');
|
||||
form.submit();
|
||||
}else{
|
||||
@@ -420,7 +474,11 @@
|
||||
<spring:message code="no_revalidate" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<select name="userRegion['no_revalidate']" id="no_revalidate"
|
||||
<div class="bootstrap-switch">
|
||||
<input type="checkbox" id="no_revalidate" name="no_revalidate" class="switch userRegion"
|
||||
value="${_cfg.userRegion['no_revalidate'] }" <c:if test="${_cfg.userRegion['no_revalidate'] eq 1}">checked</c:if>/>
|
||||
</div>
|
||||
<%-- <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}"
|
||||
@@ -428,8 +486,7 @@
|
||||
|| (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}"> --%>
|
||||
</select> --%>
|
||||
</div>
|
||||
<div for="no_revalidate"></div>
|
||||
</div>
|
||||
@@ -440,13 +497,16 @@
|
||||
<spring:message code="cache_dyn_url" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<select name="userRegion['cache_dyn_url']" id="cache_dyn_url"
|
||||
<div class="bootstrap-switch">
|
||||
<input type="checkbox" id="cache_dyn_url" name="cache_dyn_url" class="switch userRegion"
|
||||
value="${_cfg.userRegion['cache_dyn_url']}" <c:if test="${_cfg.userRegion['cache_dyn_url'] eq 1}">checked</c:if>/>
|
||||
</div>
|
||||
<%-- <select name="userRegion['cache_dyn_url']" id="cache_dyn_url"
|
||||
class="selectpicker show-tick form-control">
|
||||
<c:forEach items="${fns:getDictList('CACHE_DYN_URL')}" var="dict">
|
||||
<option value="${dict.itemCode}" <c:if test="${_cfg.userRegion.cache_dyn_url eq dict.itemCode || (empty _cfg.userRegion.cache_dyn_url && dict.itemCode eq 0)}">selected</c:if>><spring:message code="${dict.itemValue}"/></option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
<%-- <input id="cache_dyn_url" name="userRegion['cache_dyn_url']" class="form-control" type="text" value="${_cfg.userRegion.cache_dyn_url}"> --%>
|
||||
</select> --%>
|
||||
</div>
|
||||
<div for="userRegion['cache_dyn_url']"></div>
|
||||
</div>
|
||||
@@ -459,13 +519,16 @@
|
||||
<spring:message code="cache_cookied_cont" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<select name="userRegion['cache_cookied_cont']" id="cache_cookied_cont"
|
||||
<div class="bootstrap-switch">
|
||||
<input type="checkbox" id="cache_cookied_cont" name="cache_cookied_cont" class="switch userRegion"
|
||||
value="${_cfg.userRegion['cache_cookied_cont'] }" <c:if test="${_cfg.userRegion['cache_cookied_cont'] eq 1}">checked</c:if>/>
|
||||
</div>
|
||||
<%-- <select name="userRegion['cache_cookied_cont']" id="cache_cookied_cont"
|
||||
class="selectpicker show-tick form-control">
|
||||
<c:forEach items="${fns:getDictList('CACHE_COOKIED_CONT')}" var="dict">
|
||||
<option value="${dict.itemCode}" <c:if test="${_cfg.userRegion.cache_cookied_cont eq dict.itemCode || (empty _cfg.userRegion.cache_cookied_cont && dict.itemCode eq 0)}">selected</c:if>><spring:message code="${dict.itemValue}"/></option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
<%-- <input id="cache_cookied_cont" name="userRegion['cache_cookied_cont']" class="form-control" type="text" value="${_cfg.userRegion.cache_cookied_cont}"> --%>
|
||||
</select> --%>
|
||||
</div>
|
||||
<div for="cache_cookied_cont"></div>
|
||||
</div>
|
||||
@@ -477,13 +540,16 @@
|
||||
<spring:message code="ignore_req_nocache" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<select name="userRegion['ignore_req_nocache']" id="ignore_req_nocache"
|
||||
<div class="bootstrap-switch">
|
||||
<input type="checkbox" id="ignore_req_nocache" name="ignore_req_nocache" class="switch userRegion"
|
||||
value="${_cfg.userRegion['ignore_req_nocache'] }" <c:if test="${_cfg.userRegion['ignore_req_nocache'] eq 1}">checked</c:if>/>
|
||||
</div>
|
||||
<%-- <select name="userRegion['ignore_req_nocache']" id="ignore_req_nocache"
|
||||
class="selectpicker show-tick form-control">
|
||||
<c:forEach items="${fns:getDictList('IGNORE_REQ_NOCACHE')}" var="dict">
|
||||
<option value="${dict.itemCode}" <c:if test="${_cfg.userRegion.ignore_req_nocache eq dict.itemCode || (empty _cfg.userRegion.ignore_req_nocache && dict.itemCode eq 0)}">selected</c:if>><spring:message code="${dict.itemValue}"/></option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
<%-- <input id="ignore_req_nocache" name="userRegion['ignore_req_nocache']" class="form-control" type="text" value="${_cfg.userRegion.ignore_req_nocache}"> --%>
|
||||
</select> --%>
|
||||
</div>
|
||||
<div for="ignore_req_nocache"></div>
|
||||
</div>
|
||||
@@ -497,13 +563,16 @@
|
||||
<spring:message code="ignore_res_nocache" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<select name="userRegion['ignore_res_nocache']" id="ignore_res_nocache"
|
||||
<div class="bootstrap-switch">
|
||||
<input type="checkbox" id="ignore_res_nocache" name="ignore_res_nocache" class="switch userRegion"
|
||||
value="${_cfg.userRegion['ignore_res_nocache'] }" <c:if test="${_cfg.userRegion['ignore_res_nocache'] eq 1}">checked</c:if>/>
|
||||
</div>
|
||||
<%-- <select name="userRegion['ignore_res_nocache']" id="ignore_res_nocache"
|
||||
class="selectpicker show-tick form-control">
|
||||
<c:forEach items="${fns:getDictList('IGNORE_REQ_NOCACHE')}" var="dict">
|
||||
<option value="${dict.itemCode}" <c:if test="${_cfg.userRegion.ignore_res_nocache eq dict.itemCode || (empty _cfg.userRegion.ignore_res_nocache && dict.itemCode eq 0)}">selected</c:if>><spring:message code="${dict.itemValue}"/></option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
<%-- <input id="ignore_res_nocache" name="userRegion['ignore_res_nocache']" class="form-control" type="text" value="${_cfg.userRegion.ignore_res_nocache}"> --%>
|
||||
</select> --%>
|
||||
</div>
|
||||
<div for="ignore_res_nocache"></div>
|
||||
</div>
|
||||
@@ -515,13 +584,16 @@
|
||||
<spring:message code="force_caching" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<select name="userRegion['force_caching']" id="force_caching"
|
||||
<div class="bootstrap-switch">
|
||||
<input type="checkbox" id="force_caching" name="force_caching" class="switch userRegion"
|
||||
value="${_cfg.userRegion['force_caching'] }" <c:if test="${_cfg.userRegion['force_caching'] eq 1}">checked</c:if>/>
|
||||
</div>
|
||||
<%-- <select name="userRegion['force_caching']" id="force_caching"
|
||||
class="selectpicker show-tick form-control">
|
||||
<c:forEach items="${fns:getDictList('FORCE_CACHING')}" var="dict">
|
||||
<option value="${dict.itemCode}" <c:if test="${_cfg.userRegion.force_caching eq dict.itemCode || (empty _cfg.userRegion.force_caching && dict.itemCode eq 0)}">selected</c:if>><spring:message code="${dict.itemValue}"/></option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
<%-- <input id="force_caching" name="userRegion['force_caching']" class="form-control" type="text" value="${_cfg.userRegion.force_caching}"> --%>
|
||||
</select> --%>
|
||||
</div>
|
||||
<div for="force_caching"></div>
|
||||
</div>
|
||||
@@ -535,7 +607,7 @@
|
||||
<spring:message code="min_use" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<input id="min_use" name="userRegion['min_use']" class="form-control digits" type="text" value="${_cfg.userRegion.min_use}">
|
||||
<input id="min_use" class="form-control digits userRegion" name="min_use" placeholder="0" type="text" value="${_cfg.userRegion.min_use}">
|
||||
</div><div for="min_use"></div>
|
||||
</div>
|
||||
|
||||
@@ -547,7 +619,7 @@
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<div class="input-group">
|
||||
<input type="input" id="pinning_time" class="form-control input-small digits" name="userRegion['pinning_time']"
|
||||
<input type="input" id="pinning_time" name="pinning_time" placeholder="0" class="form-control input-small digits userRegion"
|
||||
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">
|
||||
@@ -584,7 +656,7 @@
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<div class="input-group">
|
||||
<input type="input" id="max_cache_size" class="form-control input-small digits" name="userRegion['max_cache_size']"
|
||||
<input type="input" id="max_cache_size" name="max_cache_size" placeholder="unlimited" class="form-control input-small digits userRegion"
|
||||
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">
|
||||
@@ -613,7 +685,7 @@
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<div class="input-group">
|
||||
<input type="input" id="inactive_time" class="form-control input-small digits" name="userRegion['inactive_time']"
|
||||
<input type="input" id="inactive_time" placeholder="0" name="inactive_time" class="form-control input-small digits userRegion"
|
||||
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">
|
||||
@@ -621,6 +693,9 @@
|
||||
<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>
|
||||
<!-- <a href="#" style="margin-left:5px" data-original-title="" class="tooltips" data-flag="false" data-html="true" data-placement="top">
|
||||
<i class="icon-info"></i>
|
||||
</a> -->
|
||||
</div>
|
||||
<div for="inactive_time"></div>
|
||||
<%-- <div class="input-group">
|
||||
@@ -651,8 +726,7 @@
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<div class="input-group">
|
||||
<input type="input" id="max_cache_obj_size" class="form-control input-small digits"
|
||||
name="userRegion['max_cache_obj_size']"
|
||||
<input type="input" id="max_cache_obj_size" name="max_cache_obj_size" placeholder="unlimited" class="form-control input-small digits userRegion"
|
||||
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">
|
||||
@@ -660,6 +734,9 @@
|
||||
<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>
|
||||
<!-- <a href="#" style="margin-left:5px" data-original-title=" Inactive time specifies how long an item can remain in the cache without being accessed. In this example, a file that has not been requested for 60 minutes is automatically deleted from the cache by the cache manager process, regardless of whether or not it has expired" class="tooltips" data-flag="false" data-html="true" data-placement="top">
|
||||
<i class="icon-info"></i>
|
||||
</a> -->
|
||||
</div>
|
||||
<div for="max_cache_obj_size"></div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user