1、网站HTTP配置新增、修改功能提交;2、样例配置审核修改文件URL
This commit is contained in:
120
.classpath
120
.classpath
@@ -33,5 +33,125 @@
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="lib" path="lib/jersey-client-2.23.1.jar">
|
||||
<attributes>
|
||||
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="lib" path="lib/jersey-common-2.23.1.jar">
|
||||
<attributes>
|
||||
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="lib" path="lib/jersey-entity-filtering-2.23.1.jar">
|
||||
<attributes>
|
||||
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="lib" path="lib/jersey-guava-2.23.1.jar">
|
||||
<attributes>
|
||||
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="lib" path="lib/jersey-media-json-jackson-2.23.1.jar">
|
||||
<attributes>
|
||||
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="lib" path="lib/jersey-media-multipart-2.23.1.jar">
|
||||
<attributes>
|
||||
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="lib" path="lib/javax.annotation-api-1.2.jar">
|
||||
<attributes>
|
||||
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="lib" path="lib/javax.inject-2.4.0-b34.jar">
|
||||
<attributes>
|
||||
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="lib" path="lib/javax.servlet-api-3.1.0.jar">
|
||||
<attributes>
|
||||
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="lib" path="lib/javax.ws.rs-api-2.0.1.jar">
|
||||
<attributes>
|
||||
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="lib" path="lib/hk2-api-2.4.0-b34.jar">
|
||||
<attributes>
|
||||
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="lib" path="lib/hk2-locator-2.4.0-b34.jar">
|
||||
<attributes>
|
||||
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="lib" path="lib/hk2-utils-2.4.0-b34.jar">
|
||||
<attributes>
|
||||
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="lib" path="lib/jna-4.1.0.jar">
|
||||
<attributes>
|
||||
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="lib" path="lib/jna-platform-4.1.0.jar">
|
||||
<attributes>
|
||||
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="lib" path="lib/maat-tools-0.0.1-SNAPSHOT.jar">
|
||||
<attributes>
|
||||
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="lib" path="lib/mchange-commons-java-0.2.11.jar">
|
||||
<attributes>
|
||||
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="lib" path="lib/mimepull-1.9.6.jar">
|
||||
<attributes>
|
||||
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="lib" path="lib/jackson-annotations-2.5.4.jar">
|
||||
<attributes>
|
||||
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="lib" path="lib/jackson-core-2.5.4.jar">
|
||||
<attributes>
|
||||
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="lib" path="lib/jackson-databind-2.5.4.jar">
|
||||
<attributes>
|
||||
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="lib" path="lib/jackson-jaxrs-base-2.5.4.jar">
|
||||
<attributes>
|
||||
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="lib" path="lib/jackson-jaxrs-json-provider-2.5.4.jar">
|
||||
<attributes>
|
||||
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="lib" path="lib/jackson-module-jaxb-annotations-2.5.4.jar">
|
||||
<attributes>
|
||||
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="output" path="target/classes"/>
|
||||
</classpath>
|
||||
|
||||
@@ -12,13 +12,13 @@ public class AvFileSampleCfg extends BaseCfg<AvFileSampleCfg> {
|
||||
@SerializedName("srcFile")
|
||||
private String srcUrl;
|
||||
@Expose
|
||||
@SerializedName("sampleFile")
|
||||
@SerializedName("dstFile")
|
||||
private String sampleUrl;
|
||||
@Expose
|
||||
@SerializedName("srcFileMd5")
|
||||
private String srcMd5;
|
||||
@Expose
|
||||
@SerializedName("sampleFileMd5")
|
||||
@SerializedName("dstFileMd5")
|
||||
private String sampleMd5;
|
||||
@Expose
|
||||
private Integer level;
|
||||
|
||||
@@ -29,6 +29,18 @@ public class CfgIndexInfo extends BaseCfg<CfgIndexInfo> {
|
||||
private List<AvVoipIpCfg> voipIps; //Add表单使用
|
||||
private AvVoipAccountCfg voipAccount;//Search使用
|
||||
private AvVoipIpCfg voipIp;//Search使用
|
||||
private IpPortCfg ipPort;
|
||||
private HttpUrlCfg httpUrl;
|
||||
private HttpReqHeadCfg httpReqHdr;
|
||||
private HttpResHeadCfg httpResHdr;
|
||||
private HttpBodyCfg httpReqBody;
|
||||
private HttpBodyCfg httpResBody;
|
||||
private List<IpPortCfg> ipPortList;
|
||||
private List<HttpUrlCfg> httpUrlList;
|
||||
private List<HttpReqHeadCfg> httpReqHdrList;
|
||||
private List<HttpResHeadCfg> httpResHdrList;
|
||||
private List<HttpBodyCfg> httpReqBodyList;
|
||||
private List<HttpBodyCfg> httpResBodyList;
|
||||
|
||||
|
||||
public AvVoipAccountCfg getVoipAccount() {
|
||||
@@ -55,5 +67,77 @@ public class CfgIndexInfo extends BaseCfg<CfgIndexInfo> {
|
||||
public List<AvVoipIpCfg> getVoipIps() {
|
||||
return voipIps;
|
||||
}
|
||||
public IpPortCfg getIpPort() {
|
||||
return ipPort;
|
||||
}
|
||||
public void setIpPort(IpPortCfg ipPort) {
|
||||
this.ipPort = ipPort;
|
||||
}
|
||||
public HttpUrlCfg getHttpUrl() {
|
||||
return httpUrl;
|
||||
}
|
||||
public void setHttpUrl(HttpUrlCfg httpUrl) {
|
||||
this.httpUrl = httpUrl;
|
||||
}
|
||||
public HttpReqHeadCfg getHttpReqHdr() {
|
||||
return httpReqHdr;
|
||||
}
|
||||
public void setHttpReqHdr(HttpReqHeadCfg httpReqHdr) {
|
||||
this.httpReqHdr = httpReqHdr;
|
||||
}
|
||||
public HttpResHeadCfg getHttpResHdr() {
|
||||
return httpResHdr;
|
||||
}
|
||||
public void setHttpResHdr(HttpResHeadCfg httpResHdr) {
|
||||
this.httpResHdr = httpResHdr;
|
||||
}
|
||||
public HttpBodyCfg getHttpReqBody() {
|
||||
return httpReqBody;
|
||||
}
|
||||
public void setHttpReqBody(HttpBodyCfg httpReqBody) {
|
||||
this.httpReqBody = httpReqBody;
|
||||
}
|
||||
public HttpBodyCfg getHttpResBody() {
|
||||
return httpResBody;
|
||||
}
|
||||
public void setHttpResBody(HttpBodyCfg httpResBody) {
|
||||
this.httpResBody = httpResBody;
|
||||
}
|
||||
public List<IpPortCfg> getIpPortList() {
|
||||
return ipPortList;
|
||||
}
|
||||
public void setIpPortList(List<IpPortCfg> ipPortList) {
|
||||
this.ipPortList = ipPortList;
|
||||
}
|
||||
public List<HttpUrlCfg> getHttpUrlList() {
|
||||
return httpUrlList;
|
||||
}
|
||||
public void setHttpUrlList(List<HttpUrlCfg> httpUrlList) {
|
||||
this.httpUrlList = httpUrlList;
|
||||
}
|
||||
public List<HttpReqHeadCfg> getHttpReqHdrList() {
|
||||
return httpReqHdrList;
|
||||
}
|
||||
public void setHttpReqHdrList(List<HttpReqHeadCfg> httpReqHdrList) {
|
||||
this.httpReqHdrList = httpReqHdrList;
|
||||
}
|
||||
public List<HttpResHeadCfg> getHttpResHdrList() {
|
||||
return httpResHdrList;
|
||||
}
|
||||
public void setHttpResHdrList(List<HttpResHeadCfg> httpResHdrList) {
|
||||
this.httpResHdrList = httpResHdrList;
|
||||
}
|
||||
public List<HttpBodyCfg> getHttpReqBodyList() {
|
||||
return httpReqBodyList;
|
||||
}
|
||||
public void setHttpReqBodyList(List<HttpBodyCfg> httpReqBodyList) {
|
||||
this.httpReqBodyList = httpReqBodyList;
|
||||
}
|
||||
public List<HttpBodyCfg> getHttpResBodyList() {
|
||||
return httpResBodyList;
|
||||
}
|
||||
public void setHttpResBodyList(List<HttpBodyCfg> httpResBodyList) {
|
||||
this.httpResBodyList = httpResBodyList;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ public class IpPortCfg extends BaseIpCfg {
|
||||
public void initDefaultValue() {
|
||||
// TODO Auto-generated method stub
|
||||
super.initDefaultValue();
|
||||
this.protocolId = 0;
|
||||
// this.protocolId = 0;
|
||||
}
|
||||
public void initDefaultValueImpl(){
|
||||
initDefaultValue();
|
||||
@@ -40,12 +40,12 @@ public class IpPortCfg extends BaseIpCfg {
|
||||
/**
|
||||
* 此表固定写0
|
||||
*/
|
||||
@Override
|
||||
/*@Override
|
||||
public void setProtocolId(Integer protocolId) {
|
||||
// TODO Auto-generated method stub
|
||||
super.setProtocolId(0);
|
||||
}
|
||||
/**
|
||||
*//**
|
||||
* tablename
|
||||
* @return tablename
|
||||
*/
|
||||
|
||||
@@ -61,6 +61,7 @@ import com.nis.web.service.configuration.SslCfgService;
|
||||
import com.nis.web.service.configuration.StringCfgService;
|
||||
import com.nis.web.service.configuration.TunnelCfgService;
|
||||
import com.nis.web.service.configuration.WebCfgService;
|
||||
import com.nis.web.service.configuration.WebsiteCfgService;
|
||||
import com.nis.web.service.specific.SpecificServiceCfgService;
|
||||
import com.nis.web.service.specific.SpecificServiceHostCfgService;
|
||||
import com.nis.web.service.systemService.ServiceConfigInfoService;
|
||||
@@ -149,6 +150,8 @@ public class BaseController {
|
||||
protected AvCfgService avCfgService;
|
||||
@Autowired
|
||||
protected AvContentCfgService avContentCfgService;
|
||||
@Autowired
|
||||
protected WebsiteCfgService websiteCfgService;
|
||||
/**
|
||||
* 管理基础路径
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
package com.nis.web.controller.configuration.ntc;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.authz.annotation.Logical;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.configuration.BaseIpCfg;
|
||||
import com.nis.domain.configuration.CfgIndexInfo;
|
||||
import com.nis.domain.configuration.HttpBodyCfg;
|
||||
import com.nis.domain.configuration.HttpReqHeadCfg;
|
||||
import com.nis.domain.configuration.HttpResHeadCfg;
|
||||
import com.nis.domain.configuration.HttpUrlCfg;
|
||||
import com.nis.domain.configuration.IpPortCfg;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.web.controller.BaseController;
|
||||
|
||||
/**
|
||||
* 白名单
|
||||
* @author dell
|
||||
*
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("${adminPath}/ntc/website/")
|
||||
public class WebsiteController extends BaseController{
|
||||
|
||||
@RequestMapping(value = {"httpList"})
|
||||
@RequiresPermissions(value={"website:http:config"})
|
||||
public String httpList(Model model,@ModelAttribute("cfg")CfgIndexInfo cfg,HttpServletRequest request,HttpServletResponse response) {
|
||||
Page<CfgIndexInfo> searchPage=new Page<CfgIndexInfo>(request,response,"a");
|
||||
Page<CfgIndexInfo> page = websiteCfgService.getHttpList(searchPage, cfg);
|
||||
model.addAttribute("page", page);
|
||||
initPageCondition(model,cfg);
|
||||
return "/cfg/website/httpList";
|
||||
}
|
||||
@RequestMapping(value = {"dnsList"})
|
||||
@RequiresPermissions(value={"website:dns:config"})
|
||||
public String dnsList(Model model,@ModelAttribute("cfg")CfgIndexInfo cfg,HttpServletRequest request,HttpServletResponse response) {
|
||||
Page<CfgIndexInfo> searchPage=new Page<CfgIndexInfo>(request,response,"a");
|
||||
Page<CfgIndexInfo> page = websiteCfgService.findPage(searchPage, cfg);
|
||||
model.addAttribute("page", page);
|
||||
initPageCondition(model,cfg);
|
||||
return "/cfg/website/dnsList";
|
||||
}
|
||||
@RequestMapping(value = {"httpForm"})
|
||||
@RequiresPermissions(value={"website:http:config"})
|
||||
public String httpForm(Model model,String ids,CfgIndexInfo entity) {
|
||||
if(StringUtils.isNotBlank(ids)){
|
||||
entity = websiteCfgService.getHttpCfg(Long.parseLong(ids));
|
||||
}else{
|
||||
List<IpPortCfg> ipList=new ArrayList<IpPortCfg>();
|
||||
ipList.add(new IpPortCfg());
|
||||
entity.setIpPortList(ipList);
|
||||
List<HttpUrlCfg> urlList=new ArrayList<HttpUrlCfg>();
|
||||
urlList.add(new HttpUrlCfg());
|
||||
entity.setHttpUrlList(urlList);
|
||||
List<HttpReqHeadCfg> reqHdrList=new ArrayList<HttpReqHeadCfg>();
|
||||
reqHdrList.add(new HttpReqHeadCfg());
|
||||
entity.setHttpReqHdrList(reqHdrList);
|
||||
List<HttpResHeadCfg> resHdrList=new ArrayList<HttpResHeadCfg>();
|
||||
resHdrList.add(new HttpResHeadCfg());
|
||||
entity.setHttpResHdrList(resHdrList);
|
||||
List<HttpBodyCfg> reqBodyList=new ArrayList<HttpBodyCfg>();
|
||||
reqBodyList.add(new HttpBodyCfg());
|
||||
entity.setHttpReqBodyList(reqBodyList);
|
||||
List<HttpBodyCfg> resBodyList=new ArrayList<HttpBodyCfg>();
|
||||
resBodyList.add(new HttpBodyCfg());
|
||||
entity.setHttpResBodyList(resBodyList);
|
||||
}
|
||||
initFormCondition(model,entity);
|
||||
model.addAttribute("_cfg", entity);
|
||||
return "/cfg/website/httpForm";
|
||||
}
|
||||
@RequestMapping(value = {"saveHttpCfg"})
|
||||
@RequiresPermissions(value={"website:http:config"})
|
||||
public String saveHttpCfg(Model model,HttpServletRequest request,HttpServletResponse response,String ids,CfgIndexInfo entity) {
|
||||
websiteCfgService.saveHttpCfg(entity);
|
||||
return "redirect:" + adminPath +"/ntc/website/httpList?functionId="+entity.getFunctionId();
|
||||
}
|
||||
}
|
||||
@@ -487,6 +487,12 @@
|
||||
<if test="isValid != null" >
|
||||
,is_valid = #{isValid,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="srcUrl != null and srcUrl!=''" >
|
||||
,src_url = #{srcUrl,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="sampleUrl != null and sampleUrl!=''" >
|
||||
,sample_url = #{sampleUrl,jdbcType=VARCHAR}
|
||||
</if>
|
||||
where cfg_id = #{cfgId,jdbcType=BIGINT}
|
||||
</update>
|
||||
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.nis.web.dao.configuration;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.nis.domain.configuration.CfgIndexInfo;
|
||||
import com.nis.domain.configuration.HttpBodyCfg;
|
||||
import com.nis.domain.configuration.HttpReqHeadCfg;
|
||||
import com.nis.domain.configuration.HttpResHeadCfg;
|
||||
import com.nis.domain.configuration.HttpUrlCfg;
|
||||
import com.nis.domain.configuration.IpPortCfg;
|
||||
import com.nis.web.dao.CrudDao;
|
||||
import com.nis.web.dao.MyBatisDao;
|
||||
|
||||
|
||||
/**
|
||||
* WEB相关配置数据处理类
|
||||
* @author dell
|
||||
*
|
||||
*/
|
||||
@MyBatisDao
|
||||
public interface WebsiteCfgDao extends CrudDao<CfgIndexInfo>{
|
||||
|
||||
public CfgIndexInfo getCfgIndexInfo(Long id);
|
||||
public List<CfgIndexInfo> getHttpList(CfgIndexInfo entity);
|
||||
public List<IpPortCfg> getIpPortList(CfgIndexInfo entity);
|
||||
public List<HttpUrlCfg> getHttpUrlList(CfgIndexInfo entity);
|
||||
public List<HttpResHeadCfg> getHttpResHdrList(CfgIndexInfo entity);
|
||||
public List<HttpBodyCfg> getHttpResBodyList(CfgIndexInfo entity);
|
||||
public List<HttpReqHeadCfg> getHttpReqHdrList(CfgIndexInfo entity);
|
||||
public List<HttpBodyCfg> getHttpReqBodyList(CfgIndexInfo entity);
|
||||
public void saveCfgIndex(CfgIndexInfo entity);
|
||||
public void saveHttpIpCfg(IpPortCfg entity);
|
||||
public void saveHttpUrlCfg(HttpUrlCfg entity);
|
||||
public void saveHttpReqHdrCfg(HttpReqHeadCfg entity);
|
||||
public void saveHttpResHdrCfg(HttpResHeadCfg entity);
|
||||
public void saveHttpBodyCfg(HttpBodyCfg entity);
|
||||
public void deleteHttpIpCfg(CfgIndexInfo entity);
|
||||
public void deleteHttpUrlCfg(CfgIndexInfo entity);
|
||||
public void deleteHttpReqHdrCfg(CfgIndexInfo entity);
|
||||
public void deleteHttpResHdrCfg(CfgIndexInfo entity);
|
||||
public void deleteHttpBodyCfg(CfgIndexInfo entity);
|
||||
public void updateCfgIndex(CfgIndexInfo entity);
|
||||
public void updateHttpIpCfg(IpPortCfg entity);
|
||||
public void updateHttpUrlCfg(HttpUrlCfg entity);
|
||||
public void updateHttpReqHdrCfg(HttpReqHeadCfg entity);
|
||||
public void updateHttpResHdrCfg(HttpResHeadCfg entity);
|
||||
public void updateHttpBodyCfg(HttpBodyCfg entity);
|
||||
|
||||
}
|
||||
772
src/main/java/com/nis/web/dao/configuration/WebsiteCfgDao.xml
Normal file
772
src/main/java/com/nis/web/dao/configuration/WebsiteCfgDao.xml
Normal file
@@ -0,0 +1,772 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.nis.web.dao.configuration.WebsiteCfgDao" >
|
||||
|
||||
<resultMap id="CfgIndexInfoMap" type="com.nis.domain.configuration.CfgIndexInfo" >
|
||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
||||
<result column="action" property="action" jdbcType="INTEGER" />
|
||||
<result column="is_valid" property="isValid" jdbcType="INTEGER" />
|
||||
<result column="is_audit" property="isAudit" jdbcType="INTEGER" />
|
||||
<result column="creator_id" property="creatorId" jdbcType="INTEGER" />
|
||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
|
||||
<result column="editor_id" property="editorId" jdbcType="INTEGER" />
|
||||
<result column="edit_time" property="editTime" jdbcType="TIMESTAMP" />
|
||||
<result column="auditor_id" property="auditorId" jdbcType="INTEGER" />
|
||||
<result column="audit_time" property="auditTime" jdbcType="TIMESTAMP" />
|
||||
<result column="service_id" property="serviceId" jdbcType="INTEGER" />
|
||||
<result column="request_id" property="requestId" jdbcType="INTEGER" />
|
||||
<result column="compile_id" property="compileId" jdbcType="INTEGER" />
|
||||
<result column="is_area_effective" property="isAreaEffective" jdbcType="INTEGER" />
|
||||
<result column="classify" property="classify" jdbcType="VARCHAR" />
|
||||
<result column="attribute" property="attribute" jdbcType="VARCHAR" />
|
||||
<result column="lable" property="lable" jdbcType="VARCHAR" />
|
||||
<result column="area_effective_ids" property="areaEffectiveIds" jdbcType="VARCHAR" />
|
||||
<result column="function_id" property="functionId" jdbcType="INTEGER" />
|
||||
</resultMap>
|
||||
<resultMap id="ipPortMap" type="com.nis.domain.configuration.IpPortCfg" >
|
||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
||||
<result column="ip_type" property="ipType" jdbcType="INTEGER" />
|
||||
<result column="ip_pattern" property="ipPattern" jdbcType="INTEGER" />
|
||||
<result column="dest_ip_address" property="destIpAddress" jdbcType="VARCHAR" />
|
||||
<result column="src_ip_address" property="srcIpAddress" jdbcType="VARCHAR" />
|
||||
<result column="dest_port" property="destPort" jdbcType="VARCHAR" />
|
||||
<result column="src_port" property="srcPort" jdbcType="VARCHAR" />
|
||||
<result column="port_pattern" property="portPattern" jdbcType="INTEGER" />
|
||||
<result column="direction" property="direction" jdbcType="INTEGER" />
|
||||
<result column="protocol" property="protocol" jdbcType="INTEGER" />
|
||||
<result column="protocol_id" property="protocolId" jdbcType="INTEGER" />
|
||||
<result column="action" property="action" jdbcType="INTEGER" />
|
||||
<result column="is_valid" property="isValid" jdbcType="INTEGER" />
|
||||
<result column="is_audit" property="isAudit" jdbcType="INTEGER" />
|
||||
<result column="creator_id" property="creatorId" jdbcType="INTEGER" />
|
||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
|
||||
<result column="editor_id" property="editorId" jdbcType="INTEGER" />
|
||||
<result column="edit_time" property="editTime" jdbcType="TIMESTAMP" />
|
||||
<result column="auditor_id" property="auditorId" jdbcType="INTEGER" />
|
||||
<result column="audit_time" property="auditTime" jdbcType="TIMESTAMP" />
|
||||
<result column="service_id" property="serviceId" jdbcType="INTEGER" />
|
||||
<result column="request_id" property="requestId" jdbcType="INTEGER" />
|
||||
<result column="compile_id" property="compileId" jdbcType="INTEGER" />
|
||||
<result column="is_area_effective" property="isAreaEffective" jdbcType="INTEGER" />
|
||||
<result column="classify" property="classify" jdbcType="VARCHAR" />
|
||||
<result column="attribute" property="attribute" jdbcType="VARCHAR" />
|
||||
<result column="lable" property="lable" jdbcType="VARCHAR" />
|
||||
<result column="area_effective_ids" property="areaEffectiveIds" jdbcType="VARCHAR" />
|
||||
<result column="function_id" property="functionId" jdbcType="INTEGER" />
|
||||
<result column="cfg_region_code" property="cfgRegionCode" jdbcType="INTEGER" />
|
||||
<result column="cfg_type" property="cfgType" jdbcType="VARCHAR" />
|
||||
</resultMap>
|
||||
<resultMap id="stringCfgMap" type="com.nis.domain.configuration.BaseStringCfg" >
|
||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
||||
<result column="cfg_keywords" property="cfgKeywords" jdbcType="VARCHAR" />
|
||||
<result column="cfg_type" property="cfgType" jdbcType="VARCHAR" />
|
||||
<result column="action" property="action" jdbcType="INTEGER" />
|
||||
<result column="is_valid" property="isValid" jdbcType="INTEGER" />
|
||||
<result column="is_audit" property="isAudit" jdbcType="INTEGER" />
|
||||
<result column="creator_id" property="creatorId" jdbcType="INTEGER" />
|
||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
|
||||
<result column="editor_id" property="editorId" jdbcType="INTEGER" />
|
||||
<result column="edit_time" property="editTime" jdbcType="TIMESTAMP" />
|
||||
<result column="auditor_id" property="auditorId" jdbcType="INTEGER" />
|
||||
<result column="audit_time" property="auditTime" jdbcType="TIMESTAMP" />
|
||||
<result column="service_id" property="serviceId" jdbcType="INTEGER" />
|
||||
<result column="request_id" property="requestId" jdbcType="INTEGER" />
|
||||
<result column="compile_id" property="compileId" jdbcType="INTEGER" />
|
||||
<result column="is_area_effective" property="isAreaEffective" jdbcType="INTEGER" />
|
||||
<result column="classify" property="classify" jdbcType="VARCHAR" />
|
||||
<result column="attribute" property="attribute" jdbcType="VARCHAR" />
|
||||
<result column="lable" property="lable" jdbcType="VARCHAR" />
|
||||
<result column="expr_type " property="exprType" jdbcType="INTEGER" />
|
||||
<result column="match_method" property="matchMethod" jdbcType="INTEGER" />
|
||||
<result column="is_hexbin" property="isHexbin" jdbcType="INTEGER" />
|
||||
<result column="area_effective_ids" property="areaEffectiveIds" jdbcType="VARCHAR" />
|
||||
<result column="function_id" property="functionId" jdbcType="INTEGER" />
|
||||
<result column="cfg_region_code" property="cfgRegionCode" jdbcType="INTEGER" />
|
||||
<result column="cfg_type" property="cfgType" jdbcType="VARCHAR" />
|
||||
</resultMap>
|
||||
<resultMap id="complexCfgMap" type="com.nis.domain.configuration.ComplexkeywordCfg" >
|
||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
||||
<result column="cfg_keywords" property="cfgKeywords" jdbcType="VARCHAR" />
|
||||
<result column="district" property="district" jdbcType="VARCHAR" />
|
||||
<result column="cfg_type" property="cfgType" jdbcType="VARCHAR" />
|
||||
<result column="action" property="action" jdbcType="INTEGER" />
|
||||
<result column="is_valid" property="isValid" jdbcType="INTEGER" />
|
||||
<result column="is_audit" property="isAudit" jdbcType="INTEGER" />
|
||||
<result column="creator_id" property="creatorId" jdbcType="INTEGER" />
|
||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
|
||||
<result column="editor_id" property="editorId" jdbcType="INTEGER" />
|
||||
<result column="edit_time" property="editTime" jdbcType="TIMESTAMP" />
|
||||
<result column="auditor_id" property="auditorId" jdbcType="INTEGER" />
|
||||
<result column="audit_time" property="auditTime" jdbcType="TIMESTAMP" />
|
||||
<result column="service_id" property="serviceId" jdbcType="INTEGER" />
|
||||
<result column="request_id" property="requestId" jdbcType="INTEGER" />
|
||||
<result column="compile_id" property="compileId" jdbcType="INTEGER" />
|
||||
<result column="is_area_effective" property="isAreaEffective" jdbcType="INTEGER" />
|
||||
<result column="classify" property="classify" jdbcType="VARCHAR" />
|
||||
<result column="attribute" property="attribute" jdbcType="VARCHAR" />
|
||||
<result column="lable" property="lable" jdbcType="VARCHAR" />
|
||||
<result column="expr_type " property="exprType" jdbcType="INTEGER" />
|
||||
<result column="match_method" property="matchMethod" jdbcType="INTEGER" />
|
||||
<result column="is_hexbin" property="isHexbin" jdbcType="INTEGER" />
|
||||
<result column="area_effective_ids" property="areaEffectiveIds" jdbcType="VARCHAR" />
|
||||
<result column="function_id" property="functionId" jdbcType="INTEGER" />
|
||||
<result column="cfg_region_code" property="cfgRegionCode" jdbcType="INTEGER" />
|
||||
<result column="cfg_type" property="cfgType" jdbcType="VARCHAR" />
|
||||
</resultMap>
|
||||
<sql id="ConfigIndex_Column" >
|
||||
a.CFG_ID,a.CFG_DESC,a.ACTION,a.IS_VALID,a.IS_AUDIT,
|
||||
a.CREATOR_ID,a.CREATE_TIME,a.EDITOR_ID,a.EDIT_TIME,a.AUDITOR_ID,a.AUDIT_TIME,
|
||||
a.SERVICE_ID,a.REQUEST_ID,a.COMPILE_ID,a.IS_AREA_EFFECTIVE,a.CLASSIFY,
|
||||
a.ATTRIBUTE,a.LABLE,a.AREA_EFFECTIVE_IDS,a.function_id
|
||||
</sql>
|
||||
<sql id="IpCfg_Column" >
|
||||
a.cfg_id,a.cfg_desc,a.ip_type,a.src_ip_address,a.ip_pattern,a.port_pattern,a.src_port
|
||||
,a.protocol,a.protocol_id,a.direction,a.cfg_type,a.action,a.dest_port,a.dest_ip_address
|
||||
,a.is_valid,a.is_audit,a.creator_id,a.create_time,a.editor_id
|
||||
,a.edit_time,a.auditor_id,a.audit_time,a.service_id,a.request_id,
|
||||
a.compile_id,a.is_area_effective,a.classify,a.attribute,a.lable
|
||||
,a.area_effective_ids,a.function_id,a.cfg_region_code
|
||||
</sql>
|
||||
<sql id="StrCfg_Column" >
|
||||
a.cfg_id,a.cfg_desc,a.cfg_keywords,a.cfg_type,
|
||||
a.action,a.is_valid,a.is_audit,a.creator_id,a.create_time,a.editor_id,a.edit_time, a.auditor_id,
|
||||
a.audit_time,a.service_id,a.request_id,a.compile_id,a.is_area_effective,a.classify,a.attribute,a.lable,
|
||||
a.expr_type,a.match_method,a.is_hexbin,a.area_effective_ids,a.function_id,a.cfg_region_code
|
||||
</sql>
|
||||
<sql id="ComplexCfg_Column" >
|
||||
a.cfg_id,a.cfg_desc,a.cfg_keywords,a.cfg_type,a.district,
|
||||
a.action,a.is_valid,a.is_audit,a.creator_id,a.create_time,a.editor_id,a.edit_time, a.auditor_id,
|
||||
a.audit_time,a.service_id,a.request_id,a.compile_id,a.is_area_effective,a.classify,a.attribute,a.lable,
|
||||
a.expr_type,a.match_method,a.is_hexbin,a.area_effective_ids,a.function_id,a.cfg_region_code
|
||||
</sql>
|
||||
<select id="getHttpList" resultMap="CfgIndexInfoMap" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
|
||||
SELECT
|
||||
<include refid="ConfigIndex_Column" />
|
||||
<trim prefix="," prefixOverrides=",">
|
||||
, s.name as creator_name,e.name as editor_name,u.name as auditor_name
|
||||
,ri.request_title as requestName
|
||||
</trim>
|
||||
FROM cfg_index_info a
|
||||
left join sys_user s on a.creator_id=s.id
|
||||
left join sys_user e on a.editor_id=e.id
|
||||
left join sys_user u on a.auditor_id=u.id
|
||||
left join request_info ri on a.request_id=ri.id
|
||||
|
||||
<trim prefix="WHERE" prefixOverrides="AND |OR ">
|
||||
<if test="page !=null and page.where != null and page.where != ''">
|
||||
AND ${page.where}
|
||||
</if>
|
||||
<if test="cfgId != null">
|
||||
AND a.CFG_ID=#{cfgId,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="cfgDesc != null and cfgDesc != ''">
|
||||
AND a.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="action != null">
|
||||
AND a.ACTION=#{action,jdbcType=INTEGER}
|
||||
</if>
|
||||
<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>
|
||||
<if test="creatorName != null and creatorName != ''">
|
||||
AND CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="editorName != null and editorName != ''">
|
||||
AND EDITOR_NAME like concat(concat('%',#{editorName,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="auditorName != null and auditorName != ''">
|
||||
AND AUDITOR_NAME like concat(concat('%',#{auditorName,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="serviceId != null">
|
||||
AND a.SERVICE_ID=#{serviceId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="requestId != null">
|
||||
AND a.REQUEST_ID=#{requestId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="compileId != null">
|
||||
AND a.COMPILE_ID=#{compileId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isAreaEffective != null">
|
||||
AND a.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="classify != null and classify != ''">
|
||||
AND a.classify like concat(concat('%',#{classify,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="attribute != null and attribute != ''">
|
||||
AND a.attribute like concat(concat('%',#{attribute,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="lable != null and lable != ''">
|
||||
AND a.lable like concat(concat('%',#{lable,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="areaEffectiveIds != null and areaEffectiveIds != ''">
|
||||
AND a.AREA_EFFECTIVE_IDS like concat(concat('%',#{areaEffectiveIds,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="functionId != null">
|
||||
AND a.function_id=#{functionId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="ipPort!=null">
|
||||
AND a.compile_id in (select t.compile_id from ip_port_cfg t
|
||||
<where>
|
||||
and t.protocol_id=4
|
||||
<if test="ipPort.srcIpAddress != null and ipPort.srcIpAddress != ''">
|
||||
and t.src_ip_address =#{(ipPort.srcIpAddress,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="ipPort.srcPort != null and ipPort.srcPort != ''">
|
||||
and t.src_port =#{ipPort.srcPort,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="ipPort.destIpAddress != null and ipPort.destIpAddress != ''">
|
||||
and t.dest_ip_address =#{(ipPort.destIpAddress,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="ipPort.destPort != null and ipPort.destPort != ''">
|
||||
and t.dest_port =#{ipPort.destPort,jdbcType=VARCHAR}
|
||||
</if>
|
||||
</where>
|
||||
)
|
||||
</if>
|
||||
<if test="httpUrl!=null">
|
||||
AND a.compile_id in (select f.compile_id from http_url_cfg f
|
||||
<where>
|
||||
<if test="httpUrl.cfgKeywords != null and httpUrl.cfgKeywords != ''">
|
||||
and f.cfg_keywords like concat(concat('%',#{httpUrl.cfgKeywords,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
|
||||
</where>
|
||||
)
|
||||
</if>
|
||||
<if test="httpReqBody!=null">
|
||||
AND a.compile_id in (select f.compile_id from http_body_cfg f
|
||||
<where>
|
||||
and cfg_type='http_req_body'
|
||||
<if test="httpReqBody.cfgKeywords != null and httpReqBody.cfgKeywords != ''">
|
||||
and f.cfg_keywords like concat(concat('%',#{httpReqBody.cfgKeywords,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
|
||||
</where>
|
||||
)
|
||||
</if>
|
||||
<if test="httpResBody!=null">
|
||||
AND a.compile_id in (select f.compile_id from http_body_cfg f
|
||||
<where>
|
||||
and cfg_type='http_res_body'
|
||||
<if test="httpResBody.cfgKeywords != null and httpResBody.cfgKeywords != ''">
|
||||
and f.cfg_keywords like concat(concat('%',#{httpResBody.cfgKeywords,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
|
||||
</where>
|
||||
)
|
||||
</if>
|
||||
<if test="httpReqHdr!=null">
|
||||
AND a.compile_id in (select f.compile_id from http_req_head_cfg f
|
||||
<where>
|
||||
<if test="httpReqHdr.cfgKeywords != null and httpReqHdr.cfgKeywords != ''">
|
||||
and f.cfg_keywords like concat(concat('%',#{httpReqHdr.cfgKeywords,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="httpReqHdr.district != null and httpReqHdr.district != ''">
|
||||
and f.district like concat(concat('%',#{httpReqHdr.district,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
</where>
|
||||
)
|
||||
</if>
|
||||
<if test="httpResHdr!=null">
|
||||
AND a.compile_id in (select f.compile_id from http_res_head_cfg f
|
||||
<where>
|
||||
<if test="httpResHdr.cfgKeywords != null and httpResHdr.cfgKeywords != ''">
|
||||
and f.cfg_keywords like concat(concat('%',#{httpResHdr.cfgKeywords,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="httpResHdr.district != null and httpResHdr.district != ''">
|
||||
and f.district like concat(concat('%',#{httpResHdr.district,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
</where>
|
||||
)
|
||||
</if>
|
||||
<!-- 数据范围过滤 -->
|
||||
${sqlMap.dsf}
|
||||
</trim>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY a.CFG_ID desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
<select id="getCfgIndexInfo" resultMap="CfgIndexInfoMap" parameterType="java.lang.Long">
|
||||
SELECT
|
||||
<include refid="ConfigIndex_Column" />
|
||||
FROM cfg_index_info a where cfg_id=#{cfgId}
|
||||
</select>
|
||||
<select id="getIpPortList" resultMap="ipPortMap" parameterType="com.nis.domain.configuration.CfgIndexInfo">
|
||||
SELECT
|
||||
<include refid="IpCfg_Column" />
|
||||
FROM ip_port_cfg a where compile_id=#{compileId} and is_valid=#{isValid} and is_audit=#{isAudit}
|
||||
</select>
|
||||
<select id="getHttpUrlList" resultMap="stringCfgMap">
|
||||
SELECT
|
||||
<include refid="StrCfg_Column" />
|
||||
FROM http_url_cfg a where compile_id=#{compileId} and is_valid=#{isValid} and is_audit=#{isAudit}
|
||||
</select>
|
||||
<select id="getHttpReqBodyList" resultMap="stringCfgMap" parameterType="com.nis.domain.configuration.CfgIndexInfo">
|
||||
SELECT
|
||||
<include refid="StrCfg_Column" />
|
||||
FROM http_body_cfg a where compile_id=#{compileId} and cfg_type='http_req_body' and is_valid=#{isValid} and is_audit=#{isAudit}
|
||||
</select>
|
||||
<select id="getHttpResBodyList" resultMap="stringCfgMap" parameterType="com.nis.domain.configuration.CfgIndexInfo">
|
||||
SELECT
|
||||
<include refid="StrCfg_Column" />
|
||||
FROM http_body_cfg a where compile_id=#{compileId} and cfg_type='http_res_body' and is_valid=#{isValid} and is_audit=#{isAudit}
|
||||
</select>
|
||||
<select id="getHttpReqHdrList" resultMap="complexCfgMap" parameterType="com.nis.domain.configuration.CfgIndexInfo">
|
||||
SELECT
|
||||
<include refid="ComplexCfg_Column" />
|
||||
FROM http_req_head_cfg a where compile_id=#{compileId} and is_valid=#{isValid} and is_audit=#{isAudit}
|
||||
</select>
|
||||
<select id="getHttpResHdrList" resultMap="complexCfgMap" parameterType="com.nis.domain.configuration.CfgIndexInfo">
|
||||
SELECT
|
||||
<include refid="ComplexCfg_Column" />
|
||||
FROM http_res_head_cfg a where compile_id=#{compileId} and is_valid=#{isValid} and is_audit=#{isAudit}
|
||||
</select>
|
||||
|
||||
<!-- insert cfgIndexInfox -->
|
||||
<insert id="saveCfgIndex" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
|
||||
<selectKey resultType="java.lang.Long" order="AFTER" keyProperty="cfgId">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into cfg_index_info(
|
||||
CFG_DESC,
|
||||
ACTION,
|
||||
IS_VALID,
|
||||
IS_AUDIT,
|
||||
CREATOR_ID,
|
||||
CREATE_TIME,
|
||||
EDITOR_ID,
|
||||
EDIT_TIME,
|
||||
AUDITOR_ID,
|
||||
AUDIT_TIME,
|
||||
SERVICE_ID,
|
||||
REQUEST_ID,
|
||||
COMPILE_ID,
|
||||
IS_AREA_EFFECTIVE,
|
||||
CLASSIFY,
|
||||
ATTRIBUTE,
|
||||
LABLE,
|
||||
AREA_EFFECTIVE_IDS,
|
||||
function_id
|
||||
)values (
|
||||
#{cfgDesc,jdbcType=VARCHAR},
|
||||
#{action,jdbcType=INTEGER},
|
||||
0,
|
||||
0,
|
||||
#{creatorId,jdbcType=INTEGER},
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
#{editorId,jdbcType=INTEGER},
|
||||
#{editTime,jdbcType=TIMESTAMP},
|
||||
#{auditorId,jdbcType=INTEGER},
|
||||
#{auditTime,jdbcType=TIMESTAMP},
|
||||
#{serviceId,jdbcType=INTEGER},
|
||||
#{requestId,jdbcType=INTEGER},
|
||||
#{compileId,jdbcType=INTEGER},
|
||||
#{isAreaEffective,jdbcType=INTEGER},
|
||||
#{classify,jdbcType=VARCHAR},
|
||||
#{attribute,jdbcType=VARCHAR},
|
||||
#{lable,jdbcType=VARCHAR},
|
||||
#{areaEffectiveIds,jdbcType=VARCHAR},
|
||||
#{functionId,jdbcType=INTEGER}
|
||||
)
|
||||
</insert>
|
||||
<!-- insert ip_port_cfg表信息 -->
|
||||
<insert id="saveHttpIpCfg" parameterType="com.nis.domain.configuration.IpPortCfg" >
|
||||
<selectKey resultType="java.lang.Long" order="AFTER" keyProperty="cfgId">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into ip_port_cfg (
|
||||
CFG_DESC,
|
||||
ACTION,
|
||||
IS_VALID,
|
||||
IS_AUDIT,
|
||||
CREATOR_ID,
|
||||
CREATE_TIME,
|
||||
EDITOR_ID,
|
||||
EDIT_TIME,
|
||||
AUDITOR_ID,
|
||||
AUDIT_TIME,
|
||||
SERVICE_ID,
|
||||
REQUEST_ID,
|
||||
COMPILE_ID,
|
||||
IS_AREA_EFFECTIVE,
|
||||
CLASSIFY,
|
||||
ATTRIBUTE,
|
||||
LABLE,
|
||||
AREA_EFFECTIVE_IDS,
|
||||
function_id,
|
||||
ip_type,
|
||||
src_ip_address,
|
||||
ip_pattern,
|
||||
port_pattern,
|
||||
src_port,
|
||||
protocol,
|
||||
protocol_id,
|
||||
direction,
|
||||
dest_port,
|
||||
dest_ip_address,
|
||||
cfg_type,
|
||||
cfg_region_code
|
||||
)values (
|
||||
#{cfgDesc,jdbcType=VARCHAR},
|
||||
#{action,jdbcType=INTEGER},
|
||||
0,
|
||||
0,
|
||||
#{creatorId,jdbcType=INTEGER},
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
#{editorId,jdbcType=INTEGER},
|
||||
#{editTime,jdbcType=TIMESTAMP},
|
||||
#{auditorId,jdbcType=INTEGER},
|
||||
#{auditTime,jdbcType=TIMESTAMP},
|
||||
#{serviceId,jdbcType=INTEGER},
|
||||
#{requestId,jdbcType=INTEGER},
|
||||
#{compileId,jdbcType=INTEGER},
|
||||
#{isAreaEffective,jdbcType=INTEGER},
|
||||
#{classify,jdbcType=VARCHAR},
|
||||
#{attribute,jdbcType=VARCHAR},
|
||||
#{lable,jdbcType=VARCHAR},
|
||||
#{areaEffectiveIds,jdbcType=VARCHAR},
|
||||
#{functionId,jdbcType=INTEGER},
|
||||
#{ipType,jdbcType=INTEGER},
|
||||
#{srcIpAddress,jdbcType=VARCHAR},
|
||||
#{ipPattern,jdbcType=INTEGER},
|
||||
#{portPattern,jdbcType=INTEGER},
|
||||
#{srcPort,jdbcType=VARCHAR},
|
||||
#{protocol,jdbcType=INTEGER},
|
||||
#{protocolId,jdbcType=INTEGER},
|
||||
#{direction,jdbcType=INTEGER},
|
||||
#{destPort,jdbcType=VARCHAR},
|
||||
#{destIpAddress,jdbcType=VARCHAR},
|
||||
#{cfgType,jdbcType=VARCHAR},
|
||||
#{cfgRegionCode,jdbcType=INTEGER}
|
||||
)
|
||||
</insert>
|
||||
<!-- insert http_req_hdr_cfg表信息 -->
|
||||
<insert id="saveHttpReqHdrCfg" parameterType="com.nis.domain.configuration.HttpReqHeadCfg" >
|
||||
<selectKey resultType="java.lang.Long" order="AFTER" keyProperty="cfgId">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into http_req_head_cfg (
|
||||
CFG_DESC,
|
||||
ACTION,
|
||||
IS_VALID,
|
||||
IS_AUDIT,
|
||||
CREATOR_ID,
|
||||
CREATE_TIME,
|
||||
EDITOR_ID,
|
||||
EDIT_TIME,
|
||||
AUDITOR_ID,
|
||||
AUDIT_TIME,
|
||||
SERVICE_ID,
|
||||
REQUEST_ID,
|
||||
COMPILE_ID,
|
||||
IS_AREA_EFFECTIVE,
|
||||
CLASSIFY,
|
||||
ATTRIBUTE,
|
||||
LABLE,
|
||||
AREA_EFFECTIVE_IDS,
|
||||
function_id,
|
||||
district,
|
||||
cfg_keywords,
|
||||
cfg_type,
|
||||
cfg_region_code,
|
||||
expr_type,
|
||||
match_method,
|
||||
is_hexbin
|
||||
)values (
|
||||
#{cfgDesc,jdbcType=VARCHAR},
|
||||
#{action,jdbcType=INTEGER},
|
||||
0,
|
||||
0,
|
||||
#{creatorId,jdbcType=INTEGER},
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
#{editorId,jdbcType=INTEGER},
|
||||
#{editTime,jdbcType=TIMESTAMP},
|
||||
#{auditorId,jdbcType=INTEGER},
|
||||
#{auditTime,jdbcType=TIMESTAMP},
|
||||
#{serviceId,jdbcType=INTEGER},
|
||||
#{requestId,jdbcType=INTEGER},
|
||||
#{compileId,jdbcType=INTEGER},
|
||||
#{isAreaEffective,jdbcType=INTEGER},
|
||||
#{classify,jdbcType=VARCHAR},
|
||||
#{attribute,jdbcType=VARCHAR},
|
||||
#{lable,jdbcType=VARCHAR},
|
||||
#{areaEffectiveIds,jdbcType=VARCHAR},
|
||||
#{functionId,jdbcType=INTEGER},
|
||||
#{district,jdbcType=VARCHAR},
|
||||
#{cfgKeywords,jdbcType=VARCHAR},
|
||||
#{cfgType,jdbcType=VARCHAR},
|
||||
#{cfgRegionCode,jdbcType=INTEGER},
|
||||
#{exprType,jdbcType=INTEGER},
|
||||
#{matchMethod,jdbcType=INTEGER},
|
||||
#{isHexbin,jdbcType=INTEGER}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- insert http_res_hdr_cfg表信息 -->
|
||||
<insert id="saveHttpResHdrCfg" parameterType="com.nis.domain.configuration.HttpResHeadCfg" >
|
||||
<selectKey resultType="java.lang.Long" order="AFTER" keyProperty="cfgId">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into http_res_head_cfg (
|
||||
CFG_DESC,
|
||||
ACTION,
|
||||
IS_VALID,
|
||||
IS_AUDIT,
|
||||
CREATOR_ID,
|
||||
CREATE_TIME,
|
||||
EDITOR_ID,
|
||||
EDIT_TIME,
|
||||
AUDITOR_ID,
|
||||
AUDIT_TIME,
|
||||
SERVICE_ID,
|
||||
REQUEST_ID,
|
||||
COMPILE_ID,
|
||||
IS_AREA_EFFECTIVE,
|
||||
CLASSIFY,
|
||||
ATTRIBUTE,
|
||||
LABLE,
|
||||
AREA_EFFECTIVE_IDS,
|
||||
function_id,
|
||||
district,
|
||||
cfg_keywords,
|
||||
cfg_type,
|
||||
cfg_region_code,
|
||||
expr_type,
|
||||
match_method,
|
||||
is_hexbin
|
||||
)values (
|
||||
#{cfgDesc,jdbcType=VARCHAR},
|
||||
#{action,jdbcType=INTEGER},
|
||||
0,
|
||||
0,
|
||||
#{creatorId,jdbcType=INTEGER},
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
#{editorId,jdbcType=INTEGER},
|
||||
#{editTime,jdbcType=TIMESTAMP},
|
||||
#{auditorId,jdbcType=INTEGER},
|
||||
#{auditTime,jdbcType=TIMESTAMP},
|
||||
#{serviceId,jdbcType=INTEGER},
|
||||
#{requestId,jdbcType=INTEGER},
|
||||
#{compileId,jdbcType=INTEGER},
|
||||
#{isAreaEffective,jdbcType=INTEGER},
|
||||
#{classify,jdbcType=VARCHAR},
|
||||
#{attribute,jdbcType=VARCHAR},
|
||||
#{lable,jdbcType=VARCHAR},
|
||||
#{areaEffectiveIds,jdbcType=VARCHAR},
|
||||
#{functionId,jdbcType=INTEGER},
|
||||
#{district,jdbcType=VARCHAR},
|
||||
#{cfgKeywords,jdbcType=VARCHAR},
|
||||
#{cfgType,jdbcType=VARCHAR},
|
||||
#{cfgRegionCode,jdbcType=INTEGER},
|
||||
#{exprType,jdbcType=INTEGER},
|
||||
#{matchMethod,jdbcType=INTEGER},
|
||||
#{isHexbin,jdbcType=INTEGER}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- insert http_body_cfg表信息 -->
|
||||
<insert id="saveHttpBodyCfg" parameterType="com.nis.domain.configuration.HttpBodyCfg" >
|
||||
<selectKey resultType="java.lang.Long" order="AFTER" keyProperty="cfgId">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into http_body_cfg (
|
||||
CFG_DESC,
|
||||
ACTION,
|
||||
IS_VALID,
|
||||
IS_AUDIT,
|
||||
CREATOR_ID,
|
||||
CREATE_TIME,
|
||||
EDITOR_ID,
|
||||
EDIT_TIME,
|
||||
AUDITOR_ID,
|
||||
AUDIT_TIME,
|
||||
SERVICE_ID,
|
||||
REQUEST_ID,
|
||||
COMPILE_ID,
|
||||
IS_AREA_EFFECTIVE,
|
||||
CLASSIFY,
|
||||
ATTRIBUTE,
|
||||
LABLE,
|
||||
AREA_EFFECTIVE_IDS,
|
||||
function_id,
|
||||
cfg_keywords,
|
||||
cfg_type,
|
||||
cfg_region_code,
|
||||
expr_type,
|
||||
match_method,
|
||||
is_hexbin
|
||||
)values (
|
||||
#{cfgDesc,jdbcType=VARCHAR},
|
||||
#{action,jdbcType=INTEGER},
|
||||
0,
|
||||
0,
|
||||
#{creatorId,jdbcType=INTEGER},
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
#{editorId,jdbcType=INTEGER},
|
||||
#{editTime,jdbcType=TIMESTAMP},
|
||||
#{auditorId,jdbcType=INTEGER},
|
||||
#{auditTime,jdbcType=TIMESTAMP},
|
||||
#{serviceId,jdbcType=INTEGER},
|
||||
#{requestId,jdbcType=INTEGER},
|
||||
#{compileId,jdbcType=INTEGER},
|
||||
#{isAreaEffective,jdbcType=INTEGER},
|
||||
#{classify,jdbcType=VARCHAR},
|
||||
#{attribute,jdbcType=VARCHAR},
|
||||
#{lable,jdbcType=VARCHAR},
|
||||
#{areaEffectiveIds,jdbcType=VARCHAR},
|
||||
#{functionId,jdbcType=INTEGER},
|
||||
#{cfgKeywords,jdbcType=VARCHAR},
|
||||
#{cfgType,jdbcType=VARCHAR},
|
||||
#{cfgRegionCode,jdbcType=INTEGER},
|
||||
#{exprType,jdbcType=INTEGER},
|
||||
#{matchMethod,jdbcType=INTEGER},
|
||||
#{isHexbin,jdbcType=INTEGER}
|
||||
)
|
||||
</insert>
|
||||
<!-- insert http_url_cfg表信息 -->
|
||||
<insert id="saveHttpUrlCfg" parameterType="com.nis.domain.configuration.HttpUrlCfg" >
|
||||
<selectKey resultType="java.lang.Long" order="AFTER" keyProperty="cfgId">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into http_url_cfg (
|
||||
CFG_DESC,
|
||||
ACTION,
|
||||
IS_VALID,
|
||||
IS_AUDIT,
|
||||
CREATOR_ID,
|
||||
CREATE_TIME,
|
||||
EDITOR_ID,
|
||||
EDIT_TIME,
|
||||
AUDITOR_ID,
|
||||
AUDIT_TIME,
|
||||
SERVICE_ID,
|
||||
REQUEST_ID,
|
||||
COMPILE_ID,
|
||||
IS_AREA_EFFECTIVE,
|
||||
CLASSIFY,
|
||||
ATTRIBUTE,
|
||||
LABLE,
|
||||
AREA_EFFECTIVE_IDS,
|
||||
function_id,
|
||||
cfg_keywords,
|
||||
cfg_type,
|
||||
cfg_region_code,
|
||||
expr_type,
|
||||
match_method,
|
||||
is_hexbin
|
||||
)values (
|
||||
#{cfgDesc,jdbcType=VARCHAR},
|
||||
#{action,jdbcType=INTEGER},
|
||||
0,
|
||||
0,
|
||||
#{creatorId,jdbcType=INTEGER},
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
#{editorId,jdbcType=INTEGER},
|
||||
#{editTime,jdbcType=TIMESTAMP},
|
||||
#{auditorId,jdbcType=INTEGER},
|
||||
#{auditTime,jdbcType=TIMESTAMP},
|
||||
#{serviceId,jdbcType=INTEGER},
|
||||
#{requestId,jdbcType=INTEGER},
|
||||
#{compileId,jdbcType=INTEGER},
|
||||
#{isAreaEffective,jdbcType=INTEGER},
|
||||
#{classify,jdbcType=VARCHAR},
|
||||
#{attribute,jdbcType=VARCHAR},
|
||||
#{lable,jdbcType=VARCHAR},
|
||||
#{areaEffectiveIds,jdbcType=VARCHAR},
|
||||
#{functionId,jdbcType=INTEGER},
|
||||
#{cfgKeywords,jdbcType=VARCHAR},
|
||||
#{cfgType,jdbcType=VARCHAR},
|
||||
#{cfgRegionCode,jdbcType=INTEGER},
|
||||
#{exprType,jdbcType=INTEGER},
|
||||
#{matchMethod,jdbcType=INTEGER},
|
||||
#{isHexbin,jdbcType=INTEGER}
|
||||
)
|
||||
</insert>
|
||||
<update id="updateCfgIndex" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
|
||||
update cfg_index_info
|
||||
<set >
|
||||
<trim suffixOverrides=",">
|
||||
<if test="cfgDesc != null and cfgDesc != ''" >
|
||||
cfg_desc = #{cfgDesc,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="action != null" >
|
||||
action = #{action,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isValid != null" >
|
||||
is_valid = #{isValid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isAudit != null" >
|
||||
is_audit = #{isAudit,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="creatorId != null" >
|
||||
creator_id = #{creatorId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="createTime != null and createTime != ''" >
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="editorId != null" >
|
||||
editor_id = #{editorId,jdbcType=INTEGER},
|
||||
</if>
|
||||
edit_time = #{editTime,jdbcType=TIMESTAMP},
|
||||
<if test="serviceId != null" >
|
||||
service_id = #{serviceId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="requestId != null" >
|
||||
request_id = #{requestId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isAreaEffective != null" >
|
||||
is_area_effective = #{isAreaEffective,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="classify != null and classify != ''" >
|
||||
classify = #{classify,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="attribute != null and attribute != ''" >
|
||||
attribute = #{attribute,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="lable != null and lable != ''" >
|
||||
lable = #{lable,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="areaEffectiveIds != null" >
|
||||
area_effective_ids = #{areaEffectiveIds,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="functionId != null" >
|
||||
function_id = #{functionId,jdbcType=INTEGER},
|
||||
</if>
|
||||
</trim>
|
||||
</set>
|
||||
where cfg_id = #{cfgId,jdbcType=BIGINT}
|
||||
</update>
|
||||
<!-- 删除http子配置 -->
|
||||
<delete id="deleteHttpIpCfg" >
|
||||
delete from ip_port_cfg where compile_id=#{compileId} and protocol_id=4 and function_id=#{functionId}
|
||||
</delete>
|
||||
<delete id="deleteHttpUrlCfg">
|
||||
delete from http_url_cfg where compile_id=#{compileId} and function_id=#{functionId}
|
||||
</delete>
|
||||
<delete id="deleteHttpReqHdrCfg">
|
||||
delete from http_req_head_cfg where compile_id=#{compileId} and function_id=#{functionId}
|
||||
</delete>
|
||||
<delete id="deleteHttpResHdrCfg">
|
||||
delete from http_res_head_cfg where compile_id=#{compileId} and function_id=#{functionId}
|
||||
</delete>
|
||||
<delete id="deleteHttpBodyCfg">
|
||||
delete from http_body_cfg where compile_id=#{compileId} and function_id=#{functionId}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
@@ -186,7 +186,7 @@ public class AvCfgService extends BaseService{
|
||||
sampleMap.put("key",FileUtils.getPrefix(sampleFile.getName(), false));
|
||||
sampleMap.put("fileName", sampleFile.getName());
|
||||
sampleMap.put("checksum", entity.getSampleMd5());
|
||||
ToMaatResult result2 = ConfigServiceUtil.postFileCfg(null, srcFile, JSONObject.fromObject(sampleMap));
|
||||
ToMaatResult result2 = ConfigServiceUtil.postFileCfg(null, sampleFile, JSONObject.fromObject(sampleMap));
|
||||
logger.info("音视频样例文件上传响应信息:"+result2);
|
||||
|
||||
//获取文件上传响应信息(新的文件访问路径)
|
||||
|
||||
@@ -0,0 +1,209 @@
|
||||
package com.nis.web.service.configuration;
|
||||
|
||||
import java.beans.PropertyDescriptor;
|
||||
import java.lang.reflect.Method;
|
||||
import java.lang.reflect.Modifier;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.BeansException;
|
||||
import org.springframework.beans.FatalBeanException;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.ClassUtils;
|
||||
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.configuration.BaseIpCfg;
|
||||
import com.nis.domain.configuration.CfgIndexInfo;
|
||||
import com.nis.domain.configuration.HttpBodyCfg;
|
||||
import com.nis.domain.configuration.HttpReqHeadCfg;
|
||||
import com.nis.domain.configuration.HttpResHeadCfg;
|
||||
import com.nis.domain.configuration.HttpUrlCfg;
|
||||
import com.nis.domain.configuration.IpPortCfg;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
import com.nis.util.ConfigServiceUtil;
|
||||
import com.nis.web.dao.configuration.IpCfgDao;
|
||||
import com.nis.web.dao.configuration.WebsiteCfgDao;
|
||||
import com.nis.web.service.BaseService;
|
||||
import com.nis.web.service.CrudService;
|
||||
|
||||
/**
|
||||
* 网站相关配置事务类
|
||||
* @author dell
|
||||
*
|
||||
*/
|
||||
@Service
|
||||
public class WebsiteCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo> {
|
||||
@Autowired
|
||||
protected WebsiteCfgDao websiteCfgDao;
|
||||
|
||||
public CfgIndexInfo getHttpCfg(Long cfgId){
|
||||
CfgIndexInfo entity = websiteCfgDao.getCfgIndexInfo(cfgId);
|
||||
List<IpPortCfg> ipPortList = websiteCfgDao.getIpPortList(entity);
|
||||
List<HttpUrlCfg> httpUrlList = websiteCfgDao.getHttpUrlList(entity);
|
||||
List<HttpReqHeadCfg> httpReqHdrList = websiteCfgDao.getHttpReqHdrList(entity);
|
||||
List<HttpResHeadCfg> httpResHdrList = websiteCfgDao.getHttpResHdrList(entity);
|
||||
List<HttpBodyCfg> httpReqBodyList = websiteCfgDao.getHttpReqBodyList(entity);
|
||||
List<HttpBodyCfg> httpResBodyList = websiteCfgDao.getHttpResBodyList(entity);
|
||||
if(ipPortList.size()==0){
|
||||
ipPortList.add(new IpPortCfg());
|
||||
}
|
||||
if(httpUrlList.size()==0){
|
||||
httpUrlList.add(new HttpUrlCfg());
|
||||
}
|
||||
if(httpReqHdrList.size()==0){
|
||||
httpReqHdrList.add(new HttpReqHeadCfg());
|
||||
}
|
||||
if(httpResHdrList.size()==0){
|
||||
httpResHdrList.add(new HttpResHeadCfg());
|
||||
}
|
||||
if(httpReqBodyList.size()==0){
|
||||
httpReqBodyList.add(new HttpBodyCfg());
|
||||
}
|
||||
if(httpResBodyList.size()==0){
|
||||
httpResBodyList.add(new HttpBodyCfg());
|
||||
}
|
||||
entity.setIpPortList(ipPortList);
|
||||
entity.setHttpReqBodyList(httpReqBodyList);
|
||||
entity.setHttpReqHdrList(httpReqHdrList);
|
||||
entity.setHttpResBodyList(httpResBodyList);
|
||||
entity.setHttpResHdrList(httpResHdrList);
|
||||
entity.setHttpUrlList(httpUrlList);
|
||||
return entity;
|
||||
}
|
||||
public Page<CfgIndexInfo> getHttpList(Page<CfgIndexInfo> page, CfgIndexInfo entity){
|
||||
// 生成数据权限过滤条件(dsf为dataScopeFilter的简写,在xml中使用 ${sqlMap.dsf}调用权限SQL)
|
||||
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"a"));
|
||||
entity.setPage(page);
|
||||
List<CfgIndexInfo> list = websiteCfgDao.getHttpList(entity);
|
||||
page.setList(list);
|
||||
return page;
|
||||
}
|
||||
public List<IpPortCfg> getHttpIpList(IpPortCfg entity){
|
||||
return null;
|
||||
}
|
||||
public List<HttpUrlCfg> getHttpUrlList(HttpUrlCfg entity){
|
||||
return null;
|
||||
}
|
||||
public List<HttpResHeadCfg> getHttpResHdrList(HttpResHeadCfg entity){
|
||||
return null;
|
||||
}
|
||||
public List<HttpBodyCfg> getHttpResBodyList(HttpBodyCfg entity){
|
||||
return null;
|
||||
}
|
||||
public List<HttpReqHeadCfg> getHttpReqHdrList(HttpReqHeadCfg entity){
|
||||
return null;
|
||||
}
|
||||
public List<HttpBodyCfg> getHttpReqBodyList(HttpBodyCfg entity){
|
||||
return null;
|
||||
}
|
||||
public void saveHttpCfg(CfgIndexInfo entity){
|
||||
if(entity.getCfgId()==null){
|
||||
Integer compileId = 0;
|
||||
try {
|
||||
List<Integer> idList = ConfigServiceUtil.getId(1, 1);
|
||||
if(idList!=null && idList.size()>0){
|
||||
compileId = idList.get(0);
|
||||
}
|
||||
entity.setCompileId(compileId);
|
||||
entity.setCreateTime(new Date());
|
||||
entity.setCreatorId(entity.getCurrentUser().getId());
|
||||
websiteCfgDao.saveCfgIndex(entity);
|
||||
if(entity.getIpPortList()!=null){
|
||||
for(IpPortCfg cfg:entity.getIpPortList()){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
websiteCfgDao.saveHttpIpCfg(cfg);
|
||||
}
|
||||
}
|
||||
if(entity.getHttpUrlList()!=null){
|
||||
for(HttpUrlCfg cfg:entity.getHttpUrlList()){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
websiteCfgDao.saveHttpUrlCfg(cfg);
|
||||
}
|
||||
}
|
||||
if(entity.getHttpReqHdrList()!=null){
|
||||
for(HttpReqHeadCfg cfg:entity.getHttpReqHdrList()){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
websiteCfgDao.saveHttpReqHdrCfg(cfg);
|
||||
}
|
||||
}
|
||||
if(entity.getHttpResHdrList()!=null){
|
||||
for(HttpResHeadCfg cfg:entity.getHttpResHdrList()){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
websiteCfgDao.saveHttpResHdrCfg(cfg);
|
||||
}
|
||||
}
|
||||
if(entity.getHttpReqBodyList()!=null){
|
||||
for(HttpBodyCfg cfg:entity.getHttpReqBodyList()){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
websiteCfgDao.saveHttpBodyCfg(cfg);
|
||||
}
|
||||
}
|
||||
if(entity.getHttpResBodyList()!=null){
|
||||
for(HttpBodyCfg cfg:entity.getHttpResBodyList()){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
websiteCfgDao.saveHttpBodyCfg(cfg);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.info("获取编译ID出错");
|
||||
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>:"+e.getMessage());
|
||||
}
|
||||
|
||||
}else{
|
||||
websiteCfgDao.updateCfgIndex(entity);
|
||||
// entity = websiteCfgDao.getCfgIndexInfo(entity.getCfgId());
|
||||
//无效子配置后,再新增子配置
|
||||
websiteCfgDao.deleteHttpIpCfg(entity);
|
||||
websiteCfgDao.deleteHttpUrlCfg(entity);
|
||||
websiteCfgDao.deleteHttpReqHdrCfg(entity);
|
||||
websiteCfgDao.deleteHttpResHdrCfg(entity);
|
||||
websiteCfgDao.deleteHttpBodyCfg(entity);
|
||||
entity.setCreateTime(new Date());
|
||||
entity.setCreatorId(entity.getCurrentUser().getId());
|
||||
if(entity.getIpPortList()!=null){
|
||||
for(IpPortCfg cfg:entity.getIpPortList()){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
websiteCfgDao.saveHttpIpCfg(cfg);
|
||||
}
|
||||
}
|
||||
if(entity.getHttpUrlList()!=null){
|
||||
for(HttpUrlCfg cfg:entity.getHttpUrlList()){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
websiteCfgDao.saveHttpUrlCfg(cfg);
|
||||
}
|
||||
}
|
||||
if(entity.getHttpReqHdrList()!=null){
|
||||
for(HttpReqHeadCfg cfg:entity.getHttpReqHdrList()){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
websiteCfgDao.saveHttpReqHdrCfg(cfg);
|
||||
}
|
||||
}
|
||||
if(entity.getHttpResHdrList()!=null){
|
||||
for(HttpResHeadCfg cfg:entity.getHttpResHdrList()){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
websiteCfgDao.saveHttpResHdrCfg(cfg);
|
||||
}
|
||||
}
|
||||
if(entity.getHttpReqBodyList()!=null){
|
||||
for(HttpBodyCfg cfg:entity.getHttpReqBodyList()){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
websiteCfgDao.saveHttpBodyCfg(cfg);
|
||||
}
|
||||
}
|
||||
if(entity.getHttpResBodyList()!=null){
|
||||
for(HttpBodyCfg cfg:entity.getHttpResBodyList()){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
websiteCfgDao.saveHttpBodyCfg(cfg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -563,3 +563,9 @@ port_pattern=\u7AEF\u53E3\u683C\u5F0F
|
||||
port_mask=port Mask
|
||||
ip_range=IP Range
|
||||
ip_subnet=Subnet
|
||||
http_ip_title=HTTP IP\u914D\u7F6E
|
||||
http_url_title=HTTP URL \u914D\u7F6E
|
||||
http_req_hdr_title=HTTP\u8BF7\u6C42\u5934\u57DF\u914D\u7F6E
|
||||
http_req_body_title=HTTP\u8BF7\u6C42\u5185\u5BB9\u914D\u7F6E
|
||||
http_res_hdr_title=HTTP\u5E94\u7B54\u5934\u57DF\u914D\u7F6E
|
||||
http_res_body_title=HTTP\u5E94\u7B54\u5185\u5BB9\u914D\u7F6E
|
||||
|
||||
@@ -161,7 +161,7 @@ $(function(){
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message code="sample_file"/></label>
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="sample_file"/></label>
|
||||
<div class="col-md-6">
|
||||
<%-- <input class="form-control required" type="text" name="sampleUrl" value="${_cfg.sampleUrl}"> --%>
|
||||
<input id="sampleFile" name="sampleFile" type="file"style="width: 330px;display:none" />
|
||||
|
||||
@@ -2,130 +2,136 @@
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title><spring:message code="${cfgName}"></spring:message></title>
|
||||
<title></title>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
switchIpType($("select[name$='ipType']"));
|
||||
areaControlInit();
|
||||
$("input[name='isAreaEffective']").on('change',function(){
|
||||
var val=$(this).val();
|
||||
if(val==1){
|
||||
$(".areaType").removeClass("hidden");
|
||||
if($("input[name='areaType']:checked").val()==1){//areaISP
|
||||
$("#areaIsp").removeClass("hidden");
|
||||
}else if($("input[name='areaType']:checked").val()==0){//areaIp
|
||||
$("#areaIp").removeClass("hidden");
|
||||
}
|
||||
}else{
|
||||
$(".areaType").addClass("hidden");
|
||||
$("#areaIp").addClass("hidden");
|
||||
$("#areaIsp").addClass("hidden");
|
||||
}
|
||||
});
|
||||
$("select[name$='ipType']").on("change",function(){
|
||||
switchIpType($(this));
|
||||
});
|
||||
$("input[name='areaType']").on('change',function(){
|
||||
var val=$(this).val();
|
||||
if($(this).is(":visible")){
|
||||
if(val==0){
|
||||
$("#areaIp").removeClass("hidden");
|
||||
$("#areaIsp").addClass("hidden");
|
||||
}else{
|
||||
$("#areaIsp").removeClass("hidden");
|
||||
$("#areaIp").addClass("hidden");
|
||||
}
|
||||
}else{
|
||||
$("#areaIsp").addClass("hidden");
|
||||
$("#areaIp").addClass("hidden");
|
||||
}
|
||||
});
|
||||
$("#cancel").on("click",function(){
|
||||
window.history.back();
|
||||
});
|
||||
$("#cfgFrom").validate({
|
||||
errorPlacement: function(error,element){
|
||||
$(element).parents(".form-group").find("div[for='"+element.attr("name")+"']").append(error);
|
||||
},
|
||||
submitHandler: function(form){
|
||||
//loading('onloading...');
|
||||
form.submit();
|
||||
},
|
||||
errorContainer: "#messageBox",
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="page-content">
|
||||
|
||||
<h3 class="page-title">
|
||||
<spring:message code="${cfgName}"></spring:message>
|
||||
</h3>
|
||||
<c:forEach items="${regionList}" var="regionDistrict">
|
||||
<c:if
|
||||
test="${_cfg.functionId eq regionDistrict.functionId
|
||||
and regionDistrict.regionType eq 3
|
||||
and regionValue eq regionDistrict.configRegionValue}">
|
||||
<!-- regionDistrict.regionType==3表示增强字符串类配置 -->
|
||||
<input type="hidden" name="${cfgName}[${status.index }].cfgType" value="${regionDistrict.configRegionValue }">
|
||||
<input type="hidden" name="${cfgName}[${status.index }].cfgRegionCode" value="${regionDistrict.configRegionCode }">
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet box blue">
|
||||
<div class="portlet-title">
|
||||
<div class="caption">
|
||||
<i class="fa fa-gift"></i>
|
||||
<c:if test="${empty _cfg.cfgId}"><spring:message code="add"></spring:message></c:if>
|
||||
<c:if test="${not empty _cfg.cfgId}"><spring:message code="edit"></spring:message></c:if>
|
||||
<div class="pull-right">
|
||||
<span class="glyphicon glyphicon-remove pull-right" title="remove"
|
||||
onClick="delContent('${tabName}${status.index}','${tabName}Add');" />
|
||||
</div>
|
||||
<!-- <div class="tools">
|
||||
<a href="javascript:;" class="collapse" data-original-title="" title=""> </a>
|
||||
<a href="#portlet-config" data-toggle="modal" class="config" data-original-title="" title=""> </a>
|
||||
<a href="javascript:;" class="reload" data-original-title="" title=""> </a>
|
||||
<a href="javascript:;" class="remove" data-original-title="" title=""> </a>
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="portlet-body form">
|
||||
<!-- BEGIN FORM-->
|
||||
<form id="cfgFrom" action="${ctx}/cfg/complex/saveOrUpdateCfg" method="post" class="form-horizontal">
|
||||
<div class="form-body">
|
||||
<%@include file="/WEB-INF/include/form/complexInfo.jsp" %>
|
||||
<c:if test="${not empty _cfg.cfgId}">
|
||||
<input type="hidden" name="cfgId" value="${_cfg.cfgId}">
|
||||
</c:if>
|
||||
<c:if test="${not empty _cfg.compileId}">
|
||||
<input type="hidden" name="compileId" value="${_cfg.compileId}">
|
||||
</c:if>
|
||||
<input type="hidden" name="audit" value="${audit}">
|
||||
<input type="hidden" name="tableName" value="${_cfg.tableName}">
|
||||
<input type="hidden" name="serviceId" value="${_cfg.serviceId}">
|
||||
<input type="hidden" name="cfgName" value="${cfgName}">
|
||||
<input type="hidden" name="action" value="${action}">
|
||||
<input type="hidden" name="district" value="${_cfg.district}">
|
||||
<c:choose>
|
||||
<c:when test="${action!=5 and action!=8}">
|
||||
<%@include file="/WEB-INF/include/form/areaInfo.jsp" %>
|
||||
<%@include file="/WEB-INF/include/form/basicInfo.jsp" %>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<input type="hidden" name=requestId value="0">
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="district" /></label>
|
||||
<div class="col-md-6">
|
||||
<select name="${cfgName}[${status.index }].district"
|
||||
class="selectpicker show-tick form-control required">
|
||||
<c:forEach items="${regionList}" var="regionDistrict">
|
||||
<c:if
|
||||
test="${_cfg.functionId eq regionDistrict.functionId and regionValue eq regionDistrict.configRegionValue}">
|
||||
<c:forEach items="${fn:split(regionDistrict.configDistrict,',')}"
|
||||
var="_district">
|
||||
<option value="${_district }"
|
||||
<c:if test="${complexCfg.district==_district || complexCfg.district==null}">selected</c:if>>${_district }</option>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
<div for="${cfgName}[${status.index }].district"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="keywords" /></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control required" type="text"
|
||||
name="${cfgName}[${status.index }].cfgKeywords"
|
||||
value="${complexCfg.cfgKeywords}">
|
||||
</div>
|
||||
<div for="${cfgName}[${status.index }].cfgKeywords"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-offset-3 col-md-8">
|
||||
<button id="save" type="submit" class="btn green"><spring:message code="submit"/></button>
|
||||
<button id="cancel" type="button" class="btn default"><spring:message code="cancel"/></button>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="expression_type" /></label>
|
||||
<div class="col-md-6">
|
||||
<label class="radio-inline"> <input type="radio"
|
||||
name="${cfgName}[${status.index }].exprType" value="1"
|
||||
class="required"
|
||||
<c:if test="${complexCfg.exprType==1}">checked</c:if>> <spring:message
|
||||
code="and" />
|
||||
</label> <label class="radio-inline"> <input type="radio"
|
||||
name="${cfgName}[${status.index }].exprType" value="0"
|
||||
class="required"
|
||||
<c:if test="${complexCfg.exprType==0 || complexCfg.exprType==null}">checked</c:if>>
|
||||
<spring:message code="null" />
|
||||
</label>
|
||||
</div>
|
||||
<div for="${cfgName}[${status.index }].exprType"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="match_method" /></label>
|
||||
<div class="col-md-6">
|
||||
<select name="${cfgName}[${status.index }].matchMethod"
|
||||
class="selectpicker select2 form-control required">
|
||||
<option value=""><spring:message code="select" /></option>
|
||||
<option value="0"
|
||||
<c:if test="${complexCfg.matchMethod==0 || complexCfg.matchMethod==null }">selected</c:if>><spring:message
|
||||
code="substring_match"></spring:message></option>
|
||||
<option value="1"
|
||||
<c:if test="${complexCfg.matchMethod==1 }">selected</c:if>><spring:message
|
||||
code="right_match"></spring:message></option>
|
||||
<option value="2"
|
||||
<c:if test="${complexCfg.matchMethod==2 }">selected</c:if>><spring:message
|
||||
code="left_match"></spring:message></option>
|
||||
<option value="3"
|
||||
<c:if test="${complexCfg.matchMethod==3 || complexCfg.matchMethod==null}">selected</c:if>><spring:message
|
||||
code="exactly_match"></spring:message></option>
|
||||
</select>
|
||||
</div>
|
||||
<div for="${cfgName}[${status.index }].matchMethod"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6"> </div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="whether_hexbinary" /></label>
|
||||
<div class="col-md-6">
|
||||
<select name="${cfgName}[${status.index }].isHexbin"
|
||||
class="selectpicker select2 form-control required">
|
||||
<option value=""><spring:message code="select" /></option>
|
||||
<option value="0"
|
||||
<c:if test="${complexCfg.isHexbin==0 || complexCfg.isHexbin==null}">selected</c:if>><spring:message
|
||||
code="case_insensitive_nohex"></spring:message></option>
|
||||
<option value="1"
|
||||
<c:if test="${complexCfg.isHexbin==1 }">selected</c:if>><spring:message
|
||||
code="hex_binary"></spring:message></option>
|
||||
<option value="2"
|
||||
<c:if test="${complexCfg.isHexbin==2 }">selected</c:if>><spring:message
|
||||
code="case_sensitive_nohex"></spring:message></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<!-- END FORM-->
|
||||
<div for="${cfgName}[${status.index }].isHexbin"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -2,121 +2,186 @@
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title><spring:message code="${cfgName}"></spring:message></title>
|
||||
<link href="${pageContext.request.contextPath}/static/global/plugins/bootstrap-select/css/bootstrap-select.min.css" rel="stylesheet"/>
|
||||
<title></title>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
switchIpType($("select[name$='ipType']"));
|
||||
areaControlInit();
|
||||
$("input[name='isAreaEffective']").on('change',function(){
|
||||
var val=$(this).val();
|
||||
if(val==1){
|
||||
$(".areaType").removeClass("hidden");
|
||||
if($("input[name='areaType']:checked").val()==1){//areaISP
|
||||
$("#areaIsp").removeClass("hidden");
|
||||
}else if($("input[name='areaType']:checked").val()==0){//areaIp
|
||||
$("#areaIp").removeClass("hidden");
|
||||
}
|
||||
}else{
|
||||
$(".areaType").addClass("hidden");
|
||||
$("#areaIp").addClass("hidden");
|
||||
$("#areaIsp").addClass("hidden");
|
||||
}
|
||||
});
|
||||
$("input[name='areaType']").on('change',function(){
|
||||
var val=$(this).val();
|
||||
if($(this).is(":visible")){
|
||||
if(val==0){
|
||||
$("#areaIp").removeClass("hidden");
|
||||
$("#areaIsp").addClass("hidden");
|
||||
}else{
|
||||
$("#areaIsp").removeClass("hidden");
|
||||
$("#areaIp").addClass("hidden");
|
||||
}
|
||||
}else{
|
||||
$("#areaIsp").addClass("hidden");
|
||||
$("#areaIp").addClass("hidden");
|
||||
}
|
||||
});
|
||||
$("#cancel").on("click",function(){
|
||||
window.history.back();
|
||||
});
|
||||
$("select[name$='ipType']").on("change",function(){
|
||||
switchIpType($(this));
|
||||
});
|
||||
$("#ipCfgFrom").validate({
|
||||
errorPlacement: function(error,element){
|
||||
$(element).parents(".form-group").find("div[for='"+element.attr("name")+"']").append(error);
|
||||
},
|
||||
submitHandler: function(form){
|
||||
//loading('onloading...');
|
||||
form.submit();
|
||||
},
|
||||
errorContainer: "#messageBox",
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-content">
|
||||
<h3 class="page-title">
|
||||
<spring:message code="${cfgName}"></spring:message>
|
||||
</h3>
|
||||
<c:forEach items="${regionList}" var="regionDistrict">
|
||||
<c:if
|
||||
test="${_cfg.functionId eq regionDistrict.functionId and regionDistrict.regionType eq 1}">
|
||||
<!-- regionDistrict.regionType==1表示IP类配置 -->
|
||||
<input type="hidden" name="${cfgName}[${status.index }].cfgType" value="${regionDistrict.configRegionValue }">
|
||||
<input type="hidden" name="${cfgName}[${status.index }].cfgRegionCode" value="${regionDistrict.configRegionCode }">
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<input type="hidden" name="${cfgName}[${status.index }].protocolId" id="protocolId" value="">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet box blue">
|
||||
<div class="portlet-title">
|
||||
<div class="caption">
|
||||
<i class="fa fa-gift"></i>
|
||||
<c:if test="${empty _cfg.cfgId}"><spring:message code="add"></spring:message></c:if>
|
||||
<c:if test="${not empty _cfg.cfgId}"><spring:message code="edit"></spring:message></c:if>
|
||||
<div class="pull-right">
|
||||
<span class="glyphicon glyphicon-remove pull-right" title="remove"
|
||||
onClick="delContent('${tabName}${status.index}','${tabName}Add');" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body form">
|
||||
<!-- BEGIN FORM-->
|
||||
<form id="ipCfgFrom" action="${ctx}/cfg/ip/saveOrUpdateCfg" method="post" class="form-horizontal">
|
||||
<div class="form-body">
|
||||
<%@include file="/WEB-INF/include/form/ipInfo.jsp" %>
|
||||
<c:if test="${not empty _cfg.cfgId}">
|
||||
<input type="hidden" name="cfgId" value="${_cfg.cfgId}">
|
||||
</c:if>
|
||||
<c:if test="${not empty _cfg.compileId}">
|
||||
<input type="hidden" name="compileId" value="${_cfg.compileId}">
|
||||
</c:if>
|
||||
<input type="hidden" name="tableName" value="${_cfg.tableName}">
|
||||
<input type="hidden" name="serviceId" value="${serviceId}">
|
||||
<input type="hidden" name="cfgName" value="${cfgName}">
|
||||
<input type="hidden" name="action" value="${action}">
|
||||
<input type="hidden" name="protocolId" value="${_cfg.protocolId}">
|
||||
<c:choose>
|
||||
<c:when test="${action!=5 and action!=8}">
|
||||
<%@include file="/WEB-INF/include/form/areaInfo.jsp" %>
|
||||
<%@include file="/WEB-INF/include/form/basicInfo.jsp" %>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<input type="hidden" name=requestId value="0">
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="ip_type" /></label>
|
||||
<div class="col-md-6">
|
||||
<select name="${cfgName}[${status.index }].ipType"
|
||||
class="selectpicker show-tick form-control required">
|
||||
<option value="4"
|
||||
<c:if test="${ipPort.ipType==4 || ipPort.ipType==null }">selected</c:if>>V4</option>
|
||||
<option value="6" <c:if test="${ipPort.ipType==6}">selected</c:if>>V6</option>
|
||||
</select>
|
||||
</div>
|
||||
<div for="${cfgName}[${status.index }].ipType"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row ip">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="ip_pattern" /></label>
|
||||
<div class="col-md-6">
|
||||
<select name="${cfgName}[${status.index }].ipPattern"
|
||||
class="selectpicker show-tick form-control required">
|
||||
<option value="1"
|
||||
<c:if test="${ipPort.ipPattern==1 || ipPort.ipPattern==null}">selected</c:if>><spring:message
|
||||
code="subnet" /></option>
|
||||
<option value="2"
|
||||
<c:if test="${ipPort.ipPattern==2}">selected</c:if>><spring:message
|
||||
code="ip_range" /></option>
|
||||
<option value="3"
|
||||
<c:if test="${ipPort.ipPattern==3}">selected</c:if>>IP</option>
|
||||
</select>
|
||||
</div>
|
||||
<div for="${cfgName}[${status.index }].ipPattern"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="client_ip" /></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control required" type="text"
|
||||
name="${cfgName}[${status.index }].srcIpAddress"
|
||||
value="${ipPort.srcIpAddress}">
|
||||
</div>
|
||||
<div for="${cfgName}[${status.index }].srcIpAddress"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row hidden port">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="port_pattern" /></label>
|
||||
<div class="col-md-6">
|
||||
<select name="${cfgName}[${status.index }].portPattern"
|
||||
class="selectpicker show-tick form-control required">
|
||||
<option value="1"
|
||||
<c:if test="${ipPort.portPattern==1 || ipPort.portPattern== null}">selected</c:if>>port</option>
|
||||
<option value="2"
|
||||
<c:if test="${ipPort.portPattern==2}">selected</c:if>><spring:message
|
||||
code="port_range" /></option>
|
||||
</select>
|
||||
</div>
|
||||
<div for="${cfgName}[${status.index }].portPattern"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="client_port" /></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control required" type="text"
|
||||
name="${cfgName}[${status.index }].srcPort"
|
||||
value="${ipPort.srcPort}">
|
||||
</div>
|
||||
<div for="${cfgName}[${status.index }].srcPort"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row hidden destIpPort">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="server_ip" /></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control required" type="text"
|
||||
name="${cfgName}[${status.index }].destIpAddress"
|
||||
value="${ipPort.destIpAddress}">
|
||||
</div>
|
||||
<div for="${cfgName}[${status.index }].destIpAddress"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="server_port" /></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control required" type="text"
|
||||
name="${cfgName}[${status.index }].destPort"
|
||||
value="${ipPort.destPort}">
|
||||
</div>
|
||||
<div for="${cfgName}[${status.index }].destPort"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row hidden protocol">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="protocol" /></label>
|
||||
<div class="col-md-6">
|
||||
<select name="${cfgName}[${status.index }].protocol"
|
||||
class="selectpicker show-tick form-control required">
|
||||
<option value=""><spring:message code="select" /></option>
|
||||
<option value="6"
|
||||
<c:if test="${ipPort.protocol==6}">selected</c:if>>TCP</option>
|
||||
<option value="17"
|
||||
<c:if test="${ipPort.protocol==17}">selected</c:if>>UDP</option>
|
||||
<option value="0"
|
||||
<c:if test="${ipPort.protocol==0 || ipPort.protocol==null}">selected</c:if>><spring:message
|
||||
code="arbitrary" /></option>
|
||||
</select>
|
||||
</div>
|
||||
<div for="${cfgName}[${status.index }].protocol"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="direction" /></label>
|
||||
<div class="col-md-6">
|
||||
<select name="${cfgName}[${status.index }].direction"
|
||||
class="selectpicker show-tick form-control required">
|
||||
<option value=""><spring:message code="select" /></option>
|
||||
<option value="0"
|
||||
<c:if test="${ipPort.direction==0 || ipPort.direction==null}">selected</c:if>><spring:message
|
||||
code="twoway" /></option>
|
||||
<option value="1"
|
||||
<c:if test="${ipPort.direction==1 }">selected</c:if>>
|
||||
<spring:message code="ingress" /></option>
|
||||
<option value="2"
|
||||
<c:if test="${ipPort.direction==2 }">selected</c:if>>
|
||||
<spring:message code="degress" /></option>
|
||||
</select>
|
||||
</div>
|
||||
<div for="${cfgName}[${status.index }].direction"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-offset-3 col-md-8">
|
||||
<button id="save" type="submit" class="btn green"><spring:message code="submit"/></button>
|
||||
<button id="cancel" type="button" class="btn default"><spring:message code="cancel"/></button>
|
||||
<button type="button" class="btn btn-red-hollow center-block"
|
||||
onClick="more(this);" data-click-times="0">
|
||||
<spring:message code="show_more" />
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6"> </div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<!-- END FORM-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<br>
|
||||
|
||||
</html>
|
||||
@@ -2,129 +2,112 @@
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title><spring:message code="${cfgName}"></spring:message></title>
|
||||
<title></title>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
switchIpType($("select[name$='ipType']"));
|
||||
areaControlInit();
|
||||
$("input[name='isAreaEffective']").on('change',function(){
|
||||
var val=$(this).val();
|
||||
if(val==1){
|
||||
$(".areaType").removeClass("hidden");
|
||||
if($("input[name='areaType']:checked").val()==1){//areaISP
|
||||
$("#areaIsp").removeClass("hidden");
|
||||
}else if($("input[name='areaType']:checked").val()==0){//areaIp
|
||||
$("#areaIp").removeClass("hidden");
|
||||
}
|
||||
}else{
|
||||
$(".areaType").addClass("hidden");
|
||||
$("#areaIp").addClass("hidden");
|
||||
$("#areaIsp").addClass("hidden");
|
||||
}
|
||||
});
|
||||
$("input[name='areaType']").on('change',function(){
|
||||
var val=$(this).val();
|
||||
if($(this).is(":visible")){
|
||||
if(val==0){
|
||||
$("#areaIp").removeClass("hidden");
|
||||
$("#areaIsp").addClass("hidden");
|
||||
}else{
|
||||
$("#areaIsp").removeClass("hidden");
|
||||
$("#areaIp").addClass("hidden");
|
||||
}
|
||||
}else{
|
||||
$("#areaIsp").addClass("hidden");
|
||||
$("#areaIp").addClass("hidden");
|
||||
}
|
||||
});
|
||||
$("#cfgFrom").validate({
|
||||
errorPlacement: function(error,element){
|
||||
$(element).parents(".form-group").find("div[for='"+element.attr("name")+"']").append(error);
|
||||
},
|
||||
submitHandler: function(form){
|
||||
//loading('onloading...');
|
||||
form.submit();
|
||||
},
|
||||
errorContainer: "#messageBox",
|
||||
});
|
||||
$("select[name$='ipType']").on("change",function(){
|
||||
switchIpType($(this));
|
||||
});
|
||||
$("#cancel").on("click",function(){
|
||||
window.history.back();
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="page-content">
|
||||
|
||||
<h3 class="page-title">
|
||||
<spring:message code="${cfgName}"></spring:message>
|
||||
</h3>
|
||||
|
||||
<c:forEach items="${regionList}" var="regionDistrict">
|
||||
<c:if
|
||||
test="${_cfg.functionId eq regionDistrict.functionId
|
||||
and regionDistrict.regionType eq 2
|
||||
and regionValue eq regionDistrict.configRegionValue}">
|
||||
<!-- regionDistrict.regionType==2表示字符串类配置 -->
|
||||
<input type="hidden" name="${cfgName}[${status.index }].cfgType" value="${regionDistrict.configRegionValue }">
|
||||
<input type="hidden" name="${cfgName}[${status.index }].cfgRegionCode" value="${regionDistrict.configRegionCode }">
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet box blue">
|
||||
<div class="portlet-title">
|
||||
<div class="caption">
|
||||
<i class="fa fa-gift"></i>
|
||||
<c:if test="${empty _cfg.cfgId}"><spring:message code="add"></spring:message></c:if>
|
||||
<c:if test="${not empty _cfg.cfgId}"><spring:message code="edit"></spring:message></c:if>
|
||||
<div class="pull-right">
|
||||
<span class="glyphicon glyphicon-remove pull-right" title="remove"
|
||||
onClick="delContent('${tabName}${status.index}','${tabName}Add');" />
|
||||
</div>
|
||||
<!-- <div class="tools">
|
||||
<a href="javascript:;" class="collapse" data-original-title="" title=""> </a>
|
||||
<a href="#portlet-config" data-toggle="modal" class="config" data-original-title="" title=""> </a>
|
||||
<a href="javascript:;" class="reload" data-original-title="" title=""> </a>
|
||||
<a href="javascript:;" class="remove" data-original-title="" title=""> </a>
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="portlet-body form">
|
||||
<!-- BEGIN FORM-->
|
||||
<form id="cfgFrom" action="${ctx}/cfg/string/saveOrUpdateCfg" method="post" class="form-horizontal">
|
||||
<div class="form-body">
|
||||
<%@include file="/WEB-INF/include/form/stringInfo.jsp" %>
|
||||
<c:if test="${not empty _cfg.cfgId}">
|
||||
<input type="hidden" name="cfgId" value="${_cfg.cfgId}">
|
||||
</c:if>
|
||||
<c:if test="${not empty _cfg.compileId}">
|
||||
<input type="hidden" name="compileId" value="${_cfg.compileId}">
|
||||
</c:if>
|
||||
<input id="audit" name="audit" type="hidden" value="${audit}"/>
|
||||
<input id="action" name="action" type="hidden" value="${action}"/>
|
||||
<input type="hidden" name="tableName" value="${_cfg.tableName}">
|
||||
<input type="hidden" name="serviceId" value="${_cfg.serviceId}">
|
||||
<input type="hidden" name="cfgName" value="${cfgName}">
|
||||
<c:choose>
|
||||
<c:when test="${action!=5 and action!=8}">
|
||||
<%@include file="/WEB-INF/include/form/areaInfo.jsp" %>
|
||||
<%@include file="/WEB-INF/include/form/basicInfo.jsp" %>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<input type="hidden" name=requestId value="0">
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="keywords" /></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control required" type="text"
|
||||
name="${cfgName}[${status.index }].cfgKeywords"
|
||||
value="${strCfg.cfgKeywords}">
|
||||
</div>
|
||||
<div for="${cfgName}[${status.index }].cfgKeywords"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-offset-3 col-md-8">
|
||||
<button id="save" type="submit" class="btn green"><spring:message code="submit"/></button>
|
||||
<button id="cancel" type="button" class="btn default"><spring:message code="cancel"/></button>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="expression_type" /></label>
|
||||
<div class="col-md-6">
|
||||
<label class="radio-inline"> <input type="radio"
|
||||
name="${cfgName}[${status.index }].exprType" value="1"
|
||||
class="required" <c:if test="${strCfg.exprType==1}">checked</c:if>>
|
||||
<spring:message code="and" />
|
||||
</label> <label class="radio-inline"> <input type="radio"
|
||||
name="${cfgName}[${status.index }].exprType" value="0"
|
||||
class="required"
|
||||
<c:if test="${strCfg.exprType==0 || strCfg.exprType==null}">checked</c:if>>
|
||||
<spring:message code="null" />
|
||||
</label>
|
||||
</div>
|
||||
<div for="${cfgName}[${status.index }].exprType"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="match_method" /></label>
|
||||
<div class="col-md-6">
|
||||
<select name="${cfgName}[${status.index }].matchMethod"
|
||||
class="selectpicker select2 form-control required">
|
||||
<option value=""><spring:message code="select" /></option>
|
||||
<option value="0"
|
||||
<c:if test="${strCfg.matchMethod==0 || strCfg.matchMethod==null }">selected</c:if>><spring:message
|
||||
code="substring_match"></spring:message></option>
|
||||
<option value="1"
|
||||
<c:if test="${strCfg.matchMethod==1 }">selected</c:if>><spring:message
|
||||
code="right_match"></spring:message></option>
|
||||
<option value="2"
|
||||
<c:if test="${strCfg.matchMethod==2 }">selected</c:if>><spring:message
|
||||
code="left_match"></spring:message></option>
|
||||
<option value="3"
|
||||
<c:if test="${strCfg.matchMethod==3 || strCfg.matchMethod==null}">selected</c:if>><spring:message
|
||||
code="exactly_match"></spring:message></option>
|
||||
</select>
|
||||
</div>
|
||||
<div for="${cfgName}[${status.index }].matchMethod"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6"> </div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="whether_hexbinary" /></label>
|
||||
<div class="col-md-6">
|
||||
<select name="${cfgName}[${status.index }].isHexbin"
|
||||
class="selectpicker select2 form-control required">
|
||||
<option value=""><spring:message code="select" /></option>
|
||||
<option value="0"
|
||||
<c:if test="${strCfg.isHexbin==0 || strCfg.isHexbin==null}">selected</c:if>><spring:message
|
||||
code="case_insensitive_nohex"></spring:message></option>
|
||||
<option value="1"
|
||||
<c:if test="${strCfg.isHexbin==1 }">selected</c:if>><spring:message
|
||||
code="hex_binary"></spring:message></option>
|
||||
<option value="2"
|
||||
<c:if test="${strCfg.isHexbin==2 }">selected</c:if>><spring:message
|
||||
code="case_sensitive_nohex"></spring:message></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<!-- END FORM-->
|
||||
<div for="${cfgName}[${status.index }].isHexbin"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
410
src/main/webapp/WEB-INF/views/cfg/website/httpForm.jsp
Normal file
410
src/main/webapp/WEB-INF/views/cfg/website/httpForm.jsp
Normal file
@@ -0,0 +1,410 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title><spring:message code="${cfgName}"></spring:message></title>
|
||||
<!-- BEGIN THEME GLOBAL STYLES -->
|
||||
<link
|
||||
href="${pageContext.request.contextPath}/static/global/css/components.css"
|
||||
rel="stylesheet" id="style_components" type="text/css" />
|
||||
<script
|
||||
src="${pageContext.request.contextPath}/static/global/scripts/common.js"
|
||||
type="text/javascript"></script>
|
||||
<style type="text/css">
|
||||
.boxSolid {
|
||||
border: 1px solid #eeeeee
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(document)
|
||||
.ready(
|
||||
function() {
|
||||
switchIpType($("select[name$='ipType']"));
|
||||
areaControlInit();
|
||||
$("input[name='isAreaEffective']")
|
||||
.on(
|
||||
'change',
|
||||
function() {
|
||||
var val = $(this).val();
|
||||
if (val == 1) {
|
||||
$(".areaType").removeClass(
|
||||
"hidden");
|
||||
if ($(
|
||||
"input[name='areaType']:checked")
|
||||
.val() == 1) {//areaISP
|
||||
$("#areaIsp").removeClass(
|
||||
"hidden");
|
||||
} else if ($(
|
||||
"input[name='areaType']:checked")
|
||||
.val() == 0) {//areaIp
|
||||
$("#areaIp").removeClass(
|
||||
"hidden");
|
||||
}
|
||||
} else {
|
||||
$(".areaType").addClass(
|
||||
"hidden");
|
||||
$("#areaIp").addClass("hidden");
|
||||
$("#areaIsp")
|
||||
.addClass("hidden");
|
||||
}
|
||||
});
|
||||
$("select[name$='ipType']").on("change", function() {
|
||||
switchIpType($(this));
|
||||
});
|
||||
$("input[name='areaType']").on('change', function() {
|
||||
var val = $(this).val();
|
||||
if ($(this).is(":visible")) {
|
||||
if (val == 0) {
|
||||
$("#areaIp").removeClass("hidden");
|
||||
$("#areaIsp").addClass("hidden");
|
||||
} else {
|
||||
$("#areaIsp").removeClass("hidden");
|
||||
$("#areaIp").addClass("hidden");
|
||||
}
|
||||
} else {
|
||||
$("#areaIsp").addClass("hidden");
|
||||
$("#areaIp").addClass("hidden");
|
||||
}
|
||||
});
|
||||
$("#cancel").on("click", function() {
|
||||
window.history.back();
|
||||
});
|
||||
$(".action").on("change", function() {
|
||||
$("#serviceId").val($(this).attr("serviceId"));
|
||||
$("#protocolId").val($(this).attr("protocolId"));
|
||||
});
|
||||
$("#serviceId").val($(".action").attr("serviceId"));
|
||||
$("#protocolId").val($(".action").attr("protocolId"));
|
||||
$(".httpResCfg").addClass("hidden").addClass("disabled");
|
||||
$(".httpReqCfg").removeClass("hidden").removeClass(
|
||||
"disabled");
|
||||
$("li").on("click", function() {
|
||||
var region = ($(this).find("a").attr("for"));
|
||||
if(region=="httpReqCfg"){
|
||||
$(".httpResCfg").addClass("hidden").addClass("disabled");
|
||||
$(".httpReqCfg").removeClass("hidden").removeClass(
|
||||
"disabled");
|
||||
}else{
|
||||
$(".httpReqCfg").addClass("hidden").addClass("disabled");
|
||||
$(".httpResCfg").removeClass("hidden").removeClass(
|
||||
"disabled");
|
||||
}
|
||||
|
||||
});
|
||||
$("#cfgFrom").validate(
|
||||
{
|
||||
errorPlacement : function(error, element) {
|
||||
$(element).parents(".form-group").find(
|
||||
"div[for='"
|
||||
+ element.attr("name")
|
||||
+ "']").append(error);
|
||||
},
|
||||
submitHandler : function(form) {
|
||||
//loading('onloading...');
|
||||
//将disable属性的元素删除
|
||||
$(".disabled").each(function(){
|
||||
$(this).remove();
|
||||
});
|
||||
form.submit();
|
||||
},
|
||||
errorContainer : "#messageBox",
|
||||
});
|
||||
//业务内容增加
|
||||
/* $("span[title='add']").on("click", function() {
|
||||
$(".ipPort0").removeClass("hidden");
|
||||
}); */
|
||||
|
||||
});
|
||||
|
||||
//业务窗口打开
|
||||
var addContent = function(obj, contentClassName) {
|
||||
$("." + contentClassName + "0").removeClass("hidden").removeClass(
|
||||
"disabled");
|
||||
/* $("."+contentClassName+"0").find("input,select").each(function(){
|
||||
$(this).removeAttr("disabled");
|
||||
}); */
|
||||
$(obj).addClass("hidden");
|
||||
}
|
||||
|
||||
//业务窗口关闭
|
||||
var delContent = function(contentClassName, addBtnClassName) {
|
||||
$("." + contentClassName).addClass("hidden").addClass("disabled");
|
||||
/* $("."+contentClassName).find("input,select").each(function(){
|
||||
$(this).attr("disabled","true");
|
||||
}); */
|
||||
$("." + addBtnClassName).removeClass("hidden");
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-content">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet box blue">
|
||||
<div class="portlet-title">
|
||||
<div class="caption">
|
||||
<i class="fa fa-gift"></i>
|
||||
<c:if test="${empty _cfg.cfgId}">
|
||||
<spring:message code="add"></spring:message>
|
||||
</c:if>
|
||||
<c:if test="${not empty _cfg.cfgId}">
|
||||
<spring:message code="edit"></spring:message>
|
||||
</c:if>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body form">
|
||||
<!-- BEGIN FORM-->
|
||||
<form id="cfgFrom" action="${ctx}/ntc/website/saveHttpCfg"
|
||||
method="post" class="form-horizontal">
|
||||
<input type="hidden" name="cfgId" value="${_cfg.cfgId}">
|
||||
<input type="hidden" name="compileId" value="${_cfg.compileId}">
|
||||
<input type="hidden" name="functionId" value="${_cfg.functionId}">
|
||||
<input type="hidden" id="serviceId" name="serviceId"
|
||||
value="${_cfg.serviceId}">
|
||||
|
||||
<div class="form-body">
|
||||
|
||||
<div class="portlet-body flip-scroll">
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
|
||||
<div class="tabbable tabbable-custom tabs-left">
|
||||
|
||||
<!-- Only required for left/right tabs -->
|
||||
<ul class="nav nav-tabs tabs-left">
|
||||
|
||||
<li class="active"><a href="#http_req_tab"
|
||||
data-toggle="tab" for="httpReqCfg"
|
||||
data_dldk="<spring:message code="http_req_control"/>"><spring:message
|
||||
code="http_req_control" /></a></li>
|
||||
<li><a href="#http_res_tab" data-toggle="tab" for="httpResCfg"
|
||||
data_dldk="<spring:message code="http_res_control"/>"><spring:message
|
||||
code="http_res_control" /></a></li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message
|
||||
code="config_describe" /></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control" type="text" name="cfgDesc"
|
||||
value="${_cfg.cfgDesc}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message
|
||||
code="action" /></label>
|
||||
<div class="col-md-6">
|
||||
<c:forEach items="${serviceList}" var="service"
|
||||
varStatus="satus">
|
||||
<label class="radio-inline"> <c:if
|
||||
test="${_cfg.functionId eq service.functionId}">
|
||||
<input type="radio" name="action"
|
||||
serviceId="${service.serviceId }"
|
||||
protocolId="${service.protocolId }"
|
||||
value="${service.action }" class="required action"
|
||||
<c:if test="${_cfg.action==service.action || _cfg.action==null}">checked</c:if>>
|
||||
<spring:message code="${service.actionCode }" />
|
||||
</c:if>
|
||||
</label>
|
||||
</c:forEach>
|
||||
</div>
|
||||
<div for="action"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--ip info-->
|
||||
<div class="httpReqCfg">
|
||||
<c:set var="tabName" value="httpIpTab"></c:set>
|
||||
<h4 class="form-section" >
|
||||
<spring:message code="http_ip_title" />
|
||||
<small> <span
|
||||
class="glyphicon glyphicon-plus ${tabName}Add"
|
||||
onClick="addContent(this,'${tabName}')" title="add"></span></small>
|
||||
</h4>
|
||||
<c:set var="cfgName" value="ipPortList"></c:set>
|
||||
<c:forEach items="${_cfg.ipPortList}" var="ipPort"
|
||||
varStatus="status">
|
||||
<div class="row boxSolid ${tabName}${status.index} <c:if test="${empty ipPort.cfgId}">hidden disabled</c:if>" >
|
||||
|
||||
<!-- 引入页面动态传参 -->
|
||||
<%-- <jsp:include page="/WEB-INF/views/cfg/ipCfgForm.jsp" flush="true">
|
||||
<jsp:param value="ipCfg" name="cfgName"/>
|
||||
<jsp:param value="ipCfg${status.index }" name="cfgNameIndex"/>
|
||||
<jsp:param value="ipPortList[${status.index }]" name="propertiesName"/>
|
||||
</jsp:include> --%>
|
||||
<%@include file="/WEB-INF/views/cfg/ipCfgForm.jsp"%>
|
||||
</div>
|
||||
</c:forEach>
|
||||
</div>
|
||||
<!--/ip info-->
|
||||
<!--url info-->
|
||||
<div class="httpReqCfg">
|
||||
<c:set var="tabName" value="httpUrlTab"></c:set>
|
||||
<h4 class="form-section" >
|
||||
<spring:message code="http_url_title" />
|
||||
<small> <span
|
||||
class="glyphicon glyphicon-plus ${tabName}Add"
|
||||
onClick="addContent(this,'${tabName}')" title="add"></span></small>
|
||||
</h4>
|
||||
<c:set var="cfgName" value="httpUrlList"></c:set>
|
||||
<c:set var="regionValue" value="http_url"></c:set>
|
||||
<c:forEach items="${_cfg.httpUrlList}" var="strCfg"
|
||||
varStatus="status">
|
||||
<div class="row boxSolid ${tabName}${status.index} <c:if test="${empty strCfg.cfgId}">hidden disabled</c:if>" >
|
||||
<!-- 引入页面动态传参 -->
|
||||
<%-- <jsp:include page="/WEB-INF/views/cfg/stringCfgForm.jsp" flush="true">
|
||||
<jsp:param value="http_url" name="regionValue"/>
|
||||
<jsp:param value="httpUrl" name="cfgName"/>
|
||||
<jsp:param value="httpUrl${status.index }" name="cfgNameIndex"/>
|
||||
<jsp:param value="httpUrlList[${status.index }]" name="propertiesName"/>
|
||||
</jsp:include> --%>
|
||||
<%@include file="/WEB-INF/views/cfg/stringCfgForm.jsp"%>
|
||||
</div>
|
||||
</c:forEach>
|
||||
</div>
|
||||
<!--/url info-->
|
||||
<!--request header info-->
|
||||
<div class="httpReqCfg">
|
||||
<c:set var="tabName" value="httpReqHdrTab"></c:set>
|
||||
<h4 class="form-section" >
|
||||
<spring:message code="http_req_hdr_title" />
|
||||
<small> <span
|
||||
class="glyphicon glyphicon-plus ${tabName}Add"
|
||||
onClick="addContent(this,'${tabName}')" title="add"></span></small>
|
||||
</h4>
|
||||
<c:set var="cfgName" value="httpReqHdrList"></c:set>
|
||||
<c:set var="regionValue" value="http_req_hdr"></c:set>
|
||||
<c:forEach items="${_cfg.httpReqHdrList}" var="complexCfg"
|
||||
varStatus="status">
|
||||
<div class="row boxSolid ${tabName}${status.index} <c:if test="${empty complexCfg.cfgId}">hidden disabled</c:if>">
|
||||
<!-- 引入页面动态传参 -->
|
||||
<%-- <jsp:include page="/WEB-INF/views/cfg/complexCfgForm.jsp" flush="true">
|
||||
<jsp:param value="http_req_hdr" name="regionValue"/>
|
||||
<jsp:param value="httpReqHdr" name="cfgName"/>
|
||||
<jsp:param value="httpReqHdr${status.index }" name="cfgNameIndex"/>
|
||||
<jsp:param value="httpReqHdrList[${status.index }]" name="propertiesName"/>
|
||||
</jsp:include> --%>
|
||||
<%@include file="/WEB-INF/views/cfg/complexCfgForm.jsp"%>
|
||||
</div>
|
||||
</c:forEach>
|
||||
</div>
|
||||
<!--/request header info-->
|
||||
<!--request body info-->
|
||||
<div class="httpReqCfg">
|
||||
<c:set var="tabName" value="httpReqBodyTab"></c:set>
|
||||
<h4 class="form-section" >
|
||||
<spring:message code="http_req_body_title" />
|
||||
<small> <span
|
||||
class="glyphicon glyphicon-plus ${tabName}Add"
|
||||
onClick="addContent(this,'${tabName}')" title="add"></span></small>
|
||||
</h4>
|
||||
<c:set var="cfgName" value="httpReqBodyList"></c:set>
|
||||
<c:set var="regionValue" value="http_req_body"></c:set>
|
||||
<c:forEach items="${_cfg.httpReqBodyList}" var="strCfg"
|
||||
varStatus="status">
|
||||
<div class="row boxSolid ${tabName}${status.index} <c:if test="${empty strCfg.cfgId}">hidden disabled</c:if>" >
|
||||
<!-- 引入页面动态传参 -->
|
||||
<%-- <jsp:include page="/WEB-INF/views/cfg/stringCfgForm.jsp" flush="true">
|
||||
<jsp:param value="http_req_body" name="regionValue"/>
|
||||
<jsp:param value="httpReqBody" name="cfgName"/>
|
||||
<jsp:param value="httpReqBody${status.index }" name="cfgNameIndex"/>
|
||||
<jsp:param value="httpReqBodyList[${status.index }]" name="propertiesName"/>
|
||||
</jsp:include> --%>
|
||||
<%@include file="/WEB-INF/views/cfg/stringCfgForm.jsp"%>
|
||||
</div>
|
||||
</c:forEach>
|
||||
</div>
|
||||
<!--/request body info-->
|
||||
<!--response header info-->
|
||||
<div class="httpResCfg">
|
||||
<c:set var="tabName" value="httpResHdrTab"></c:set>
|
||||
<h4 class="form-section" >
|
||||
<spring:message code="http_res_hdr_title" />
|
||||
<small> <span
|
||||
class="glyphicon glyphicon-plus ${tabName}Add"
|
||||
onClick="addContent(this,'${tabName}')" title="add"></span></small>
|
||||
</h4>
|
||||
<c:set var="cfgName" value="httpResHdrList"></c:set>
|
||||
<c:set var="regionValue" value="http_res_hdr"></c:set>
|
||||
<c:forEach items="${_cfg.httpResHdrList}" var="complexCfg"
|
||||
varStatus="status">
|
||||
<div class="row boxSolid ${tabName}${status.index} <c:if test="${empty complexCfg.cfgId}">hidden disabled</c:if>">
|
||||
<%-- <jsp:include page="/WEB-INF/views/cfg/complexCfgForm.jsp" flush="true">
|
||||
<jsp:param value="http_res_hdr" name="regionValue"/>
|
||||
<jsp:param value="httpResHdr" name="cfgName"/>
|
||||
<jsp:param value="httpResHdr${status.index }" name="cfgNameIndex"/>
|
||||
<jsp:param value="httpResHdrList[${status.index }]" name="propertiesName"/>
|
||||
</jsp:include> --%>
|
||||
<%@include file="/WEB-INF/views/cfg/complexCfgForm.jsp"%>
|
||||
</div>
|
||||
</c:forEach>
|
||||
</div>
|
||||
<!--/response header info-->
|
||||
<!--response body info-->
|
||||
<div class="httpResCfg">
|
||||
<c:set var="tabName" value="httpResBodyTab"></c:set>
|
||||
<h4 class="form-section" >
|
||||
<spring:message code="http_res_body_title" />
|
||||
<small> <span
|
||||
class="glyphicon glyphicon-plus ${tabName}Add"
|
||||
onClick="addContent(this,'${tabName}')" title="add"></span></small>
|
||||
</h4>
|
||||
<c:set var="cfgName" value="httpResBodyList"></c:set>
|
||||
<c:set var="regionValue" value="http_res_body"></c:set>
|
||||
<c:forEach items="${_cfg.httpResBodyList}" var="strCfg"
|
||||
varStatus="status">
|
||||
<div class="row boxSolid ${tabName}${status.index} <c:if test="${empty strCfg.cfgId}">hidden disabled</c:if>" >
|
||||
<!-- 引入页面动态传参 -->
|
||||
<%-- <jsp:include page="/WEB-INF/views/cfg/stringCfgForm.jsp" flush="true">
|
||||
<jsp:param value="http_res_body" name="regionValue"/>
|
||||
<jsp:param value="httpResBody" name="cfgName"/>
|
||||
<jsp:param value="httpResBody${status.index }" name="cfgNameIndex"/>
|
||||
<jsp:param value="httpResBodyList[${status.index }]" name="propertiesName"/>
|
||||
</jsp:include> --%>
|
||||
<%@include file="/WEB-INF/views/cfg/stringCfgForm.jsp"%>%>
|
||||
</div>
|
||||
</c:forEach>
|
||||
</div>
|
||||
<br>
|
||||
<%@include file="/WEB-INF/include/form/areaInfo.jsp"%>
|
||||
<br>
|
||||
<%@include file="/WEB-INF/include/form/basicInfo.jsp"%>
|
||||
<div class="form-actions">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="row">
|
||||
<div class="col-md-offset-3 col-md-8">
|
||||
<button id="save" type="submit" class="btn green">
|
||||
<spring:message code="submit" />
|
||||
</button>
|
||||
<button id="cancel" type="button" class="btn default">
|
||||
<spring:message code="cancel" />
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<!-- END FORM-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
676
src/main/webapp/WEB-INF/views/cfg/website/httpList.jsp
Normal file
676
src/main/webapp/WEB-INF/views/cfg/website/httpList.jsp
Normal file
@@ -0,0 +1,676 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title><spring:message code="${cfgName}"></spring:message></title>
|
||||
<link href="${pageContext.request.contextPath}/static/global/plugins/bootstrap-select/css/bootstrap-select.min.css" rel="stylesheet"/>
|
||||
<link href="${pageContext.request.contextPath}/static/global/plugins/treeTable/themes/vsStyle/treeTable.min.css" rel="stylesheet" type="text/css" />
|
||||
<script src="${pageContext.request.contextPath}/static/global/plugins/bootstrap-select/js/bootstrap-select.min.js"></script>
|
||||
<c:choose>
|
||||
<c:when test="${cookie.Language.value eq 'zh_CN'}">
|
||||
<script src="${pageContext.request.contextPath}/static/global/plugins/bootstrap-select/js/i18n/defaults-zh_CN.min.js"></script>
|
||||
</c:when>
|
||||
<c:when test="${cookie.Language.value eq 'en'}">
|
||||
<script src="${pageContext.request.contextPath}/static/global/plugins/bootstrap-select/js/i18n/defaults-en_US.min.js"></script>
|
||||
</c:when>
|
||||
<c:when test="${cookie.Language.value eq 'ru_RU'}">
|
||||
<script src="${pageContext.request.contextPath}/static/global/plugins/bootstrap-select/js/i18n/defaults-ru_RU.min.js"></script>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<script src="${pageContext.request.contextPath}/static/global/plugins/bootstrap-select/js/i18n/defaults-en_US.min.js"></script>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
//搜索框提示语初始化
|
||||
if("${cfg.cfgDesc}"){
|
||||
$("#intype").val("${cfg.cfgDesc}");
|
||||
}else{
|
||||
$("#intype").attr("placeholder","<spring:message code='input'/> "+$("#seltype").find("option:selected").text());
|
||||
}
|
||||
$("#seltype").change(function(){
|
||||
$("#intype").attr("placeholder","<spring:message code='input'/> "+$(this).find("option:selected").text());
|
||||
});
|
||||
//筛选功能初始化
|
||||
filterActionInit();
|
||||
$("#isAudit").change(function(){
|
||||
page();
|
||||
});
|
||||
//reset
|
||||
$("#resetBtn").on("click",function(){
|
||||
$("select.selectpicker").each(function(){
|
||||
$(this).selectpicker('val',$(this).find('option:first').val());
|
||||
$(this).find("option").attr("selected",false);
|
||||
$(this).find("option:first").attr("selected",true);
|
||||
});
|
||||
$(".Wdate").attr("value",'');
|
||||
$("#level").attr("value",'');
|
||||
$("#searchForm")[0].reset();
|
||||
});
|
||||
|
||||
//异步获取voip相关信息
|
||||
$("span[id^=open]").click(function(){
|
||||
var openId=$(this).attr("id");
|
||||
var closeId=$(this).attr("id").replace("open","close");
|
||||
var index=$(this).attr("id").replace("open","");
|
||||
$("#"+openId).hide();
|
||||
$("#"+closeId).show();
|
||||
var compileId=$(this).attr("compileId");
|
||||
var cfgId=$(this).attr("cfgId");
|
||||
var hasIp=false;
|
||||
var hasAccount=false;
|
||||
if($("#"+openId).parent().parent().next("tr").hasClass("child")){
|
||||
$("#"+openId).parent().parent().next("tr").show();
|
||||
}else{
|
||||
$.ajax({
|
||||
type:'post',
|
||||
async:false,
|
||||
url:'${ctx}/ntc/website/ajaxVoipAndAccountInfo',
|
||||
data:{"compileId":compileId,"cfgId":cfgId},
|
||||
success:function(data){
|
||||
var voipIpCfgTab="<tr class='child'>"+
|
||||
"<td style='border-right: 1px solid #FFFFFF;'>"+
|
||||
"<input type='checkbox' hidden='hidden'/>"+
|
||||
"</td>"+
|
||||
"<td colspan='"+($(".table tr").eq(0).children("th").length-1)+"'>";
|
||||
var html="";
|
||||
html+="<div class='row'>";
|
||||
if(data.ip.length >0){
|
||||
hasIp=true;
|
||||
html+="<div id='ipTitle"+index+"' onclick='switchInfo(\"account\","+index+")' class='col-md-1' style='width:150px;background-color: #eeeeee;border: 1px solid #c2cad8;padding: 5px;border-bottom:0px'>";
|
||||
html+="<spring:message code='av_voip_ip_title'/>";
|
||||
html+="<i id='ipDown"+index+"' class='fa fa-angle-double-down' ></i>";
|
||||
html+="<i id='ipUp"+index+"' class='fa fa-angle-double-up ' style='display:none'></i>";
|
||||
html+="</div>";
|
||||
}
|
||||
if(data.account.length >0){
|
||||
hasAccount=true;
|
||||
html+="<div id='accountTitle"+index+"' onclick='switchInfo(\"ip\","+index+")' class='col-md-1' style='width:150px;background-color: #f6f3f3;border: 1px solid #c2cad8;padding: 5px;border-bottom:0px'>";
|
||||
html+="<spring:message code='av_voip_account_title'/>";
|
||||
html+="<i id='accountDown"+index+"' class='fa fa-angle-double-down ' style='display:none'></i>";
|
||||
html+="<i id='accountUp"+index+"' class='fa fa-angle-double-up '></i>";
|
||||
html+="</div>";
|
||||
}
|
||||
|
||||
html+="</div>";
|
||||
//ip信息
|
||||
if(data.ip.length >0){
|
||||
html+="<div id='ipInfo"+index+"' style='width:1050px;background-color: #f6f3f3;border: 1px solid #c2cad8;padding: 5px;'>";
|
||||
$.each(data.ip,function(index,item){
|
||||
html+="<div class='row'>";
|
||||
html+="<div class='col-md-4'>";
|
||||
html+="<div class='form-group'>";
|
||||
html+="<label><spring:message code='ip_type'/>:</label>";
|
||||
html+="<label>"
|
||||
if(item.ipType==4){
|
||||
html+="V4";
|
||||
}
|
||||
if(item.ipType==6){
|
||||
html+="V6";
|
||||
}
|
||||
html+="</label>";
|
||||
html+="</div>";
|
||||
html+="</div>";
|
||||
html+="<div class='col-md-4'>";
|
||||
html+="<div class='form-group'>";
|
||||
html+="<label><spring:message code='ip_pattern'/>:</label>";
|
||||
html+="<label>"
|
||||
if(item.ipPattern==1){
|
||||
html+="<spring:message code='subnet'/>"
|
||||
}
|
||||
if(item.ipPattern==2){
|
||||
html+="<spring:message code='ip_range'/>"
|
||||
}
|
||||
html+="</label>";
|
||||
html+="</div>";
|
||||
html+="</div>";
|
||||
html+="<div class='col-md-4'>";
|
||||
html+="<div class='form-group'>";
|
||||
html+="<label><spring:message code='client_ip'/>:</label>";
|
||||
html+="<label>"
|
||||
html+=item.srcIpAddress;
|
||||
html+="</label>";
|
||||
html+="</div>";
|
||||
html+="</div>";
|
||||
html+="</div>";
|
||||
html+="<div class='row'>";
|
||||
html+="<div class='col-md-4'>";
|
||||
html+="<div class='form-group'>";
|
||||
html+="<label><spring:message code='port_pattern'/>:</label>";
|
||||
html+="<label>"
|
||||
if(item.portPattern==1){
|
||||
html+="<spring:message code='subnet'/>"
|
||||
}
|
||||
if(item.portPattern==2){
|
||||
html+="<spring:message code='ip_range'/>"
|
||||
}
|
||||
if(item.portPattern==3){
|
||||
html+="IP"
|
||||
}
|
||||
html+="</label>";
|
||||
html+="</div>";
|
||||
html+="</div>";
|
||||
html+="<div class='col-md-4'>";
|
||||
html+="<div class='form-group'>";
|
||||
html+="<label><spring:message code='client_port'/>:</label>";
|
||||
html+="<label>"
|
||||
html+=item.srcPort;
|
||||
html+="</label>";
|
||||
html+="</div>";
|
||||
html+="</div>";
|
||||
html+="<div class='col-md-4'>";
|
||||
html+="<div class='form-group'>";
|
||||
html+="<label><spring:message code='server_ip'/>:</label>";
|
||||
html+="<label>"
|
||||
html+=item.destIpAddress;
|
||||
html+="</label>";
|
||||
html+="</div>";
|
||||
html+="</div>";
|
||||
html+="</div>";
|
||||
html+="<div class='row'>";
|
||||
html+="<div class='col-md-4'>";
|
||||
html+="<div class='form-group'>";
|
||||
html+="<label><spring:message code='server_port'/>:</label>";
|
||||
html+="<label>"
|
||||
html+=item.destPort;
|
||||
html+="</label>";
|
||||
html+="</div>";
|
||||
html+="</div>";
|
||||
html+="<div class='col-md-4'>";
|
||||
html+="<div class='form-group'>";
|
||||
html+="<label><spring:message code='direction'/>:</label>";
|
||||
html+="<label>"
|
||||
if(item.direction==0){
|
||||
html+="<spring:message code='twoway'/>"
|
||||
}
|
||||
if(item.direction==1){
|
||||
html+="<spring:message code='ingress'/>"
|
||||
}
|
||||
if(item.direction==2){
|
||||
html+="<spring:message code='degress'/>"
|
||||
}
|
||||
html+="</label>";
|
||||
html+="</div>";
|
||||
html+="</div>";
|
||||
html+="<div class='col-md-4'>";
|
||||
html+="<div class='form-group'>";
|
||||
html+="<label><spring:message code='protocol'/>:</label>";
|
||||
html+="<label>"
|
||||
if(item.protocol==6){
|
||||
html+="TCP"
|
||||
}
|
||||
if(item.protocol==17){
|
||||
html+="UDP"
|
||||
}
|
||||
if(item.protocol==2){
|
||||
html+="<spring:message code='arbitrary'/>"
|
||||
}
|
||||
html+=item.protocol;
|
||||
html+="</label>";
|
||||
html+="</div>";
|
||||
html+="</div>";
|
||||
html+="</div>";
|
||||
/* if(index < (data.ip.length-1) && index != 0){
|
||||
alert("下一行");
|
||||
}
|
||||
html+="<h5 class='page-header'></h5>";*/
|
||||
})
|
||||
html+="</div>";
|
||||
|
||||
}
|
||||
//account信息
|
||||
if(data.account.length > 0){
|
||||
html+="<div id='accountInfo"+index+"' style='display:none;width:1050px;background-color: #f6f3f3;border: 1px solid #c2cad8;padding: 5px;'>";
|
||||
$.each(data.account,function(index,item){
|
||||
html+="<div class='row'>";
|
||||
html+="<div class='col-md-4'>";
|
||||
html+="<div class='form-group'>";
|
||||
html+="<label><spring:message code='key_word'/>:</label>";
|
||||
html+="<label>"
|
||||
html+=item.cfgKeywords;
|
||||
html+="</label>";
|
||||
html+="</div>";
|
||||
html+="</div>";
|
||||
html+="<div class='col-md-4'>";
|
||||
html+="<div class='form-group'>";
|
||||
html+="<label><spring:message code='strong_string'/>:</label>";
|
||||
html+="<label>"
|
||||
html+=item.district;
|
||||
html+="</label>";
|
||||
html+="</div>";
|
||||
html+="</div>";
|
||||
html+="<div class='col-md-4'>";
|
||||
html+="<div class='form-group'>";
|
||||
html+="<label><spring:message code='expression_type'/>:</label>";
|
||||
html+="<label>"
|
||||
if(item.exprType==1){
|
||||
html+="<spring:message code='and'/>"
|
||||
}
|
||||
if(item.exprType==0){
|
||||
html+="<spring:message code='null'/>"
|
||||
}
|
||||
html+="</label>";
|
||||
html+="</div>";
|
||||
html+="</div>";
|
||||
html+="</div>";
|
||||
html+="<div class='row'>";
|
||||
html+="<div class='col-md-4'>";
|
||||
html+="<div class='form-group'>";
|
||||
html+="<label><spring:message code='match_method'/>:</label>";
|
||||
html+="<label>"
|
||||
if(item.matchMethod==0){
|
||||
html+="<spring:message code='substring_match'/>"
|
||||
}
|
||||
if(item.matchMethod==1){
|
||||
html+="<spring:message code='right_match'/>"
|
||||
}
|
||||
if(item.matchMethod==2){
|
||||
html+="<spring:message code='left_match'/>"
|
||||
}
|
||||
if(item.matchMethod==3){
|
||||
html+="<spring:message code='exactly_match'/>"
|
||||
}
|
||||
html+="</label>";
|
||||
html+="</div>";
|
||||
html+="</div>";
|
||||
html+="<div class='col-md-4'>";
|
||||
html+="<div class='form-group'>";
|
||||
html+="<label><spring:message code='whether_hexbinary'/>:</label>";
|
||||
html+="<label>"
|
||||
if(item.isHexbin==1){
|
||||
html+="<spring:message code='hex_binary'/>"
|
||||
}
|
||||
if(item.isHexbin==2){
|
||||
html+="<spring:message code='case_sensitive_nohex'/>"
|
||||
}
|
||||
if(item.isHexbin==0){
|
||||
html+="<spring:message code='case_insensitive_nohex'/>"
|
||||
}
|
||||
html+="</label>";
|
||||
html+="</div>";
|
||||
html+="</div>";
|
||||
html+="<div class='col-md-4'>";
|
||||
html+="<div class='form-group'>";
|
||||
html+="<label></label>";
|
||||
html+="<label>"
|
||||
html+="</label>";
|
||||
html+="</div>";
|
||||
html+="</div>";
|
||||
html+="</div>";
|
||||
/* if(index < (data.ip.length-1) && index != 0){
|
||||
alert("下一行");
|
||||
}
|
||||
html+="<h5 class='page-header'></h5>";*/
|
||||
})
|
||||
html+="</div>";
|
||||
}
|
||||
|
||||
voipIpCfgTab=voipIpCfgTab+html;
|
||||
voipIpCfgTab+="</td>";
|
||||
voipIpCfgTab+="</tr>";
|
||||
$("#"+openId).parent().parent().after(voipIpCfgTab);
|
||||
if(hasAccount && ! hasIp){
|
||||
switchInfo("ip",index);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$("span[id^=close]").on("click",function(){
|
||||
var closeId=$(this).attr("id");
|
||||
var openId=$(this).attr("id").replace("close","open");
|
||||
$("#"+closeId).hide();
|
||||
$("#"+openId).show();
|
||||
$("#"+closeId).parent().parent().next("tr").hide();
|
||||
});
|
||||
});
|
||||
|
||||
function switchInfo(flag,index){
|
||||
//关闭ip信息
|
||||
if("ip" ==flag){
|
||||
$("#ipInfo"+index).hide();
|
||||
$("#downIp"+index).hide();
|
||||
$("#ipTitle"+index).css("background-color","#f6f3f3");
|
||||
$("#accountInfo"+index).show();
|
||||
$("#accountDown"+index).show();
|
||||
$("#accountUp"+index).hide();
|
||||
$("#ipUp"+index).show();
|
||||
$("#ipDown"+index).hide();
|
||||
$("#accountTitle"+index).css("background-color","#eeeeee");
|
||||
}else{
|
||||
//关闭account信息
|
||||
$("#accountInfo"+index).hide();
|
||||
$("#downAccount"+index).hide();
|
||||
$("#accountTitle"+index).css("background-color","#f6f3f3");
|
||||
$("#ipInfo"+index).show();
|
||||
$("#ipDown"+index).show();
|
||||
$("#accountUp"+index).show();
|
||||
$("#accountDown"+index).hide();
|
||||
$("#ipUp"+index).hide();
|
||||
$("#ipTitle"+index).css("background-color","#eeeeee");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="page-content">
|
||||
<div class="theme-panel hidden-xs hidden-sm">
|
||||
<shiro:hasPermission name="website:http:config">
|
||||
<button type="button" class="btn btn-primary"
|
||||
onClick="javascript:window.location='${ctx}/ntc/website/httpForm?functionId=${cfg.functionId}'">
|
||||
<i class="fa fa-plus"></i>
|
||||
<spring:message code="add"></spring:message></button>
|
||||
</shiro:hasPermission>
|
||||
</div>
|
||||
|
||||
<h3 class="page-title">
|
||||
<spring:message code="website_http_control"></spring:message>
|
||||
<small><spring:message code="date_list"/></small>
|
||||
</h3>
|
||||
<h5 class="page-header"></h5>
|
||||
<div class="col-md-12">
|
||||
<div class="portlet">
|
||||
<div class="portlet-body">
|
||||
<div class="row" >
|
||||
<sys:message content="${message}"/>
|
||||
<form:form id="searchForm" modelAttribute="cfg" action="${ctx}/ntc/website/httpList?functionId=${cfg.functionId}" method="post" class="form-search">
|
||||
<input id="functionId" name="functionId" type="hidden" value="${cfg.functionId}"/>
|
||||
<input id="audit" name="audit" type="hidden" value="${audit}"/>
|
||||
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
|
||||
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
|
||||
<sys:tableSort id="orderBy" name="orderBy" value="${page.orderBy}"
|
||||
callback="page();" />
|
||||
<!-- 筛选按钮展开状态-->
|
||||
<input id="isFilterAction" name="isFilterAction" type="hidden" value="${cfg.isFilterAction }"/>
|
||||
<!-- 搜索内容与操作按钮栏 -->
|
||||
<div class="col-md-12">
|
||||
<div class="pull-left">
|
||||
<c:set var="state"><spring:message code='state'/></c:set>
|
||||
<form:select path="isAudit" class="selectpicker select2 input-small">
|
||||
<form:option value=""><spring:message code="all_states"/></form:option>
|
||||
<form:option value="0"><spring:message code="created"></spring:message></form:option>
|
||||
<form:option value="1"><spring:message code="approved"></spring:message></form:option>
|
||||
<form:option value="2"><spring:message code="unapproved"></spring:message></form:option>
|
||||
<form:option value="3"><spring:message code="cancel_approved"></spring:message></form:option>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
<div class="pull-left">
|
||||
|
||||
<div class="input-group">
|
||||
<div class="input-group-btn">
|
||||
|
||||
<form:select path="seltype" class="selectpicker select2 input-small" >
|
||||
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
|
||||
<%-- <form:option value="voipIp.srcIpAddress"><spring:message code="client_ip"/></form:option>
|
||||
<form:option value="voipIp.srcPort"><spring:message code="client_port"/></form:option>
|
||||
<form:option value="voipAccount.cfgKeywords"><spring:message code="key_word"/></form:option>
|
||||
<form:option value="voipAccount.district"><spring:message code="strong_string"/></form:option> --%>
|
||||
</form:select>
|
||||
|
||||
</div>
|
||||
|
||||
<input id="intype" class="form-control input-medium" type="text" value="">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
<button type="button" class="btn blue" onClick="return page()"> <i class="fa fa-search"></i> <spring:message code="search"/> </button>
|
||||
<button type="button" class="btn btn-default" id="resetBtn"> <i class="fa fa-refresh"></i> <spring:message code="reset"/> </button>
|
||||
<button type="button" class="btn btn-default" id="filter-btn"> <spring:message code="filter"/> <i class="fa fa-angle-double-down"></i></button>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<shiro:hasPermission name="website:http:config">
|
||||
<sys:delRow url="${ctx}/ntc/website/httpForm" id="contentTable" label="update"></sys:delRow>
|
||||
<sys:delRow url="${ctx}/ntc/website/updateAvVoip?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
|
||||
</shiro:hasPermission>
|
||||
<shiro:hasPermission name="website:http:audit">
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
<i class="fa fa-wrench"></i> <spring:message code="examine"></spring:message>
|
||||
<i class="fa fa-angle-down"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu pull-right">
|
||||
<li><sys:delRow url="${ctx}/ntc/website/auditHttp?isAudit=1&isValid=1&functionId=${cfg.functionId }" id="contentTable" label="approved"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/ntc/website/auditHttp?isAudit=2&isValid=0&functionId=${cfg.functionId }" id="contentTable" label="unapproved"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/ntc/website/auditHttp?isAudit=3&isValid=0&functionId=${cfg.functionId }" id="contentTable" label="cancelPass"></sys:delRow></li>
|
||||
</ul>
|
||||
</div>
|
||||
</shiro:hasPermission>
|
||||
<a class="btn btn-icon-only btn-default setfields tooltips"
|
||||
data-container="body" data-placement="top" data-original-title=<spring:message code="custom_columns"/> href="javascript:;">
|
||||
<i class="icon-wrench"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /搜索内容与操作按钮栏 -->
|
||||
|
||||
<!-- 筛选搜索内容栏默认隐藏-->
|
||||
<div class="col-md-12 filter-action-select-panle hide" >
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-3">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label"><spring:message code='request_number'/></label>
|
||||
<c:set var="select"><spring:message code='select'/></c:set>
|
||||
<form:select path="requestId" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<c:forEach items="${requestInfos}" var="requestInfo" >
|
||||
<form:option value="${requestInfo.id}"><spring:message code="${requestInfo.requestTitle}"></spring:message></form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label"><spring:message code='type'/></label>
|
||||
<form:select path="classify" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<c:forEach items="${fls}" var="fl" >
|
||||
<form:option value="${fl.serviceDictId}"><spring:message code="${fl.itemValue}"></spring:message></form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label"><spring:message code='attribute'/></label>
|
||||
<c:set var="select"><spring:message code='select'/></c:set>
|
||||
<form:select path="attribute" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<c:forEach items="${xzs}" var="xz" >
|
||||
<form:option value="${xz.serviceDictId}"><spring:message code="${xz.itemValue}"></spring:message></form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label"><spring:message code='label'/></label>
|
||||
<form:select path="lable" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<c:forEach items="${lables}" var="lable" >
|
||||
<form:option value="${lable.serviceDictId}"><spring:message code="${lable.itemValue}"></spring:message></form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="config_time"/>:</label>
|
||||
<input name="search_create_time_start" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value='${cfg.search_create_time_start}' pattern='yyyy-MM-dd HH:mm:ss'/>" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label> </label>
|
||||
<input name="search_create_time_end" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_create_time_end}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="edit_time"/>:</label>
|
||||
<input name="search_edit_time_start" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_edit_time_start}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label> </label>
|
||||
<input name="search_edit_time_end" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_edit_time_end}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="audit_time"/>:</label>
|
||||
<input name="search_audit_time_start" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_audit_time_start}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label> </label>
|
||||
<input name="search_audit_time_end" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_audit_time_end}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<!-- /筛选搜索内容栏 结束-->
|
||||
</form:form>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><input type="checkbox" class="i-checks" id="checkAll"></th>
|
||||
<th class="cfgDesc"><spring:message code="config_describe"/></th>
|
||||
<th><spring:message code="block_type"/></th>
|
||||
<th><spring:message code="whether_area_block"/></th>
|
||||
<th><spring:message code="letter"/></th>
|
||||
<th><spring:message code="type"/></th>
|
||||
<th><spring:message code="attribute"/></th>
|
||||
<th><spring:message code="label"/></th>
|
||||
<th><spring:message code="valid_identifier"/></th>
|
||||
<th><spring:message code="is_audit"/></th>
|
||||
<th><spring:message code="creator"/></th>
|
||||
<th class="sort-column a.create_time"><spring:message code="config_time"/></th>
|
||||
<th><spring:message code="editor"/></th>
|
||||
<th class="sort-column a.edit_time"><spring:message code="edit_time"/></th>
|
||||
<th><spring:message code="auditor"/></th>
|
||||
<th class="sort-column a.audit_time"><spring:message code="audit_time"/></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:forEach items="${page.list }" var="indexCfg" varStatus="status" step="1">
|
||||
<tr>
|
||||
<td>
|
||||
<span id="open${status.index}" class="" compileId="${indexCfg.compileId}" cfgId="${indexCfg.cfgId}"> ▷ </span><span style="display: none" id="close${status.index}" > ▼ </span>
|
||||
<input type="checkbox" class="i-checks child-checks" id="${indexCfg.cfgId}" value="${indexCfg.isAudit}">
|
||||
</td>
|
||||
<td>${indexCfg.cfgDesc }</td>
|
||||
<td>
|
||||
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
|
||||
<c:if test="${dict.itemValue eq indexCfg.action }">
|
||||
<spring:message code="${dict.itemCode }"/>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td>
|
||||
<c:if test="${indexCfg.isAreaEffective==0}"><spring:message code="no"/></c:if>
|
||||
<c:if test="${indexCfg.isAreaEffective==1}"><spring:message code="yes"/></c:if>
|
||||
</td>
|
||||
<td>${indexCfg.requestName }</td>
|
||||
<td>
|
||||
<c:forEach items="${fn:split(indexCfg.classify,',')}" var="classifyId">
|
||||
<c:forEach items="${fls}" var="fl">
|
||||
<c:if test="${classifyId eq fn:trim(fl.serviceDictId)}">
|
||||
${fl.itemValue},
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
${classifyName[status]}
|
||||
</td>
|
||||
<td>
|
||||
<c:forEach items="${fn:split(indexCfg.attribute,',')}" var="attributeId">
|
||||
<c:forEach items="${xzs}" var="xz">
|
||||
<c:if test="${attributeId eq fn:trim(xz.serviceDictId)}">${xz.itemValue},</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td>
|
||||
<c:forEach items="${fn:split(indexCfg.lable,',')}" var="lableId">
|
||||
<c:forEach items="${lables}" var="lable">
|
||||
<c:if test="${lableId eq fn:trim(lable.serviceDictId)}">${lable.itemValue},</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td>
|
||||
<c:if test="${indexCfg.isValid==0}"><spring:message code="no"/></c:if>
|
||||
<c:if test="${indexCfg.isValid==1}"><spring:message code="yes"/></c:if>
|
||||
<c:if test="${indexCfg.isValid==-1}"><spring:message code="deleted"/></c:if>
|
||||
</td>
|
||||
<td>
|
||||
<c:choose>
|
||||
<c:when test="${indexCfg.isAudit eq '0'}"><span class="label label-danger"><spring:message code="created"></spring:message></span></c:when>
|
||||
<c:when test="${indexCfg.isAudit eq '1'}"><span class="label label-success"><spring:message code="approved"></spring:message></span></c:when>
|
||||
<c:when test="${indexCfg.isAudit eq '2'}"><span class="label label-warning"><spring:message code="unapproved"></spring:message></span></c:when>
|
||||
<c:when test="${indexCfg.isAudit eq '3'}"><span class="label label-warning"><spring:message code="cancel_approved"></spring:message></span></c:when>
|
||||
</c:choose>
|
||||
</td>
|
||||
<td>${indexCfg.creatorName }</td>
|
||||
<td><fmt:formatDate value="${indexCfg.createTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td>${indexCfg.editorName }</td>
|
||||
<td><fmt:formatDate value="${indexCfg.editTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td>${indexCfg.auditorName }</td>
|
||||
<td><fmt:formatDate value="${indexCfg.auditTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="page" style="margin-top:40px">${page}</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user