首页来函业务类型统计功能

修改部分页面十六进制校验不生效bug
更换logo
This commit is contained in:
duandongmei
2018-08-10 16:24:07 +08:00
parent 61ad81687c
commit 96fa1eedb9
17 changed files with 507 additions and 94 deletions

View File

@@ -238,4 +238,20 @@ public class DictUtils {
}
return dictList;
}
/**
* 功能配置域字典,获取相应功能菜单对应的配置域信息
* @param functionId
* @return
*/
public static List<FunctionRegionDict> getFunctionRegionDictList(){
List<FunctionRegionDict> allDictList = (List<FunctionRegionDict>)CacheUtils.get(Constants.CACHE_FUNCTION_REGION_DICT);
List<FunctionRegionDict> dictList = new ArrayList();
if(StringUtil.isEmpty(allDictList)){
FunctionRegionDict entity = new FunctionRegionDict();
allDictList = functionRegionDictDao.getList(entity);
CacheUtils.put(Constants.CACHE_FUNCTION_REGION_DICT, allDictList);
}
return allDictList;
}
}

View File

@@ -3,6 +3,7 @@ package com.nis.web.controller.configuration.statistics;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
@@ -16,10 +17,13 @@ import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import com.nis.domain.FunctionServiceDict;
import com.nis.domain.Page;
import com.nis.domain.configuration.CfgIndexInfo;
import com.nis.domain.configuration.RequestInfo;
import com.nis.util.CacheUtils;
import com.nis.util.Constants;
import com.nis.util.DictUtils;
import com.nis.util.StringUtil;
import com.nis.web.controller.BaseController;
import com.nis.web.service.BaseService;
import com.nis.web.service.CommonService;
@@ -37,11 +41,32 @@ public class ConfigureStatisticsController extends BaseController{
public String configStateStatistics(Model model,HttpServletRequest request
,HttpServletResponse response
,RedirectAttributes redirectAttributes){
/****************************Request Info Statistics*****************************/
//1、查询所有有效的service
List<FunctionServiceDict> serviceDictList = DictUtils.getFunctionServiceDictList();
List<Object[]> list = configureStatisticsService.getConfigStateStatistics();
//2、根据来函分页
RequestInfo requestInfo=new RequestInfo();
requestInfo.setIsAudit(1);
Page requestPage = requestInfoService.findRequestInfo(new Page(request, response,"r"),requestInfo);
List<RequestInfo> requestInfos=requestPage.getList();
//3、根据当前页的requestInfo信息查询request统计信息
List<Object[]> requestStatisticList=configureStatisticsService.getRequestStateStatistics(requestInfos,serviceDictList);
if(!StringUtil.isEmpty(requestStatisticList)){
for (Iterator iterator = requestStatisticList.iterator(); iterator.hasNext();) {
Map map = (Map) iterator.next();
for (RequestInfo requestInfoO : requestInfos) {
if(requestInfoO.getId().toString().equals(map.get("request").toString())){
map.put("request", requestInfoO.getRequestTitle());
}
}
}
}
requestPage.setList(requestStatisticList);
model.addAttribute("requestInfos", requestInfos);
model.addAttribute("serviceList", serviceDictList);
model.addAttribute("page", requestPage);
/****************************Config Status Info Statistics*****************************/
List<Object[]> list = configureStatisticsService.getConfigStateStatistics();
model.addAttribute("configStatistics", list);
return "/index";
}

View File

@@ -5,11 +5,15 @@ import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.nis.domain.FunctionServiceDict;
import com.nis.domain.Page;
import com.nis.domain.configuration.HttpBodyCfg;
import com.nis.domain.configuration.RequestInfo;
import com.nis.web.dao.MyBatisDao;
@MyBatisDao
public interface ConfigureStatisticsDao {
public List<Object[]> getConfigStateStatistics( ) ;
public List<Object[]> getRequestStateStatistics(@Param("requestList")List<RequestInfo> requestList,@Param("serviceList")List<FunctionServiceDict> serviceList) ;
}

View File

@@ -12,4 +12,27 @@
from cfg_num_statistics c
group by service_id;
</select>
<select id="getRequestStateStatistics" resultType="java.util.LinkedHashMap">
select request_id request,
<foreach item="serivice" collection="serviceList" separator=",">
sum(case when c.service_id =${serivice.serviceId} then 1 else 0 end) as ${serivice.serviceName}
</foreach>
from request_num_statistics c
where request_id in
<foreach item="requestInfo" collection="requestList" separator="," open="(" close=")">
${requestInfo.id}
</foreach>
group by request_id
</select>
<!-- <select id="getRequestStateCount" resultType="long">
select count(request_id) count
from
(request_id request,
<foreach item="serivice" collection="serviceList" separator=",">
sum(case when c.service_id =${serivice.serviceId} then 1 else 0 end) as ${serivice.serviceName}
</foreach>
from request_num_statistics c
group by request_id)
</select> -->
</mapper>

View File

@@ -6,9 +6,12 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.nis.domain.FunctionServiceDict;
import com.nis.domain.Page;
import com.nis.domain.configuration.AreaIpCfg;
import com.nis.domain.configuration.BaseIpCfg;
import com.nis.domain.configuration.NumBoundaryCfg;
import com.nis.domain.configuration.RequestInfo;
import com.nis.util.Constants;
import com.nis.web.dao.configuration.NumCfgDao;
import com.nis.web.dao.configuration.statistics.ConfigureStatisticsDao;
@@ -25,4 +28,8 @@ public class ConfigureStatisticsService extends CrudService<NumCfgDao,NumBoundar
public List<Object[]> getConfigStateStatistics(){
return configureStatisticsDao.getConfigStateStatistics();
}
public List<Object[]> getRequestStateStatistics(List<RequestInfo> requestList,List<FunctionServiceDict> serviceList){
List<Object[]> dataList=configureStatisticsDao.getRequestStateStatistics(requestList,serviceList);
return dataList;
}
}

View File

@@ -166,7 +166,7 @@ ip_website_text_control=IP+Website Keyword Control
request_task=Letter and Task
realtime_report=Log Report
protocol_and_app=Protocol And App
text_content_monitor=Text Content
text_content_monitor=Plaintext Content
multimedia=Multimedia
ddos_system=Ddos System
ip_reuse_system=IP Reuse
@@ -573,7 +573,8 @@ av_sample_voip_control=VoIP Sample
av_sample_audio_porn_control=Audio Scene Detection
av_sample_video_porn_control=Video Scene Detection
av_sample_control=Sample
configure_statistics_info=Configure statistics info
configure_statistics_info=Configuration Service And Status Statistics
letter_statistics_info=Letter And Configuration Service Statistics
harm_level=Degree of harm
src_file=Source File
file=File

View File

@@ -772,7 +772,7 @@ ip_intercept=IP\u62E6\u622A
domain_intercept=\u57DF\u540D\u62E6\u622A
control_policy=\u63A7\u5236\u7B56\u7565
domain_forward=\u57DF\u540D\u8F6C\u53D1
http_redirect=HTTP\u91CD\u5B9A\u5411\u914D\u7F6E
http_redirect=HTTP(S) \u91CD\u5B9A\u5411\u914D\u7F6E
http_req_replace=HTTP\u8BF7\u6C42\u5185\u5BB9\u66FF\u6362
http_res_replace=HTTP\u5E94\u7B54\u5185\u5BB9\u66FF\u6362
replace_content=\u66FF\u6362\u5185\u5BB9
@@ -894,11 +894,11 @@ temporary_redirect=\u4E34\u65F6\u91CD\u5B9A\u5411
prohibition_access=\u7981\u6B62\u8BBF\u95EE
not_allowed_method=\u4E0D\u5141\u8BB8\u6B64\u65B9\u6CD5\u8BBF\u95EE
law_prohibition_access=\u7531\u4E8E\u6CD5\u5F8B\u539F\u56E0\u4E0D\u53EF\u7528
http_block=HTTP\u7BA1\u63A7
http_reddirect=HTTP\u91CD\u5B9A\u5411
http_replace=HTTP\u66FF\u6362
http_monit=HTTP\u76D1\u6D4B
http_whitelist=HTTP\u767D\u540D\u5355
http_block=HTTP(S) \u7BA1\u63A7
http_reddirect=HTTP(S) \u91CD\u5B9A\u5411
http_replace=HTTP(S) \u66FF\u6362
http_monit=HTTP(S) \u76D1\u6D4B
http_whitelist=HTTP(S) \u767D\u540D\u5355
response_code=\u5E94\u7B54\u7801
response_content=\u54CD\u5E94\u5185\u5BB9
not_found=\u672A\u627E\u5230\u8BF7\u6C42\u754C\u9762
@@ -1012,11 +1012,11 @@ ddos_ip_drop=DDOS\u76EE\u6807\u9632\u62A4IP
ip_reuse_adress_pool_loop=IP\u590D\u7528\u5730\u5740\u6C60\u914D\u7F6E
app_strategy_monit=APP\u7B56\u7565\u76D1\u6D4B
app_strategy_drop=APP\u7B56\u7565\u4E22\u5F03
ctrl_http_reject=HTTP\u7BA1\u63A7
ctrl_http_redirect=HTTP\u91CD\u5B9A\u5411
ctrl_http_replace=HTTP\u66FF\u6362
ctrl_http_monit=HTTP\u76D1\u6D4B
ctrl_http_whitelist=HTTP\u767D\u540D\u5355
ctrl_http_reject=HTTP(S) \u7BA1\u63A7
ctrl_http_redirect=HTTP(S) \u91CD\u5B9A\u5411
ctrl_http_replace=HTTP(S) \u66FF\u6362
ctrl_http_monit=HTTP(S) \u76D1\u6D4B
ctrl_http_whitelist=HTTP(S) \u767D\u540D\u5355
#=============function_service_dict==>service_name=================
#=============about report===================
report_list=\u62A5\u8868

View File

@@ -0,0 +1,231 @@
-- ----------------------------
-- Table structure for proc_exec_log
-- ----------------------------
CREATE TABLE `proc_exec_log` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`proc_name` varchar(200) DEFAULT NULL,
`table_name` varchar(200) DEFAULT NULL,
`log_time` datetime DEFAULT NULL,
`description` varchar(200) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=449 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for statistics_tables
-- ----------------------------
CREATE TABLE `statistics_tables` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`tab_name` varchar(200) NOT NULL,
`is_valid` int(11) NOT NULL,
`description` varchar(200) DEFAULT '',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=38 DEFAULT CHARSET=utf8;
INSERT INTO `statistics_tables` VALUES ('1', 'app_byte_cfg', '1', '');
INSERT INTO `statistics_tables` VALUES ('2', 'app_domain_cfg', '1', '');
INSERT INTO `statistics_tables` VALUES ('3', 'app_features_index', '0', '');
INSERT INTO `statistics_tables` VALUES ('4', 'app_http_cfg', '1', '');
INSERT INTO `statistics_tables` VALUES ('5', 'app_id_cfg', '0', '');
INSERT INTO `statistics_tables` VALUES ('6', 'app_ip_cfg', '1', '');
INSERT INTO `statistics_tables` VALUES ('7', 'app_policy_cfg', '1', '');
INSERT INTO `statistics_tables` VALUES ('8', 'asn_keyword_cfg', '1', '');
INSERT INTO `statistics_tables` VALUES ('9', 'av_cont_ip_cfg', '1', '');
INSERT INTO `statistics_tables` VALUES ('10', 'av_cont_url_cfg', '1', '');
INSERT INTO `statistics_tables` VALUES ('11', 'av_file_sample_cfg', '1', '');
INSERT INTO `statistics_tables` VALUES ('12', 'av_pic_ip_cfg', '1', '');
INSERT INTO `statistics_tables` VALUES ('13', 'av_pic_url_cfg', '1', '');
INSERT INTO `statistics_tables` VALUES ('14', 'av_sign_sample_cfg', '0', '');
INSERT INTO `statistics_tables` VALUES ('15', 'av_voip_account_cfg', '1', '');
INSERT INTO `statistics_tables` VALUES ('16', 'av_voip_ip_cfg', '1', '');
INSERT INTO `statistics_tables` VALUES ('17', 'byte_features_cfg', '0', '');
INSERT INTO `statistics_tables` VALUES ('18', 'complex_keyword_cfg', '1', '');
INSERT INTO `statistics_tables` VALUES ('19', 'ddos_ip_cfg', '1', '');
INSERT INTO `statistics_tables` VALUES ('20', 'dns_domain_cfg', '1', '');
INSERT INTO `statistics_tables` VALUES ('21', 'dns_ip_cfg', '1', '');
INSERT INTO `statistics_tables` VALUES ('22', 'dns_res_strategy', '1', '');
INSERT INTO `statistics_tables` VALUES ('23', 'file_digest_cfg', '1', '');
INSERT INTO `statistics_tables` VALUES ('24', 'ftp_keyword_cfg', '1', '');
INSERT INTO `statistics_tables` VALUES ('25', 'http_body_cfg', '1', '');
INSERT INTO `statistics_tables` VALUES ('26', 'http_req_head_cfg', '1', '');
INSERT INTO `statistics_tables` VALUES ('27', 'http_res_head_cfg', '1', '');
INSERT INTO `statistics_tables` VALUES ('28', 'http_url_cfg', '1', '');
INSERT INTO `statistics_tables` VALUES ('29', 'ip_multiplex_pool_cfg', '1', '');
INSERT INTO `statistics_tables` VALUES ('30', 'ip_port_cfg', '1', '');
INSERT INTO `statistics_tables` VALUES ('31', 'l2tp_url_cfg', '1', '');
INSERT INTO `statistics_tables` VALUES ('32', 'mail_keyword_cfg', '1', '');
INSERT INTO `statistics_tables` VALUES ('33', 'multiple_cfg_relation', '0', '');
INSERT INTO `statistics_tables` VALUES ('34', 'num_boundary_cfg', '1', '');
INSERT INTO `statistics_tables` VALUES ('35', 'policy_group_info', '0', '');
INSERT INTO `statistics_tables` VALUES ('36', 'pptp_url_cfg', '1', '');
INSERT INTO `statistics_tables` VALUES ('37', 'ssl_keyword_cfg', '1', '');
-- ----------------------------
-- Table structure for cfg_num_statistics
-- ----------------------------
CREATE TABLE `cfg_num_statistics` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`function_id` int(11) NOT NULL,
`service_id` int(11) NOT NULL,
`action` int(11) NOT NULL,
`cfg_state` int(11) NOT NULL COMMENT '0未审核1已审核2审核未通过3审核取消-1删除',
`cfg_type` varchar(128) DEFAULT NULL COMMENT '配置类型,与业务配置表中相同',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5888338 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for request_num_statistics
-- ----------------------------
CREATE TABLE `request_num_statistics` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`function_id` int(11) NOT NULL,
`service_id` int(11) NOT NULL,
`request_id` int(11) NOT NULL COMMENT '来函信息',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5913175 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Procedure structure for exec_procs
-- ----------------------------
DELIMITER ;;
CREATE DEFINER=`root`@`%` PROCEDURE `exec_procs`()
BEGIN
call proc_statistics_request();
call proc_statistics_config();
END;;
DELIMITER ;
-- ----------------------------
-- Procedure structure for proc_statistics_config
-- ----------------------------
DELIMITER ;;
CREATE DEFINER=`root`@`%` PROCEDURE `proc_statistics_config`()
BEGIN
DECLARE ntime VARCHAR(40);/*当前时间*/
DECLARE tabName VARCHAR(500);
DECLARE description VARCHAR(500);
DECLARE deleteSql VARCHAR(500);
DECLARE done INT;/*游标标识*/
DECLARE flag INT;/*循环标识*/
DECLARE proc_log_table VARCHAR(100);/*存储过程日志表*/
DECLARE proc_name VARCHAR(100);/*存储过程名称*/
DECLARE icursor CURSOR FOR SELECT tab_name FROM statistics_tables where is_valid=1;
DECLARE CONTINUE HANDLER FOR NOT found SET done=1;
DECLARE EXIT HANDLER FOR SQLEXCEPTION ROLLBACK;
SET done=0;
SET proc_log_table='proc_exec_log';
SET proc_name='proc_statistics_config';
SET ntime=DATE_FORMAT(SYSDATE(),'%Y-%m-%d %H:%k:%S');
set @deleteSql := 'delete from cfg_num_statistics';
PREPARE execs FROM @deleteSql;
EXECUTE execs;
DEALLOCATE PREPARE execs;
COMMIT;
OPEN icursor;
loop_iloop:LOOP
FETCH icursor INTO tabName;
SET description=tabName;
set @descriptionStart=concat(description,'表统计start');
/*统计当前配置表数据到统计表中start*/
set @v_log_sql1 := concat('insert into ',proc_log_table,'(proc_name,table_name,log_time,description) values(?,?,?,?)');
PREPARE execs FROM @v_log_sql1;
EXECUTE execs using proc_name,proc_log_table,ntime,@descriptionStart;
DEALLOCATE PREPARE execs;
COMMIT;
set @insert_statistics_sql :=concat('insert into cfg_num_statistics(function_id,service_id,action,cfg_type,cfg_state) select function_id,service_id,action,cfg_type,if(is_audit=3,3,if(is_audit=2,2,if(is_audit=1,1,if(is_valid=0,0,if(is_valid,-1,-1))))) cfg_state from ',tabName);
PREPARE execs FROM @insert_statistics_sql;
EXECUTE execs;
DEALLOCATE PREPARE execs;
COMMIT;
set @descriptionEnd=concat(description,'表统计end');
set @v_log_sql2 := concat('insert into ',proc_log_table,'(proc_name,table_name,log_time,description) values(?,?,?,?)');
PREPARE execs FROM @v_log_sql2;
EXECUTE execs using proc_name,proc_log_table,ntime,@descriptionEnd;
DEALLOCATE PREPARE execs;
COMMIT;
/*统计当前配置表数据到统计表中end*/
IF done=1 THEN
LEAVE loop_iloop;
ELSE
SET flag=0;
END IF;
IF flag=0 THEN
SET done=0;
END IF;
END LOOP;
CLOSE icursor;
COMMIT;
END;;
DELIMITER ;
-- ----------------------------
-- Procedure structure for proc_statistics_request
-- ----------------------------
DELIMITER ;;
CREATE DEFINER=`root`@`%` PROCEDURE `proc_statistics_request`()
BEGIN
DECLARE ntime VARCHAR(40);/*当前时间*/
DECLARE tabName VARCHAR(500);
DECLARE description VARCHAR(500);
DECLARE deleteSql VARCHAR(500);
DECLARE done INT;/*游标标识*/
DECLARE flag INT;/*循环标识*/
DECLARE proc_log_table VARCHAR(100);/*存储过程日志表*/
DECLARE proc_name VARCHAR(100);/*存储过程名称*/
DECLARE icursor CURSOR FOR SELECT tab_name FROM statistics_tables where is_valid=1;
DECLARE CONTINUE HANDLER FOR NOT found SET done=1;
DECLARE EXIT HANDLER FOR SQLEXCEPTION ROLLBACK;
SET done=0;
SET proc_log_table='proc_exec_log';
SET proc_name='proc_statistics_request';
SET ntime=DATE_FORMAT(SYSDATE(),'%Y-%m-%d %H:%k:%S');
set @deleteSql := 'delete from request_num_statistics';
PREPARE execs FROM @deleteSql;
EXECUTE execs;
DEALLOCATE PREPARE execs;
COMMIT;
OPEN icursor;
loop_iloop:LOOP
FETCH icursor INTO tabName;
SET description=tabName;
set @descriptionStart=concat(description,'表request统计start');
/*统计当前配置表数据到统计表中start*/
set @v_log_sql1 := concat('insert into ',proc_log_table,'(proc_name,table_name,log_time,description) values(?,?,?,?)');
PREPARE execs FROM @v_log_sql1;
EXECUTE execs using proc_name,proc_log_table,ntime,@descriptionStart;
DEALLOCATE PREPARE execs;
COMMIT;
set @insert_statistics_sql :=concat('insert into request_num_statistics(function_id,service_id,request_id) select function_id,service_id,request_id from ',tabName,' where request_id <> 0');
PREPARE execs FROM @insert_statistics_sql;
EXECUTE execs;
DEALLOCATE PREPARE execs;
COMMIT;
set @descriptionEnd=concat(description,'表request统计end');
set @v_log_sql2 := concat('insert into ',proc_log_table,'(proc_name,table_name,log_time,description) values(?,?,?,?)');
PREPARE execs FROM @v_log_sql2;
EXECUTE execs using proc_name,proc_log_table,ntime,@descriptionEnd;
DEALLOCATE PREPARE execs;
COMMIT;
/*统计当前配置表数据到统计表中end*/
IF done=1 THEN
LEAVE loop_iloop;
ELSE
SET flag=0;
END IF;
IF flag=0 THEN
SET done=0;
END IF;
END LOOP;
CLOSE icursor;
COMMIT;
END;;
DELIMITER ;
-- exec_procs存储过程

View File

@@ -31,19 +31,19 @@ $(function(){
flag = false;
}
})
/* $("select[name$='isHexbin']").each(function(){
$("select[name$='isHexbin']").each(function(){
var isHexbin=$(this).val();
if(isHexbin == 1){
var keywords=$("input[name$='"+$(this).attr("name").replace("isHexbin","cfgKeywords")+"']").val();
if(!(/^([0-9|a-f|A-F]*)$/.test(keywords))){
$(this).parents(".form-group").find(
$(this).parents(".form-body").find(
"div[for='"
+ $(this).attr("name").replace("isHexbin","cfgKeywords")
+ "']").html("<label id=\"cfgKeywordsError\" class=\"error\">"+$.validator.messages.hexCheck+"</label>");
flag = false;
}
}
}); */
});
if(flag){
$("input[name$='exprType']").attr("disabled",false);
$("#appCode").val($("#specServiceIdId").val());

View File

@@ -275,7 +275,7 @@
<th><input type="checkbox" class="i-checks" id="checkAll"></th>
<th class="cfgDesc"><spring:message code="config_describe"/></th>
<th><spring:message code="social_app"/></th>
<th>IP<spring:message code="type"/></th>
<th>IP <spring:message code="type"/></th>
<%-- <th><spring:message code="client_ip"/></th>
<th><spring:message code="client_port"/></th> --%>
<th><spring:message code="server_ip"/></th>

View File

@@ -41,9 +41,21 @@ $(function(){
+ $(this).attr("name")
+ "']").html("<label id=\"cfgKeywordsError\" class=\"error\">"+$("#keywordError").text()+"</label>");
flag = false;
return;
}
})
$("select[name$='isHexbin']").each(function(){
var isHexbin=$(this).val();
if(isHexbin == 1){ //十六进制
var keywords=$("input[name$='"+$(this).attr("name").replace("isHexbin","cfgKeywords")+"']").val();
if(!(/^([0-9|a-f|A-F]*)$/.test(keywords))){
$(this).parents(".form-body").find(
"div[for='"
+ $(this).attr("name").replace("isHexbin","cfgKeywords")
+ "']").html("<label id=\"cfgKeywordsError\" class=\"error\">"+$.validator.messages.hexCheck+"</label>");
flag = false;
}
}
});
if(flag){
//将disable属性的元素删除
$(".disabled").each(function(){
@@ -59,6 +71,8 @@ $(function(){
/* $("#appCode").val($("#specServiceIdId").val()); */
loading('onloading...');
form.submit();
}else{
return;
}
},
errorContainer: "#messageBox",

View File

@@ -30,7 +30,6 @@ $(function(){
+ $(this).attr("name")
+ "']").html("<label id=\"cfgKeywordsError\" class=\"error\">"+$("#keywordError").text()+"</label>");
flag = false;
return;
}/* else if(!(/^(https?|s?ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test($(this).val()))){
$(this).parents(".form-group").find(
"div[for='"
@@ -40,10 +39,25 @@ $(function(){
return;
} */
})
$("select[name$='isHexbin']").each(function(){
var isHexbin=$(this).val();
if(isHexbin == 1){ //十六进制
var keywords=$("input[name$='"+$(this).attr("name").replace("isHexbin","cfgKeywords")+"']").val();
if(!(/^([0-9|a-f|A-F]*)$/.test(keywords))){
$(this).parents(".form-body").find(
"div[for='"
+ $(this).attr("name").replace("isHexbin","cfgKeywords")
+ "']").html("<label id=\"cfgKeywordsError\" class=\"error\">"+$.validator.messages.hexCheck+"</label>");
flag = false;
}
}
});
if(flag){
loading('onloading...');
$("input[name$='exprType']").attr("disabled",false);
form.submit();
}else{
return;
}
},
errorContainer: "#messageBox",
@@ -52,7 +66,8 @@ $(function(){
</script>
</head>
<body>
<span id="keywordError" style="display:none"><spring:message code="required"></spring:message></span>
<span id="tagsinputTip" style="display:none"><spring:message code="multiple_keywords_tip"></spring:message></span>
<div class="page-content">
<h3 class="page-title">

View File

@@ -33,10 +33,25 @@ $(function(){
return;
}
})
$("select[name$='isHexbin']").each(function(){
var isHexbin=$(this).val();
if(isHexbin == 1){ //十六进制
var keywords=$("input[name$='"+$(this).attr("name").replace("isHexbin","cfgKeywords")+"']").val();
if(!(/^([0-9|a-f|A-F]*)$/.test(keywords))){
$(this).parents(".form-body").find(
"div[for='"
+ $(this).attr("name").replace("isHexbin","cfgKeywords")
+ "']").html("<label id=\"cfgKeywordsError\" class=\"error\">"+$.validator.messages.hexCheck+"</label>");
flag = false;
}
}
});
if(flag){
$("input[name$='exprType']").attr("disabled",false);
loading('onloading...');
form.submit();
}else{
return;
}
},
errorContainer: "#messageBox",
@@ -45,7 +60,8 @@ $(function(){
</script>
</head>
<body>
<span id="keywordError" style="display:none"><spring:message code="required"></spring:message></span>
<span id="tagsinputTip" style="display:none"><spring:message code="multiple_keywords_tip"></spring:message></span>
<div class="page-content">
<h3 class="page-title">

View File

@@ -41,9 +41,21 @@ $(function(){
+ $(this).attr("name")
+ "']").html("<label id=\"cfgKeywordsError\" class=\"error\">"+$("#keywordError").text()+"</label>");
flag = false;
return;
}
})
$("select[name$='isHexbin']").each(function(){
var isHexbin=$(this).val();
if(isHexbin == 1){ //十六进制
var keywords=$($(this).attr("name").replace("isHexbin","cfgKeywords")).val();
if(!(/^([0-9|a-f|A-F]*)$/.test(keywords))){
$(this).parents(".form-body").find(
"div[for='"
+ $(this).attr("name").replace("isHexbin","cfgKeywords")
+ "']").html("<label id=\"cfgKeywordsError\" class=\"error\">"+$.validator.messages.hexCheck+"</label>");
flag = false;
}
}
});
if(flag){
//将disable属性的元素删除
$(".disabled").each(function(){
@@ -59,6 +71,8 @@ $(function(){
/* $("#appCode").val($("#specServiceIdId").val()); */
loading('onloading...');
form.submit();
}else{
return;
}
},
errorContainer: "#messageBox",
@@ -81,7 +95,8 @@ var delContent = function(contentClassName, addBtnClassName) {
</script>
</head>
<body>
<span id="keywordError" style="display:none"><spring:message code="required"></spring:message></span>
<span id="tagsinputTip" style="display:none"><spring:message code="multiple_keywords_tip"></spring:message></span>
<div class="page-content">
<c:forEach items="${fns:getDictList('SPECIFIC_SERVICE_CFG_TYPE') }" var="dict">
<c:if test="${dict.itemValue eq 'basic_protocol'}"><c:set var="app" value="${dict.itemCode}"/></c:if>

View File

@@ -41,9 +41,21 @@ $(function(){
+ $(this).attr("name")
+ "']").html("<label id=\"cfgKeywordsError\" class=\"error\">"+$("#keywordError").text()+"</label>");
flag = false;
return;
}
})
$("select[name$='isHexbin']").each(function(){
var isHexbin=$(this).val();
if(isHexbin == 1){ //十六进制
var keywords=$("input[name$='"+$(this).attr("name").replace("isHexbin","cfgKeywords")+"']").val();
if(!(/^([0-9|a-f|A-F]*)$/.test(keywords))){
$(this).parents(".form-body").find(
"div[for='"
+ $(this).attr("name").replace("isHexbin","cfgKeywords")
+ "']").html("<label id=\"cfgKeywordsError\" class=\"error\">"+$.validator.messages.hexCheck+"</label>");
flag = false;
}
}
});
if(flag){
//将disable属性的元素删除
$(".disabled").each(function(){
@@ -59,6 +71,8 @@ $(function(){
/* $("#appCode").val($("#specServiceIdId").val()); */
loading('onloading...');
form.submit();
}else{
return;
}
},
errorContainer: "#messageBox",
@@ -130,7 +144,8 @@ var delContent = function(contentClassName, addBtnClassName) {
</script>
</head>
<body>
<span id="keywordError" style="display:none"><spring:message code="required"></spring:message></span>
<span id="tagsinputTip" style="display:none"><spring:message code="multiple_keywords_tip"></spring:message></span>
<div class="page-content">
<c:forEach items="${fns:getDictList('SPECIFIC_SERVICE_CFG_TYPE') }" var="dict">
<c:if test="${dict.itemValue eq 'encrypted_tunnel_behavior'}"><c:set var="app" value="${dict.itemCode}"/></c:if>

View File

@@ -3,6 +3,27 @@
<html>
<head>
<style type="text/css">
.statisticsRequest{
padding:10px 0px 0px 10px;
width:99%
}
.statisticsStatus{
padding:10px 0px 0px 10px;
width:99%
}
.page{
padding:8px 0px 5px 0px;
}
.tableDiv{
width:100%;
overflow-x:auto;
}
.table {
margin-bottom: 0px;
margin-top: 0px;
max-width: 100%;
width: 100%;
}
.table > thead > tr > th {
vertical-align: bottom;
border-bottom: 2px solid #e7ecf1; }
@@ -48,84 +69,94 @@
.table-bordered > thead > tr > td {
border-bottom-width: 2px; }
</style>
<script type="text/javascript">
$(function(){
closeTip();
});
</script>
</head>
<title>index</title>
</head>
<body class="page-full-width">
<!--<input id="page_load_num" type="hidden" />
<div id="alert" class="modal hide fade">
<div class="modal-header" id="modal_title">
<button type="button" class="close" data-dismiss="modal"
aria-hidden="true"></button>
<h3>
Note
</h3>
</div>
<div class="modal-body" id="modal_body">
</div>
<div class="modal-footer">
<button type="button" id="OK" class="btn red"
onclick="statisticProtocol()">
<s:text name="button.confirm"/>
</button>
<button type="button" data-dismiss="modal" class="btn">
<s:text name="button.cancel"/>
</button>
</div>
</div> -->
<div class="page-content">
<font size="4"><i class="fa fa-cogs"><spring:message code="configure_statistics_info"/></i></font> <a style="color:#333333" href="${ctx}/configure/statistics/configureStateStatistics" class="icon-refresh pull-right"> </a>
<div class="statisticsRequest">
<form id="searchForm" action="${ctx}/configure/statistics/configureStateStatistics" >
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
<font size="4"><i class="fa fa-cogs"> <spring:message code="letter_statistics_info"/></i></font> <a style="color:#333333" href="javascript:page(${page.pageNo},${page.pageSize});" class="icon-refresh pull-right"> </a>
<h5 class="page-header"></h5>
<table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap">
<div class="tableDiv">
<table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap">
<thead>
<tr>
<th><spring:message code="service_name"/></th>
<th><spring:message code="approved"/></th>
<th><spring:message code="unapproved"/></th>
<th><spring:message code="cancel_approved"/></th>
<th><spring:message code="created"/></th>
<th><spring:message code="deleted"/></th>
<th><spring:message code="letter"/></th>
<c:forEach items="${serviceList }" var="serviceDict" varStatus="status" step="1">
<th><spring:message code="${serviceDict.serviceName }"/></th>
</c:forEach>
</tr>
</thead>
<tbody>
<c:forEach items="${configStatistics }" var="statistics" varStatus="status" step="1">
<c:set var="serviceName" value=""></c:set>
<c:forEach items="${serviceList }" var="serviceDict" varStatus="status" step="1">
<c:if test="${serviceDict.serviceId eq statistics.service }">
<c:set var="serviceName" value="${serviceDict.serviceName }"></c:set>
</c:if>
</c:forEach>
<c:if test="${!empty serviceName }">
<tr>
<td>
<spring:message code="${serviceName }"/>
</td>
<td>
${statistics.approved }
</td>
<td>
${statistics.unapproved }
</td>
<td>
${statistics.cancle_approved }
</td>
<td>
${statistics.created }
</td>
<td>
${statistics.deleted }
</td>
</tr>
</c:if>
<c:forEach items="${page.list }" var="requestStatistics" varStatus="statusRequest" step="1">
<tr>
<td>${requestStatistics['request']}</td>
<c:forEach items="${serviceList }" var="serviceDict" varStatus="status" step="1">
<td>${requestStatistics[serviceDict.serviceName]}</td>
</c:forEach>
</tr>
</c:forEach>
</tbody>
</table>
</div>
</table>
</div>
</form>
<div class="page">${page}</div>
</div>
<div class="statisticsStatus">
<font size="4"><i class="fa fa-cogs"> <spring:message code="configure_statistics_info"/></i></font> <a style="color:#333333" href="javascript:page(${page.pageNo},${page.pageSize});" class="icon-refresh pull-right"> </a>
<h5 class="page-header"></h5>
<table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap">
<thead>
<tr>
<th><spring:message code="service_name"/></th>
<th><spring:message code="approved"/></th>
<th><spring:message code="unapproved"/></th>
<th><spring:message code="cancel_approved"/></th>
<th><spring:message code="created"/></th>
<th><spring:message code="deleted"/></th>
</tr>
</thead>
<tbody>
<c:forEach items="${configStatistics }" var="statistics" varStatus="status" step="1">
<c:set var="serviceName" value=""></c:set>
<c:forEach items="${serviceList }" var="serviceDict" varStatus="status" step="1">
<c:if test="${serviceDict.serviceId eq statistics.service }">
<c:set var="serviceName" value="${serviceDict.serviceName }"></c:set>
</c:if>
</c:forEach>
<c:if test="${!empty serviceName }">
<tr>
<td>
<spring:message code="${serviceName }"/>
</td>
<td>
${statistics.approved }
</td>
<td>
${statistics.unapproved }
</td>
<td>
${statistics.cancle_approved }
</td>
<td>
${statistics.created }
</td>
<td>
${statistics.deleted }
</td>
</tr>
</c:if>
</c:forEach>
</tbody>
</table>
</div>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB