diff --git a/src/main/java/com/nis/util/DictUtils.java b/src/main/java/com/nis/util/DictUtils.java index 0b2fcad8d..bdd871424 100644 --- a/src/main/java/com/nis/util/DictUtils.java +++ b/src/main/java/com/nis/util/DictUtils.java @@ -238,4 +238,20 @@ public class DictUtils { } return dictList; } + /** + * 功能配置域字典,获取相应功能菜单对应的配置域信息 + * @param functionId + * @return + */ + public static List getFunctionRegionDictList(){ + List allDictList = (List)CacheUtils.get(Constants.CACHE_FUNCTION_REGION_DICT); + List 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; + } } diff --git a/src/main/java/com/nis/web/controller/configuration/statistics/ConfigureStatisticsController.java b/src/main/java/com/nis/web/controller/configuration/statistics/ConfigureStatisticsController.java index 1ff4021ba..002397f95 100644 --- a/src/main/java/com/nis/web/controller/configuration/statistics/ConfigureStatisticsController.java +++ b/src/main/java/com/nis/web/controller/configuration/statistics/ConfigureStatisticsController.java @@ -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 serviceDictList = DictUtils.getFunctionServiceDictList(); - List list = configureStatisticsService.getConfigStateStatistics(); - + //2、根据来函分页 + RequestInfo requestInfo=new RequestInfo(); + requestInfo.setIsAudit(1); + Page requestPage = requestInfoService.findRequestInfo(new Page(request, response,"r"),requestInfo); + List requestInfos=requestPage.getList(); + //3、根据当前页的requestInfo信息查询request统计信息 + List 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 list = configureStatisticsService.getConfigStateStatistics(); model.addAttribute("configStatistics", list); return "/index"; } diff --git a/src/main/java/com/nis/web/dao/configuration/statistics/ConfigureStatisticsDao.java b/src/main/java/com/nis/web/dao/configuration/statistics/ConfigureStatisticsDao.java index 147a797a1..615860b24 100644 --- a/src/main/java/com/nis/web/dao/configuration/statistics/ConfigureStatisticsDao.java +++ b/src/main/java/com/nis/web/dao/configuration/statistics/ConfigureStatisticsDao.java @@ -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 getConfigStateStatistics( ) ; + public List getRequestStateStatistics(@Param("requestList")List requestList,@Param("serviceList")List serviceList) ; } diff --git a/src/main/java/com/nis/web/dao/configuration/statistics/ConfigureStatisticsDao.xml b/src/main/java/com/nis/web/dao/configuration/statistics/ConfigureStatisticsDao.xml index 68a0876bb..3c9d4698c 100644 --- a/src/main/java/com/nis/web/dao/configuration/statistics/ConfigureStatisticsDao.xml +++ b/src/main/java/com/nis/web/dao/configuration/statistics/ConfigureStatisticsDao.xml @@ -12,4 +12,27 @@ from cfg_num_statistics c group by service_id; + + + \ No newline at end of file diff --git a/src/main/java/com/nis/web/service/configuration/statistics/ConfigureStatisticsService.java b/src/main/java/com/nis/web/service/configuration/statistics/ConfigureStatisticsService.java index 850b9c106..bce7b6d17 100644 --- a/src/main/java/com/nis/web/service/configuration/statistics/ConfigureStatisticsService.java +++ b/src/main/java/com/nis/web/service/configuration/statistics/ConfigureStatisticsService.java @@ -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 getConfigStateStatistics(){ return configureStatisticsDao.getConfigStateStatistics(); } + public List getRequestStateStatistics(List requestList,List serviceList){ + List dataList=configureStatisticsDao.getRequestStateStatistics(requestList,serviceList); + return dataList; + } } diff --git a/src/main/resources/messages/message_en.properties b/src/main/resources/messages/message_en.properties index 45a6e90a3..3c7b95714 100644 --- a/src/main/resources/messages/message_en.properties +++ b/src/main/resources/messages/message_en.properties @@ -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 diff --git a/src/main/resources/messages/message_zh_CN.properties b/src/main/resources/messages/message_zh_CN.properties index d6ea85b24..257e67347 100644 --- a/src/main/resources/messages/message_zh_CN.properties +++ b/src/main/resources/messages/message_zh_CN.properties @@ -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 diff --git a/src/main/resources/sql/statisticsSql.sql b/src/main/resources/sql/statisticsSql.sql new file mode 100644 index 000000000..588339d84 --- /dev/null +++ b/src/main/resources/sql/statisticsSql.sql @@ -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存储过程 diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appHttpCfgForm.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appHttpCfgForm.jsp index bd3dbc6df..8e82f408c 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appHttpCfgForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appHttpCfgForm.jsp @@ -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(""); flag = false; } } - }); */ + }); if(flag){ $("input[name$='exprType']").attr("disabled",false); $("#appCode").val($("#specServiceIdId").val()); diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appIpCfgList.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appIpCfgList.jsp index 3189c316d..524bfa474 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appIpCfgList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appIpCfgList.jsp @@ -275,7 +275,7 @@ - IP + IP <%-- --%> diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appPolicyCfgForm.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appPolicyCfgForm.jsp index 508dfad05..6368c86b2 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appPolicyCfgForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appPolicyCfgForm.jsp @@ -41,9 +41,21 @@ $(function(){ + $(this).attr("name") + "']").html(""); 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(""); + 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", diff --git a/src/main/webapp/WEB-INF/views/cfg/av/contUrl/contUrlForm.jsp b/src/main/webapp/WEB-INF/views/cfg/av/contUrl/contUrlForm.jsp index 59f62cd6d..efa40d57b 100644 --- a/src/main/webapp/WEB-INF/views/cfg/av/contUrl/contUrlForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/av/contUrl/contUrlForm.jsp @@ -30,7 +30,6 @@ $(function(){ + $(this).attr("name") + "']").html(""); 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(""); + flag = false; + } + } + }); if(flag){ loading('onloading...'); $("input[name$='exprType']").attr("disabled",false); form.submit(); + }else{ + return; } }, errorContainer: "#messageBox", @@ -52,7 +66,8 @@ $(function(){ - + +

diff --git a/src/main/webapp/WEB-INF/views/cfg/av/picUrl/picUrlForm.jsp b/src/main/webapp/WEB-INF/views/cfg/av/picUrl/picUrlForm.jsp index 30efa7984..7b76b3dca 100644 --- a/src/main/webapp/WEB-INF/views/cfg/av/picUrl/picUrlForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/av/picUrl/picUrlForm.jsp @@ -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(""); + flag = false; + } + } + }); if(flag){ $("input[name$='exprType']").attr("disabled",false); loading('onloading...'); form.submit(); + }else{ + return; } }, errorContainer: "#messageBox", @@ -45,7 +60,8 @@ $(function(){ - + +

diff --git a/src/main/webapp/WEB-INF/views/cfg/basicprotocol/form.jsp b/src/main/webapp/WEB-INF/views/cfg/basicprotocol/form.jsp index fc75ac9f9..026727348 100644 --- a/src/main/webapp/WEB-INF/views/cfg/basicprotocol/form.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/basicprotocol/form.jsp @@ -41,9 +41,21 @@ $(function(){ + $(this).attr("name") + "']").html(""); 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(""); + 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) { - + +
diff --git a/src/main/webapp/WEB-INF/views/cfg/encryptedtunnelbehav/form.jsp b/src/main/webapp/WEB-INF/views/cfg/encryptedtunnelbehav/form.jsp index 96a23a128..92f90a405 100644 --- a/src/main/webapp/WEB-INF/views/cfg/encryptedtunnelbehav/form.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/encryptedtunnelbehav/form.jsp @@ -41,9 +41,21 @@ $(function(){ + $(this).attr("name") + "']").html(""); 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(""); + 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) { - + +
diff --git a/src/main/webapp/WEB-INF/views/index.jsp b/src/main/webapp/WEB-INF/views/index.jsp index 84265f0ab..9c44e86c6 100644 --- a/src/main/webapp/WEB-INF/views/index.jsp +++ b/src/main/webapp/WEB-INF/views/index.jsp @@ -3,6 +3,27 @@ + index - -
- +
+
+ + + - +
+
- - - - - - + + + + - - - - - - - - - - - - - - - - - + + + + + + + -
- - - ${statistics.approved } - - ${statistics.unapproved } - - ${statistics.cancle_approved } - - ${statistics.created } - - ${statistics.deleted } -
${requestStatistics['request']}${requestStatistics[serviceDict.serviceName]}
-
+ +
+ +
${page}
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + ${statistics.approved } + + ${statistics.unapproved } + + ${statistics.cancle_approved } + + ${statistics.created } + + ${statistics.deleted } +
+
diff --git a/src/main/webapp/static/pages/img/logo1.png b/src/main/webapp/static/pages/img/logo1.png new file mode 100644 index 000000000..0a199a5c6 Binary files /dev/null and b/src/main/webapp/static/pages/img/logo1.png differ