协议IP表结构变更,修改协议IP管理功能。
This commit is contained in:
@@ -26,26 +26,21 @@ public class SpecificServiceHostCfg extends BaseEntity<SpecificServiceHostCfg>{
|
||||
@Expose
|
||||
private Integer ipType; //ip地址类型 ipV4=4 ipV6=6
|
||||
@Expose
|
||||
private String srcIp; //src_ip 源IP地址 varchar(64) N 缺省0.0.0.0值表示任意
|
||||
@Expose
|
||||
private String srcIpMask; //src_ip_mask 源地址掩码 varchar(64) N IPV4:255.255.255.255表示无掩码,即精确IP匹配,0.0.0.0值表示任意;
|
||||
//IPV6:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF表示无掩码,::(两个半角冒号)表示任意。非0掩码值必须是2的指数幂,下同。
|
||||
@Expose
|
||||
private String srcPort; //src_port 源端口 varchar(6) N 0表示任意值
|
||||
@Expose
|
||||
private String srcPortMask; //src_port_mask 源端口掩码 varchar(6) N 65535表示无掩码,即精确端口匹配,0表示任意
|
||||
@Expose
|
||||
private String dstIp; //dst_ip 目的IP地址 varchar(64) N 缺省0.0.0.0值表示任意
|
||||
@Expose
|
||||
private String dstIpMask; //dst_ip_mask 目的地址掩码 varchar(64) N 同源ip地址掩码
|
||||
@Expose
|
||||
private String dstPort; //dst_port 目的端口 varchar(6) N 目的端口,0表示任意值
|
||||
@Expose
|
||||
private String dstPortMask; //dst_port_mask 目的端口掩码 varchar(6) N 同源端口掩码
|
||||
@Expose
|
||||
private Integer direction;; //direction 方向 int N 0双向,1单向,默认缺省为双向。
|
||||
@Expose
|
||||
private Integer protocol; //protocol 协议 int N 6表示tcp,17表示udp,0表示任意
|
||||
@Expose
|
||||
private Integer ipPattern; //ip格式
|
||||
@Expose
|
||||
private String srcIpAddress; //源(客户端)IP地址
|
||||
@Expose
|
||||
private String destIpAddress; //目的(服务器)IP地址
|
||||
@Expose
|
||||
private Integer portPattern; //端口格式
|
||||
@Expose
|
||||
private String srcPort; //源(客户端)端口
|
||||
@Expose
|
||||
private String destPort;//目的(服务器)端口
|
||||
|
||||
private Integer isValid; //is_valid 有效标识 int N 0无效,1有效
|
||||
private Integer isAudit; //is_audit 是否审核 int N 0未审核,1审核通过,2审核未通过,3取消审核通过(即删除)
|
||||
@@ -90,19 +85,13 @@ public class SpecificServiceHostCfg extends BaseEntity<SpecificServiceHostCfg>{
|
||||
this.ipType = ipType;
|
||||
}
|
||||
@ExcelField(title="client_ip",align=2,sort=30,fieldType=String.class)
|
||||
public String getSrcIp() {
|
||||
return srcIp;
|
||||
public String getSrcIpAddress() {
|
||||
return srcIpAddress;
|
||||
}
|
||||
public void setSrcIp(String srcIp) {
|
||||
this.srcIp = srcIp;
|
||||
}
|
||||
@ExcelField(title="client_address_mask",align=2,sort=40,fieldType=String.class)
|
||||
public String getSrcIpMask() {
|
||||
return srcIpMask;
|
||||
}
|
||||
public void setSrcIpMask(String srcIpMask) {
|
||||
this.srcIpMask = srcIpMask;
|
||||
public void setSrcIpAddress(String srcIpAddress) {
|
||||
this.srcIpAddress = srcIpAddress;
|
||||
}
|
||||
|
||||
@ExcelField(title="client_port",align=2,sort=50,fieldType=String.class)
|
||||
public String getSrcPort() {
|
||||
return srcPort;
|
||||
@@ -110,40 +99,34 @@ public class SpecificServiceHostCfg extends BaseEntity<SpecificServiceHostCfg>{
|
||||
public void setSrcPort(String srcPort) {
|
||||
this.srcPort = srcPort;
|
||||
}
|
||||
@ExcelField(title="client_port_mask",align=2,sort=60,fieldType=String.class)
|
||||
public String getSrcPortMask() {
|
||||
return srcPortMask;
|
||||
}
|
||||
public void setSrcPortMask(String srcPortMask) {
|
||||
this.srcPortMask = srcPortMask;
|
||||
}
|
||||
|
||||
@ExcelField(title="server_ip",align=2,sort=70,fieldType=String.class)
|
||||
public String getDstIp() {
|
||||
return dstIp;
|
||||
public String getDestIpAddress() {
|
||||
return destIpAddress;
|
||||
}
|
||||
public void setDstIp(String dstIp) {
|
||||
this.dstIp = dstIp;
|
||||
}
|
||||
@ExcelField(title="server_address_mask",align=2,sort=80,fieldType=String.class)
|
||||
public String getDstIpMask() {
|
||||
return dstIpMask;
|
||||
}
|
||||
public void setDstIpMask(String dstIpMask) {
|
||||
this.dstIpMask = dstIpMask;
|
||||
public void setDestIpAddress(String destIpAddress) {
|
||||
this.destIpAddress = destIpAddress;
|
||||
}
|
||||
@ExcelField(title="server_port",align=2,sort=90,fieldType=String.class)
|
||||
public String getDstPort() {
|
||||
return dstPort;
|
||||
public String getDestPort() {
|
||||
return destPort;
|
||||
}
|
||||
public void setDstPort(String dstPort) {
|
||||
this.dstPort = dstPort;
|
||||
public void setDestPort(String destPort) {
|
||||
this.destPort = destPort;
|
||||
}
|
||||
@ExcelField(title="server_port_mask",align=2,sort=100,fieldType=String.class)
|
||||
public String getDstPortMask() {
|
||||
return dstPortMask;
|
||||
@ExcelField(title="ip_pattern",align=2,sort=21,fieldType=Integer.class)
|
||||
public Integer getIpPattern() {
|
||||
return ipPattern;
|
||||
}
|
||||
public void setDstPortMask(String dstPortMask) {
|
||||
this.dstPortMask = dstPortMask;
|
||||
public void setIpPattern(Integer ipPattern) {
|
||||
this.ipPattern = ipPattern;
|
||||
}
|
||||
@ExcelField(title="port_pattern",align=2,sort=40,fieldType=Integer.class)
|
||||
public Integer getPortPattern() {
|
||||
return portPattern;
|
||||
}
|
||||
public void setPortPattern(Integer portPattern) {
|
||||
this.portPattern = portPattern;
|
||||
}
|
||||
@ExcelField(title="direction",align=2,sort=110)
|
||||
public Integer getDirection() {
|
||||
@@ -209,9 +192,6 @@ public class SpecificServiceHostCfg extends BaseEntity<SpecificServiceHostCfg>{
|
||||
public void setAuditTime(Date auditTime) {
|
||||
this.auditTime = auditTime;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public Date getBeginDate() {
|
||||
return beginDate;
|
||||
}
|
||||
|
||||
@@ -181,14 +181,16 @@ public class SpecificServiceCfgController extends BaseController {
|
||||
|
||||
/**
|
||||
* 父节点选择树形结构
|
||||
* @param extId
|
||||
* @param extId排除节点id
|
||||
* @param isShowHide
|
||||
* @param isLeafShow:叶子节点是否显示
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping(value = "treeData")
|
||||
public List<Map<String, Object>> treeData(@RequestParam(required=false) String extId,@RequestParam(required=false) String isShowHide, HttpServletResponse response){
|
||||
public List<Map<String, Object>> treeData(@RequestParam(required=false) String extId,@RequestParam(required=false) String isShowHide,
|
||||
@RequestParam(required=false)boolean isLeafShow,HttpServletResponse response){
|
||||
List<Map<String, Object>> mapList = Lists.newArrayList();
|
||||
Map<String, Object> map2 = Maps.newHashMap();
|
||||
map2.put("id", 0);
|
||||
@@ -200,7 +202,8 @@ public class SpecificServiceCfgController extends BaseController {
|
||||
for (int i=0; i<list.size(); i++){
|
||||
SpecificServiceCfg specificServiceCfg = list.get(i);
|
||||
if(StringUtils.isBlank(extId)||(extId!=null&&!extId.equals(specificServiceCfg.getSpecServiceId().toString()))){
|
||||
if(specificServiceCfg.getIsValid().equals(0)||specificServiceCfg.getIsLeaf().equals(1)){
|
||||
if(specificServiceCfg.getIsValid().equals(0)||
|
||||
(!isLeafShow && specificServiceCfg.getIsLeaf().equals(1))){
|
||||
continue;
|
||||
}
|
||||
Map<String, Object> map = Maps.newHashMap();
|
||||
|
||||
@@ -7,16 +7,14 @@
|
||||
<id column="host_id" property="hostId" jdbcType="INTEGER" />
|
||||
<result column="spec_service_id" property="specServiceId" jdbcType="INTEGER" />
|
||||
<result column="ip_type" property="ipType" jdbcType="INTEGER" />
|
||||
<result column="src_ip" property="srcIp" jdbcType="VARCHAR" />
|
||||
<result column="src_ip_mask" property="srcIpMask" jdbcType="VARCHAR" />
|
||||
<result column="src_port" property="srcPort" jdbcType="VARCHAR" />
|
||||
<result column="src_port_mask" property="srcPortMask" jdbcType="VARCHAR" />
|
||||
<result column="dst_ip" property="dstIp" jdbcType="VARCHAR" />
|
||||
<result column="dst_ip_mask" property="dstIpMask" jdbcType="VARCHAR" />
|
||||
<result column="dst_port" property="dstPort" jdbcType="VARCHAR" />
|
||||
<result column="dst_port_mask" property="dstPortMask" jdbcType="VARCHAR" />
|
||||
<result column="direction" property="direction" jdbcType="INTEGER" />
|
||||
<result column="protocol" property="protocol" 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="is_valid" property="isValid" jdbcType="INTEGER" />
|
||||
<result column="is_audit" property="isAudit" jdbcType="INTEGER" />
|
||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
|
||||
@@ -39,17 +37,8 @@
|
||||
<sql id="specificServiceHostCfgColumns">
|
||||
s.host_id AS hostId,
|
||||
s.spec_service_id AS specServiceId,
|
||||
s.ip_type AS ipType,
|
||||
s.src_ip AS srcIp,
|
||||
s.src_ip_mask AS srcIpMask,
|
||||
s.src_port AS srcPort,
|
||||
s.src_port_mask AS srcPortMask,
|
||||
s.dst_ip AS dstIp,
|
||||
s.dst_ip_mask AS dstIpMask,
|
||||
s.dst_port AS dstPort,
|
||||
s.dst_port_mask AS dstPortMask,
|
||||
s.direction AS direction,
|
||||
s.protocol AS protocol,
|
||||
s.ip_type,s.src_ip_address,s.ip_pattern,s.port_pattern,s.src_port
|
||||
,s.protocol,s.direction,s.dest_ip_address,s.dest_port,
|
||||
s.is_valid AS isValid,
|
||||
s.is_audit AS isAudit,
|
||||
s.creator_id AS "creator.id",
|
||||
@@ -81,11 +70,11 @@ select * from specific_service_host_cfg where is_valid = 1
|
||||
<if test="ipType !=null" >
|
||||
AND ip_type = #{ipType}
|
||||
</if>
|
||||
<if test="srcIp !=null and srcIp !='' " >
|
||||
AND src_ip = #{srcIp}
|
||||
<if test="srcIpAddress !=null and srcIpAddress !='' " >
|
||||
AND src_ip_address = #{srcIpAddress}
|
||||
</if>
|
||||
<if test="dstIp !=null and dstIp !='' " >
|
||||
AND dst_ip = #{dstIp}
|
||||
<if test="destIpAddress !=null and destIpAddress !='' " >
|
||||
AND dest_ip_address = #{destIpAddress}
|
||||
</if>
|
||||
<if test="protocol !=null" >
|
||||
AND protocol = #{protocol}
|
||||
@@ -131,24 +120,40 @@ from specific_service_host_cfg s where s.spec_service_id = #{specServiceId}
|
||||
|
||||
<!-- 新增 -->
|
||||
<insert id="insert" parameterType="com.nis.domain.specific.SpecificServiceHostCfg">
|
||||
insert into specific_service_host_cfg (spec_service_id,ip_type,src_ip,src_ip_mask,src_port,src_port_mask,dst_ip,dst_ip_mask,dst_port,dst_port_mask,direction,protocol,is_valid,is_audit,creator_id,create_time,editor_id,edit_time,auditor_id,audit_time)
|
||||
values(#{specServiceId},#{ipType},#{srcIp},#{srcIpMask},#{srcPort},#{srcPortMask},#{dstIp},#{dstIpMask},#{dstPort},#{dstPortMask},#{direction},#{protocol},#{isValid},#{isAudit},#{creator.id},#{createTime},#{editor.id},#{editTime},#{auditor.id},#{auditTime})
|
||||
insert into specific_service_host_cfg (spec_service_id,ip_type,
|
||||
src_ip_address,
|
||||
ip_pattern,
|
||||
port_pattern,
|
||||
src_port,
|
||||
protocol,
|
||||
direction,
|
||||
dest_port,
|
||||
dest_ip_address,
|
||||
is_valid,is_audit,creator_id,create_time,editor_id,edit_time,auditor_id,audit_time)
|
||||
values(#{specServiceId},#{ipType,jdbcType=INTEGER},
|
||||
#{srcIpAddress,jdbcType=VARCHAR},
|
||||
#{ipPattern,jdbcType=INTEGER},
|
||||
#{portPattern,jdbcType=INTEGER},
|
||||
#{srcPort,jdbcType=VARCHAR},
|
||||
#{protocol,jdbcType=INTEGER},
|
||||
#{direction,jdbcType=INTEGER},
|
||||
#{destPort,jdbcType=VARCHAR},
|
||||
#{destIpAddress,jdbcType=VARCHAR},
|
||||
#{isValid},#{isAudit},#{creator.id},#{createTime},#{editor.id},#{editTime},#{auditor.id},#{auditTime})
|
||||
</insert>
|
||||
<!-- 修改 -->
|
||||
<update id="update" parameterType="com.nis.domain.specific.SpecificServiceHostCfg">
|
||||
update specific_service_host_cfg s set
|
||||
s.spec_service_id = #{specServiceId},
|
||||
s.ip_type = #{ipType},
|
||||
s.src_ip = #{srcIp},
|
||||
s.src_ip_mask = #{srcIpMask},
|
||||
s.src_port = #{srcPort},
|
||||
s.src_port_mask = #{srcPortMask},
|
||||
s.dst_ip = #{dstIp},
|
||||
s.dst_ip_mask = #{dstIpMask},
|
||||
s.dst_port = #{dstPort},
|
||||
s.dst_port_mask = #{dstPortMask},
|
||||
s.direction = #{direction},
|
||||
s.protocol = #{protocol},
|
||||
s.IP_TYPE = #{ipType,jdbcType=INTEGER},
|
||||
s.IP_PATTERN=#{ipPattern,jdbcType=INTEGER},
|
||||
s.SRC_IP_ADDRESS=#{srcIpAddress,jdbcType=VARCHAR},
|
||||
s.DEST_IP_ADDRESS=#{destIpAddress,jdbcType=VARCHAR},
|
||||
s.PORT_PATTERN=#{portPattern,jdbcType=INTEGER},
|
||||
s.SRC_PORT=#{srcPort,jdbcType=VARCHAR},
|
||||
s.DEST_PORT=#{destPort,jdbcType=VARCHAR},
|
||||
s.direction = #{direction,jdbcType=INTEGER},
|
||||
s.protocol = #{protocol,jdbcType=INTEGER},
|
||||
s.is_valid = #{isValid},
|
||||
s.is_audit = #{isAudit},
|
||||
s.creator_id = #{creator.id},
|
||||
|
||||
@@ -83,10 +83,25 @@ public class SpecificServiceCfgService extends BaseService{
|
||||
specificServiceCfgDao.insertConfigGroupInfo(group);
|
||||
}
|
||||
if(specificServiceCfg.getSpecServiceId()==null){//新增
|
||||
if(specificServiceCfg.getIsLeaf()==null){
|
||||
if(specificServiceCfg.getParent().getSpecServiceId().equals(0)){
|
||||
specificServiceCfg.setIsLeaf(0);
|
||||
}else{
|
||||
specificServiceCfg.setIsLeaf(1);
|
||||
}
|
||||
}
|
||||
|
||||
specificServiceCfg.setIsValid(1);
|
||||
specificServiceCfg.setOpTime(new Date());
|
||||
specificServiceCfgDao.insert(specificServiceCfg);
|
||||
}else{//修改
|
||||
if(specificServiceCfg.getIsLeaf()==null){
|
||||
if(specificServiceCfg.getParent().getSpecServiceId().equals(0)){
|
||||
specificServiceCfg.setIsLeaf(0);
|
||||
}else{
|
||||
specificServiceCfg.setIsLeaf(1);
|
||||
}
|
||||
}
|
||||
specificServiceCfg.setOpTime(new Date());
|
||||
specificServiceCfgDao.update(specificServiceCfg);
|
||||
}
|
||||
|
||||
@@ -59,34 +59,44 @@ public class SpecificServiceHostCfgService extends BaseService{
|
||||
public void saveOrUpdate(SpecificServiceHostCfg specificServiceHostCfg) {
|
||||
SysUser user = UserUtils.getUser();
|
||||
String defaultIp = "0.0.0.0"; //缺省0.0.0.0值表示任意
|
||||
String defaultIpMask = "";
|
||||
if(specificServiceHostCfg.getIpType().equals(4)){
|
||||
defaultIpMask = "255.255.255.255"; //255.255.255.255表示无掩码
|
||||
if(specificServiceHostCfg.getIpPattern()==1){
|
||||
defaultIp = "0.0.0.0/32"; //0.0.0.0表示任意
|
||||
}else if(specificServiceHostCfg.getIpPattern()==2){
|
||||
defaultIp = "0.0.0.0-0.0.0.0";
|
||||
}else{
|
||||
defaultIp = "0.0.0.0";
|
||||
}
|
||||
|
||||
}
|
||||
if(specificServiceHostCfg.getIpType().equals(6)){
|
||||
defaultIpMask = "FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF"; //FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF表示无掩码
|
||||
if(specificServiceHostCfg.getIpPattern()==1){
|
||||
defaultIp = "::/64";
|
||||
}else if(specificServiceHostCfg.getIpPattern()==2){
|
||||
defaultIp = "::-::";
|
||||
}else{
|
||||
defaultIp = "::";
|
||||
}
|
||||
}
|
||||
String defaultPort = "0"; //0表示任意
|
||||
if(specificServiceHostCfg.getPortPattern().equals(1)){
|
||||
defaultPort = "0";
|
||||
}else{
|
||||
defaultPort = "0/0";
|
||||
}
|
||||
String defaultPortMask = "65535"; //65535表示无掩码
|
||||
//ip地址默认 缺省0.0.0.0值表示任意
|
||||
if(StringUtil.isBlank(specificServiceHostCfg.getSrcIp())){
|
||||
specificServiceHostCfg.setSrcIp(defaultIp);
|
||||
if(StringUtil.isBlank(specificServiceHostCfg.getSrcIpAddress())){
|
||||
specificServiceHostCfg.setSrcIpAddress(defaultIp);
|
||||
}
|
||||
if(StringUtil.isBlank(specificServiceHostCfg.getDstIp())){
|
||||
specificServiceHostCfg.setDstIp(defaultIp);
|
||||
}
|
||||
//ip掩码默认
|
||||
if(StringUtil.isBlank(specificServiceHostCfg.getSrcIpMask())){
|
||||
specificServiceHostCfg.setSrcIpMask(defaultIpMask);
|
||||
}
|
||||
if(StringUtil.isBlank(specificServiceHostCfg.getDstIpMask())){
|
||||
specificServiceHostCfg.setDstIpMask(defaultIpMask);
|
||||
if(StringUtil.isBlank(specificServiceHostCfg.getDestIpAddress())){
|
||||
specificServiceHostCfg.setDestIpAddress(defaultIp);
|
||||
}
|
||||
//端口掩码默认
|
||||
if(StringUtil.isBlank(specificServiceHostCfg.getSrcPortMask())){
|
||||
specificServiceHostCfg.setSrcPortMask(defaultPortMask);
|
||||
if(StringUtil.isBlank(specificServiceHostCfg.getSrcPort())){
|
||||
specificServiceHostCfg.setSrcPort(defaultPort);
|
||||
}
|
||||
if(StringUtil.isBlank(specificServiceHostCfg.getDstPortMask())){
|
||||
specificServiceHostCfg.setDstPortMask(defaultPortMask);
|
||||
if(StringUtil.isBlank(specificServiceHostCfg.getDestPort())){
|
||||
specificServiceHostCfg.setDestPort(defaultPort);
|
||||
}
|
||||
//方向缺省
|
||||
if(specificServiceHostCfg.getDirection()==null){
|
||||
@@ -181,7 +191,7 @@ public class SpecificServiceHostCfgService extends BaseService{
|
||||
}
|
||||
|
||||
//源IP
|
||||
if(!StringUtil.isEmpty(specificServiceHostCfg.getSrcIp())&&!BasicProvingUtil.isIpOrIpMask(specificServiceHostCfg.getSrcIp(), specificServiceHostCfg.getIpType())){
|
||||
/*if(!StringUtil.isEmpty(specificServiceHostCfg.getSrcIp())&&!BasicProvingUtil.isIpOrIpMask(specificServiceHostCfg.getSrcIp(), specificServiceHostCfg.getIpType())){
|
||||
logger.info(msgProp.getProperty("the_line_of").replace("rowNum", (i+3)+"")+ msgProp.getProperty("val_src_ip"));
|
||||
// throw new RuntimeException(msgProp.getProperty("the_line_of").replace("rowNum", (i+3)+"")+ msgProp.getProperty("val_src_ip"));
|
||||
importErrorInfo=new ImportErrorInfo(i+3+"",msgProp.getProperty("client_ip"),msgProp.getProperty("the_line_of").replace("rowNum", (i+3)+"")+ msgProp.getProperty("val_src_ip"));
|
||||
@@ -293,7 +303,7 @@ public class SpecificServiceHostCfgService extends BaseService{
|
||||
//方向缺省
|
||||
if(specificServiceHostCfg.getDirection()==null){
|
||||
specificServiceHostCfg.setDirection(0);
|
||||
}
|
||||
}*/
|
||||
Date date = new Date();
|
||||
specificServiceHostCfg.setIsValid(1);
|
||||
specificServiceHostCfg.setCreator(user);
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
var validateForm;
|
||||
$(document).ready(function() {
|
||||
//校验叶子节点有下级不得更改为叶子节点
|
||||
jQuery.validator.addMethod("leafChange",function(value,element){
|
||||
/* jQuery.validator.addMethod("leafChange",function(value,element){
|
||||
var flagLeafChange=false;
|
||||
$.ajax({
|
||||
type:'post',
|
||||
@@ -19,7 +19,7 @@
|
||||
}
|
||||
});
|
||||
return flagLeafChange;
|
||||
},"<spring:message code='leafChange'/>");
|
||||
},"<spring:message code='leafChange'/>"); */
|
||||
|
||||
$("#name").focus();
|
||||
validateForm = $("#inputForm").validate({
|
||||
@@ -99,7 +99,7 @@
|
||||
<div class="col-md-4">
|
||||
<c:set var="fatherName"><spring:message code="root_node"/></c:set>
|
||||
<sys:treeselect id="specificServiceCfg" name="parent.specServiceId" value="${specificServiceCfg.parent.specServiceId}" labelName="parent.specServiceName" labelValue="${specificServiceCfg.parent.specServiceId eq '0'?fatherName:fns:getBySpecServiceId(specificServiceCfg.parent.specServiceId).specServiceName}"
|
||||
title="" url="/specific/specificServiceCfg/treeData" extId="${specificServiceCfg.specServiceId}" cssClass="required form-control"/>
|
||||
title="" url="/specific/specificServiceCfg/treeData?isLeafShow=false" extId="${specificServiceCfg.specServiceId}" cssClass="required form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@@ -120,7 +120,7 @@
|
||||
<form:input path="groupId" htmlEscape="false" maxlength="50" range="[0,2147483647]" class="form-control digits" placeholder="0"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<%-- <div class="form-group">
|
||||
<label class="col-md-3 control-label"><font color="red">*</font><spring:message code="is_leaf"/>:</label>
|
||||
<div class="col-md-4">
|
||||
<form:select path="isLeaf" class="form-control leafChange">
|
||||
@@ -129,7 +129,7 @@
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
</div>
|
||||
</div> --%>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"><spring:message code="protocol_desc"/>:</label>
|
||||
<div class="col-md-4">
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" type="text/css"
|
||||
href="${ctxStatic}/pages/css/dictInfo.css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
var validateForm;
|
||||
function selectP(){
|
||||
@@ -88,7 +87,6 @@ function selectP(){
|
||||
<h3 class="page-title">
|
||||
<spring:message code="agreement_ip_configuration" />
|
||||
</h3>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet box blue">
|
||||
@@ -99,13 +97,10 @@ function selectP(){
|
||||
</div>
|
||||
<div class="tools"></div>
|
||||
</div>
|
||||
|
||||
<div class="portlet-body form">
|
||||
|
||||
<div class="form-body">
|
||||
|
||||
<!-- BEGIN FORM-->
|
||||
<form:form id="inputForm" modelAttribute="specificServiceHostCfg" action="${ctx}/specific/specificServiceHostCfg/saveOrUpdate" method="post" class="form-horizontal" >
|
||||
<div class="form-body row">
|
||||
<form:hidden path="hostId" class="form-control" />
|
||||
<sys:message content="${message}" />
|
||||
<div class="row">
|
||||
@@ -113,15 +108,14 @@ function selectP(){
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"><font color="red">*</font><spring:message code='protocol_name' />:</label>
|
||||
<c:set var="spec_service_id"><spring:message code='select' /></c:set>
|
||||
<form:select path="specServiceId" class="selectpicker select2 col-md-6" title="${spec_service_id}" data-live-search="true" data-live-search-placeholder="search" onchange="selectP()">
|
||||
<c:forEach items="${listSpecService}" var="specService" >
|
||||
<form:option value="${specService.specServiceId}">${specService.specServiceName}</form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
<!-- <label class="col-md-3 control-label dfdf" > </label>
|
||||
<div class="col-md-6 dfdf">
|
||||
<label class="error">不能为空!</label>
|
||||
</div> -->
|
||||
<div class="col-md-6">
|
||||
<sys:treeselect id="specServiceId" name="specServiceId" value="${specificServiceCfg.parent.specServiceId}"
|
||||
labelName="parent.specServiceName"
|
||||
labelValue="${empty specificServiceHostCfg.specServiceId?spec_service_id:fns:getBySpecServiceId(specificServiceHostCfg.specServiceId).specServiceName}"
|
||||
title="${spec_service_id}" url="/specific/specificServiceCfg/treeData?isLeafShow=false" extId=""
|
||||
cssClass="form-control required"/>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -129,9 +123,9 @@ function selectP(){
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"><spring:message code='direction' />:</label>
|
||||
<div class="col-md-6">
|
||||
<form:select path="direction" class="select2 form-control" >
|
||||
<form:select path="direction" class="select2 form-control required" >
|
||||
<form:option value=""><spring:message code='select' /></form:option>
|
||||
<c:forEach items="${fns:getDictList('SPEC_DIRECTION')}" var="dict">
|
||||
<c:forEach items="${fns:getDictList('DIRECTION')}" var="dict">
|
||||
<form:option value="${dict.itemCode}"><spring:message code='${dict.itemValue}' /></form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
@@ -147,7 +141,7 @@ function selectP(){
|
||||
<div class="col-md-6">
|
||||
<form:select path="protocol" class="select2 form-control required" >
|
||||
<form:option value=""><spring:message code='select' /></form:option>
|
||||
<c:forEach items="${fns:getDictList('SPEC_PROTOCOL')}" var="dict">
|
||||
<c:forEach items="${fns:getDictList('PROTOCOL')}" var="dict">
|
||||
<form:option value="${dict.itemCode}"><spring:message code='${dict.itemValue}' /></form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
@@ -159,8 +153,7 @@ function selectP(){
|
||||
<label class="col-md-3 control-label"><font color="red">*</font><spring:message code='ip_type' />:</label>
|
||||
<div class="col-md-6">
|
||||
<form:select path="ipType" class="select2 form-control required" >
|
||||
<%-- <form:option value=""><spring:message code='select' /></form:option> --%>
|
||||
<c:forEach items="${fns:getDictList('SPEC_IP_TYPE')}" var="dict">
|
||||
<c:forEach items="${fns:getDictList('IP_TYPE')}" var="dict">
|
||||
<form:option value="${dict.itemCode}"><spring:message code='${dict.itemValue}' /></form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
@@ -171,22 +164,26 @@ function selectP(){
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<c:set var="arbitraryValue"><spring:message code='arbitrary'/> : 0.0.0.0</c:set>
|
||||
<c:set var="arbitraryPort"><spring:message code='arbitrary'/> : 0</c:set>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"><spring:message code='client_ip' />:</label>
|
||||
<div class="col-md-6">
|
||||
<form:input path="srcIp" htmlEscape="false" maxlength="50" class="form-control ipCheck" placeholder="${arbitraryValue}"/>
|
||||
</div>
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="ip_pattern" /></label>
|
||||
<div class="col-md-6">
|
||||
<form:select path="ipPattern"
|
||||
class="select2 form-control required">
|
||||
<c:forEach items="${fns:getDictList('IP_PATTERN')}" var="ipPatternC">
|
||||
<option value="${ipPatternC.itemCode}" ><spring:message code="${ipPatternC.itemValue}"/></option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"><spring:message code='server_ip' />:</label>
|
||||
<label class="col-md-3 control-label"><font color="red">*</font><spring:message code='server_ip' />:</label>
|
||||
<div class="col-md-6">
|
||||
<form:input path="dstIp" htmlEscape="false" maxlength="50" class="form-control ipCheck" placeholder="${arbitraryValue}"/>
|
||||
<form:input class="form-control required ipCheck" type="text" path="destIpAddress" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -195,120 +192,29 @@ function selectP(){
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"><spring:message code='client_address_mask' />:</label>
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="port_pattern" /></label>
|
||||
<div class="col-md-6">
|
||||
<form:input path="srcIpMask" htmlEscape="false" maxlength="50" class="form-control ipMask" placeholder="${arbitraryValue}"/>
|
||||
<form:select path="portPattern"
|
||||
class="select2 form-control required">
|
||||
<c:forEach items="${fns:getDictList('PORT_PATTERN')}" var="portPatternC">
|
||||
<option value="${portPatternC.itemCode}" ><spring:message code="${portPatternC.itemValue}"/></option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"><spring:message code='server_address_mask' />:</label>
|
||||
<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">
|
||||
<form:input path="dstIpMask" htmlEscape="false" maxlength="50" class="form-control ipMask" placeholder="${arbitraryValue}"/>
|
||||
<form:input class="form-control required portCheck" type="text"
|
||||
path="destPort" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"><font color="red">*</font><spring:message code='client_port' />:</label>
|
||||
<div class="col-md-6">
|
||||
<form:input path="srcPort" htmlEscape="false" maxlength="50" range="[0,65535]" class="form-control required digits notStartZero" placeholder="${arbitraryPort}"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"><font color="red">*</font><spring:message code='server_port' />:</label>
|
||||
<div class="col-md-6">
|
||||
<form:input path="dstPort" htmlEscape="false" maxlength="50" range="[0,65535]" class="form-control required digits notStartZero" placeholder="${arbitraryPort}"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"><spring:message code='client_port_mask' />:</label>
|
||||
<div class="col-md-6">
|
||||
<form:input path="srcPortMask" htmlEscape="false" maxlength="50" range="[0,65535]" class="form-control digits notStartZero" placeholder="${arbitraryPort}"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"><spring:message code='server_port_mask' />:</label>
|
||||
<div class="col-md-6">
|
||||
<form:input path="dstPortMask" htmlEscape="false" maxlength="50" range="[0,65535]" class="form-control digits notStartZero" placeholder="${arbitraryPort}"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%-- <div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"><font color="red">*</font>创建人员:</label>
|
||||
<div class="col-md-6">
|
||||
<form:input path="creator.id" htmlEscape="false" maxlength="50" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"><font color="red">*</font>配置时间:</label>
|
||||
<div class="col-md-6">
|
||||
<form:input path="createTime" htmlEscape="false" maxlength="50" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"><font color="red">*</font>修改人员:</label>
|
||||
<div class="col-md-6">
|
||||
<form:input path="editor.id" htmlEscape="false" maxlength="50" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"><font color="red">*</font>修改时间:</label>
|
||||
<div class="col-md-6">
|
||||
<form:input path="editTime" htmlEscape="false" maxlength="50" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"><font color="red">*</font>审核人员:</label>
|
||||
<div class="col-md-6">
|
||||
<form:input path="auditor.id" htmlEscape="false" maxlength="50" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"><font color="red">*</font>审核时间:</label>
|
||||
<div class="col-md-6">
|
||||
<form:input path="auditTime" htmlEscape="false" maxlength="50" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> --%>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="form-actions">
|
||||
<div class="row">
|
||||
<div class="col-md-offset-3 col-md-9">
|
||||
@@ -317,16 +223,13 @@ function selectP(){
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form:form>
|
||||
<!-- END FORM-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -224,9 +224,9 @@
|
||||
onClick="javascript:window.location='${ctx}/specific/specificServiceHostCfg/form'">
|
||||
<i class="fa fa-plus"></i>
|
||||
<spring:message code="add"/></button>
|
||||
<button type="button" class="btn btn-primary green" data-toggle="modal" data-target="#exampleModal" onClick="toImport();">
|
||||
<%-- <button type="button" class="btn btn-primary green" data-toggle="modal" data-target="#exampleModal" onClick="toImport();">
|
||||
<i class="fa fa-upload"></i>
|
||||
<spring:message code="import"/></button>
|
||||
<spring:message code="import"/></button> --%>
|
||||
</button>
|
||||
</shiro:hasPermission>
|
||||
</div>
|
||||
@@ -256,11 +256,12 @@
|
||||
<div class="col-md-12">
|
||||
<div class="pull-left">
|
||||
<c:set var="spec_service_id"><spring:message code="protocol_name"/></c:set>
|
||||
<form:select path="specServiceId" class="selectpicker select2 input-small" title="${spec_service_id}" data-live-search="true" data-live-search-placeholder="search" onchange="page()">
|
||||
<c:forEach items="${listSpecService}" var="specService" >
|
||||
<form:option value="${specService.specServiceId}">${specService.specServiceName}</form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
<sys:treeselect id="specServiceId" name="specServiceId" value="${specificServiceCfg.parent.specServiceId}"
|
||||
labelName="parent.specServiceName"
|
||||
labelValue="${empty specificServiceHostCfg.specServiceId?spec_service_id:fns:getBySpecServiceId(specificServiceHostCfg.specServiceId).specServiceName}"
|
||||
title="${spec_service_id}" url="/specific/specificServiceCfg/treeData?isLeafShow=false" extId=""
|
||||
cssClass="form-control input-small"/>
|
||||
|
||||
</div>
|
||||
<div class="pull-left" style="margin-right:0px;">
|
||||
<form:select path="protocol" class="selectpicker select2 input-small" >
|
||||
@@ -270,21 +271,9 @@
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
<%-- <div class="pull-left" style="margin-right:0px;">
|
||||
<form:select path="ipType" class="selectpicker select2 input-small" >
|
||||
<form:option value=""><spring:message code="ip_type"/></form:option>
|
||||
<c:forEach items="${fns:getDictList('SPEC_IP_TYPE')}" var="dict">
|
||||
<form:option value="${dict.itemCode}"><spring:message code="${dict.itemValue}"/></form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div> --%>
|
||||
<div class="pull-left">
|
||||
<c:set var = "condition_srcIp"><spring:message code="client_ip" /></c:set>
|
||||
<form:input path="srcIp" placeholder="${condition_srcIp}" class="form-control input-small"/>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
<c:set var = "condition_dstIp"><spring:message code="server_ip" /></c:set>
|
||||
<form:input path="dstIp" placeholder="${condition_dstIp}" class="form-control input-small"/>
|
||||
<form:input path="destIpAddress" placeholder="${condition_dstIp}" class="form-control input-small"/>
|
||||
</div>
|
||||
|
||||
<div class="pull-left">
|
||||
@@ -393,14 +382,9 @@
|
||||
<tr>
|
||||
<th><input type="checkbox" class="i-checks" id="checkAll"></th>
|
||||
<th><spring:message code="protocol_name" /></th>
|
||||
<th><spring:message code="client_ip" /></th>
|
||||
<th><spring:message code="client_address_mask" /></th>
|
||||
<th><spring:message code="client_port" /></th>
|
||||
<th><spring:message code="client_port_mask" /></th>
|
||||
<th><spring:message code="ip_type" /></th>
|
||||
<th><spring:message code="server_ip" /></th>
|
||||
<th><spring:message code="server_address_mask" /></th>
|
||||
<th><spring:message code="server_port" /></th>
|
||||
<th><spring:message code="server_port_mask" /></th>
|
||||
<th><spring:message code="direction" /></th>
|
||||
<th><spring:message code="protocol" /></th>
|
||||
<%-- <th><spring:message code="is_audit" /></th> --%>
|
||||
@@ -417,17 +401,15 @@
|
||||
<tr>
|
||||
<td><input type="checkbox" class="i-checks" name="check" id="${specificServiceHostCfg.hostId}" value="${specificServiceHostCfg.hostId}"></td>
|
||||
<td>${fns:getBySpecServiceId(specificServiceHostCfg.specServiceId).specServiceName }</td>
|
||||
<td title="${specificServiceHostCfg.srcIp}">${fns:abbr(specificServiceHostCfg.srcIp,15)}</td>
|
||||
<td title="${specificServiceHostCfg.srcIpMask}">${fns:abbr(specificServiceHostCfg.srcIpMask,15) }</td>
|
||||
<td>${specificServiceHostCfg.srcPort}</td>
|
||||
<td>${specificServiceHostCfg.srcPortMask}</td>
|
||||
<td title="${specificServiceHostCfg.dstIp}">${fns:abbr(specificServiceHostCfg.dstIp,15) }</td>
|
||||
<td title="${specificServiceHostCfg.dstIpMask}">${fns:abbr(specificServiceHostCfg.dstIpMask,15) }</td>
|
||||
<td>${specificServiceHostCfg.dstPort }</td>
|
||||
<td>${specificServiceHostCfg.dstPortMask }</td>
|
||||
<td><spring:message code='${fns:getDictLabel("SPEC_DIRECTION",specificServiceHostCfg.direction,"0")}' /></td>
|
||||
<td><spring:message code='${fns:getDictLabel("SPEC_PROTOCOL",specificServiceHostCfg.protocol,"0")}' /></td>
|
||||
<!--<td><spring:message code='${fns:getDictLabel("SPEC_AUDIT",specificServiceHostCfg.isAudit,"0")}' /></td> -->
|
||||
<td>
|
||||
<c:forEach items="${fns:getDictList('IP_TYPE')}" var="ipType">
|
||||
<c:if test="${ipType.itemCode eq specificServiceHostCfg.ipType}">${ipType.itemValue}</c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td>${specificServiceHostCfg.destIpAddress }</td>
|
||||
<td>${specificServiceHostCfg.destPort }</td>
|
||||
<td><spring:message code='${fns:getDictLabel("DIRECTION",specificServiceHostCfg.direction,"0")}' /></td>
|
||||
<td><spring:message code='${fns:getDictLabel("PROTOCOL",specificServiceHostCfg.protocol,"0")}' /></td>
|
||||
<td>${fns:getUserById(specificServiceHostCfg.creator.id).name}</td>
|
||||
<td><fmt:formatDate value="${specificServiceHostCfg.createTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td>${fns:getUserById(specificServiceHostCfg.editor.id==null?0:specificServiceHostCfg.editor.id).name}</td>
|
||||
|
||||
Reference in New Issue
Block a user