完成协议ip国际化,权限控制

更改分类/性质/标签,地域/运营商/作用域 ,特定服务,协议ip 修改操作由可选多项仅只修改第一项改为 只能选择一条数据,修订校验国际化
This commit is contained in:
zhangshilin
2018-03-29 18:45:37 +08:00
parent 99175da3f2
commit 0633a74024
15 changed files with 228 additions and 310 deletions

View File

@@ -48,18 +48,18 @@
$("#dstIp").attr("value","");
}
//编辑
function edit(){
var mulitId="";
jQuery("#contentTable").find(":checkbox:checked[name='check']").each(function(){
if(jQuery(this).val()!=""){
mulitId+=jQuery(this).val()+",";
}
});
if(mulitId!=""){
confirmx('您确认要执行该操作?', '${ctx}/specific/specificServiceHostCfg/form?hostId='+mulitId.split(",", 1)[0]);
}else{
alert("至少选择一条数据记录");
//修改
function cmdEdit(){
var cked = $("tbody tr td input[name='check']:checkbox:checked");
if(cked.length<1){
top.$.jBox.tip("<spring:message code='one_more'/>", "<spring:message code='info'/>");
}
if(cked.length>1){
top.$.jBox.tip("<spring:message code='check_one'/>", "<spring:message code='info'/>");
}
if(cked.length==1){
var url=arguments[0];
confirmx("<spring:message code='confirm_message'/>", url+"?hostId="+cked.val());
}
}
//删除
@@ -71,9 +71,9 @@
}
});
if(mulitId!=""){
confirmx('您确认要执行该操作?', '${ctx}/specific/specificServiceHostCfg/delete?mulitId='+mulitId);
confirmx("<spring:message code='confirm_message'/>", '${ctx}/specific/specificServiceHostCfg/delete?mulitId='+mulitId);
}else{
alert("至少选择一条数据记录");
top.$.jBox.tip("<spring:message code='one_more'/>", "<spring:message code='info'/>");
}
}
//查询
@@ -91,10 +91,13 @@
<div class="page-content">
<div class="theme-panel hidden-xs hidden-sm">
<button type="button" class="btn btn-default" onclick="javascript:window.location='${ctx}/specific/specificServiceHostCfg/list'"><spring:message code="refresh"></spring:message></button>
<shiro:hasPermission name="specific:serviceIp:edit">
<button type="button" class="btn btn-primary"
onClick="javascript:window.location='${ctx}/specific/specificServiceHostCfg/form'">
<i class="fa fa-plus"></i>
<spring:message code="add"/></button>
</shiro:hasPermission>
</div>
<h3 class="page-title">
@@ -120,16 +123,8 @@
<!-- 搜索内容与操作按钮栏 -->
<div class="col-md-12">
<%-- <div class="pull-left">
<form:select path="isAudit" class="selectpicker select2 input-small" >
<form:option value=""><spring:message code="all_states"/></form:option>
<c:forEach items="${fns:getDictList('SPEC_AUDIT')}" var="dict">
<form:option value="${dict.itemCode}">${dict.itemValue}</form:option>
</c:forEach>
</form:select>
</div> --%>
<div class="pull-left">
<c:set var="spec_service_id">请选择协议名称</c:set>
<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>
@@ -138,100 +133,42 @@
</div>
<div class="pull-left" style="margin-right:0px;">
<form:select path="ipType" class="selectpicker select2 input-small" >
<form:option value="">-请选择ip类型-</form:option>
<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}">${dict.itemValue}</form:option>
<form:option value="${dict.itemCode}"><spring:message code="${dict.itemValue}"/></form:option>
</c:forEach>
</form:select>
</div>
<div class="pull-left">
<form:input path="srcIp" placeholder="请输入源IP地址" class="form-control input-small"/>
<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">
<form:input path="dstIp" placeholder="请输入目的IP地址" class="form-control input-small"/>
<c:set var = "condition_dstIp"><spring:message code="server_ip" /></c:set>
<form:input path="dstIp" placeholder="${condition_dstIp}" class="form-control input-small"/>
</div>
<%-- <div class="pull-left">
<form:select path="direction" class="selectpicker select2 input-small">
<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>
</form:select>
</div> --%>
<div class="pull-left" style="margin-right:0px;">
<form:select path="protocol" class="selectpicker select2 input-small" >
<form:option value="">-请选择协议-</form:option>
<form:option value=""><spring:message code="protocol"/></form:option>
<c:forEach items="${fns:getDictList('SPEC_PROTOCOL')}" var="dict">
<form:option value="${dict.itemCode}">${dict.itemValue}</form:option>
<form:option value="${dict.itemCode}"><spring:message code="${dict.itemValue}"/></form:option>
</c:forEach>
</form:select>
</div>
<%-- <div class="pull-left">
<button type="button" class="btn btn-default" onClick="resetx()"> <i class="fa fa-refresh"></i> <spring:message code="reset"/> </button>
<button class="btn btn-default btn-search" type="button" onclick="return page()"><i class="fa fa-search"></i></button>
</div> --%>
<%-- <div class="pull-left" >
<form:select path="protocol" class="selectpicker select2 input-small" >
<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>
</form:select>
</div>
<div class="pull-left">
<form:select path="direction" class="selectpicker select2 input-small" >
<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>
</form:select>
</div>
<div class="pull-left">
<div class="input-group">
<div class="input-group-btn">
<form:select path="" class="selectpicker select2 input-small" >
<form:option value="srcIp">协议ID</form:option>
<form:option value="srcIp"><spring:message code="client_ip"></spring:message></form:option>
<form:option value="dstIp"><spring:message code="server_ip"></spring:message></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="page()"> <i class="fa fa-search"></i> <spring:message code="search"/> </button>
<button type="button" class="btn btn-default" onClick="resetx()"> <i class="fa fa-refresh"></i> <spring:message code="reset"/> </button>
<button type="button" class="btn btn-default" id="filter-btn"> 筛选 <i class="fa fa-angle-double-down"></i></button>
<button type="button" class="btn btn-default" id="filter-btn"> <spring:message code="filter"></spring:message> <i class="fa fa-angle-double-down"></i></button>
</div>
<div class="pull-right">
<button type="button" class="btn btn-default" onclick="edit()">
<shiro:hasPermission name="specific:serviceIp:edit">
<button type="button" class="btn btn-default" onclick="cmdEdit('${ctx}/specific/specificServiceHostCfg/form')">
<i class="fa fa-edit"></i> <spring:message code="edit"></spring:message></button>
<button type="button" class="btn btn-default" onclick="delAll()">
<i class="fa fa-trash"></i> 删除</button>
<%-- <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="" id="contentTable" label="approved"></sys:delRow></li>
<li><sys:delRow url="" id="contentTable" label="unapproved"></sys:delRow></li>
<li><sys:delRow url="" id="contentTable" label="cancelPass"></sys:delRow></li>
</ul>
</div> --%>
<i class="fa fa-trash"></i><spring:message code="delete"/></button>
</shiro:hasPermission>
<a class="btn btn-icon-only btn-default setfields tooltips"
data-container="body" data-placement="top" data-original-title="自定义列字段" href="javascript:;">
data-container="body" data-placement="top" data-original-title="<spring:message code='custom_columns'/>" href="javascript:;">
<i class="icon-wrench"></i>
</a>
</div>
@@ -321,24 +258,24 @@
<thead>
<tr>
<th><input type="checkbox" class="i-checks" id="checkAll"></th>
<th>协议名称</th>
<th>源IP地址</th>
<th>源地址掩码</th>
<th>源端口</th>
<th>源端口掩码</th>
<th>目的IP地址</th>
<th>目的地址掩码</th>
<th>目的端口</th>
<th>目的端口掩码</th>
<th>方向</th>
<th>协议</th>
<th>是否审核</th>
<th>创建人员</th>
<th class="sort-column create_time">配置时间</th>
<th>修改人员</th>
<th class="sort-column edit_time">修改时间</th>
<th isVisible="false">审核人员</th>
<th isVisible="false" class="sort-column audit_time">审核时间</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="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>
<th><spring:message code="creator" /></th>
<th class="sort-column create_time"><spring:message code="config_time" /></th>
<th><spring:message code="editor" /></th>
<th class="sort-column edit_time"><spring:message code="edit_time" /></th>
<th isVisible="false"><spring:message code="auditor" /></th>
<th isVisible="false" class="sort-column audit_time"><spring:message code="audit_time" /></th>
</tr>
</thead>
<tbody>
@@ -354,9 +291,9 @@
<td title="${specificServiceHostCfg.dstIpMask}">${fns:abbr(specificServiceHostCfg.dstIpMask,15) }</td>
<td>${specificServiceHostCfg.dstPort }</td>
<td>${specificServiceHostCfg.dstPortMask }</td>
<td>${fns:getDictLabel("SPEC_DIRECTION",specificServiceHostCfg.direction,"0")}</td>
<td>${fns:getDictLabel("SPEC_PROTOCOL",specificServiceHostCfg.protocol,"0")}</td>
<td>${fns:getDictLabel("SPEC_AUDIT",specificServiceHostCfg.isAudit,"0")}</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>${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).name}</td>