Merge branch 'develop' of http://10.0.6.99/gwall/gwall.git into develop

Conflicts:
	src/main/resources/messages/message_en.properties
	src/main/resources/messages/message_ru.properties
	src/main/resources/messages/message_zh_CN.properties
request 和配置状态统计增加编译id
xml增加compileId去重
首页增加统计时间展示
This commit is contained in:
duandongmei
2018-09-19 10:20:48 +08:00
9 changed files with 319 additions and 18 deletions

View File

@@ -68,10 +68,12 @@ public class ConfigureStatisticsController extends BaseController{
requestPage.setList(requestStatisticList);
model.addAttribute("requestInfos", requestInfos);
model.addAttribute("serviceList", serviceDictList);
model.addAttribute("requestStatisticTime", configureStatisticsService.getRequestStatisticTime());
model.addAttribute("page", requestPage);
/****************************Config Status Info Statistics*****************************/
List<Object[]> list = configureStatisticsService.getConfigStateStatistics();
model.addAttribute("configStatistics", list);
model.addAttribute("configStatisticTime", configureStatisticsService.getConfigStatisticTime());
return "/index";
}
}

View File

@@ -69,11 +69,17 @@
<if test="isValid == null">
AND r.IS_VALID != -1
</if>
<if test="beginDate!=null and beginDate!='' and endDate!=null and endDate!=''">
AND r.request_time between #{beginDate} and #{endDate}
</if>
<if test="dobeginDate!=null and dobeginDate!='' and doendDate!=null and doendDate!=''">
AND r.edit_time between #{dobeginDate} and #{doendDate}
<if test="beginDate!=null and beginDate!=''">
AND r.request_time &gt;= #{beginDate}
</if>
<if test="endDate!=null and endDate!=''">
AND r.request_time &lt;= #{endDate}
</if>
<if test="dobeginDate!=null and dobeginDate!='' ">
AND r.edit_time &gt;= #{dobeginDate}
</if>
<if test="doendDate!=null and doendDate!=''">
AND r.edit_time &lt;= #{doendDate}
</if>
<!-- 数据范围过滤 -->
${sqlMap.dsf}

View File

@@ -65,11 +65,17 @@
<if test="isAudit != null">
AND r.is_audit=${isAudit}
</if>
<if test="beginDate!=null and beginDate!='' and endDate!=null and endDate!=''">
AND r.task_time between #{beginDate} and #{endDate}
<if test="beginDate!=null and beginDate!='' ">
AND r.task_time &gt;= #{beginDate}
</if>
<if test="dobeginDate!=null and dobeginDate!='' and doendDate!=null and doendDate!=''">
AND r.edit_time between #{dobeginDate} and #{doendDate}
<if test="endDate!=null and endDate!=''">
AND r.task_time &lt;= #{endDate}
</if>
<if test="dobeginDate!=null and dobeginDate!='' ">
AND r.edit_time &gt;= #{dobeginDate}
</if>
<if test="doendDate!=null and doendDate!=''">
AND r.edit_time &lt;= #{doendDate}
</if>
<!-- 数据范围过滤 -->

View File

@@ -14,6 +14,8 @@ import com.nis.web.dao.MyBatisDao;
@MyBatisDao
public interface ConfigureStatisticsDao {
public List<Object[]> getConfigStateStatistics( ) ;
public List<Object[]> getConfigStateStatistics( );
public List<Object[]> getConfigStatisticTime();
public List<Object[]> getRequestStatisticTime();
public List<Object[]> getRequestStateStatistics(@Param("requestList")List<RequestInfo> requestList,@Param("serviceList")List<FunctionServiceDict> serviceList) ;
}

View File

@@ -9,7 +9,7 @@
sum(case when c.cfg_state =3 then 1 else 0 end) as cancle_approved,
sum(case when c.cfg_state =0 then 1 else 0 end) as created,
sum(case when c.cfg_state =-1 then 1 else 0 end) as deleted
from cfg_num_statistics c
from (select distinct cfg_state,service_id,compile_id from cfg_num_statistics) c
group by service_id;
</select>
@@ -18,13 +18,23 @@
<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
from (select distinct service_id,request_id,compile_id 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="getConfigStatisticTime" resultType="java.util.LinkedHashMap">
select statistic_time
from cfg_num_statistics c
order by statistic_time asc
</select>
<select id="getRequestStatisticTime" resultType="java.util.LinkedHashMap">
select statistic_time
from request_num_statistics c
order by statistic_time asc
</select>
<!-- <select id="getRequestStateCount" resultType="long">
select count(request_id) count
from

View File

@@ -28,6 +28,12 @@ public class ConfigureStatisticsService extends CrudService<NumCfgDao,NumBoundar
public List<Object[]> getConfigStateStatistics(){
return configureStatisticsDao.getConfigStateStatistics();
}
public List<Object[]> getConfigStatisticTime(){
return configureStatisticsDao.getConfigStatisticTime();
}
public List<Object[]> getRequestStatisticTime(){
return configureStatisticsDao.getRequestStatisticTime();
}
public List<Object[]> getRequestStateStatistics(List<RequestInfo> requestList,List<FunctionServiceDict> serviceList){
List<Object[]> dataList=configureStatisticsDao.getRequestStateStatistics(requestList,serviceList);
return dataList;

View File

@@ -1,7 +1,255 @@
update statistics_tables set is_valid=1 where id=14;
INSERT INTO statistics_tables ( `tab_name`, `is_valid`, `description`) VALUES ('pxy_obj_keyring', 1, '');
INSERT INTO statistics_tables ( `tab_name`, `is_valid`, `description`) VALUES ('proxy_file_strategy_cfg', 1, '');
ALTER TABLE cfg_num_statistics ADD COLUMN statistic_time datetime NULL COMMENT 'ͳ<EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>';
ALTER TABLE request_num_statistics ADD COLUMN statistic_time datetime NULL COMMENT 'ͳ<EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>';
update cfg_num_statistics set cfg_type=0;
ALTER TABLE cfg_num_statistics CHANGE cfg_type compile_id int null default 0;
ALTER TABLE cfg_num_statistics CHANGE cfg_type compile_id int null default 0;
ALTER TABLE request_num_statistics add compile_id int null default 0;
ALTER TABLE cfg_num_statistics add statistic_time datetime null default null;
ALTER TABLE request_num_statistics add statistic_time datetime null default null;
delete from statistics_tables;
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', 1, '');
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, '');
INSERT INTO statistics_tables
()
VALUES
(38, 'p2p_hash_cfg', 1, '');
INSERT INTO statistics_tables
()
VALUES
(39, 'p2p_keyword_cfg', 1, '');
INSERT INTO statistics_tables
()
VALUES
(40, 'ntc_subscribe_id_cfg', 1, '');
INSERT INTO statistics_tables
()
VALUES
(41, 'app_ssl_cert_cfg', 1, '');
INSERT INTO statistics_tables
()
VALUES
(42, 'app_layer_header_cfg', 1, '');
INSERT INTO statistics_tables
()
VALUES
(43, 'app_topic_domain_cfg', 1, '');
INSERT INTO statistics_tables
()
VALUES
(44, 'app_session_cfg', 1, '');
INSERT INTO statistics_tables
()
VALUES
(45, 'intercept_pkt_bin', 1, '');
INSERT INTO statistics_tables
()
VALUES
(46, 'ntc_bgp_as_cfg', 1, '');
INSERT INTO statistics_tables
()
VALUES
(47, 'ntc_bgp_as_cfg', 1, '');
INSERT INTO statistics_tables
()
VALUES
(48, 'pxy_obj_keyring', 1, '');
INSERT INTO statistics_tables
()
VALUES
(49, 'proxy_file_strategy_cfg', 1, '');

View File

@@ -0,0 +1,7 @@
#修改基于音视频传输的IP PORT阻断业务的业务ID由0x100改为0x10F
update function_service_dict set service_id='271' where dict_id='21';
#修改基于音视频传输的URL阻断业务的业务ID由0x101改为0x110
update function_service_dict set service_id='272' where dict_id='30';
#音视频添加action白名单
INSERT INTO `function_service_dict` VALUES (130,20, 0, 128, 'whitelist', 256, 'av_content_ip_whitelist', '', 1, NULL, NULL, NULL, NULL, '2');
INSERT INTO `function_service_dict` VALUES (131,22, 0, 128, 'whitelist', 257, 'av_content_url_whitelist', '', 1, NULL, NULL, NULL, NULL, '2');

View File

@@ -83,7 +83,15 @@
<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>
<font size="4"><i class="fa fa-cogs"> <spring:message code="letter_statistics_info"/>
[<spring:message code="statistic_time"/><c:forEach items="${requestStatisticTime }" var="requestStatisticTime" varStatus="status">
<c:if test="${status.index eq 0 }">
${requestStatisticTime.statistic_time }
</c:if>
</c:forEach>]
</i>
</font>
<a style="color:#333333" href="javascript:page(${page.pageNo},${page.pageSize});" class="icon-refresh pull-right"> </a>
<h5 class="page-header"></h5>
<div class="tableDiv">
<table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap">
@@ -111,7 +119,13 @@
<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>
<font size="4"><i class="fa fa-cogs"> <spring:message code="configure_statistics_info"/>
[<spring:message code="statistic_time"/><c:forEach items="${configStatisticTime }" var="configStatisticTime" varStatus="status">
<c:if test="${status.index eq 0 }">
${configStatisticTime.statistic_time }
</c:if>
</c:forEach>]
</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>