日志总量js提取到common.js中
This commit is contained in:
@@ -5,15 +5,6 @@
|
|||||||
<title><spring:message code="${cfgName}"></spring:message></title>
|
<title><spring:message code="${cfgName}"></spring:message></title>
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$("td[compileId]").each(function(){
|
|
||||||
var data={};
|
|
||||||
data.date=new Date();
|
|
||||||
data.compileId=$(this).attr("compileId");
|
|
||||||
data.action=$(this).attr("action");
|
|
||||||
data.functionId=$(this).attr("functionId");
|
|
||||||
data.obj=$(this)
|
|
||||||
GetLogTotal('${ctx}',data);
|
|
||||||
});
|
|
||||||
//搜索框提示语初始化
|
//搜索框提示语初始化
|
||||||
if("${cfg.srcIpAddress}"){
|
if("${cfg.srcIpAddress}"){
|
||||||
$("#intype").val("${cfg.srcIpAddress}");
|
$("#intype").val("${cfg.srcIpAddress}");
|
||||||
@@ -354,10 +345,10 @@
|
|||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<c:forEach items="${fns:getDictList('SPEC_AUDIT')}" var="auditC">
|
<c:forEach items="${fns:getDictList('SPEC_AUDIT')}" var="auditC">
|
||||||
<c:if test="${cfg.isAudit eq auditC.itemCode and auditC.itemValue eq 'created'}"><span class="label label-danger"><spring:message code="created"></spring:message></span></c:if>
|
<c:if test="${cfg.isAudit eq auditC.itemCode and auditC.itemValue eq 'created'}"><span data-audit="created" class="label label-danger"><spring:message code="created"></spring:message></span></c:if>
|
||||||
<c:if test="${cfg.isAudit eq auditC.itemCode and auditC.itemValue eq 'approved'}"><span class="label label-success"><spring:message code="approved"></spring:message></span></c:if>
|
<c:if test="${cfg.isAudit eq auditC.itemCode and auditC.itemValue eq 'approved'}"><span data-audit="approved" class="label label-success"><spring:message code="approved"></spring:message></span></c:if>
|
||||||
<c:if test="${cfg.isAudit eq auditC.itemCode and auditC.itemValue eq 'unapproved'}"><span class="label label-warning"><spring:message code="unapproved"></spring:message></span></c:if>
|
<c:if test="${cfg.isAudit eq auditC.itemCode and auditC.itemValue eq 'unapproved'}"><span data-audit="unapproved" class="label label-warning"><spring:message code="unapproved"></spring:message></span></c:if>
|
||||||
<c:if test="${cfg.isAudit eq auditC.itemCode and auditC.itemValue eq 'cancel'}"><span class="label label-warning"><spring:message code="cancel_approved"></spring:message></span></c:if>
|
<c:if test="${cfg.isAudit eq auditC.itemCode and auditC.itemValue eq 'cancel'}"><span data-audit="cancel" class="label label-warning"><spring:message code="cancel_approved"></spring:message></span></c:if>
|
||||||
</c:forEach>
|
</c:forEach>
|
||||||
</td>
|
</td>
|
||||||
<td functionId="${cfg.functionId}" compileId="${cfg.compileId}" action="${cfg.action}"><div class="loading-total"></div></td>
|
<td functionId="${cfg.functionId}" compileId="${cfg.compileId}" action="${cfg.action}"><div class="loading-total"></div></td>
|
||||||
|
|||||||
@@ -5,15 +5,6 @@
|
|||||||
<title><spring:message code="${cfgName}"></spring:message></title>
|
<title><spring:message code="${cfgName}"></spring:message></title>
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$("td[compileId]").each(function(){
|
|
||||||
var data={};
|
|
||||||
data.date=new Date();
|
|
||||||
data.compileId=$(this).attr("compileId");
|
|
||||||
data.action=$(this).attr("action");
|
|
||||||
data.functionId=$(this).attr("functionId");
|
|
||||||
data.obj=$(this)
|
|
||||||
GetLogTotal('${ctx}',data);
|
|
||||||
});
|
|
||||||
//搜索框提示语初始化
|
//搜索框提示语初始化
|
||||||
if("${cfg.srcIpAddress}"){
|
if("${cfg.srcIpAddress}"){
|
||||||
$("#intype").val("${cfg.srcIpAddress}");
|
$("#intype").val("${cfg.srcIpAddress}");
|
||||||
@@ -344,10 +335,10 @@
|
|||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<c:forEach items="${fns:getDictList('SPEC_AUDIT')}" var="auditC">
|
<c:forEach items="${fns:getDictList('SPEC_AUDIT')}" var="auditC">
|
||||||
<c:if test="${cfg.isAudit eq auditC.itemCode and auditC.itemValue eq 'created'}"><span class="label label-danger"><spring:message code="created"></spring:message></span></c:if>
|
<c:if test="${cfg.isAudit eq auditC.itemCode and auditC.itemValue eq 'created'}"><span data-audit="created" class="label label-danger"><spring:message code="created"></spring:message></span></c:if>
|
||||||
<c:if test="${cfg.isAudit eq auditC.itemCode and auditC.itemValue eq 'approved'}"><span class="label label-success"><spring:message code="approved"></spring:message></span></c:if>
|
<c:if test="${cfg.isAudit eq auditC.itemCode and auditC.itemValue eq 'approved'}"><span data-audit="approved" class="label label-success"><spring:message code="approved"></spring:message></span></c:if>
|
||||||
<c:if test="${cfg.isAudit eq auditC.itemCode and auditC.itemValue eq 'unapproved'}"><span class="label label-warning"><spring:message code="unapproved"></spring:message></span></c:if>
|
<c:if test="${cfg.isAudit eq auditC.itemCode and auditC.itemValue eq 'unapproved'}"><span data-audit="unapproved" class="label label-warning"><spring:message code="unapproved"></spring:message></span></c:if>
|
||||||
<c:if test="${cfg.isAudit eq auditC.itemCode and auditC.itemValue eq 'cancel'}"><span class="label label-warning"><spring:message code="cancel_approved"></spring:message></span></c:if>
|
<c:if test="${cfg.isAudit eq auditC.itemCode and auditC.itemValue eq 'cancel'}"><span data-audit="cancel" class="label label-warning"><spring:message code="cancel_approved"></spring:message></span></c:if>
|
||||||
</c:forEach>
|
</c:forEach>
|
||||||
</td>
|
</td>
|
||||||
<td functionId="${cfg.functionId}" compileId="${cfg.compileId}" action="${cfg.action}"><div class="loading-total"></div></td>
|
<td functionId="${cfg.functionId}" compileId="${cfg.compileId}" action="${cfg.action}"><div class="loading-total"></div></td>
|
||||||
|
|||||||
@@ -289,7 +289,28 @@ $(function(){
|
|||||||
$("input[name$='exprType']:checked").each(function(){
|
$("input[name$='exprType']:checked").each(function(){
|
||||||
setDefaultMatchMethod(this);
|
setDefaultMatchMethod(this);
|
||||||
});
|
});
|
||||||
|
/*
|
||||||
|
*配置展示日志总数,审核通过才会调用接口查询日志总量
|
||||||
|
必须放在是否审核一列之后
|
||||||
|
并且是否审核一列的span标签需配置data-audit="xxxx"属性
|
||||||
|
xxxx可用值为created,approved,unapproved,cancel
|
||||||
|
td需要配置属性有,functionId,compileId,action
|
||||||
|
*/
|
||||||
|
$("td[compileId]").each(function(){
|
||||||
|
var audit=$(this).prev().find("span").data("audit");
|
||||||
|
if(audit == "approved"){
|
||||||
|
var data={};
|
||||||
|
data.date=new Date();
|
||||||
|
data.compileId=$(this).attr("compileId");
|
||||||
|
data.action=$(this).attr("action");
|
||||||
|
data.functionId=$(this).attr("functionId");
|
||||||
|
data.audit=$(this).attr("audit");
|
||||||
|
data.obj=$(this)
|
||||||
|
GetLogTotal('${ctx}',data);
|
||||||
|
}else{
|
||||||
|
$(this).html("0");
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
//与表达式时,只允许为子串匹配
|
//与表达式时,只允许为子串匹配
|
||||||
var setDefaultMatchMethod=function (obj){
|
var setDefaultMatchMethod=function (obj){
|
||||||
|
|||||||
Reference in New Issue
Block a user