Merge branch 'develop' of http://10.0.6.99/gwall/gwall.git into develop
This commit is contained in:
@@ -35,12 +35,21 @@ public class AppPolicyCfg extends BaseCfg<AppPolicyCfg> {
|
||||
private Integer behavCode;//specific_service_cfg表二级节点的spec_service_code
|
||||
private Integer specServiceId;
|
||||
private String appName;
|
||||
private String behavName;
|
||||
private String cfgKeywords;
|
||||
private String userRegion1;
|
||||
private String userRegion2;
|
||||
private String userRegion3;
|
||||
private String userRegion4;
|
||||
private String userRegion5;
|
||||
public String getBehavName() {
|
||||
return behavName;
|
||||
}
|
||||
|
||||
public void setBehavName(String behavName) {
|
||||
this.behavName = behavName;
|
||||
}
|
||||
|
||||
@Expose
|
||||
@ExcelField(title="expression_type")
|
||||
@SerializedName("exprType")
|
||||
|
||||
@@ -7,6 +7,11 @@ import java.util.Map;
|
||||
import com.google.gson.GsonBuilder;
|
||||
|
||||
public final class Constants {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static String SPECIFIC_SERVICE_CFG_TYPE_APP=Configurations.getStringProperty("specific_service_cfg_type_app", "social_app");
|
||||
public static String SPECIFIC_SERVICE_CFG_TYPE_ENCRYPTED_TUNNEL_PROTPCOL=Configurations.getStringProperty("specific_service_cfg_type_encrypted_tunnel_protpcol", "encrypted_tunnel_protpcol");
|
||||
/**
|
||||
* 报表去重连接符
|
||||
*/
|
||||
@@ -391,6 +396,8 @@ public final class Constants {
|
||||
public static final Integer CLIENT_CONNECT_TIMEOUT = Configurations.getIntProperty("client_connect_timeout",1000);
|
||||
public static final Integer CLIENT_READ_TIMEOUT = Configurations.getIntProperty("client_read_timeout",1000);
|
||||
public static final Integer CLIENT_SOCKET_TIMEOUT = Configurations.getIntProperty("client_socket_timeout",1000);
|
||||
public static final String BEHAV_ID_REGION = Configurations.getStringProperty("behav_id_region","BEHAV_ID");
|
||||
public static final String RATE_LIMIT_REGION = Configurations.getStringProperty("rate_limit_region","RATE_LIMIT");
|
||||
public static final String AREA_REGION = Configurations.getStringProperty("area_region","area_ip");
|
||||
public static final String HTTP_IP_REGION = Configurations.getStringProperty("http_ip_region","http_ip");
|
||||
public static final String HTTP_REQ_HEAD_REGION = Configurations.getStringProperty("http_req_hdr_region","http_req_hdr");
|
||||
|
||||
@@ -16,6 +16,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.SysDataDictionaryItem;
|
||||
import com.nis.domain.configuration.AppByteCfg;
|
||||
import com.nis.domain.configuration.AppDomainCfg;
|
||||
import com.nis.domain.configuration.AppHttpCfg;
|
||||
@@ -24,6 +25,8 @@ import com.nis.domain.configuration.AppPolicyCfg;
|
||||
import com.nis.domain.configuration.IpPortCfg;
|
||||
import com.nis.domain.specific.SpecificServiceCfg;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DictUtils;
|
||||
import com.nis.web.controller.BaseController;
|
||||
import com.nis.web.security.UserUtils;
|
||||
|
||||
@@ -51,6 +54,28 @@ public class AppCfgController extends BaseController {
|
||||
SpecificServiceCfg app = specificServiceCfgService.getBySpecServiceId(entity.getSpecServiceId());
|
||||
entity.setAppName(app.getSpecServiceName());
|
||||
}
|
||||
//查找社交应用的所有有效二级特定服务
|
||||
SpecificServiceCfg second=new SpecificServiceCfg();
|
||||
for(SysDataDictionaryItem dict:DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) {
|
||||
if(Constants.SPECIFIC_SERVICE_CFG_TYPE_APP.equals(dict.getItemValue())) {
|
||||
second.setCfgType(Integer.parseInt(dict.getItemCode()));
|
||||
break;
|
||||
}
|
||||
}
|
||||
second.setIsValid(Constants.VALID_YES);
|
||||
second.setIsLeaf(1);
|
||||
List<SpecificServiceCfg> secondList=specificServiceCfgService.findAllSpecificServiceCfg(second, null);
|
||||
//遍历,找到匹配项后将行为设置进去
|
||||
for(SpecificServiceCfg secondCfg:secondList) {
|
||||
if(secondCfg.getSpecServiceCode()==null) continue;
|
||||
for(AppPolicyCfg entity:page.getList()){
|
||||
if(entity.getBehavCode()==null) continue;
|
||||
if(secondCfg.getSpecServiceCode().intValue()==entity.getBehavCode().intValue()) {
|
||||
entity.setBehavName(secondCfg.getSpecServiceName());
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
model.addAttribute("page", page);
|
||||
initPageCondition(model,cfg);
|
||||
return "/cfg/app/appPolicyCfgList";
|
||||
|
||||
@@ -120,6 +120,9 @@
|
||||
<if test="specificServiceCfg.cfgType != null and specificServiceCfg.cfgType != '' ">
|
||||
AND cfg_type = #{specificServiceCfg.cfgType}
|
||||
</if>
|
||||
<if test="specificServiceCfg.isLeaf != null and specificServiceCfg.isLeaf != '' ">
|
||||
AND is_leaf = #{specificServiceCfg.isLeaf}
|
||||
</if>
|
||||
<if test="specificServiceCfg.beginDate != null">
|
||||
AND op_time > #{specificServiceCfg.beginDate}
|
||||
</if>
|
||||
|
||||
@@ -5,6 +5,7 @@ import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -476,10 +477,12 @@ public class AppCfgService extends BaseService {
|
||||
String actionCode = DictUtils.getDictCode("SERVICE_ACTION", "action_ratelimit");
|
||||
if(!actionCode.equals("默认")){
|
||||
if(entity.getAction().equals(Integer.parseInt(actionCode))){
|
||||
userRegion += Constants.USER_REGION_SPLIT+"RATE_LIMIT="+entity.getRatelimit();
|
||||
userRegion += Constants.USER_REGION_SPLIT+Constants.RATE_LIMIT_REGION+"="+entity.getRatelimit();
|
||||
}
|
||||
}
|
||||
|
||||
if(entity.getBehavCode()!=null) {
|
||||
userRegion += Constants.USER_REGION_SPLIT+Constants.BEHAV_ID_REGION+"="+entity.getBehavCode();
|
||||
}
|
||||
maatCfg.setUserRegion(userRegion);
|
||||
configCompileList.add(maatCfg);
|
||||
maatBean.setConfigCompileList(configCompileList);
|
||||
|
||||
@@ -310,6 +310,8 @@ ssl_san_region=ssl_san
|
||||
ssl_ca_region=ssl_ca
|
||||
ssl_ip_region=ssl_ip
|
||||
bgp_ip_region=bgp_ip
|
||||
behav_id_region=BEHAV_ID
|
||||
rate_limit_region=RATE_LIMIT
|
||||
#存在与表达式的关键字特殊分隔符
|
||||
keyword_expr=***and***
|
||||
#时区
|
||||
@@ -390,4 +392,7 @@ picture_sample_proc_param_is_translation=false
|
||||
http_header_user_region_key=HTTP_HEADER
|
||||
http_header_dict_module=HTTP_HEADER_DISTRICT
|
||||
#dns自定义域参数key
|
||||
dns_strategy_user_region_key=DNS_STRATEGY
|
||||
dns_strategy_user_region_key=DNS_STRATEGY
|
||||
#特定服务类别
|
||||
specific_service_cfg_type_app=social_app
|
||||
specific_service_cfg_type_encrypted_tunnel_protpcol=encrypted_tunnel_protpcol
|
||||
@@ -41,6 +41,9 @@
|
||||
<body>
|
||||
|
||||
<div class="page-content">
|
||||
<c:forEach items="${fns:getDictList('SPECIFIC_SERVICE_CFG_TYPE') }" var="dict">
|
||||
<c:if test="${dict.itemValue eq 'social_app'}"><c:set var="app" value="${dict.itemCode}"/></c:if>
|
||||
</c:forEach>
|
||||
<div class="theme-panel hidden-xs hidden-sm">
|
||||
<shiro:hasPermission name="app:byte:config">
|
||||
<button type="button" class="btn btn-primary"
|
||||
@@ -87,7 +90,7 @@
|
||||
<sys:treeselect id="specServiceId" name="specServiceId" value="${specificServiceCfg.parent.specServiceId}"
|
||||
labelName="parent.specServiceName"
|
||||
labelValue="${empty cfg.specServiceId?spec_service_id:fns:getBySpecServiceId(cfg.specServiceId).specServiceName}"
|
||||
title="${spec_service_id}" url="/specific/specificServiceCfg/treeData?isLeafShow=false" extId=""
|
||||
title="${spec_service_id}" url="/specific/specificServiceCfg/treeData?isLeafShow=false&cfgType=${app}" extId=""
|
||||
cssClass="form-control input-small"/>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
|
||||
@@ -41,6 +41,9 @@
|
||||
<body>
|
||||
|
||||
<div class="page-content">
|
||||
<c:forEach items="${fns:getDictList('SPECIFIC_SERVICE_CFG_TYPE') }" var="dict">
|
||||
<c:if test="${dict.itemValue eq 'social_app'}"><c:set var="app" value="${dict.itemCode}"/></c:if>
|
||||
</c:forEach>
|
||||
<div class="theme-panel hidden-xs hidden-sm">
|
||||
<shiro:hasPermission name="app:domain:config">
|
||||
<button type="button" class="btn btn-primary"
|
||||
@@ -87,7 +90,7 @@
|
||||
<sys:treeselect id="specServiceId" name="specServiceId" value="${specificServiceCfg.parent.specServiceId}"
|
||||
labelName="parent.specServiceName"
|
||||
labelValue="${empty cfg.specServiceId?spec_service_id:fns:getBySpecServiceId(cfg.specServiceId).specServiceName}"
|
||||
title="${spec_service_id}" url="/specific/specificServiceCfg/treeData?isLeafShow=false" extId=""
|
||||
title="${spec_service_id}" url="/specific/specificServiceCfg/treeData?isLeafShow=false&cfgType=${app}" extId=""
|
||||
cssClass="form-control input-small"/>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
|
||||
@@ -41,6 +41,9 @@
|
||||
<body>
|
||||
|
||||
<div class="page-content">
|
||||
<c:forEach items="${fns:getDictList('SPECIFIC_SERVICE_CFG_TYPE') }" var="dict">
|
||||
<c:if test="${dict.itemValue eq 'social_app'}"><c:set var="app" value="${dict.itemCode}"/></c:if>
|
||||
</c:forEach>
|
||||
<div class="theme-panel hidden-xs hidden-sm">
|
||||
<shiro:hasPermission name="app:http:config">
|
||||
<button type="button" class="btn btn-primary"
|
||||
@@ -87,7 +90,7 @@
|
||||
<sys:treeselect id="specServiceId" name="specServiceId" value="${specificServiceCfg.parent.specServiceId}"
|
||||
labelName="parent.specServiceName"
|
||||
labelValue="${empty cfg.specServiceId?spec_service_id:fns:getBySpecServiceId(cfg.specServiceId).specServiceName}"
|
||||
title="${spec_service_id}" url="/specific/specificServiceCfg/treeData?isLeafShow=false" extId=""
|
||||
title="${spec_service_id}" url="/specific/specificServiceCfg/treeData?isLeafShow=false&cfgType=${app}" extId=""
|
||||
cssClass="form-control input-small"/>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
|
||||
@@ -44,6 +44,9 @@
|
||||
<body>
|
||||
|
||||
<div class="page-content">
|
||||
<c:forEach items="${fns:getDictList('SPECIFIC_SERVICE_CFG_TYPE') }" var="dict">
|
||||
<c:if test="${dict.itemValue eq 'social_app'}"><c:set var="app" value="${dict.itemCode}"/></c:if>
|
||||
</c:forEach>
|
||||
<div class="theme-panel hidden-xs hidden-sm">
|
||||
<shiro:hasPermission name="app:ip:config">
|
||||
<button type="button" class="btn btn-primary"
|
||||
@@ -90,7 +93,7 @@
|
||||
<sys:treeselect id="specServiceId" name="specServiceId" value="${specificServiceCfg.parent.specServiceId}"
|
||||
labelName="parent.specServiceName"
|
||||
labelValue="${empty cfg.specServiceId?spec_service_id:fns:getBySpecServiceId(cfg.specServiceId).specServiceName}"
|
||||
title="${spec_service_id}" url="/specific/specificServiceCfg/treeData?isLeafShow=false" extId=""
|
||||
title="${spec_service_id}" url="/specific/specificServiceCfg/treeData?isLeafShow=false&cfgType=${app}" extId=""
|
||||
cssClass="form-control input-small"/>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
|
||||
@@ -57,7 +57,7 @@ $(function(){
|
||||
},
|
||||
errorContainer: "#messageBox",
|
||||
});
|
||||
if('${_cfg.userRegion1}'){
|
||||
if('${_cfg.behavCode}'){
|
||||
ajaxBehaviour($("#specServiceIdId").val());
|
||||
}
|
||||
$("#specServiceIdId").on("change",function(){
|
||||
@@ -75,11 +75,11 @@ var ajaxBehaviour=function(val){
|
||||
success:function(data,textStatus){//处理返回结果
|
||||
if(textStatus=="success"){
|
||||
if(data.length>0){
|
||||
var html='<select name="userRegion1" data-live-search="true" class="selectpicker form-control">'
|
||||
var html='<select name="behavCode" data-live-search="true" class="selectpicker form-control">'
|
||||
+'<option value=""><spring:message code="select"/></option>';
|
||||
for(i=0;i<data.length;i++){
|
||||
html+='<option value="'+data[i].code+'"';
|
||||
if('${_cfg.userRegion1}'==data[i].code){
|
||||
if('${_cfg.behavCode}'==data[i].code){
|
||||
html+=" selected";
|
||||
}
|
||||
html+='>'+data[i].name+'</option>';
|
||||
@@ -87,8 +87,8 @@ var ajaxBehaviour=function(val){
|
||||
html+='</select>';
|
||||
$("#behaviour").prev("label").removeClass("hidden");
|
||||
$("#behaviour").html(html);
|
||||
$("[name='userRegion1']").selectpicker("refresh");
|
||||
$("[name='userRegion1']").selectpicker("render");
|
||||
$("[name='behavCode']").selectpicker("refresh");
|
||||
$("[name='behavCode']").selectpicker("render");
|
||||
}else{
|
||||
if($("#behaviour").prev("label").is(":visible")){
|
||||
$("#behaviour").prev("label").addClass("hidden");
|
||||
@@ -150,9 +150,9 @@ var delContent = function(contentClassName, addBtnClassName) {
|
||||
<input type="hidden" name="functionId" value="${_cfg.functionId}">
|
||||
<input type="hidden" id="serviceId" name="serviceId" value="${_cfg.serviceId}">
|
||||
<%-- <input type="hidden" id="appCode" name="appCode" value="${_cfg.appCode}"> --%>
|
||||
<input type="hidden" id="behavCode" name="behavCode" value="${_cfg.behavCode}">
|
||||
<%-- <input type="hidden" id="behavCode" name="behavCode" value="${_cfg.behavCode}"> --%>
|
||||
<input type="hidden" id="exprType" name="exprType" value="0">
|
||||
<input type="hidden" id="matchMethod" name="matchMethod" value="3">
|
||||
<input type="hidden" id="matchMethod" name="matchMethod" value="0">
|
||||
<input type="hidden" id="isHexbin" name="isHexbin" value="0">
|
||||
<div class="form-body">
|
||||
<!-- desc and action -->
|
||||
|
||||
@@ -84,6 +84,9 @@
|
||||
<body>
|
||||
|
||||
<div class="page-content">
|
||||
<c:forEach items="${fns:getDictList('SPECIFIC_SERVICE_CFG_TYPE') }" var="dict">
|
||||
<c:if test="${dict.itemValue eq 'social_app'}"><c:set var="app" value="${dict.itemCode}"/></c:if>
|
||||
</c:forEach>
|
||||
<div class="theme-panel hidden-xs hidden-sm">
|
||||
<shiro:hasPermission name="app:policy:config">
|
||||
<button type="button" class="btn btn-primary"
|
||||
@@ -130,7 +133,7 @@
|
||||
<sys:treeselect id="specServiceId" name="specServiceId" value="${specificServiceCfg.parent.specServiceId}"
|
||||
labelName="parent.specServiceName"
|
||||
labelValue="${empty cfg.specServiceId?spec_service_id:fns:getBySpecServiceId(cfg.specServiceId).specServiceName}"
|
||||
title="${spec_service_id}" url="/specific/specificServiceCfg/treeData?isLeafShow=false" extId=""
|
||||
title="${spec_service_id}" url="/specific/specificServiceCfg/treeData?isLeafShow=false&cfgType=${app}" extId=""
|
||||
cssClass="form-control input-small"/>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
@@ -338,7 +341,7 @@
|
||||
</td>
|
||||
<td>${cfg.cfgDesc }</td>
|
||||
<td>${cfg.appName }</td>
|
||||
<td>${cfg.userRegion1 }</td>
|
||||
<td>${cfg.behavName }</td>
|
||||
<td>${cfg.ratelimit }</td>
|
||||
<td>
|
||||
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
|
||||
|
||||
Reference in New Issue
Block a user