解决问题:

0000022
基本配置-特征作用域
新增、修改界面,取消设置上级配置

0000021
基本配置-协议IP配置
数据列表界面:”协议id“一列显示为协议名称
数据列表界面:查询条件区域,协议id下拉列表改为协议名称下拉列表,源IP地址和目的IP地址改为输入框;
新增/修改界面:协议id改为协议名称,下拉列表选择有效协议名称;
新增/修改界面:源ip/目的ip掩码,源端口/目的端口掩码 缺省值在后台添加入库,用户填写时为非必填项


删除列表序列号,
This commit is contained in:
zhangshilin
2018-03-22 18:22:09 +08:00
parent 7ffdb1c002
commit 2d132d2b02
14 changed files with 147 additions and 760 deletions

View File

@@ -52,8 +52,8 @@ public class ConfigDictUtils {
}
/**
* 根据主键查询配置详情
* @param sysDictId
* 根据主键查询特定服务协议对象
* @param specServiceId
* @return
*/
public static SpecificServiceCfg getBySpecServiceId(Integer specServiceId){
@@ -97,5 +97,6 @@ public class ConfigDictUtils {
}
return result;
}
}

View File

@@ -146,6 +146,7 @@ public class SysDictInfoController extends BaseController {
@RequestMapping(value={"form"})
public String form(SysDictInfo sysDictInfo, Model model, String doAction, String itType, String mulitId) {
if(doAction!=null&&doAction.equals("0")){
model.addAttribute("specType", sysDictInfo.getItemType());
return "/basics/sysDictInfo";
}
Integer id=0;
@@ -291,7 +292,7 @@ public class SysDictInfoController extends BaseController {
@ResponseBody
@RequestMapping(value = "ajaxType")
public boolean ajaxType(Integer parent,Integer child) {
if(parent==-1||parent==0){
if(parent==null||parent==-1||parent==0){
return true;
}
SysDictInfo p = sysDictInfoService.getDictById(parent);

View File

@@ -18,6 +18,7 @@ import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import com.google.common.collect.Lists;
import com.nis.domain.Page;
import com.nis.domain.specific.SpecificServiceCfg;
import com.nis.domain.specific.SpecificServiceHostCfg;
import com.nis.util.StringUtil;
import com.nis.web.controller.BaseController;
@@ -52,25 +53,9 @@ public class SpecificServiceHostCfgController extends BaseController {
//查出分页数据
Page<SpecificServiceHostCfg> page = specificServiceHostCfgService.findSpecHostList(new Page<SpecificServiceHostCfg>(request, response), specificServiceHostCfg);
model.addAttribute("page", page);
//查出所有
List<SpecificServiceHostCfg> list = specificServiceHostCfgService.getAll();
List<Integer> listSpecServiceId = Lists.newArrayList();
List<String> listSrcIp = Lists.newArrayList();
List<String> listDstIp = Lists.newArrayList();
for(SpecificServiceHostCfg ssh:list){
if(ssh!=null&&ssh.getSpecServiceId()!=null&&(!listSpecServiceId.contains(ssh.getSpecServiceId()))){
listSpecServiceId.add(ssh.getSpecServiceId());
}
if(ssh!=null&&ssh.getSrcIp()!=null&&(!listSrcIp.contains(ssh.getSrcIp()))){
listSrcIp.add(ssh.getSrcIp());
}
if(ssh!=null&&ssh.getDstIp()!=null&&(!listDstIp.contains(ssh.getDstIp()))){
listDstIp.add(ssh.getDstIp());
}
}
model.addAttribute("listSpecServiceId", listSpecServiceId);
model.addAttribute("listSrcIp", listSrcIp);
model.addAttribute("listDstIp", listDstIp);
//查询特定服务管理specific_service_cfg协议id供下拉选择
List<SpecificServiceCfg> listSpecService = specificServiceCfgService.findAllSpecificServiceCfg(new SpecificServiceCfg(), "spec_service_id DESC");
model.addAttribute("listSpecService", listSpecService);
return "/specific/specificServiceHostCfgList";
}
@@ -85,7 +70,9 @@ public class SpecificServiceHostCfgController extends BaseController {
@RequiresPermissions("sys:dict:view")
@RequestMapping(value = "form")
public String form(SpecificServiceHostCfg specificServiceHostCfg, HttpServletRequest request, HttpServletResponse response, Model model) {
//查询协议id供下拉选择
List<SpecificServiceCfg> listSpecService = specificServiceCfgService.findAllSpecificServiceCfg(new SpecificServiceCfg(), "spec_service_id DESC");
model.addAttribute("listSpecService", listSpecService);
return "/specific/specificServiceHostCfgForm";
}
@@ -132,7 +119,7 @@ public class SpecificServiceHostCfgController extends BaseController {
* @param newId
* @param oldId
*/
@ResponseBody
/* @ResponseBody
@RequestMapping(value = "isSpecServiceIdRepeat")
public boolean isSpecServiceIdRepeat(String newId,String oldId){
if(oldId!=null){
@@ -145,5 +132,5 @@ public class SpecificServiceHostCfgController extends BaseController {
}
}
return false;
}
}*/
}

View File

@@ -24,12 +24,6 @@ public interface SpecificServiceHostCfgDao extends CrudDao<SpecificServiceHostCf
*/
List<SpecificServiceHostCfg> findSpecHostList(SpecificServiceHostCfg specificServiceHostCfg);
/**
* 查出所有
* @return
*/
List<SpecificServiceHostCfg> getAll();
/**
* 删除
* @param hostId

View File

@@ -122,10 +122,6 @@ select * from specific_service_host_cfg where is_valid = 1
</select>
<!-- 查询所有 -->
<select id="getAll" resultMap="specificServiceHostCfgResultMap">
select * from specific_service_host_cfg
</select>
<!-- 根据协议ID查询对象 -->
<select id="getBySpecServiceId" resultType="com.nis.domain.specific.SpecificServiceHostCfg" parameterType="java.lang.Integer">
select

View File

@@ -10,6 +10,7 @@ import org.springframework.stereotype.Service;
import com.nis.domain.Page;
import com.nis.domain.SysUser;
import com.nis.domain.specific.SpecificServiceHostCfg;
import com.nis.util.StringUtil;
import com.nis.web.dao.specific.SpecificServiceHostCfgDao;
import com.nis.web.security.UserUtils;
import com.nis.web.service.BaseService;
@@ -48,6 +49,40 @@ 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.getIpType().equals(6)){
defaultIpMask = "FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF"; //FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF表示无掩码
}
String defaultPortMask = "65535"; //65535表示无掩码
//ip地址默认 缺省0.0.0.0值表示任意
if(StringUtil.isBlank(specificServiceHostCfg.getSrcIp())){
specificServiceHostCfg.setSrcIp(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.getSrcPortMask())){
specificServiceHostCfg.setSrcPortMask(defaultPortMask);
}
if(StringUtil.isBlank(specificServiceHostCfg.getDstPortMask())){
specificServiceHostCfg.setDstPortMask(defaultPortMask);
}
//方向缺省
if(specificServiceHostCfg.getDirection()==null){
specificServiceHostCfg.setDirection(0);
}
Date date = new Date();
if(specificServiceHostCfg.getHostId()==null){//新增
specificServiceHostCfg.setIsValid(1);
@@ -73,15 +108,6 @@ public class SpecificServiceHostCfgService extends BaseService{
}
}
/**
* 查出所有
* @return
*/
public List<SpecificServiceHostCfg> getAll() {
return specificServiceHostCfgDao.getAll();
}
/**
* 删除
* @param mulitId

View File

@@ -1,320 +0,0 @@
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/include/taglib.jsp"%>
<html>
<head>
<title>配置信息</title>
<link href="${ctxStatic}/global/plugins/treeTable/themes/vsStyle/treeTable.min.css" rel="stylesheet" type="text/css" />
<%-- <link href="${ctxStatic}/pages/css/dictInfo.css" rel="stylesheet" type="text/css" /> --%>
<script src="${ctxStatic}/global/plugins/treeTable/jquery.treeTable.min.js" type="text/javascript"></script>
<script src="${ctxStatic}/pages/scripts/dict.js" type="text/javascript"></script>
<script type="text/javascript">
function reset(){
$("#searchForm").reset();
}
/**
处理全选、全取消
**/
function selectAll(){
//alert($("#selAll").prop("checked"));
if($("#selAll").prop("checked")){
//$("#treeTable").find(":checkbox[name='check']").attr("checked","checked");
//$("#treeTable").find(":checkbox[name='check']").each(function(){
$("input[name='check']:checkbox").each(function(){
$(this).prop("checked",true);
});
}else{
//$("#treeTable").find(":checkbox[name='check']").attr("checked",false);
//$("#treeTable").find(":checkbox[name='check']").each(function(){
$("input[name='check']:checkbox").each(function(){
//$(this).attr("checked",false);
$(this).removeProp("checked");
});
}
}
/*
系统通用方法根据参数来决定处理的url和参数
*/
function cmd(){
var url=arguments[0];
var mulitId="";
jQuery("#treeTable").find(":checkbox:checked[name='check']").each(function(){
if(jQuery(this).val()!=""){
mulitId+=jQuery(this).val()+",";
}
});
if(mulitId!=""){
confirmx('您确认要执行该操作?', url+"&mulitId="+mulitId);
}else{
alert("至少选择一条数据记录");
}
}
//查询
function page(n,s){
//$("#intype").attr("name",$("#seltype").val());
$("#pageNo").val(n);
$("#pageSize").val(s);
$("#searchForm").attr("action","${ctx}/basics/serviceDictInfo/searchList?itType=${itType}");
$("#searchForm").submit();
return false;
}
function page2(n,s){
//$("#intype").attr("name",$("#seltype").val());
$("#pageNo").val(n);
$("#pageSize").val(s);
$("#searchForm").attr("action","${ctx}/basics/serviceDictInfo/searchList?itType=${itType}");
$("#searchForm").submit();
return false;
}
$(document).ready(function() {
//reset
$("#resetBtn").on("click",function(){
$(".Wdate").attr("value",'');
$("#searchForm")[0].reset();
});
//设定显示总条数
$("#showTotalCount").text('${showTotalCount}');
//设定selected设定name 设定value
$("#seltype").find("option[value=${searchType==null?11:searchType}]").attr("selected",true);
$("#intype").attr("name",$("#seltype").find("option:selected").val());
$("#intype").val('${searchContent}');
//筛选功能初始化
filterActionInit();
$("#isAudit").change(function(){
page();
});
$("#seltype").change(function(){
$("#intype").val("");
$("#intype").attr("placeholder","请输入"+$(this).find("option:selected").text());
$("#intype").attr("name",$(this).find("option:selected").val());
});
$("#treeTable").treeTable({expandLevel : 3}).show();
});
</script>
<style type="text/css">
.dropdown-menu {
min-width: 70px;
}
</style>
</head>
<body>
<div class="page-content">
<div class="theme-panel hidden-xs hidden-sm">
<button type="button" class="btn btn-primary"
onClick="javascript:window.location='${ctx}/basics/serviceDictInfo/form?itType=${itType}'">
<i class="fa fa-plus"></i>
<spring:message code="add"></spring:message>配置</button>
</div>
<h3 class="page-title">
${fns:getItemTypeByNo("SERVICE_DICT_ITM_TYPE",intArr)}
<small><spring:message code="date_list"/></small>
</h3>
<h5 class="page-header"></h5>
<div class="row">
<div class="col-md-12">
<div class="portlet">
<div class="portlet-body">
<div class="row" >
<form:form id="searchForm" modelAttribute="serviceDictInfo" action="${ctx}/basics/serviceDictInfo/searchList?itType=${itType}" method="post" class="form-search">
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
<!-- 筛选按钮展开状态-->
<input id="isFilterAction" name="isFilterAction" type="hidden" value="${serviceDictInfo.isFilterAction}"/>
<!-- 搜索内容与操作按钮栏 -->
<div class="col-md-12">
<%-- <div class="pull-left">
<form:select path="itemType" class="selectpicker select2 input-small" >
<form:option value="">数据类型</form:option>
<c:forEach items="${fns:getDictList('SERVICE_DICT_ITM_TYPE')}" var="dict">
<c:forEach items="${intArr}" var="itTemp">
<c:if test="${dict.itemCode eq itTemp}">
<option value="${dict.itemCode}"
<c:if test="${selectedType eq dict.itemCode}">selected="selected"</c:if>
>${dict.itemValue}</option>
</c:if>
</c:forEach>
</c:forEach>
</form:select>
</div> --%>
<div class="pull-left">
<div class="input-group">
<div class="input-group-btn">
<select id="seltype" class="selectpicker select2 input-small" >
<option value="itemCode"><spring:message code="item_code"></spring:message></option>
<option value="itemValue"><spring:message code="config_content"></spring:message></option>
</select>
</div>
<input id="intype" class="form-control input-medium" placeholder="请输入配置编码" type="text">
<div class="input-group-btn">
<button class="btn btn-default btn-search" type="button" onclick="page2()"><i class="fa fa-search"></i></button>
</div>
</div>
</div>
<div class="pull-left">
<button type="button" class="btn btn-default" id="filter-btn"> 筛选 <i class="fa fa-angle-double-down"></i></button>
</div>
<div class="pull-right">
<button type="button" class="btn btn-default" onclick="cmd('${ctx}/basics/serviceDictInfo/form?itType=${itType}')">
<i class="fa fa-edit"></i> 编辑</button>
<button type="button" class="btn btn-default" onclick="cmd('${ctx}/basics/serviceDictInfo/delete?itType=${itType}')">
<i class="fa fa-trash"></i> 删除</button>
<a class="btn btn-icon-only btn-default setfields tooltips"
data-container="body" data-placement="top" data-original-title="自定义列字段" 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-6">
<div class="pull-left">
<label>创建时间:</label>
</div>
<div class="pull-left">
<input id="beginDate" name="beginDate" type="text" readonly="readonly" maxlength="20" class="form-control input-small Wdate"
value="<fmt:formatDate value="${serviceDictInfo.beginDate}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
</div>
<div class="pull-left">
<label>到</label>
</div>
<div class="pull-left">
<input id="endDate" name="endDate" type="text" readonly="readonly" maxlength="20" class="form-control input-small Wdate"
value="<fmt:formatDate value="${serviceDictInfo.endDate}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
</div>
</div>
<div class="col-md-6">
<div class="pull-left">
<label>修改时间:</label>
</div>
<div class="pull-left">
<input id="editBeginDate" name="editBeginDate" type="text" readonly="readonly" maxlength="20" class="form-control input-small Wdate"
value="<fmt:formatDate value="${serviceDictInfo.editBeginDate}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
</div>
<div class="pull-left">
<label>到</label>
</div>
<div class="pull-left">
<input id="editEndDate" name="editEndDate" type="text" readonly="readonly" maxlength="20" class="form-control input-small Wdate"
value="<fmt:formatDate value="${serviceDictInfo.editEndDate}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
</div>
</div>
</div>
<h5 class="page-header"></h5>
<div class="row">
<div class="pull-left">
<button type="button" class="btn blue" onclick="page2()"> <i class="fa fa-search"></i> 搜索 </button>
<button type="button" id="resetBtn" class="btn btn-default" onclick="reset()"> <i class="fa fa-refresh"></i> 重置 </button>
</div>
</div>
</div>
<!-- /筛选搜索内容栏 结束-->
</form:form>
</div>
<!-- <div class="table-responsive"> -->
<sys:message content="${message}"/>
<table id="treeTable" class="table table-striped table-bordered table-condensed">
<thead>
<tr>
<th><input type="checkbox" class="ckboxs" id="selAll" onclick="selectAll()"></th>
<th>序号</th>
<th><spring:message code="item_code"/></th>
<th><spring:message code="config_content"/></th>
<th><spring:message code="desc"/></th>
<th><spring:message code="item_type"/></th>
<th><spring:message code="is_leaf"/></th>
<th><spring:message code="creator"/></th>
<th><spring:message code="create_time"/>
</th><th><spring:message code="editor"/></th>
<th><spring:message code="edit_time"/></th>
<shiro:hasPermission name="sys:menu:edit"><th><spring:message code="operation"/></th></shiro:hasPermission>
</tr>
</thead>
<tbody>
<c:forEach items="${list}" var="serviceDictInfo" varStatus="se">
<tr id="${serviceDictInfo.serviceDictId}" pId="${serviceDictInfo.parent.serviceDictId ne 0?serviceDictInfo.parent.serviceDictId:0}">
<td><input type="checkbox" class="ckbox" name="check" value="${serviceDictInfo.serviceDictId}"></td>
<td>${serviceDictInfo.showSequence}</td>
<td nowrap><i class="icon-icon-tablet"></i><a href="${ctx}/basics/serviceDictInfo/form?serviceDictId=${serviceDictInfo.serviceDictId}&doAction=0">${serviceDictInfo.itemCode}</a></td>
<td>${serviceDictInfo.itemValue}</td>
<td title="${serviceDictInfo.itemDesc}">${fns:abbr(serviceDictInfo.itemDesc,15)}</td>
<td>${fns:getDictLabel("SERVICE_DICT_ITM_TYPE",serviceDictInfo.itemType,"0")}</td>
<td>${fns:getDictLabel("SYS_YES_NO",serviceDictInfo.isLeaf,"0")}</td>
<td><c:if test="${serviceDictInfo.serviceDictCreator != null}">
${fns:getUserById(serviceDictInfo.serviceDictCreator.id).name}
</c:if></td>
<td><fmt:formatDate value="${serviceDictInfo.createTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
<td><c:if test="${serviceDictInfo.serviceDictEditor != null}">
${fns:getUserById(serviceDictInfo.serviceDictEditor.id).name}
</c:if></td>
<td><fmt:formatDate value="${serviceDictInfo.editTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
<td>
<div class="btn-group btn-xs">
<a class="btn btn-primary btn-xs dropdown-toggle" data-toggle="dropdown" href="#"><spring:message code="operation"/><span class="caret"></span></a>
<ul class="dropdown-menu btn-xs">
<li><a href="${ctx}/basics/serviceDictInfo/form?serviceDictId=${serviceDictInfo.serviceDictId}&doAction=0&itType=${itType}"><spring:message code="show"/></a></li>
<shiro:hasPermission name="sys:dict:edit">
<li><a href="${ctx}/basics/serviceDictInfo/form?serviceDictId=${serviceDictInfo.serviceDictId}&itType=${itType}" onclick="return confirmx('您确认要修改该项配置吗?', this.href)"><spring:message code="edit"/></a></li>
</shiro:hasPermission>
<shiro:hasPermission name="sys:dict:edit">
<li><a href="${ctx}/basics/serviceDictInfo/delete?mulitId=${serviceDictInfo.serviceDictId}&itType=${itType}" onclick="return confirmx('您确认要删除该项配置吗?', this.href)"><spring:message code="delete"/></a></li>
</shiro:hasPermission>
</ul>
</div>
</td>
</tr>
</c:forEach>
</tbody>
</table>
<div class="page">${page}</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>

View File

@@ -250,7 +250,7 @@
<thead>
<tr>
<th><input type="checkbox" class="ckboxs" id="selAll" onclick="selectAll()"></th>
<th>序号</th>
<!-- <th>序号</th> -->
<th><spring:message code="item_code"/></th>
<th><spring:message code="config_content"/></th>
<th><spring:message code="desc"/></th>
@@ -267,7 +267,7 @@
<c:forEach items="${list}" var="serviceDictInfo" varStatus="se">
<tr id="${serviceDictInfo.serviceDictId}" pId="${serviceDictInfo.parent.serviceDictId ne 0?serviceDictInfo.parent.serviceDictId:0}">
<td><input type="checkbox" class="ckbox" name="check" value="${serviceDictInfo.serviceDictId}"></td>
<td>${serviceDictInfo.showSequence}</td>
<%-- <td>${serviceDictInfo.showSequence}</td> --%>
<td nowrap><i class="icon-icon-tablet"></i><a href="${ctx}/basics/serviceDictInfo/form?serviceDictId=${serviceDictInfo.serviceDictId}&doAction=0">${serviceDictInfo.itemCode}</a></td>
<td>${serviceDictInfo.itemValue}</td>
<td title="${serviceDictInfo.itemDesc}">${fns:abbr(serviceDictInfo.itemDesc,15)}</td>

View File

@@ -200,6 +200,7 @@
<form:form id="inputForm" modelAttribute="sysDictInfo" action="${ctx}/basics/sysDictInfo/saveOrUpdate?itType=${itType}" method="post" class="form-horizontal">
<form:hidden path="sysDictId"/>
<sys:message content="${message}"/>
<c:if test="${specType != null and specType!=3 }">
<div class="form-group">
<label class="col-md-3 control-label"><spring:message code="superior_config"/>:</label>
<div class="col-md-4">
@@ -207,6 +208,7 @@
title="菜单" url="/basics/sysDictInfo/treeData?itType=${itType}" extId="${sysDictInfo.sysDictId}" cssClass="required form-control"/>
</div>
</div>
</c:if>
<div class="form-group">
<label class="col-md-3 control-label radio-lable"><font color="red">*</font> <spring:message code="item_type"/>:</label>
<div class="col-md-4">

View File

@@ -38,12 +38,14 @@
<form:form id="inputForm" modelAttribute="sysDictInfo" action="${ctx}/basics/sysDictInfo/saveOrUpdate" method="post" class="form-horizontal">
<form:hidden path="sysDictId"/>
<sys:message content="${message}"/>
<c:if test="${specType != null and specType!=3 }">
<div class="form-group">
<label class="col-md-3 control-label"><font color="red">*</font><spring:message code="superior_config"/>:</label>
<div class="col-md-4">
<input value="${sysDictInfo.parent.sysDictId == 0?'根节点':fns:getSysDictInfoById(sysDictInfo.parent.sysDictId).itemValue}" maxlength="50" class="form-control" readonly="readonly"/>
</div>
</div>
</c:if>
<%-- <div class="form-group">
<label class="col-md-3 control-label radio-lable"><font color="red">*</font> 配置ID:</label>
<div class="col-md-4">
@@ -68,12 +70,14 @@
<input value="${sysDictInfo.itemValue}" maxlength="50" class="form-control" readonly="readonly"/>
</div>
</div>
<c:if test="${specType != null and specType!=3 }">
<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">
<input value="${fns:getDictLabel('SYS_YES_NO',sysDictInfo.isLeaf,'0')}" maxlength="50" class="form-control" readonly="readonly"/>
</div>
</div>
</c:if>
<%-- <div class="form-group">
<label class="col-md-3 control-label"><font color="red">*</font>层级:</label>
<div class="col-md-4">

View File

@@ -1,316 +0,0 @@
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/include/taglib.jsp"%>
<html>
<head>
<title>配置信息</title>
<link href="${ctxStatic}/global/plugins/treeTable/themes/vsStyle/treeTable.min.css" rel="stylesheet" type="text/css" />
<%-- <link href="${ctxStatic}/pages/css/dictInfo.css" rel="stylesheet" type="text/css" /> --%>
<script src="${ctxStatic}/global/plugins/treeTable/jquery.treeTable.min.js" type="text/javascript"></script>
<script src="${ctxStatic}/pages/scripts/dict.js" type="text/javascript"></script>
<script type="text/javascript">
function reset(){
$("#searchForm").reset();
}
/**
处理全选、全取消
**/
function selectAll(){
//alert($("#selAll").prop("checked"));
if($("#selAll").prop("checked")){
//$("#treeTable").find(":checkbox[name='check']").attr("checked","checked");
//$("#treeTable").find(":checkbox[name='check']").each(function(){
$("input[name='check']:checkbox").each(function(){
$(this).prop("checked",true);
});
}else{
//$("#treeTable").find(":checkbox[name='check']").attr("checked",false);
//$("#treeTable").find(":checkbox[name='check']").each(function(){
$("input[name='check']:checkbox").each(function(){
//$(this).attr("checked",false);
$(this).removeProp("checked");
});
}
}
/*
系统通用方法根据参数来决定处理的url和参数
*/
function cmd(){
var url=arguments[0];
var mulitId="";
jQuery("#treeTable").find(":checkbox:checked[name='check']").each(function(){
if(jQuery(this).val()!=""){
mulitId+=jQuery(this).val()+",";
}
});
if(mulitId!=""){
confirmx('您确认要执行该操作?', url+"&mulitId="+mulitId);
}else{
alert("至少选择一条数据记录");
}
}
//查询
function page(n,s){
//$("#intype").attr("name",$("#seltype").val());
$("#pageNo").val(n);
$("#pageSize").val(s);
$("#searchForm").attr("action","${ctx}/basics/sysDictInfo/searchList?itType=${itType}");
$("#searchForm").submit();
return false;
}
function page2(n,s){
//$("#intype").attr("name",$("#seltype").val());
$("#pageNo").val(n);
$("#pageSize").val(s);
$("#searchForm").attr("action","${ctx}/basics/sysDictInfo/searchList?itType=${itType}");
$("#searchForm").submit();
return false;
}
$(document).ready(function() {
//设定显示总条数
$("#showTotalCount").text('${showTotalCount}');
//设定selected设定name 设定value
$("#seltype").find("option[value=${searchType==null?11:searchType}]").attr("selected",true);
$("#intype").attr("name",$("#seltype").find("option:selected").val());
$("#intype").val('${searchContent}');
//reset
$("#resetBtn").on("click",function(){
$(".Wdate").attr("value",'');
$("#searchForm")[0].reset();
});
//筛选功能初始化
filterActionInit();
$("#isAudit").change(function(){
page();
});
$("#seltype").change(function(){
$("#intype").val("");
$("#intype").attr("placeholder","请输入"+$(this).find("option:selected").text());
$("#intype").attr("name",$(this).find("option:selected").val());
});
$("#treeTable").treeTable({expandLevel : 3}).show();
});
</script>
<style type="text/css">
.dropdown-menu {
min-width: 70px;
}
</style>
</head>
<body>
<div class="page-content">
<div class="theme-panel hidden-xs hidden-sm">
<button type="button" class="btn btn-primary"
onClick="javascript:window.location='${ctx}/basics/sysDictInfo/form?itType=${itType}'">
<i class="fa fa-plus"></i>
<spring:message code="add"></spring:message>配置</button>
</div>
<h3 class="page-title">
${fns:getItemTypeByNo("SYS_DICT_ITM_TYPE",intArr)}
<small><spring:message code="date_list"/></small>
</h3>
<h5 class="page-header"></h5>
<div class="row">
<div class="col-md-12">
<div class="portlet">
<div class="portlet-body">
<div class="row" >
<form:form id="searchForm" modelAttribute="sysDictInfo" action="${ctx}/basics/sysDictInfo/searchList?itType=${itType}" method="post" class="form-search">
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
<!-- 筛选按钮展开状态-->
<input id="isFilterAction" name="isFilterAction" type="hidden" value="${sysDictInfo.isFilterAction}"/>
<!-- 搜索内容与操作按钮栏 -->
<div class="col-md-12">
<%-- <div class="pull-left">
<form:select path="itemType" class="selectpicker select2 input-small" >
<form:option value="">数据类型</form:option>
<c:forEach items="${fns:getDictList('SERVICE_DICT_ITM_TYPE')}" var="dict">
<c:forEach items="${intArr}" var="itTemp">
<c:if test="${dict.itemCode eq itTemp}">
<option value="${dict.itemCode}"
<c:if test="${selectedType eq dict.itemCode}">selected="selected"</c:if>
>${dict.itemValue}</option>
</c:if>
</c:forEach>
</c:forEach>
</form:select>
</div> --%>
<div class="pull-left">
<div class="input-group">
<div class="input-group-btn">
<select id="seltype" class="selectpicker select2 input-small" >
<option value="itemCode"><spring:message code="item_code"></spring:message></option>
<option value="itemValue"><spring:message code="config_content"></spring:message></option>
</select>
</div>
<input id="intype" class="form-control input-medium" placeholder="请输入配置编码" type="text">
<div class="input-group-btn">
<button class="btn btn-default btn-search" type="button" onclick="page2()"><i class="fa fa-search"></i></button>
</div>
</div>
</div>
<div class="pull-left">
<button type="button" class="btn btn-default" id="filter-btn"> 筛选 <i class="fa fa-angle-double-down"></i></button>
</div>
<div class="pull-right">
<button type="button" class="btn btn-default" onclick="cmd('${ctx}/basics/sysDictInfo/form?itType=${itType}')">
<i class="fa fa-edit"></i> 编辑</button>
<button type="button" class="btn btn-default" onclick="cmd('${ctx}/basics/sysDictInfo/delete?itType=${itType}')">
<i class="fa fa-trash"></i> 删除</button>
<a class="btn btn-icon-only btn-default setfields tooltips"
data-container="body" data-placement="top" data-original-title="自定义列字段" 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-6">
<div class="pull-left">
<label>创建时间:</label>
</div>
<div class="pull-left">
<input id="beginDate" name="beginDate" type="text" readonly="readonly" maxlength="20" class="form-control input-small Wdate"
value="<fmt:formatDate value="${sysDictInfo.beginDate}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
</div>
<div class="pull-left">
<label>到</label>
</div>
<div class="pull-left">
<input id="endDate" name="endDate" type="text" readonly="readonly" maxlength="20" class="form-control input-small Wdate"
value="<fmt:formatDate value="${sysDictInfo.endDate}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
</div>
</div>
<div class="col-md-6">
<div class="pull-left">
<label>修改时间:</label>
</div>
<div class="pull-left">
<input id="editBeginDate" name="editBeginDate" type="text" readonly="readonly" maxlength="20" class="form-control input-small Wdate"
value="<fmt:formatDate value="${sysDictInfo.editBeginDate}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
</div>
<div class="pull-left">
<label>到</label>
</div>
<div class="pull-left">
<input id="editEndDate" name="editEndDate" type="text" readonly="readonly" maxlength="20" class="form-control input-small Wdate"
value="<fmt:formatDate value="${sysDictInfo.editEndDate}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
</div>
</div>
</div>
<h5 class="page-header"></h5>
<div class="row">
<div class="pull-left">
<button type="button" class="btn blue" onclick="page2()"> <i class="fa fa-search"></i> 搜索 </button>
<button type="button" id="resetBtn" class="btn btn-default" onclick="reset()"> <i class="fa fa-refresh"></i> 重置 </button>
</div>
</div>
</div>
<!-- /筛选搜索内容栏 结束-->
</form:form>
</div>
<!-- <div class="table-responsive"> -->
<sys:message content="${message}"/>
<table id="treeTable" class="table table-striped table-bordered table-condensed">
<thead>
<tr>
<th><input type="checkbox" class="ckboxs" id="selAll" onclick="selectAll()"></th>
<th>序号</th>
<th><spring:message code="item_code"/></th>
<th><spring:message code="config_content"/></th>
<th><spring:message code="desc"/></th>
<th><spring:message code="item_type"/></th>
<th><spring:message code="is_leaf"/></th>
<th><spring:message code="creator"/></th>
<th><spring:message code="create_time"/>
</th><th><spring:message code="editor"/></th>
<th><spring:message code="edit_time"/></th>
<shiro:hasPermission name="sys:menu:edit"><th><spring:message code="operation"/></th></shiro:hasPermission>
</tr>
</thead>
<tbody>
<c:forEach items="${list}" var="sysDictInfo" varStatus="se">
<tr id="${sysDictInfo.sysDictId}" pId="${sysDictInfo.parent.sysDictId ne 0?sysDictInfo.parent.sysDictId:0}">
<td><input type="checkbox" class="ckbox" name="check" value="${sysDictInfo.sysDictId}"></td>
<td>${sysDictInfo.showSequence}</td>
<td nowrap><i class="icon-icon-tablet"></i><a href="${ctx}/basics/sysDictInfo/form?sysDictId=${sysDictInfo.sysDictId}&doAction=0">${sysDictInfo.itemCode}</a></td>
<td>${sysDictInfo.itemValue}</td>
<td title="${sysDictInfo.itemDesc}">${fns:abbr(sysDictInfo.itemDesc,15)}</td>
<td>${fns:getDictLabel("SYS_DICT_ITM_TYPE",sysDictInfo.itemType,"0")}</td>
<td>${fns:getDictLabel("SYS_YES_NO",sysDictInfo.isLeaf,"0")}</td>
<td><c:if test="${sysDictInfo.sysDictCreator != null}">
${fns:getUserById(sysDictInfo.sysDictCreator.id).name}
</c:if></td>
<td><fmt:formatDate value="${sysDictInfo.createTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
<td><c:if test="${sysDictInfo.sysDictEditor != null}">
${fns:getUserById(sysDictInfo.sysDictEditor.id).name}
</c:if></td>
<td><fmt:formatDate value="${sysDictInfo.editTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
<td>
<div class="btn-group btn-xs">
<a class="btn btn-primary btn-xs dropdown-toggle" data-toggle="dropdown" href="#"><spring:message code="operation"/><span class="caret"></span></a>
<ul class="dropdown-menu btn-xs">
<li><a href="${ctx}/basics/sysDictInfo/form?sysDictId=${sysDictInfo.sysDictId}&doAction=0&itType=${itType}"><spring:message code="show"/></a></li>
<shiro:hasPermission name="sys:dict:edit">
<li><a href="${ctx}/basics/sysDictInfo/form?sysDictId=${sysDictInfo.sysDictId}&itType=${itType}" onclick="return confirmx('您确认要修改该项配置吗?', this.href)"><spring:message code="edit"/></a></li>
</shiro:hasPermission>
<shiro:hasPermission name="sys:dict:edit">
<li><a href="${ctx}/basics/sysDictInfo/delete?mulitId=${sysDictInfo.sysDictId}&itType=${itType}" onclick="return confirmx('您确认要删除该项配置吗?', this.href)"><spring:message code="delete"/></a></li>
</shiro:hasPermission>
</ul>
</div>
</td>
</tr>
</c:forEach>
</tbody>
</table>
<div class="page">${page}</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>

View File

@@ -253,7 +253,7 @@
<thead>
<tr>
<th><input type="checkbox" id="selAll" class="ckboxs" onclick="selectAll()"></th>
<th>序号</th>
<!-- <th>序号</th> -->
<th><spring:message code="item_code"/></th>
<th><spring:message code="config_content"/></th>
<th><spring:message code="desc"/></th>
@@ -272,7 +272,7 @@
<c:forEach items="${list}" var="sysDictInfo" varStatus="se">
<tr id="${sysDictInfo.sysDictId}" pId="${sysDictInfo.parent.sysDictId ne 0?sysDictInfo.parent.sysDictId:0}">
<td><input type="checkbox" class="ckbox" name="check" value="${sysDictInfo.sysDictId}"></td>
<td>${sysDictInfo.showSequence}</td>
<%-- <td>${sysDictInfo.showSequence}</td> --%>
<td nowrap><i class="icon-icon-tablet"></i><a href="${ctx}/basics/sysDictInfo/form?sysDictId=${sysDictInfo.sysDictId}&doAction=0">${sysDictInfo.itemCode}</a></td>
<td>${sysDictInfo.itemValue}</td>
<td title="${sysDictInfo.itemDesc}">${fns:abbr(sysDictInfo.itemDesc,15)}</td>

View File

@@ -7,37 +7,46 @@
<script type="text/javascript" src="${ctxStatic}/pages/scripts/dict.js"></script>
<title></title>
<script type="text/javascript">
function sjfdsj(){
$("label[for='specServiceId']").hide();
}
$(document).ready(function() {
$("[data-toogle='tooltip']").tooltip();
$("select[name='ipType']").on("change",function(){
var type=$(this).val();
if(4==type){
$("input[name='srcIpMask']").attr("placeholder","任意掩码请填0.0.0.0,无掩码请填255.255.255.255");
$("input[name='dstIpMask']").attr("placeholder","任意掩码请填0.0.0.0,无掩码请填255.255.255.255");
$("input[name='srcIp']").attr("placeholder","任意ip请填0.0.0.0");
$("input[name='dstIp']").attr("placeholder","任意ip请填0.0.0.0");
$("input[name='srcIpMask']").attr("title","任意掩码请填0.0.0.0,无掩码请填255.255.255.255");
$("input[name='dstIpMask']").attr("title","任意掩码请填0.0.0.0,无掩码请填255.255.255.255");
$("input[name='srcIp']").attr("title","任意ip请填0.0.0.0");
$("input[name='dstIp']").attr("title","任意ip请填0.0.0.0");
$("input[name='srcIpMask']").attr("placeholder","任意ip掩码请填 0.0.0.0");
$("input[name='dstIpMask']").attr("placeholder","任意ip掩码请填 0.0.0.0");
//$("input[name='srcIp']").attr("placeholder","任意ip请填 0.0.0.0");
//$("input[name='dstIp']").attr("placeholder","任意ip请填 0.0.0.0");
$("input[name='srcIpMask']").attr("title","任意掩码请填 0.0.0.0");
$("input[name='dstIpMask']").attr("title","任意掩码请填 0.0.0.0");
//$("input[name='srcIp']").attr("title","任意ip请填 0.0.0.0");
//$("input[name='dstIp']").attr("title","任意ip请填 0.0.0.0");
}
if(6==type){
$("input[name='srcIpMask']").attr("placeholder","若无请填FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF,任意请填 ::");
$("input[name='dstIpMask']").attr("placeholder","若无请填FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF,任意请填 ::");
$("input[name='srcIp']").attr("placeholder","任意ip请填 ::");
$("input[name='dstIp']").attr("placeholder","任意ip请填 ::");
$("input[name='srcIpMask']").attr("title","若无请填FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF,任意请填 ::");
$("input[name='dstIpMask']").attr("title","若无请填FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF,任意请填 ::");
$("input[name='srcIp']").attr("title","任意ip请填 ::");
$("input[name='dstIp']").attr("title","任意ip请填 ::");
$("input[name='srcIpMask']").attr("placeholder","任意ip掩码请填 ::");
$("input[name='dstIpMask']").attr("placeholder","任意ip掩码请填 ::");
//$("input[name='srcIp']").attr("placeholder","任意ip请填 0.0.0.0");
//$("input[name='dstIp']").attr("placeholder","任意ip请填 0.0.0.0");
$("input[name='srcIpMask']").attr("title","任意ip掩码请填 ::");
$("input[name='dstIpMask']").attr("title","任意ip掩码请填 ::");
//$("input[name='srcIp']").attr("title","任意ip请填 0.0.0.0");
//$("input[name='dstIp']").attr("title","任意ip请填 0.0.0.0");
}
});
jQuery.validator.addMethod("maxValue",
function(value, element) {
return value >= 0 && value < 210000000;
}, "请填写正确的协议id");
//specServiceId校验
jQuery.validator.addMethod("specServiceIdSelected",function(value, element) {
var selectedValue=$(".filter-option").text();
if(selectedValue=="--请选择协议名称--"){
return false;
}else{
return true;
}
}, "请选择协议名称");
//ip地址校验
jQuery.validator.addMethod("ip",function(value, element) {
if(value.length==0||value.trim().length==0){return true;}
var typeInt=$("select[name='ipType']").val();
if(typeInt==4){
return this.optional(element)||(/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/.test(value) && (RegExp.$1 <256 && RegExp.$2<256 && RegExp.$3<256 && RegExp.$4<256));
@@ -46,6 +55,7 @@
}}, "请填写正确的IP地址");
//ip地址掩码校验
jQuery.validator.addMethod("ipMask",function(value, element) {
if(value.length==0||value.trim().length==0){return true;}
obj=value;
var typeInt=$("select[name='ipType']").val();
if(typeInt==4){
@@ -68,24 +78,24 @@
{
rules : {
specServiceId:{
required:true,
digits:true,
maxValue:true
specServiceIdSelected:true
},
protocol:{
required:true
},
ipType:{
required:true
},
srcIp:{
required:true,
ip:true
},
dstIp:{
required:true,
ip:true
},
srcIpMask:{
required:true,
ipMask:true
},
dstIpMask:{
required:true,
ipMask:true
},
srcPort:{
@@ -101,13 +111,11 @@
min: 0
},
srcPortMask:{
required:true,
digits:true,
max: 65535,
min: 0
},
dstPortMask:{
required:true,
digits:true,
max: 65535,
min: 0
@@ -115,23 +123,25 @@
},
messages : {
specServiceId:{
required:'<spring:message code="required"/>',
digits:'请填写整数数值',
maxValue:'请填写合适的值0~210000000'
specServiceIdSelected:'<spring:message code="required"/>'
},
protocol:{
required:'<spring:message code="required"/>'
},
ipType:{
required:'<spring:message code="required"/>'
},
srcIp:{
required:'<spring:message code="required"/>',
ip:'请填写正确的ip'
},
dstIp:{
required:'<spring:message code="required"/>',
ip:'请填写正确的ip'
},
srcIpMask:{
required:'<spring:message code="required"/>'
ipMask:'请填写正确的ip掩码'
},
dstIpMask:{
required:'<spring:message code="required"/>'
ipMask:'请填写正确的ip掩码'
},
srcPort:{
required:'<spring:message code="required"/>',
@@ -146,13 +156,11 @@
min: '数值不得小于0'
},
srcPortMask:{
required:'<spring:message code="required"/>',
digits:'请填写整数',
max: '数值不得大于65535',
min: '数值不得小于0'
},
dstPortMask:{
required:'<spring:message code="required"/>',
digits:'请填写整数',
max: '数值不得大于65535',
min: '数值不得小于0'
@@ -227,17 +235,26 @@
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label class="col-md-3 control-label"><font color="red">*</font>协议ID:</label>
<div class="col-md-6">
<form:input path="specServiceId" htmlEscape="false" maxlength="50" class="form-control" />
</div>
<label class="col-md-3 control-label"><font color="red">*</font>协议名称:</label>
<c:set var="spec_service_id">--请选择协议名称--</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="sjfdsj()">
<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>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="col-md-3 control-label"><font color="red">*</font>方向:</label>
<label class="col-md-3 control-label">方向:</label>
<div class="col-md-6">
<form:select path="direction" class="selectpicker select2 form-control" >
<form:select path="direction" class="select2 form-control" >
<form:option value="">-请选择方向-</form:option>
<c:forEach items="${fns:getDictList('SPEC_DIRECTION')}" var="dict">
<form:option value="${dict.itemCode}">${dict.itemValue}</form:option>
</c:forEach>
@@ -252,7 +269,8 @@
<div class="form-group">
<label class="col-md-3 control-label"><font color="red">*</font>协议:</label>
<div class="col-md-6">
<form:select path="protocol" class="selectpicker select2 form-control" >
<form:select path="protocol" class="select2 form-control" >
<form:option value="">-请选择协议-</form:option>
<c:forEach items="${fns:getDictList('SPEC_PROTOCOL')}" var="dict">
<form:option value="${dict.itemCode}">${dict.itemValue}</form:option>
</c:forEach>
@@ -264,7 +282,8 @@
<div class="form-group">
<label class="col-md-3 control-label"><font color="red">*</font>ip类型:</label>
<div class="col-md-6">
<form:select path="ipType" class="selectpicker select2 form-control" >
<form:select path="ipType" class="select2 form-control" >
<form:option value="">-请选择ip类型-</form:option>
<c:forEach items="${fns:getDictList('SPEC_IP_TYPE')}" var="dict">
<form:option value="${dict.itemCode}">${dict.itemValue}</form:option>
</c:forEach>
@@ -280,17 +299,17 @@
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label class="col-md-3 control-label"><font color="red">*</font>源IP地址:</label>
<label class="col-md-3 control-label">源IP地址:</label>
<div class="col-md-6">
<form:input path="srcIp" htmlEscape="false" maxlength="50" class="form-control" data-toggle="tooltip" data-placement="top" title="任意ip请填0.0.0.0" placeholder="任意ip请填0.0.0.0"/>
<form:input path="srcIp" htmlEscape="false" maxlength="50" class="form-control" data-toggle="tooltip" data-placement="top" title="任意ip请填 0.0.0.0" placeholder="任意ip请填 0.0.0.0"/>
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="col-md-3 control-label"><font color="red">*</font>目的IP地址:</label>
<label class="col-md-3 control-label">目的IP地址:</label>
<div class="col-md-6">
<form:input path="dstIp" htmlEscape="false" maxlength="50" class="form-control" data-toggle="tooltip" data-placement="top" title="任意ip请填0.0.0.0" placeholder="任意ip请填0.0.0.0"/>
<form:input path="dstIp" htmlEscape="false" maxlength="50" class="form-control" data-toggle="tooltip" data-placement="top" title="任意ip请填 0.0.0.0" placeholder="任意ip请填 0.0.0.0"/>
</div>
</div>
</div>
@@ -299,17 +318,17 @@
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label class="col-md-3 control-label"><font color="red">*</font>源地址掩码:</label>
<label class="col-md-3 control-label">源地址掩码:</label>
<div class="col-md-6">
<form:input path="srcIpMask" htmlEscape="false" maxlength="50" class="form-control" data-toggle="tooltip" title="任意掩码请填0.0.0.0,无掩码请填255.255.255.255" data-placement="top" placeholder="任意掩码请填0.0.0.0,无掩码请填255.255.255.255"/>
<form:input path="srcIpMask" htmlEscape="false" maxlength="50" class="form-control" data-toggle="tooltip" title="任意ip掩码请填 0.0.0.0" data-placement="top" placeholder="任意ip掩码请填 0.0.0.0"/>
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="col-md-3 control-label"><font color="red">*</font>目的地址掩码:</label>
<label class="col-md-3 control-label">目的地址掩码:</label>
<div class="col-md-6">
<form:input path="dstIpMask" htmlEscape="false" maxlength="50" class="form-control" data-toggle="tooltip" data-placement="top" title="任意掩码请填0.0.0.0,无掩码请填255.255.255.255" placeholder="任意掩码请填0.0.0.0,无掩码请填255.255.255.255"/>
<form:input path="dstIpMask" htmlEscape="false" maxlength="50" class="form-control" data-toggle="tooltip" data-placement="top" title="任意ip掩码请填 0.0.0.0" placeholder="任意ip掩码请填 0.0.0.0"/>
</div>
</div>
</div>
@@ -336,17 +355,17 @@
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label class="col-md-3 control-label"><font color="red">*</font>源端口掩码:</label>
<label class="col-md-3 control-label">源端口掩码:</label>
<div class="col-md-6">
<form:input path="srcPortMask" htmlEscape="false" maxlength="50" class="form-control" data-toggle="tooltip" data-placement="top" title="任意掩码请填0,无掩码请填65535" placeholder="任意掩码请填0,无掩码请填65535"/>
<form:input path="srcPortMask" htmlEscape="false" maxlength="50" class="form-control" data-toggle="tooltip" data-placement="top" title="任意掩码请填0" placeholder="任意掩码请填0"/>
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="col-md-3 control-label"><font color="red">*</font>目的端口掩码:</label>
<label class="col-md-3 control-label">目的端口掩码:</label>
<div class="col-md-6">
<form:input path="dstPortMask" htmlEscape="false" maxlength="50" class="form-control" data-toggle="tooltip" data-placement="top" title="任意掩码请填0,无掩码请填65535" placeholder="任意掩码请填0,无掩码请填65535"/>
<form:input path="dstPortMask" htmlEscape="false" maxlength="50" class="form-control" data-toggle="tooltip" data-placement="top" title="任意掩码请填0" placeholder="任意掩码请填0"/>
</div>
</div>
</div>

View File

@@ -20,6 +20,9 @@
$("#ipType").change(function(){
page();
});
$("#ipType").change(function(){
page();
});
//全选及取消
$("#checkAll").change(function(){
if($("#checkAll").prop("checked")){
@@ -126,10 +129,10 @@
</form:select>
</div> --%>
<div class="pull-left">
<c:set var="spec_service_id">协议ID</c:set>
<form:select path="specServiceId" class="selectpicker select2 input-small" title="${spec_service_id}" data-live-search="true" data-live-search-placeholder="search">
<c:forEach items="${listSpecServiceId}" var="specServiceId" >
<form:option value="${specServiceId}">${specServiceId}</form:option>
<c:set var="spec_service_id">请选择协议名称</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>
</div>
@@ -142,20 +145,10 @@
</form:select>
</div>
<div class="pull-left">
<c:set var="src_ip">源Ip地址</c:set>
<form:select path="srcIp" class="selectpicker select2 input-small" title="${src_ip}" data-live-search="true" data-live-search-placeholder="search">
<c:forEach items="${listSrcIp}" var="srcIp" >
<form:option value="${srcIp}">${srcIp}</form:option>
</c:forEach>
</form:select>
<form:input path="srcIp" placeholder="请输入源IP地址" class="form-control input-small"/>
</div>
<div class="pull-left">
<c:set var="dst_ip">目的Ip地址</c:set>
<form:select path="dstIp" class="selectpicker select2 input-small" title="${dst_ip}" data-live-search="true" data-live-search-placeholder="search">
<c:forEach items="${listDstIp}" var="dstIp" >
<form:option value="${dstIp}">${dstIp}</form:option>
</c:forEach>
</form:select>
<form:input path="dstIp" placeholder="请输入目的IP地址" class="form-control input-small"/>
</div>
<div class="pull-left">
<form:select path="direction" class="selectpicker select2 input-small" >
@@ -296,7 +289,7 @@
<thead>
<tr>
<th><input type="checkbox" class="i-checks" id="checkAll"></th>
<th>协议id</th>
<th>协议名称</th>
<th>源IP地址</th>
<th>源地址掩码</th>
<th>源端口</th>
@@ -320,7 +313,7 @@
<c:forEach items="${page.list}" var="specificServiceHostCfg">
<tr>
<td><input type="checkbox" class="i-checks" name="check" id="${specificServiceHostCfg.hostId}" value="${specificServiceHostCfg.hostId}"></td>
<td>${specificServiceHostCfg.specServiceId }</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>