完善操控配置功能,修改配置更新界面属性位置
This commit is contained in:
@@ -9,18 +9,38 @@ public class ManipulatCfgExport extends CfgIndexInfo {
|
||||
*/
|
||||
private static final long serialVersionUID = -842585769617969577L;
|
||||
|
||||
@ExcelField(title="action_export",dictType="SERVICE_ACTION",sort=2)
|
||||
@ExcelField(title="block_type",dictType="SERVICE_ACTION",sort=2)
|
||||
private String actionExport;
|
||||
|
||||
@ExcelField(title="response_code",sort=2)
|
||||
@ExcelField(title="method_export",dictType="SERVICE_ACTION",sort=3)
|
||||
private String methodExport;
|
||||
|
||||
@ExcelField(title="response_code",sort=3)
|
||||
private String responseCode;
|
||||
|
||||
@ExcelField(title="profile_info",sort=10)
|
||||
private String profileInfo;
|
||||
|
||||
private Integer action;
|
||||
|
||||
public String getResponseCode() {
|
||||
return responseCode;
|
||||
}
|
||||
public void setResponseCode(String responseCode) {
|
||||
this.responseCode = responseCode;
|
||||
}
|
||||
public String getMethodExport() {
|
||||
return methodExport;
|
||||
}
|
||||
public void setMethodExport(String methodExport) {
|
||||
this.methodExport = methodExport;
|
||||
}
|
||||
public String getProfileInfo() {
|
||||
return profileInfo;
|
||||
}
|
||||
public void setProfileInfo(String profileInfo) {
|
||||
this.profileInfo = profileInfo;
|
||||
}
|
||||
public String getActionExport() {
|
||||
return actionExport;
|
||||
}
|
||||
@@ -28,4 +48,11 @@ public class ManipulatCfgExport extends CfgIndexInfo {
|
||||
this.actionExport = actionExport;
|
||||
}
|
||||
|
||||
public Integer getAction() {
|
||||
return action;
|
||||
}
|
||||
public void setAction(Integer action) {
|
||||
this.action = action;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1915,7 +1915,7 @@ public class BaseController {
|
||||
// 代理-操控业务
|
||||
if(regionDict.getAction() != null) {
|
||||
cfg.setUserRegion5(regionDict.getAction()+"");
|
||||
if(regionDict.getAction()!=48 && regionDict.getAction()!=80) {
|
||||
if(regionDict.getAction()==85 || regionDict.getAction()==90) {
|
||||
cfg.setUserRegion4(profileId+"");
|
||||
}
|
||||
}
|
||||
@@ -2064,7 +2064,7 @@ public class BaseController {
|
||||
// 代理-操控业务
|
||||
if(regionDict.getAction() != null) {
|
||||
cfg.setUserRegion5(regionDict.getAction()+"");
|
||||
if(regionDict.getAction()!=48 && regionDict.getAction()!=80) {
|
||||
if(regionDict.getAction()==85 || regionDict.getAction()==90) {
|
||||
cfg.setUserRegion4(profileId+"");
|
||||
}
|
||||
}
|
||||
@@ -2231,7 +2231,7 @@ public class BaseController {
|
||||
// 代理-操控业务
|
||||
if(regionDict.getAction() != null) {
|
||||
cfg.setUserRegion5(regionDict.getAction()+"");
|
||||
if(regionDict.getAction()!=48 && regionDict.getAction()!=80) {
|
||||
if(regionDict.getAction()==85 || regionDict.getAction()==90) {
|
||||
cfg.setUserRegion4(profileId+"");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,8 +21,12 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.nis.domain.FunctionRegionDict;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.callback.ProxyFileHijackCfg;
|
||||
import com.nis.domain.callback.ProxyFileInsertScriptCfg;
|
||||
import com.nis.domain.callback.ProxyFileResponsePageCfg;
|
||||
import com.nis.domain.callback.ProxyFileStrategyCfg;
|
||||
import com.nis.domain.configuration.BaseCfg;
|
||||
import com.nis.domain.configuration.BaseStringCfg;
|
||||
@@ -63,6 +67,7 @@ public class ManipulatPolicyController extends BaseController {
|
||||
/*List<ProxyFileStrategyCfg> allProxyFileStrategys = proxyFileStrategyService.getProxyFileStrategyCfgList(new ProxyFileStrategyCfg());
|
||||
model.addAttribute("allProxyFileStrategys", allProxyFileStrategys);*/
|
||||
|
||||
manipulatPolicyService.setFileRegion(model);
|
||||
return "/cfg/proxy/control/manipulatPolicyList";
|
||||
}
|
||||
|
||||
@@ -115,6 +120,7 @@ public class ManipulatPolicyController extends BaseController {
|
||||
entity.getNtcSubscribeIdCfgList().add(subscribeIdCfg);
|
||||
}
|
||||
initUpdateFormCondition(model, entity);
|
||||
manipulatPolicyService.setFileRegion(model);
|
||||
} else {
|
||||
// 设置http各类配置的配置域类型
|
||||
HttpUrlCfg urlCfg = new HttpUrlCfg();
|
||||
@@ -319,18 +325,24 @@ public class ManipulatPolicyController extends BaseController {
|
||||
Map<String, String> redirectDict = DictUtils.getDictMap("REDIRECT_RESPONSE_CODE"); // Redirect
|
||||
Map<String, String> replaceDict = DictUtils.getDictMap("CONTROL_REPLACE_ZONE"); // Replace
|
||||
|
||||
// 用于检索引用的文件配置信息
|
||||
ProxyFileResponsePageCfg searchResponseFile = new ProxyFileResponsePageCfg();
|
||||
ProxyFileHijackCfg searchHijackFile = new ProxyFileHijackCfg();
|
||||
ProxyFileInsertScriptCfg searchInsertFile = new ProxyFileInsertScriptCfg();
|
||||
|
||||
Properties prop = getMsgProp();
|
||||
List<ManipulatCfgExport> baseLists = new ArrayList<ManipulatCfgExport>();
|
||||
for (CfgIndexInfo source : ipLists) {
|
||||
ManipulatCfgExport str = new ManipulatCfgExport();
|
||||
BeanUtils.copyProperties(source, str);
|
||||
|
||||
str.setActionExport("action_manipulate");
|
||||
if(str.getUserRegion5().equals("85")) {
|
||||
str.setActionExport("action_hijack");
|
||||
str.setMethodExport("action_hijack");
|
||||
}else if(str.getUserRegion5().equals("90")) {
|
||||
str.setActionExport("action_insert");
|
||||
str.setMethodExport("action_insert");
|
||||
}else {
|
||||
str.setActionExport(str.getUserRegion5());
|
||||
str.setMethodExport(str.getUserRegion5());
|
||||
}
|
||||
|
||||
if(str.getIsAudit()!=0){
|
||||
@@ -367,23 +379,35 @@ public class ManipulatPolicyController extends BaseController {
|
||||
}
|
||||
|
||||
if (str.getUserRegion5().equals("16") || str.getUserRegion5().equals("48")) {
|
||||
if (!StringUtil.isEmpty(str.getUserRegion4())) { // 是否存在文件策略
|
||||
ProxyFileStrategyCfg file = new ProxyFileStrategyCfg();
|
||||
file.setCompileId(Integer.valueOf(str.getUserRegion4()));
|
||||
List<ProxyFileStrategyCfg> allProxyFileStrategys = proxyFileStrategyService.getProxyFileStrategyCfgList(file);
|
||||
if (!StringUtil.isEmpty(str.getUserRegion3())) { // 是否存在文件策略
|
||||
searchResponseFile.setCompileId(Integer.valueOf(str.getUserRegion3()));
|
||||
List<ProxyFileResponsePageCfg> allProxyFileStrategys = proxyFileResponsePageService.getProxyFileResponsePageCfgList(searchResponseFile);
|
||||
if (allProxyFileStrategys != null && allProxyFileStrategys.size() > 0) {
|
||||
str.setUserRegion2(allProxyFileStrategys.get(0).getCfgDesc());
|
||||
str.setUserRegion1(allProxyFileStrategys.get(0).getFileDesc());
|
||||
}
|
||||
str.setUserRegion4(null);
|
||||
str.setUserRegion3(null);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(str.getUserRegion5().equals("16") || str.getUserRegion5().equals("48") || str.getUserRegion5().equals("85") ||
|
||||
str.getUserRegion5().equals("90")) {
|
||||
if(str.getUserRegion5().equals("85") || str.getUserRegion5().equals("90")) {
|
||||
str.setUserRegion1(null);
|
||||
if(str.getUserRegion5().equals("85")) {
|
||||
Page<ProxyFileHijackCfg> page = proxyFileHijackService.findPage(new Page<ProxyFileHijackCfg>(request, response, "a"), searchHijackFile);
|
||||
List<ProxyFileHijackCfg> list = page.getList();
|
||||
if(list != null && list.size() > 0) {
|
||||
str.setProfileInfo(list.get(0).getCfgDesc());
|
||||
}
|
||||
//str.setUserRegion1(null);
|
||||
str.setUserRegion4(null);
|
||||
}else if(str.getUserRegion5().equals("90")) {
|
||||
Page<ProxyFileInsertScriptCfg> page = proxyFileInsertScriptService.findPage(new Page<ProxyFileInsertScriptCfg>(request, response, "a"), searchInsertFile);
|
||||
List<ProxyFileInsertScriptCfg> list = page.getList();
|
||||
if(list != null && list.size() > 0) {
|
||||
str.setProfileInfo(list.get(0).getCfgDesc());
|
||||
}
|
||||
str.setUserRegion4(null);
|
||||
}
|
||||
str.setUserRegion5(null);
|
||||
@@ -405,7 +429,7 @@ public class ManipulatPolicyController extends BaseController {
|
||||
}
|
||||
}
|
||||
|
||||
String cfgIndexInfoNoExport = ",block_type,policy_name,group_name,&action_export:block_type-responseCode:response_code-userregion1:response_content-userregion2:redirect_url-userregion3:replace_zone-userregion4:replaced_content-userregion5:replace_content-";
|
||||
String cfgIndexInfoNoExport = ",policy_name,group_name,&method_export:method-responseCode:response_code-userregion1:response_content-userregion2:redirect_url-userregion3:replace_zone-userregion4:replaced_content-userregion5:replace_content-";
|
||||
|
||||
String httpUrlCfgNoExport = ",do_log,action,config_describe,valid_identifier,is_audit,creator,creator"
|
||||
+ ",config_time,editor,edit_time,auditor,audit_time"
|
||||
|
||||
@@ -24,4 +24,6 @@ public interface ProxyFileHijackDao extends CrudDao<ProxyFileHijackCfg>{
|
||||
public int update(ProxyFileHijackCfg entity);
|
||||
|
||||
List<ProxyFileHijackCfg> findByList(@Param("ids")String ids);
|
||||
|
||||
public List<ProxyFileHijackCfg> findHijackFiles(ProxyFileHijackCfg hijackSearch);
|
||||
}
|
||||
|
||||
@@ -326,5 +326,22 @@
|
||||
left join request_info ri on a.request_id=ri.id
|
||||
where a.CFG_ID in (${ids})
|
||||
</select>
|
||||
|
||||
|
||||
<select id="findHijackFiles" parameterType="com.nis.domain.callback.ProxyFileHijackCfg" resultMap="ProxyFileHijackCfg">
|
||||
SELECT
|
||||
<include refid="ProxyFileHijackCfgColumn" />
|
||||
FROM
|
||||
pxy_profile_hijack_files a
|
||||
<where>
|
||||
<if test="isValid != null">
|
||||
AND a.IS_VALID=#{isValid,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isValid == null">
|
||||
AND a.IS_VALID != -1
|
||||
</if>
|
||||
<if test="isAudit != null">
|
||||
AND a.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -27,4 +27,6 @@ public interface ProxyFileInsertScriptDao extends CrudDao<ProxyFileInsertScriptC
|
||||
public int update(ProxyFileInsertScriptCfg entity);
|
||||
|
||||
List<ProxyFileInsertScriptCfg> findByList(@Param("ids")String ids);
|
||||
|
||||
public List<ProxyFileInsertScriptCfg> findInsertFiles(ProxyFileInsertScriptCfg insertSearch);
|
||||
}
|
||||
|
||||
@@ -320,5 +320,22 @@
|
||||
left join request_info ri on a.request_id=ri.id
|
||||
where a.CFG_ID in (${ids})
|
||||
</select>
|
||||
|
||||
|
||||
<select id="findInsertFiles" parameterType="com.nis.domain.callback.ProxyFileInsertScriptCfg" resultMap="ProxyFileInsertScriptCfg">
|
||||
SELECT
|
||||
<include refid="ProxyFileInsertScriptCfgColumn" />
|
||||
FROM
|
||||
pxy_profile_insert_scripts a
|
||||
<where>
|
||||
<if test="isValid != null">
|
||||
AND a.IS_VALID=#{isValid,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isValid == null">
|
||||
AND a.IS_VALID != -1
|
||||
</if>
|
||||
<if test="isAudit != null">
|
||||
AND a.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -2571,7 +2571,7 @@ public abstract class BaseService {
|
||||
actionParam.setMethod("block");
|
||||
actionParam.setCode(Integer.valueOf(_cfg.getUserRegion1()));
|
||||
actionParam.setMessage(_cfg.getUserRegion2());
|
||||
actionParam.setHtml_profile(Integer.valueOf(_cfg.getUserRegion4()));
|
||||
actionParam.setHtml_profile(0);
|
||||
}else if(regionDict.getAction().equals(85)) {
|
||||
actionParam.setMethod("hijack");
|
||||
actionParam.setHijack_profile(Integer.valueOf(_cfg.getUserRegion4()));
|
||||
@@ -2720,7 +2720,7 @@ public abstract class BaseService {
|
||||
actionParam.setMethod("block");
|
||||
actionParam.setCode(Integer.valueOf(_cfg.getUserRegion1()));
|
||||
actionParam.setMessage(_cfg.getUserRegion2());
|
||||
actionParam.setHtml_profile(Integer.valueOf(_cfg.getUserRegion4()));
|
||||
actionParam.setHtml_profile(0);
|
||||
}else if(regionDict.getAction().equals(85)) {
|
||||
actionParam.setMethod("hijack");
|
||||
actionParam.setHijack_profile(Integer.valueOf(_cfg.getUserRegion4()));
|
||||
@@ -2851,7 +2851,7 @@ public abstract class BaseService {
|
||||
actionParam.setMethod("block");
|
||||
actionParam.setCode(Integer.valueOf(cfg.getUserRegion1()));
|
||||
actionParam.setMessage(cfg.getUserRegion2());
|
||||
actionParam.setHtml_profile(Integer.valueOf(cfg.getUserRegion4()));
|
||||
actionParam.setHtml_profile(0);
|
||||
}else if(regionDict.getAction().equals(85)) {
|
||||
actionParam.setMethod("hijack");
|
||||
actionParam.setHijack_profile(Integer.valueOf(cfg.getUserRegion4()));
|
||||
@@ -3293,8 +3293,8 @@ public abstract class BaseService {
|
||||
}else if(cfg.getUserRegion5().equals("16")) {
|
||||
actionParam.setMethod("block");
|
||||
actionParam.setCode(Integer.valueOf(cfg.getUserRegion1()));
|
||||
actionParam.setMessage(cfg.getUserRegion2());
|
||||
actionParam.setHtml_profile(Integer.valueOf(cfg.getUserRegion4()));
|
||||
actionParam.setMessage(StringUtils.isNotBlank(cfg.getUserRegion2())?cfg.getUserRegion2():"");
|
||||
actionParam.setHtml_profile(Integer.valueOf(StringUtils.isNotBlank(cfg.getUserRegion3())?cfg.getUserRegion3():"0"));
|
||||
}else if(cfg.getUserRegion5().equals("85")) {
|
||||
actionParam.setMethod("hijack");
|
||||
actionParam.setHijack_profile(Integer.valueOf(cfg.getUserRegion4()));
|
||||
|
||||
@@ -6,10 +6,15 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.commons.lang3.StringEscapeUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.ui.Model;
|
||||
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.callback.ProxyFileHijackCfg;
|
||||
@@ -45,6 +50,7 @@ import com.nis.web.dao.configuration.ProxyFileStrategyDao;
|
||||
import com.nis.web.dao.configuration.StringCfgDao;
|
||||
import com.nis.web.dao.configuration.WebsiteCfgDao;
|
||||
import com.nis.web.security.UserUtils;
|
||||
import com.nis.web.service.BaseService;
|
||||
import com.nis.web.service.CrudService;
|
||||
|
||||
/**
|
||||
@@ -520,8 +526,8 @@ public class ManipulatPolicyService extends CrudService<WebsiteCfgDao,CfgIndexIn
|
||||
if(Integer.valueOf(entity.getUserRegion5()).equals(16)){
|
||||
actionParam.setMethod("block");
|
||||
actionParam.setCode(Integer.valueOf(entity.getUserRegion1()));
|
||||
actionParam.setMessage(entity.getUserRegion2());
|
||||
actionParam.setHtml_profile(Integer.valueOf(entity.getUserRegion4()));
|
||||
actionParam.setMessage(StringUtils.isNotBlank(entity.getUserRegion2())?entity.getUserRegion2():"");
|
||||
actionParam.setHtml_profile(Integer.valueOf(StringUtils.isNotBlank(entity.getUserRegion3())?entity.getUserRegion3():"0"));
|
||||
}
|
||||
// Redirect
|
||||
if(Integer.valueOf(entity.getUserRegion5()).equals(48)){
|
||||
@@ -550,6 +556,8 @@ public class ManipulatPolicyService extends CrudService<WebsiteCfgDao,CfgIndexIn
|
||||
}
|
||||
|
||||
userRegion = gsonToJson(actionParam);
|
||||
//userRegion = StringEscapeUtils.unescapeJava(userRegion);
|
||||
|
||||
if(StringUtil.isEmpty(userRegion)){
|
||||
userRegion = Constants.USER_REGION_PLACEHOLDER;
|
||||
}
|
||||
@@ -605,19 +613,37 @@ public class ManipulatPolicyService extends CrudService<WebsiteCfgDao,CfgIndexIn
|
||||
}else if(source == 85) {
|
||||
ProxyFileHijackCfg searchEntity = new ProxyFileHijackCfg();
|
||||
searchEntity.setIsAudit(1);
|
||||
List<ProxyFileHijackCfg> list = proxyFileHijackDao.findPage(searchEntity);
|
||||
List<ProxyFileHijackCfg> list = proxyFileHijackDao.findHijackFiles(searchEntity);
|
||||
for (BaseCfg cfg : list) {
|
||||
resultList.add(cfg);
|
||||
}
|
||||
}else if(source == 90) {
|
||||
ProxyFileInsertScriptCfg searchEntity = new ProxyFileInsertScriptCfg();
|
||||
searchEntity.setIsAudit(1);
|
||||
List<ProxyFileInsertScriptCfg> list = proxyFileInsertDao.findPage(searchEntity);
|
||||
List<ProxyFileInsertScriptCfg> list = proxyFileInsertDao.findInsertFiles(searchEntity);
|
||||
for (BaseCfg cfg : list) {
|
||||
resultList.add(cfg);
|
||||
}
|
||||
}
|
||||
return resultList;
|
||||
}
|
||||
|
||||
public void setFileRegion(Model model) {
|
||||
|
||||
ProxyFileStrategyCfg searchEntity = new ProxyFileStrategyCfg();
|
||||
searchEntity.setIsAudit(1);
|
||||
ProxyFileHijackCfg hijackSearch = new ProxyFileHijackCfg();
|
||||
searchEntity.setIsAudit(1);
|
||||
ProxyFileInsertScriptCfg insertSearch = new ProxyFileInsertScriptCfg();
|
||||
searchEntity.setIsAudit(1);
|
||||
|
||||
List<ProxyFileStrategyCfg> resFileList = proxyFileDao.fingResPages(searchEntity);
|
||||
List<ProxyFileHijackCfg> hajackFilelist = proxyFileHijackDao.findHijackFiles(hijackSearch);
|
||||
List<ProxyFileInsertScriptCfg> InsertFilelist = proxyFileInsertDao.findInsertFiles(insertSearch);
|
||||
|
||||
model.addAttribute("allResponseFiles", resFileList);
|
||||
model.addAttribute("allHijackFiles", hajackFilelist);
|
||||
model.addAttribute("allInsertFiles", InsertFilelist);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1578,7 +1578,10 @@ enable=Enable
|
||||
forward=Forward
|
||||
decrypt_mirror_enable_on=if the enable option value is '1', the Mirror profile is needed
|
||||
ssl_ver_mirror_client_on=if the mirror client option value is '1', the min SSL version and the max SSL version will be ignored
|
||||
#---------------------------Proxy Manipulate------------------------------------
|
||||
profile_info=Profile Info
|
||||
http_manipulation=HTTP(S) Manipulate
|
||||
action_hijack=Hijack
|
||||
action_insert=Insert
|
||||
action_insert=Insert
|
||||
action_manipulate=Manipulate
|
||||
method=Method
|
||||
@@ -1580,7 +1580,10 @@ enable=Enable
|
||||
forward=Forward
|
||||
decrypt_mirror_enable_on=if the enable option value is '1', the Mirror profile is needed
|
||||
ssl_ver_mirror_client_on=if the mirror client option value is '1', the min SSL version and the max SSL version will be ignored
|
||||
#---------------------------Proxy Manipulate------------------------------------
|
||||
profile_info=Profile Info
|
||||
http_manipulation=HTTP(S) Manipulate
|
||||
action_hijack=Hijack
|
||||
action_insert=Insert
|
||||
action_insert=Insert
|
||||
action_manipulate=Manipulate
|
||||
method=Method
|
||||
@@ -1578,7 +1578,10 @@ enable=\u542F\u7528
|
||||
forward=Forward
|
||||
decrypt_mirror_enable_on=\u5982\u679C\u542F\u52A8\u9009\u9879\u7684\u503C\u662F1\uFF0C\u5219\u955C\u50CF\u6587\u4EF6\u9009\u9879\u9700\u8981\u9009\u62E9
|
||||
ssl_ver_mirror_client_on=\u5982\u679C\u955C\u50CF\u5BA2\u6237\u7AEF\u9009\u9879\u7684\u503C\u662F1\uFF0C\u5219\u6700\u5927\u6700\u5C0FSSL\u7248\u672C\u53F7\u4F1A\u88AB\u5FFD\u7565
|
||||
#---------------------------Proxy Manipulate------------------------------------
|
||||
profile_info=\u6587\u4EF6
|
||||
http_manipulation=HTTP(S)\u64CD\u63A7
|
||||
action_hijack=\u52AB\u6301
|
||||
action_insert=\u6CE8\u5165
|
||||
action_insert=\u6CE8\u5165
|
||||
action_manipulate=\u64CD\u63A7
|
||||
method=\u65B9\u6CD5
|
||||
@@ -95,14 +95,14 @@
|
||||
<c:if test="${cfg.functionId eq 215 }">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">
|
||||
<spring:message code="action" />
|
||||
<spring:message code="method" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
|
||||
<c:if test="${dict.itemCode == 16 || dict.itemCode == 48 || dict.itemCode == 80 }">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="manipulatType" class="userRegion5" value="${dict.itemCode }" class="required"
|
||||
<c:if test="${dict.itemCode == 48}">checked</c:if>>
|
||||
<c:if test="${dict.itemCode == 16}">checked</c:if>>
|
||||
<spring:message code="${dict.itemValue }"/>
|
||||
</label>
|
||||
</c:if>
|
||||
|
||||
@@ -13,6 +13,41 @@
|
||||
<spring:message code="action_region" />
|
||||
<small></small>
|
||||
</h4>
|
||||
<%-- Method --%>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">
|
||||
<spring:message code="method" />
|
||||
</label>
|
||||
<div class="col-md-8">
|
||||
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
|
||||
<c:if test="${dict.itemCode == 16 || dict.itemCode == 48 || dict.itemCode == 80 }">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="userRegion5" class="userRegion5" value="${dict.itemCode }" class="required"
|
||||
<c:if test="${_cfg.userRegion5 == dict.itemCode || (_cfg.userRegion5==null && dict.itemCode==16)}">checked</c:if>>
|
||||
<spring:message code="${dict.itemValue }"/>
|
||||
</label>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<%-- Hijack标识为85 --%>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="userRegion5" class="userRegion5" value="85" class="required"
|
||||
<c:if test="${_cfg.userRegion5 == 85}">checked</c:if>>
|
||||
<spring:message code="action_hijack"/>
|
||||
</label>
|
||||
<%-- Insert标识为90 --%>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="userRegion5" class="userRegion5" value="90" class="required"
|
||||
<c:if test="${_cfg.userRegion5 == 90}">checked</c:if>>
|
||||
<spring:message code="action_insert"/>
|
||||
</label>
|
||||
</div>
|
||||
<div for="userRegion5"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<c:if test="${_cfg.userRegion5 == 16 }">
|
||||
<div class="row blockInfoDiv" action_value="16">
|
||||
<div class="col-md-6">
|
||||
@@ -32,46 +67,69 @@
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3">
|
||||
<spring:message code="response_content" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<input id="" name="userRegion2" class="form-control" type="text" value="${_cfg.userRegion2 }" maxlength="1024">
|
||||
<div class="col-md-3">
|
||||
<select id="response1" class="selectpicker select2 input-small pull-right">
|
||||
<option value="responseContent"><spring:message code="response_content"></spring:message></option>
|
||||
<option value="responseFile"><spring:message code="response_file"></spring:message></option>
|
||||
</select>
|
||||
</div>
|
||||
<div for="userRegion2"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<%-- <div class="row blockInfoDiv" action_value="16">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="profile_info" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<select id="" name="userRegion4" data-live-search="true" data-live-search-placeholder="search" class="selectpicker form-control required">
|
||||
<input id="responseContent" name="userRegion2" class="form-control" type="text" value="${_cfg.userRegion2 }" maxlength="1024">
|
||||
<select id="responseFile" name="userRegion3" data-live-search="true" data-live-search-placeholder="search" class="selectpicker form-control required profileSel">
|
||||
<option value=""><spring:message code="select"/></option>
|
||||
<c:forEach items="${allProxyFileStrategys}" var="file">
|
||||
<c:forEach items="${allResponseFiles}" var="file">
|
||||
<c:if test="${file.isValid!=0 and file.isAudit!=3}">
|
||||
<option action="${file.action }" value="${file.compileId}"
|
||||
<c:if test="${file.compileId eq _cfg.userRegion4 }">selected</c:if>>${file.fileDesc}</option>
|
||||
<option action="${file.action }" value="${file.compileId}"
|
||||
<c:if test="${file.compileId==_cfg.userRegion3}">selected</c:if>>${file.fileDesc}</option>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
<div for="userRegion4"></div>
|
||||
<div for="userRegion2"></div>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
//页面加载时触发初始化操作
|
||||
var file = $("#responseFile").val();
|
||||
|
||||
if(file){
|
||||
$("#responseContent").hide();//隐藏输入框
|
||||
$("#response1").val("responseFile");
|
||||
$("#responseFile").selectpicker("show");//隐藏选择框
|
||||
}else{
|
||||
$("#responseFile").selectpicker("hide");//隐藏选择框
|
||||
$("#response1").val("responseContent");
|
||||
$("#responseContent").show();//隐藏输入框
|
||||
}
|
||||
|
||||
$("#response1").on("change",function(){
|
||||
var value = $(this).val();
|
||||
// 清空
|
||||
$("#responseContent").val("");
|
||||
$("#responseFile").selectpicker("val","");
|
||||
if("responseContent" == value){
|
||||
$("#responseContent").show();//显示输入框
|
||||
$("#responseFile").selectpicker("hide");//隐藏选择框
|
||||
}else{
|
||||
$("#responseContent").hide();//隐藏输入框
|
||||
$("#responseFile").selectpicker("show");//显示选择框
|
||||
getFileInfo("responseFile",16);
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
</div> --%>
|
||||
<div class="row profileSelDiv" action_value="16">
|
||||
</div>
|
||||
|
||||
<div class="row profileSelDiv hidden">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="profile_info" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<select id="profileSelId" name="userRegion4" class="selectpicker show-tick form-control required">
|
||||
|
||||
<select id="profileSelId" name="userRegion4" class="selectpicker show-tick form-control required profileSel">
|
||||
<option value=""><spring:message code="select"/></option>
|
||||
</select>
|
||||
</div>
|
||||
<div for="userRegion4"></div>
|
||||
@@ -184,44 +242,62 @@
|
||||
</div>
|
||||
<div class="col-md-6 blockInfoDiv" action_value="16">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3">
|
||||
<spring:message code="response_content" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<input id="responseContentA" name="userRegion2" class="form-control" type="text" maxlength="1024">
|
||||
</div>
|
||||
<div for="userRegion2"></div>
|
||||
</div>
|
||||
</div>
|
||||
<%-- <div class="row blockInfoDiv" action_value="16">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="profile_info" />
|
||||
</label>
|
||||
<div class="col-md-3">
|
||||
<select id="response2" class="selectpicker select2 input-small pull-right">
|
||||
<option value="blockContent"><spring:message code="response_content"></spring:message></option>
|
||||
<option value="blockFile"><spring:message code="response_file"></spring:message></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<select id="" name="userRegion4" data-live-search="true" data-live-search-placeholder="search" class="selectpicker form-control required">
|
||||
<input id="blockContent" name="userRegion2" class="form-control" type="text" maxlength="1024">
|
||||
<select id="blockFile" name="userRegion3" data-live-search="true" data-live-search-placeholder="search" class="selectpicker form-control required profileSel">
|
||||
<option value=""><spring:message code="select"/></option>
|
||||
<c:forEach items="${allProxyFileStrategys}" var="file">
|
||||
<c:if test="${file.isValid!=0 and file.isAudit!=3}">
|
||||
<option action="${file.action }" value="${file.compileId}">${file.fileDesc}</option>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
<div for="userRegion4"></div>
|
||||
</div>
|
||||
<div for="userRegion2"></div>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
//页面加载时触发初始化操作
|
||||
var file = $("#blockFile").val();
|
||||
if(file){
|
||||
$("#blockContent").hide();//隐藏输入框
|
||||
$("#response2").val("blockFile");
|
||||
$("#blockFile").selectpicker("show");//隐藏选择框
|
||||
}else{
|
||||
$("#blockFile").selectpicker("hide");//隐藏选择框
|
||||
$("#response2").val("blockContent");
|
||||
$("#blockContent").show();//隐藏输入框
|
||||
}
|
||||
|
||||
$("#response2").on("change",function(){
|
||||
var value = $(this).val();
|
||||
// 清空
|
||||
$("#blockContent").val("");
|
||||
$("#blockFile").selectpicker("val","");
|
||||
if("blockContent" == value){
|
||||
$("#blockContent").show();//显示输入框
|
||||
$("#blockFile").selectpicker("hide");//隐藏选择框
|
||||
}else{
|
||||
$("#blockContent").hide();//隐藏输入框
|
||||
$("#blockFile").selectpicker("show");//显示选择框
|
||||
getFileInfo("blockFile",16);
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</div> --%>
|
||||
<div class="row profileSelDiv" action_value="16">
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row profileSelDiv hidden">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="profile_info" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<select id="profileSelId" name="userRegion4" class="selectpicker show-tick form-control required">
|
||||
|
||||
<select id="profileSelId" name="userRegion4" class="selectpicker show-tick form-control required profileSel">
|
||||
<option value=""><spring:message code="select"/></option>
|
||||
</select>
|
||||
</div>
|
||||
<div for="userRegion4"></div>
|
||||
|
||||
@@ -185,13 +185,23 @@
|
||||
}
|
||||
if(flag){
|
||||
$(".blockInfoDiv").addClass("hidden");
|
||||
$(".profileSelDiv").removeClass("hidden");
|
||||
}else{
|
||||
$(".profileSelDiv").addClass("hidden");
|
||||
}
|
||||
});
|
||||
|
||||
// Get Policy Profile Info
|
||||
$(".actionParam").find(".profileSelDiv").each(function(){
|
||||
if(!$(this).hasClass("hidden")){
|
||||
var source = $(this).attr("source");
|
||||
if(!$(".profileSelDiv").hasClass("hidden")){
|
||||
getFileInfo("profileSelId",$(".profileSelDiv").attr("source"));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
var getFileInfo = function(selectId,source){
|
||||
$(".actionParam").find("#"+selectId).each(function(){
|
||||
//if(!$(this).hasClass("hidden")){
|
||||
//var source = $(this).attr("source");
|
||||
var pathName = window.document.location.pathname.substring(0,window.document.location.pathname.lastIndexOf("/nis")+4);
|
||||
$.ajax({
|
||||
type:'get',
|
||||
@@ -199,25 +209,38 @@
|
||||
dataType:'json',
|
||||
success:function(data){
|
||||
if(data != null){
|
||||
$("#profileSelId").empty();
|
||||
//$("#"+selectId).empty();
|
||||
$("#"+selectId).find("option").each(function(){
|
||||
if($(this).val() != "" && $(this).val() != null){
|
||||
$(this).remove();
|
||||
}
|
||||
});
|
||||
|
||||
var falseAction = $(".userRegion5:checked").val();
|
||||
$.each(data, function(i, n){
|
||||
if("${_cfg.userRegion4}" == data[i].compileId && "${_cfg.userRegion5}" == falseAction){ // 修改时选中
|
||||
var option = new Option(data[i].cfgDesc, data[i].compileId, null, true);
|
||||
if(source == 16){
|
||||
if("${_cfg.userRegion3}" == data[i].compileId && "${_cfg.userRegion5}" == falseAction){ // 修改时选中
|
||||
var option = new Option(data[i].fileDesc, data[i].compileId, null, true);
|
||||
}else{
|
||||
var option = new Option(data[i].fileDesc, data[i].compileId);
|
||||
}
|
||||
}else{
|
||||
var option = new Option(data[i].cfgDesc, data[i].compileId);
|
||||
if("${_cfg.userRegion4}" == data[i].compileId && "${_cfg.userRegion5}" == falseAction){ // 修改时选中
|
||||
var option = new Option(data[i].cfgDesc, data[i].compileId, null, true);
|
||||
}else{
|
||||
var option = new Option(data[i].cfgDesc, data[i].compileId);
|
||||
}
|
||||
}
|
||||
|
||||
$("#profileSelId")[0].options.add(option);
|
||||
$("#"+selectId)[0].options.add(option);
|
||||
});
|
||||
$("#profileSelId").selectpicker("refresh");
|
||||
$("#"+selectId).selectpicker("refresh");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
//}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
//业务窗口打开
|
||||
@@ -278,7 +301,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 hidden">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message
|
||||
code="action" /></label>
|
||||
@@ -297,7 +320,7 @@
|
||||
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
|
||||
<c:if test="${dict.itemCode eq service.action }">
|
||||
<c:set var="action" value="${dict.itemCode }"></c:set>
|
||||
<spring:message code="${dict.itemValue }"/>
|
||||
<spring:message code="action_manipulate"/>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
@@ -307,7 +330,7 @@
|
||||
<div for="action"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<%-- <div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">
|
||||
<spring:message code="action" />
|
||||
@@ -322,13 +345,13 @@
|
||||
</label>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<%-- Hijack标识为85 --%>
|
||||
Hijack标识为85
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="userRegion5" class="userRegion5" value="85" class="required"
|
||||
<c:if test="${_cfg.userRegion5 == 85}">checked</c:if>>
|
||||
<spring:message code="action_hijack"/>
|
||||
</label>
|
||||
<%-- Insert标识为90 --%>
|
||||
Insert标识为90
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="userRegion5" class="userRegion5" value="90" class="required"
|
||||
<c:if test="${_cfg.userRegion5 == 90}">checked</c:if>>
|
||||
@@ -337,7 +360,7 @@
|
||||
</div>
|
||||
<div for="userRegion5"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div> --%>
|
||||
|
||||
</div>
|
||||
<c:if test="${empty _cfg.cfgId }">
|
||||
|
||||
@@ -197,7 +197,7 @@
|
||||
<form:option value="httpResBody.cfgKeywords"><spring:message code="http_res_body_keywords"></spring:message></form:option>
|
||||
</c:if>
|
||||
</c:if>
|
||||
<form:option value="action"><spring:message code="block_type"></spring:message></form:option>
|
||||
<form:option value="action"><spring:message code="method"></spring:message></form:option>
|
||||
<form:option value="isValid"><spring:message code="valid_identifier"></spring:message></form:option>
|
||||
</form:select>
|
||||
</div>
|
||||
@@ -396,12 +396,14 @@
|
||||
<th column="config_describe" class="sort-column a.cfg_desc cfgDesc"><spring:message code="config_describe"/></th>
|
||||
<th column="block_type" class="sort-column a.action"><spring:message code="block_type"/></th>
|
||||
|
||||
<th><spring:message code="method"/></th>
|
||||
<th><spring:message code="response_code"/></th>
|
||||
<th><spring:message code="response_content"/></th>
|
||||
<th><spring:message code="redirect_url"/></th>
|
||||
<th><spring:message code="replace_zone"/></th>
|
||||
<th><spring:message code="replaced_content"/></th>
|
||||
<th><spring:message code="replace_content"/></th>
|
||||
<th><spring:message code="profile_info"/></th>
|
||||
|
||||
<th column="is_audit" ><spring:message code="is_audit"/></th>
|
||||
<th column="valid_identifier" class="sort-column a.is_valid"><spring:message code="valid_identifier"/></th>
|
||||
@@ -430,6 +432,8 @@
|
||||
</td>
|
||||
<td>${indexCfg.compileId }</td>
|
||||
<td>${indexCfg.cfgDesc }</td>
|
||||
<td><spring:message code="action_manipulate"/></td>
|
||||
|
||||
<td>
|
||||
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
|
||||
<c:if test="${dict.itemCode eq indexCfg.userRegion5 }">
|
||||
@@ -443,8 +447,6 @@
|
||||
<spring:message code="action_insert"/>
|
||||
</c:if>
|
||||
</td>
|
||||
|
||||
|
||||
<c:if test="${indexCfg.userRegion5 == 16}">
|
||||
<td>
|
||||
<c:forEach items="${fns:getDictList('RESPONSE_CODE') }" var="dict1">
|
||||
@@ -456,18 +458,19 @@
|
||||
</td>
|
||||
<td <c:if test="${not empty indexCfg.userRegion2 }"> title="${indexCfg.userRegion2 }"</c:if>"><!-- 阻断 响应内容 -->
|
||||
<c:if test="${not empty indexCfg.userRegion2 }">${fns:abbr(indexCfg.userRegion2,20)}</c:if>
|
||||
<%-- <c:if test="${not empty indexCfg.userRegion4 }">
|
||||
<c:forEach items="${allProxyFileStrategys}" var="file">
|
||||
<c:if test="${not empty indexCfg.userRegion3 }">
|
||||
<c:forEach items="${allResponseFiles}" var="file">
|
||||
<c:if test="${file.compileId eq indexCfg.userRegion3}">
|
||||
<a href="${file.url }" target="_blank">${file.fileDesc }</a>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:if> --%>
|
||||
</c:if>
|
||||
</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</c:if>
|
||||
<c:if test="${indexCfg.userRegion5 == 48}">
|
||||
<td>
|
||||
@@ -492,6 +495,7 @@
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</c:if>
|
||||
|
||||
<c:if test="${indexCfg.userRegion5 == 80}">
|
||||
@@ -507,10 +511,30 @@
|
||||
</td>
|
||||
<td title="${indexCfg.userRegion2 }">${fns:abbr(indexCfg.userRegion2,20)}</td>
|
||||
<td title="${indexCfg.userRegion3 }">${fns:abbr(indexCfg.userRegion3,20)}</td>
|
||||
<td></td>
|
||||
</c:if>
|
||||
|
||||
<c:if test="${indexCfg.userRegion5 != 16 && indexCfg.userRegion5 != 48 && indexCfg.userRegion5 != 80}">
|
||||
<td></td><td></td><td></td><td></td><td></td><td></td>
|
||||
<c:if test="${indexCfg.userRegion5 == 85 || indexCfg.userRegion5 == 90}">
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>
|
||||
<c:if test="${not empty indexCfg.userRegion4 }">
|
||||
<c:forEach items="${allHijackFiles}" var="file">
|
||||
<c:if test="${file.compileId eq indexCfg.userRegion4}">
|
||||
<a href="${file.path }" target="_blank">${file.cfgDesc }</a>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<c:forEach items="${allInsertFiles}" var="file">
|
||||
<c:if test="${file.compileId eq indexCfg.userRegion4}">
|
||||
<a href="${file.path }" target="_blank">${file.cfgDesc }</a>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
</td>
|
||||
</c:if>
|
||||
|
||||
<td>
|
||||
|
||||
@@ -247,7 +247,7 @@ function profileChange(val){
|
||||
$("input[name='regionDictIds']:first").prop("checked",true);
|
||||
}
|
||||
|
||||
if(val == 48 || val == 80){ // 重定向和替换动作无Profile属性
|
||||
if(val == 48 || val == 80 || val == 16){ // 重定向和替换动作无Profile属性
|
||||
$(".profileInfo").addClass("hidden");
|
||||
}else{
|
||||
$(".profileInfo").removeClass("hidden");
|
||||
|
||||
Reference in New Issue
Block a user