APP策略、文件摘要加SubscribeId域.
This commit is contained in:
@@ -31,6 +31,9 @@ public class FileDigestCfg extends BaseCfg<FileDigestCfg> {
|
|||||||
private Integer cfdsLevel;
|
private Integer cfdsLevel;
|
||||||
private String fileUrl;
|
private String fileUrl;
|
||||||
|
|
||||||
|
private NtcSubscribeIdCfg ntcSubscribeIdCfg;
|
||||||
|
private List<NtcSubscribeIdCfg> ntcSubscribeIdCfgList;
|
||||||
|
|
||||||
public static String getTablename() {
|
public static String getTablename() {
|
||||||
return tableName;
|
return tableName;
|
||||||
}
|
}
|
||||||
@@ -61,5 +64,17 @@ public class FileDigestCfg extends BaseCfg<FileDigestCfg> {
|
|||||||
public void setFileUrl(String fileUrl) {
|
public void setFileUrl(String fileUrl) {
|
||||||
this.fileUrl = fileUrl;
|
this.fileUrl = fileUrl;
|
||||||
}
|
}
|
||||||
|
public NtcSubscribeIdCfg getNtcSubscribeIdCfg() {
|
||||||
|
return ntcSubscribeIdCfg;
|
||||||
|
}
|
||||||
|
public void setNtcSubscribeIdCfg(NtcSubscribeIdCfg ntcSubscribeIdCfg) {
|
||||||
|
this.ntcSubscribeIdCfg = ntcSubscribeIdCfg;
|
||||||
|
}
|
||||||
|
public List<NtcSubscribeIdCfg> getNtcSubscribeIdCfgList() {
|
||||||
|
return ntcSubscribeIdCfgList;
|
||||||
|
}
|
||||||
|
public void setNtcSubscribeIdCfgList(List<NtcSubscribeIdCfg> ntcSubscribeIdCfgList) {
|
||||||
|
this.ntcSubscribeIdCfgList = ntcSubscribeIdCfgList;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -225,7 +225,7 @@ public class FileTransferCfgController extends BaseController{
|
|||||||
entity.setCreateTime(date);
|
entity.setCreateTime(date);
|
||||||
fileTime=entity.getCreateTime();
|
fileTime=entity.getCreateTime();
|
||||||
}
|
}
|
||||||
ToMaatResult result = null;
|
ToMaatResult result = new ToMaatResult();
|
||||||
if(file!=null && file.getSize()>0 && entity!=null){
|
if(file!=null && file.getSize()>0 && entity!=null){
|
||||||
String sep = System.getProperty("file.separator");
|
String sep = System.getProperty("file.separator");
|
||||||
String digestFilePath = request.getRealPath("/")+"digestFile";
|
String digestFilePath = request.getRealPath("/")+"digestFile";
|
||||||
@@ -245,6 +245,9 @@ public class FileTransferCfgController extends BaseController{
|
|||||||
String md5 = DigestUtils.md5Hex(file.getBytes());
|
String md5 = DigestUtils.md5Hex(file.getBytes());
|
||||||
fileMap.put("checksum", md5);
|
fileMap.put("checksum", md5);
|
||||||
result = ConfigServiceUtil.getFileDigest(null, uploadFile, JsonMapper.toJsonString(fileMap));
|
result = ConfigServiceUtil.getFileDigest(null, uploadFile, JsonMapper.toJsonString(fileMap));
|
||||||
|
if((result.getData().getRawLen() == null) || (result.getData().getDigest() == null)) {
|
||||||
|
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>:"+null);
|
||||||
|
}
|
||||||
logger.info("获取文件摘要响应信息:"+result);
|
logger.info("获取文件摘要响应信息:"+result);
|
||||||
}
|
}
|
||||||
fileTransferCfgService.saveOrUpdateFileDigestCfg(entity,result,areaCfgIds);
|
fileTransferCfgService.saveOrUpdateFileDigestCfg(entity,result,areaCfgIds);
|
||||||
@@ -282,6 +285,25 @@ public class FileTransferCfgController extends BaseController{
|
|||||||
}
|
}
|
||||||
return "redirect:" + adminPath +"/ntc/fileTransfer/fileDigestList?functionId="+functionId;
|
return "redirect:" + adminPath +"/ntc/fileTransfer/fileDigestList?functionId="+functionId;
|
||||||
}
|
}
|
||||||
|
@RequestMapping(value = {"ajaxFileDigestSubIdList"})
|
||||||
|
public String ajaxFileDigestSubIdList(Model model,Long cfgId,Integer index) {
|
||||||
|
FileDigestCfg cfg = fileTransferCfgService.getFileDigestSubIdCfg(cfgId);
|
||||||
|
List<String[]> tabList = new ArrayList();
|
||||||
|
//查询SubscribeId域配置
|
||||||
|
if(cfg.getNtcSubscribeIdCfgList()!=null){
|
||||||
|
String cfgType = null;
|
||||||
|
for(NtcSubscribeIdCfg ntc:cfg.getNtcSubscribeIdCfgList()){
|
||||||
|
if(!ntc.getCfgType().equals(cfgType)){
|
||||||
|
tabList.add(new String[]{"2",ntc.getCfgType()});
|
||||||
|
cfgType = ntc.getCfgType();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
model.addAttribute("_cfg", cfg);
|
||||||
|
model.addAttribute("index", index);
|
||||||
|
model.addAttribute("tabList", tabList);
|
||||||
|
return "/cfg/fileTransfer/fileDigestSubList";
|
||||||
|
}
|
||||||
|
|
||||||
@RequestMapping(value = {"p2pList"})
|
@RequestMapping(value = {"p2pList"})
|
||||||
public String p2pList(Model model,@ModelAttribute("cfg")CfgIndexInfo cfg,HttpServletRequest request,HttpServletResponse response) {
|
public String p2pList(Model model,@ModelAttribute("cfg")CfgIndexInfo cfg,HttpServletRequest request,HttpServletResponse response) {
|
||||||
|
|||||||
@@ -1508,7 +1508,7 @@
|
|||||||
<include refid="AppCommonCfg_Value_List" />,
|
<include refid="AppCommonCfg_Value_List" />,
|
||||||
#{exprType,jdbcType=INTEGER},#{matchMethod,jdbcType=INTEGER},#{isHexbin,jdbcType=INTEGER}
|
#{exprType,jdbcType=INTEGER},#{matchMethod,jdbcType=INTEGER},#{isHexbin,jdbcType=INTEGER}
|
||||||
,#{userRegion1,jdbcType=VARCHAR} ,#{userRegion2,jdbcType=VARCHAR} ,#{userRegion3,jdbcType=VARCHAR}
|
,#{userRegion1,jdbcType=VARCHAR} ,#{userRegion2,jdbcType=VARCHAR} ,#{userRegion3,jdbcType=VARCHAR}
|
||||||
,#{userRegion4,jdbcType=VARCHAR} ,#{userRegion5,jdbcType=VARCHAR}
|
,#{userRegion4,jdbcType=VARCHAR} ,#{userRegion5,jdbcType=VARCHAR} ,#{doLog,jdbcType=INTEGER}
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
<insert id="insertAppIpCfg" parameterType="com.nis.domain.configuration.AppIpCfg" >
|
<insert id="insertAppIpCfg" parameterType="com.nis.domain.configuration.AppIpCfg" >
|
||||||
|
|||||||
@@ -38,6 +38,8 @@ public interface FileTransferCfgDao extends CrudDao<CfgIndexInfo> {
|
|||||||
public void auditCfg(BaseCfg entity);
|
public void auditCfg(BaseCfg entity);
|
||||||
public FileDigestCfg getFileDigest(Long id);
|
public FileDigestCfg getFileDigest(Long id);
|
||||||
public void updateFileDigestCfg(FileDigestCfg entity);
|
public void updateFileDigestCfg(FileDigestCfg entity);
|
||||||
|
public void deleteFileDigestSubscribeIdCfg(FileDigestCfg entity);
|
||||||
|
public List<NtcSubscribeIdCfg> getFileDigestSubscribeidList(FileDigestCfg entity);
|
||||||
|
|
||||||
// P2P域配置新增
|
// P2P域配置新增
|
||||||
public void saveP2pHashCfg(BaseStringCfg cfg);
|
public void saveP2pHashCfg(BaseStringCfg cfg);
|
||||||
@@ -53,4 +55,5 @@ public interface FileTransferCfgDao extends CrudDao<CfgIndexInfo> {
|
|||||||
public void deleteP2pHashCfg(CfgIndexInfo entity);
|
public void deleteP2pHashCfg(CfgIndexInfo entity);
|
||||||
public void deleteP2pKeywordCfg(CfgIndexInfo entity);
|
public void deleteP2pKeywordCfg(CfgIndexInfo entity);
|
||||||
public void deleteP2pSubscribeIdCfg(CfgIndexInfo entity);
|
public void deleteP2pSubscribeIdCfg(CfgIndexInfo entity);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1055,7 +1055,10 @@
|
|||||||
<delete id="deleteP2pSubscribeIdCfg">
|
<delete id="deleteP2pSubscribeIdCfg">
|
||||||
delete from ntc_subscribe_id_cfg where compile_id=#{compileId} and function_id=#{functionId}
|
delete from ntc_subscribe_id_cfg where compile_id=#{compileId} and function_id=#{functionId}
|
||||||
</delete>
|
</delete>
|
||||||
|
<!-- 删除FileDigest SubscribeId配置 -->
|
||||||
|
<delete id="deleteFileDigestSubscribeIdCfg">
|
||||||
|
delete from ntc_subscribe_id_cfg where compile_id=#{compileId} and function_id=#{functionId}
|
||||||
|
</delete>
|
||||||
|
|
||||||
<!-- File Digest Cfg -->
|
<!-- File Digest Cfg -->
|
||||||
<select id="getFileDigestList" resultMap="digestCfgMap" parameterType="com.nis.domain.configuration.FileDigestCfg" >
|
<select id="getFileDigestList" resultMap="digestCfgMap" parameterType="com.nis.domain.configuration.FileDigestCfg" >
|
||||||
@@ -1151,6 +1154,15 @@
|
|||||||
FROM file_digest_cfg a where cfg_id=#{cfgId}
|
FROM file_digest_cfg a where cfg_id=#{cfgId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getFileDigestSubscribeidList" resultMap="stringCfgMap" parameterType="com.nis.domain.configuration.FileDigestCfg">
|
||||||
|
SELECT
|
||||||
|
<include refid="StrCfg_Column" />
|
||||||
|
FROM ntc_subscribe_id_cfg a where compile_id=#{compileId} and function_id=#{functionId}
|
||||||
|
<!-- <if test="cfgType != null and cfgType != ''">
|
||||||
|
and a.cfg_type =#{cfgType,jdbcType=VARCHAR}
|
||||||
|
</if> -->
|
||||||
|
</select>
|
||||||
|
|
||||||
<update id="updateFileDigestCfg" parameterType="com.nis.domain.configuration.FileDigestCfg" >
|
<update id="updateFileDigestCfg" parameterType="com.nis.domain.configuration.FileDigestCfg" >
|
||||||
update file_digest_cfg
|
update file_digest_cfg
|
||||||
<set >
|
<set >
|
||||||
|
|||||||
@@ -378,6 +378,8 @@ public class FileTransferCfgService extends CrudService<FileTransferCfgDao,CfgIn
|
|||||||
|
|
||||||
public FileDigestCfg getFileDigestCfg(Long cfgId){
|
public FileDigestCfg getFileDigestCfg(Long cfgId){
|
||||||
FileDigestCfg entity = fileTransferCfgDao.getFileDigest(cfgId);
|
FileDigestCfg entity = fileTransferCfgDao.getFileDigest(cfgId);
|
||||||
|
List<NtcSubscribeIdCfg> subscribeidList = fileTransferCfgDao.getFileDigestSubscribeidList(entity);
|
||||||
|
entity.setNtcSubscribeIdCfgList(subscribeidList);
|
||||||
return entity;
|
return entity;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -402,18 +404,21 @@ public class FileTransferCfgService extends CrudService<FileTransferCfgDao,CfgIn
|
|||||||
}
|
}
|
||||||
entity.setCompileId(compileId);
|
entity.setCompileId(compileId);
|
||||||
entity.setCreatorId(entity.getCurrentUser().getId());
|
entity.setCreatorId(entity.getCurrentUser().getId());
|
||||||
Long rawLen = result.getData().getRawLen();
|
entity.setRawLen(result.getData().getRawLen());
|
||||||
String digest = result.getData().getDigest();
|
entity.setDigest(result.getData().getDigest());
|
||||||
if((result!=null && result.getData()!=null) && (rawLen != null && digest!= null)){
|
|
||||||
entity.setRawLen(rawLen);
|
|
||||||
entity.setDigest(digest);
|
|
||||||
entity.setFileUrl(result.getData().getAccessUrl());
|
entity.setFileUrl(result.getData().getAccessUrl());
|
||||||
}else {
|
|
||||||
logger.info("获取文件摘要属性有误");
|
|
||||||
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>:"+null);
|
|
||||||
}
|
|
||||||
mailCfgDao.saveMailFileDigestCfg(entity);
|
mailCfgDao.saveMailFileDigestCfg(entity);
|
||||||
|
|
||||||
|
// 保存SubscribeId域配置信息
|
||||||
|
if(entity.getNtcSubscribeIdCfgList()!=null){
|
||||||
|
for(NtcSubscribeIdCfg cfg:entity.getNtcSubscribeIdCfgList()){
|
||||||
|
if(StringUtils.isNotBlank(cfg.getCfgKeywords())){
|
||||||
|
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||||
|
fileTransferCfgDao.saveP2pSubscribeIdCfg(cfg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
//保存区域IP信息
|
//保存区域IP信息
|
||||||
if(entity.getAreaCfg()!=null&&entity.getAreaCfg().size()>0){
|
if(entity.getAreaCfg()!=null&&entity.getAreaCfg().size()>0){
|
||||||
for (AreaIpCfg areaIpCfg : entity.getAreaCfg()) {
|
for (AreaIpCfg areaIpCfg : entity.getAreaCfg()) {
|
||||||
@@ -427,12 +432,26 @@ public class FileTransferCfgService extends CrudService<FileTransferCfgDao,CfgIn
|
|||||||
|
|
||||||
entity.setEditorId(entity.getCurrentUser().getId());
|
entity.setEditorId(entity.getCurrentUser().getId());
|
||||||
entity.setEditTime(new Date());
|
entity.setEditTime(new Date());
|
||||||
if(result!=null && result.getData()!=null){
|
if(result.getData() !=null ) {
|
||||||
entity.setRawLen(result.getData().getRawLen());
|
entity.setRawLen(result.getData().getRawLen());
|
||||||
entity.setDigest(result.getData().getDigest());
|
entity.setDigest(result.getData().getDigest());
|
||||||
entity.setFileUrl(result.getData().getAccessUrl());
|
entity.setFileUrl(result.getData().getAccessUrl());
|
||||||
}
|
}
|
||||||
|
|
||||||
fileTransferCfgDao.updateFileDigestCfg(entity);
|
fileTransferCfgDao.updateFileDigestCfg(entity);
|
||||||
|
entity.setCreatorId(entity.getCurrentUser().getId());
|
||||||
|
entity.setCreateTime(new Date());
|
||||||
|
|
||||||
|
// SubscribeId域配置 先删后加
|
||||||
|
fileTransferCfgDao.deleteFileDigestSubscribeIdCfg(entity);
|
||||||
|
if(entity.getNtcSubscribeIdCfgList()!=null){
|
||||||
|
for(NtcSubscribeIdCfg cfg:entity.getNtcSubscribeIdCfgList()){
|
||||||
|
if(StringUtils.isNotBlank(cfg.getCfgKeywords())){
|
||||||
|
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||||
|
fileTransferCfgDao.saveP2pSubscribeIdCfg(cfg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
areaCfgIds=!StringUtil.isEmpty(areaCfgIds)? ","+areaCfgIds:"";
|
areaCfgIds=!StringUtil.isEmpty(areaCfgIds)? ","+areaCfgIds:"";
|
||||||
if(!StringUtil.isEmpty(entity.getAreaCfg())){
|
if(!StringUtil.isEmpty(entity.getAreaCfg())){
|
||||||
@@ -592,6 +611,17 @@ public class FileTransferCfgService extends CrudService<FileTransferCfgDao,CfgIn
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public FileDigestCfg getFileDigestSubIdCfg(Long cfgId) {
|
||||||
|
FileDigestCfg entity = fileTransferCfgDao.getFileDigest(cfgId);
|
||||||
|
if(entity.getCompileId()!=null){
|
||||||
|
NtcSubscribeIdCfg ntcSubscribeIdCfg = new NtcSubscribeIdCfg();
|
||||||
|
ntcSubscribeIdCfg.setCompileId(entity.getCompileId());
|
||||||
|
List<NtcSubscribeIdCfg> ntcList = stringCfgDao.findSubscribeIdCfgList(ntcSubscribeIdCfg);
|
||||||
|
entity.setNtcSubscribeIdCfgList(ntcList);
|
||||||
|
}
|
||||||
|
return entity;
|
||||||
|
}
|
||||||
|
|
||||||
public Page<CfgIndexInfo> getP2pList(Page<CfgIndexInfo> page, CfgIndexInfo entity){
|
public Page<CfgIndexInfo> getP2pList(Page<CfgIndexInfo> page, CfgIndexInfo entity){
|
||||||
// 生成数据权限过滤条件(dsf为dataScopeFilter的简写,在xml中使用 ${sqlMap.dsf}调用权限SQL)
|
// 生成数据权限过滤条件(dsf为dataScopeFilter的简写,在xml中使用 ${sqlMap.dsf}调用权限SQL)
|
||||||
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"a"));
|
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"a"));
|
||||||
@@ -943,4 +973,5 @@ public class FileTransferCfgService extends CrudService<FileTransferCfgDao,CfgIn
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,11 @@ $(function(){
|
|||||||
}else{
|
}else{
|
||||||
$("#ratelimit").hide();
|
$("#ratelimit").hide();
|
||||||
}
|
}
|
||||||
|
if(($(".action:checked").val()==1) || ($(".action:checked").val()==16)){
|
||||||
|
$(".subscribeId").show();
|
||||||
|
}else{
|
||||||
|
$(".subscribeId").hide();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
$("#serviceId").val($(".action:checked").attr("serviceId"));
|
$("#serviceId").val($(".action:checked").attr("serviceId"));
|
||||||
$("#protocolId").val($(".action:checked").attr("protocolId"));
|
$("#protocolId").val($(".action:checked").attr("protocolId"));
|
||||||
@@ -21,6 +26,11 @@ $(function(){
|
|||||||
}else{
|
}else{
|
||||||
$("#ratelimit").hide();
|
$("#ratelimit").hide();
|
||||||
}
|
}
|
||||||
|
if(($(".action:checked").val()==1) || ($(".action:checked").val()==16)){
|
||||||
|
$(".subscribeId").show();
|
||||||
|
}else{
|
||||||
|
$(".subscribeId").hide();
|
||||||
|
}
|
||||||
$("#cfgFrom").validate({
|
$("#cfgFrom").validate({
|
||||||
errorPlacement: function(error,element){
|
errorPlacement: function(error,element){
|
||||||
if($(element).parents().hasClass("tagsinput")){
|
if($(element).parents().hasClass("tagsinput")){
|
||||||
@@ -31,6 +41,11 @@ $(function(){
|
|||||||
},
|
},
|
||||||
submitHandler: function(form){
|
submitHandler: function(form){
|
||||||
var flag = true;
|
var flag = true;
|
||||||
|
//代表所有业务都隐藏了,提示必须增加一种业务数据
|
||||||
|
if($(".boxSolid").length ==$(".boxSolid.hidden").length){
|
||||||
|
top.$.jBox.tip("<spring:message code='one_more'/>", "<spring:message code='info'/>");
|
||||||
|
return;
|
||||||
|
}
|
||||||
$("input[name$='cfgKeywords']").each(function(){
|
$("input[name$='cfgKeywords']").each(function(){
|
||||||
if($(this).val()==''){
|
if($(this).val()==''){
|
||||||
$(this).parents(".form-group").find(
|
$(this).parents(".form-group").find(
|
||||||
@@ -65,7 +80,6 @@ $(function(){
|
|||||||
if($("input[name='ratelimit']").is(":hidden")){
|
if($("input[name='ratelimit']").is(":hidden")){
|
||||||
$("input[name='ratelimit']").val("");
|
$("input[name='ratelimit']").val("");
|
||||||
}
|
}
|
||||||
/* $("#appCode").val($("#specServiceIdId").val()); */
|
|
||||||
loading('onloading...');
|
loading('onloading...');
|
||||||
form.submit();
|
form.submit();
|
||||||
}else{
|
}else{
|
||||||
@@ -175,8 +189,9 @@ var delContent = function(contentClassName, addBtnClassName) {
|
|||||||
<!-- desc and action -->
|
<!-- desc and action -->
|
||||||
|
|
||||||
<c:set var="ipCfgIndex" value="0"></c:set>
|
<c:set var="ipCfgIndex" value="0"></c:set>
|
||||||
|
<c:set var="subscribeIdCfgIndex" value="0"></c:set>
|
||||||
<c:forEach items="${regionList}" var="region" varStatus="status">
|
<c:forEach items="${regionList}" var="region" varStatus="status">
|
||||||
<c:if test="${region.regionType eq 2 }">
|
<c:if test="${region.configServiceType eq 'app_policy' }">
|
||||||
<input type="hidden" name="cfgType" value="${region.configRegionValue}">
|
<input type="hidden" name="cfgType" value="${region.configRegionValue}">
|
||||||
<input type="hidden" name="cfgRegionCode" value="${region.configRegionCode}">
|
<input type="hidden" name="cfgRegionCode" value="${region.configRegionCode}">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -273,6 +288,49 @@ var delContent = function(contentClassName, addBtnClassName) {
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</c:if>
|
</c:if>
|
||||||
|
<!-- subscribeId配置 -->
|
||||||
|
<div class="subscribeId" >
|
||||||
|
<c:if test="${region.configServiceType eq 'subscribe_id'}">
|
||||||
|
<c:set var="tabName" value="${region.configRegionValue}Tab"></c:set>
|
||||||
|
<h4 class="form-section">
|
||||||
|
<spring:message code="${region.configRegionValue}" />
|
||||||
|
<small> <span
|
||||||
|
class="glyphicon glyphicon-plus ${tabName}Add"
|
||||||
|
onClick="addContent(this,'${tabName}')" title="add"></span></small>
|
||||||
|
</h4>
|
||||||
|
<c:set var="cfgName" value="ntcSubscribeIdCfgList[${subscribeIdCfgIndex}]"></c:set>
|
||||||
|
<c:set var="regionValue" value="${region.configRegionValue}"></c:set>
|
||||||
|
<c:choose>
|
||||||
|
<c:when test="${fn:length(_cfg.ntcSubscribeIdCfgList)>0 and (!empty _cfg.ntcSubscribeIdCfgList[subscribeIdCfgIndex].cfgId)}">
|
||||||
|
<c:set var="isBreak" value="false" ></c:set>
|
||||||
|
<c:forEach items="${_cfg.ntcSubscribeIdCfgList}" var="cfg">
|
||||||
|
<c:choose>
|
||||||
|
<c:when test="${region.configRegionValue eq cfg.cfgType and !isBreak}">
|
||||||
|
<div class="row boxSolid ${tabName}${status.index}">
|
||||||
|
<%@include file="/WEB-INF/views/cfg/complexCfgForm.jsp"%>
|
||||||
|
</div>
|
||||||
|
<c:set var="isBreak" value="true" ></c:set>
|
||||||
|
<c:set var="subscribeIdCfgIndex" value="${subscribeIdCfgIndex+1 }"></c:set>
|
||||||
|
</c:when>
|
||||||
|
</c:choose>
|
||||||
|
</c:forEach>
|
||||||
|
<c:if test="${!isBreak}">
|
||||||
|
<div class="row boxSolid ${tabName}${status.index} hidden disabled">
|
||||||
|
<%@include file="/WEB-INF/views/cfg/complexCfgForm.jsp"%>
|
||||||
|
</div>
|
||||||
|
<c:set var="subscribeIdCfgIndex" value="${subscribeIdCfgIndex+1 }"></c:set>
|
||||||
|
</c:if>
|
||||||
|
</c:when>
|
||||||
|
<c:otherwise>
|
||||||
|
<div class="row boxSolid ${tabName}${status.index} hidden disabled">
|
||||||
|
<%@include file="/WEB-INF/views/cfg/complexCfgForm.jsp"%>
|
||||||
|
</div>
|
||||||
|
<c:set var="subscribeIdCfgIndex" value="${subscribeIdCfgIndex+1 }"></c:set>
|
||||||
|
</c:otherwise>
|
||||||
|
</c:choose>
|
||||||
|
</c:if>
|
||||||
|
</div>
|
||||||
|
<!-- IP配置 -->
|
||||||
<c:if test="${region.regionType eq 1 }">
|
<c:if test="${region.regionType eq 1 }">
|
||||||
<h4 class="form-section">
|
<h4 class="form-section">
|
||||||
<c:set var="tabName" value="${region.configRegionValue}Tab"></c:set>
|
<c:set var="tabName" value="${region.configRegionValue}Tab"></c:set>
|
||||||
@@ -301,6 +359,7 @@ var delContent = function(contentClassName, addBtnClassName) {
|
|||||||
</c:otherwise>
|
</c:otherwise>
|
||||||
</c:choose>
|
</c:choose>
|
||||||
</c:if>
|
</c:if>
|
||||||
|
|
||||||
</c:forEach>
|
</c:forEach>
|
||||||
<%@include file="/WEB-INF/include/form/areaInfo.jsp" %>
|
<%@include file="/WEB-INF/include/form/areaInfo.jsp" %>
|
||||||
<%@include file="/WEB-INF/include/form/basicInfo.jsp" %>
|
<%@include file="/WEB-INF/include/form/basicInfo.jsp" %>
|
||||||
|
|||||||
@@ -13,20 +13,61 @@
|
|||||||
});
|
});
|
||||||
$(".action").on("change", function() {
|
$(".action").on("change", function() {
|
||||||
$("#serviceId").val($(this).attr("serviceId"));
|
$("#serviceId").val($(this).attr("serviceId"));
|
||||||
|
$("#protocolId").val($(this).attr("protocolId"));
|
||||||
});
|
});
|
||||||
$("#serviceId").val($(".action:checked").attr("serviceId"));
|
$("#serviceId").val($(".action:checked").attr("serviceId"));
|
||||||
$("#cfgFrom").validate(
|
$("#protocolId").val($(".action:checked").attr("protocolId"));
|
||||||
{
|
$("#cfgFrom").validate({
|
||||||
submitHandler : function(form) {
|
errorPlacement: function(error,element){
|
||||||
/* var srcFile = $("#srcFile").val();
|
if($(element).parents().hasClass("tagsinput")){
|
||||||
var srcUrl = $("#srcUrl").val();
|
$(element).parents(".col-md-6").next("div").append(error);
|
||||||
if((srcUrl==null||srcUrl=="") && (srcFile==null || srcFile=="")){
|
|
||||||
$("div[for='srcFile']").append("<label id='level-error' class='error' for='srcFile'><spring:message code='required'></spring:message></label>");
|
|
||||||
return false;
|
|
||||||
}else{
|
}else{
|
||||||
} */
|
$(element).parents(".form-group").find("div[for='"+element.attr("name")+"']").append(error);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
submitHandler : function(form) {
|
||||||
|
var flag = true;
|
||||||
|
//代表所有业务都隐藏了,提示必须增加一种业务数据
|
||||||
|
if($(".boxSolid").length ==$(".boxSolid.hidden").length){
|
||||||
|
top.$.jBox.tip("<spring:message code='one_more'/>", "<spring:message code='info'/>");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$("input[name$='cfgKeywords']").each(function(){
|
||||||
|
if($(this).val()==''){
|
||||||
|
$(this).parents(".form-group").find(
|
||||||
|
"div[for='"
|
||||||
|
+ $(this).attr("name")
|
||||||
|
+ "']").html("<label id=\"cfgKeywordsError\" class=\"error\">"+$("#keywordError").text()+"</label>");
|
||||||
|
flag = false;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
$("select[name$='isHexbin']").each(function(){
|
||||||
|
var isHexbin=$(this).val();
|
||||||
|
if(isHexbin == 1){ //十六进制
|
||||||
|
var keywords=$("input[name$='"+$(this).attr("name").replace("isHexbin","cfgKeywords")+"']").val();
|
||||||
|
if(!(/^([0-9|a-f|A-F]*)$/.test(keywords))){
|
||||||
|
$(this).parents(".form-body").find(
|
||||||
|
"div[for='"
|
||||||
|
+ $(this).attr("name").replace("isHexbin","cfgKeywords")
|
||||||
|
+ "']").html("<label id=\"cfgKeywordsError\" class=\"error\">"+$.validator.messages.hexCheck+"</label>");
|
||||||
|
flag = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if(flag){
|
||||||
|
//将disable属性的元素删除
|
||||||
|
$(".disabled").each(function(){
|
||||||
|
$(this).remove();
|
||||||
|
});
|
||||||
|
$("input[name$='exprType']").attr("disabled",false);
|
||||||
|
if($("[name='behavCode']")&&$("[name='behavCode']").val()!=""){
|
||||||
|
$("input[name$='exprType']").val(1);
|
||||||
|
}
|
||||||
loading('onloading...');
|
loading('onloading...');
|
||||||
form.submit();
|
form.submit();
|
||||||
|
}else{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
errorContainer : "#messageBox",
|
errorContainer : "#messageBox",
|
||||||
@@ -37,10 +78,24 @@
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
//业务窗口打开
|
||||||
|
var addContent = function(obj, contentClassName) {
|
||||||
|
var showDiv = $(obj).parent().parent().next();
|
||||||
|
$(showDiv).removeClass("hidden").removeClass(
|
||||||
|
"disabled");
|
||||||
|
$(obj).addClass("hidden");
|
||||||
|
}
|
||||||
|
|
||||||
|
//业务窗口关闭
|
||||||
|
var delContent = function(contentClassName, addBtnClassName) {
|
||||||
|
$("." + contentClassName).addClass("hidden").addClass("disabled");
|
||||||
|
$("." + addBtnClassName).removeClass("hidden");
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
<span id="keywordError" style="display:none"><spring:message code="required"></spring:message></span>
|
||||||
|
<span id="tagsinputTip" style="display:none"><spring:message code="multiple_keywords_tip"></spring:message></span>
|
||||||
<div class="page-content">
|
<div class="page-content">
|
||||||
|
|
||||||
<h3 class="page-title">
|
<h3 class="page-title">
|
||||||
@@ -183,6 +238,49 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- subscribeId配置 -->
|
||||||
|
<c:set var="subscribeIdCfgIndex" value="0"></c:set>
|
||||||
|
<c:forEach items="${regionList}" var="region" varStatus="status">
|
||||||
|
<c:if test="${region.configServiceType eq 'subscribe_id'}">
|
||||||
|
<c:set var="tabName" value="${region.configRegionValue}Tab"></c:set>
|
||||||
|
<h4 class="form-section">
|
||||||
|
<spring:message code="${region.configRegionValue}" />
|
||||||
|
<small> <span
|
||||||
|
class="glyphicon glyphicon-plus ${tabName}Add"
|
||||||
|
onClick="addContent(this,'${tabName}')" title="add"></span></small>
|
||||||
|
</h4>
|
||||||
|
<c:set var="cfgName" value="ntcSubscribeIdCfgList[${subscribeIdCfgIndex}]"></c:set>
|
||||||
|
<c:set var="regionValue" value="${region.configRegionValue}"></c:set>
|
||||||
|
<c:choose>
|
||||||
|
<c:when test="${fn:length(_cfg.ntcSubscribeIdCfgList)>0 and (!empty _cfg.ntcSubscribeIdCfgList[subscribeIdCfgIndex].cfgId)}">
|
||||||
|
<c:set var="isBreak" value="false" ></c:set>
|
||||||
|
<c:forEach items="${_cfg.ntcSubscribeIdCfgList}" var="cfg">
|
||||||
|
<c:choose>
|
||||||
|
<c:when test="${region.configRegionValue eq cfg.cfgType and !isBreak}">
|
||||||
|
<div class="row boxSolid ${tabName}${status.index}">
|
||||||
|
<%@include file="/WEB-INF/views/cfg/complexCfgForm.jsp"%>
|
||||||
|
</div>
|
||||||
|
<c:set var="isBreak" value="true" ></c:set>
|
||||||
|
<c:set var="subscribeIdCfgIndex" value="${subscribeIdCfgIndex+1 }"></c:set>
|
||||||
|
</c:when>
|
||||||
|
</c:choose>
|
||||||
|
</c:forEach>
|
||||||
|
<c:if test="${!isBreak}">
|
||||||
|
<div class="row boxSolid ${tabName}${status.index} hidden disabled">
|
||||||
|
<%@include file="/WEB-INF/views/cfg/complexCfgForm.jsp"%>
|
||||||
|
</div>
|
||||||
|
<c:set var="subscribeIdCfgIndex" value="${subscribeIdCfgIndex+1 }"></c:set>
|
||||||
|
</c:if>
|
||||||
|
</c:when>
|
||||||
|
<c:otherwise>
|
||||||
|
<div class="row boxSolid ${tabName}${status.index} hidden disabled">
|
||||||
|
<%@include file="/WEB-INF/views/cfg/complexCfgForm.jsp"%>
|
||||||
|
</div>
|
||||||
|
<c:set var="subscribeIdCfgIndex" value="${subscribeIdCfgIndex+1 }"></c:set>
|
||||||
|
</c:otherwise>
|
||||||
|
</c:choose>
|
||||||
|
</c:if>
|
||||||
|
</c:forEach>
|
||||||
<%@include file="/WEB-INF/include/form/areaInfo.jsp"%>
|
<%@include file="/WEB-INF/include/form/areaInfo.jsp"%>
|
||||||
<%@include file="/WEB-INF/include/form/basicInfo.jsp"%>
|
<%@include file="/WEB-INF/include/form/basicInfo.jsp"%>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -36,6 +36,51 @@
|
|||||||
$("#level").attr("value",'');
|
$("#level").attr("value",'');
|
||||||
$("#searchForm")[0].reset();
|
$("#searchForm")[0].reset();
|
||||||
});
|
});
|
||||||
|
//异步获取voip相关信息
|
||||||
|
$("span[id^=open]").click(function(){
|
||||||
|
var openId=$(this).attr("id");
|
||||||
|
var closeId=$(this).attr("id").replace("open","close");
|
||||||
|
var index=$(this).attr("id").replace("open","");
|
||||||
|
$("#"+openId).hide();
|
||||||
|
$("#"+closeId).show();
|
||||||
|
//var compileId=$(this).attr("compileId");
|
||||||
|
var cfgId=$(this).attr("cfgId");
|
||||||
|
if($("#"+openId).parent().parent().next("tr").hasClass("child")){
|
||||||
|
$("#"+openId).parent().parent().next("tr").show();
|
||||||
|
}else{
|
||||||
|
$.ajax({
|
||||||
|
type:'post',
|
||||||
|
async:false,
|
||||||
|
url:'${ctx}/ntc/fileTransfer/ajaxFileDigestSubIdList',
|
||||||
|
data:{"cfgId":cfgId,"index":index},
|
||||||
|
dataType:"html",
|
||||||
|
success:function(data){
|
||||||
|
var subTab="<tr class='child'>"+
|
||||||
|
"<td style='border-right: 1px solid #FFFFFF;'>"+
|
||||||
|
"<input type='checkbox' hidden='hidden'/>"+
|
||||||
|
"</td>"+
|
||||||
|
"<td colspan='"+($(".table tr").eq(0).children("th").length-1)+"'>";
|
||||||
|
var html="";
|
||||||
|
html+="<div class='row'>";
|
||||||
|
html = html+data;
|
||||||
|
subTab=subTab+html;
|
||||||
|
subTab+="</td>";
|
||||||
|
subTab+="</tr>";
|
||||||
|
$("#"+openId).parent().parent().after(subTab);
|
||||||
|
$("div[name='tabTitle"+index+"']").get(0).click();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
$("span[id^=close]").on("click",function(){
|
||||||
|
var closeId=$(this).attr("id");
|
||||||
|
var openId=$(this).attr("id").replace("close","open");
|
||||||
|
$("#"+closeId).hide();
|
||||||
|
$("#"+openId).show();
|
||||||
|
$("#"+closeId).parent().parent().next("tr").hide();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -289,6 +334,7 @@
|
|||||||
<c:forEach items="${page.list }" var="indexCfg" varStatus="status" step="1">
|
<c:forEach items="${page.list }" var="indexCfg" varStatus="status" step="1">
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
|
<span id="open${status.index}" class="" compileId="${indexCfg.compileId}" cfgId="${indexCfg.cfgId}"> ▷ </span><span style="display: none" id="close${status.index}" > ▼ </span>
|
||||||
<input type="checkbox" class="i-checks child-checks" id="${indexCfg.cfgId}" value="${indexCfg.isAudit}">
|
<input type="checkbox" class="i-checks child-checks" id="${indexCfg.cfgId}" value="${indexCfg.isAudit}">
|
||||||
</td>
|
</td>
|
||||||
<td>${indexCfg.cfgDesc }</td>
|
<td>${indexCfg.cfgDesc }</td>
|
||||||
|
|||||||
@@ -0,0 +1,79 @@
|
|||||||
|
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||||
|
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<script>
|
||||||
|
$(document).ready(function() {
|
||||||
|
//$("div[name='tabTitle"+index+"']").get(0).click();
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
<style type="text/css">
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<c:forEach items="${tabList}" var="region" varStatus="regionStatus">
|
||||||
|
<div id="${region[1]}Title${index}" onclick="switchSubCfgTabInfo('${region[1]}',${index})"
|
||||||
|
class="col-md-1 tabInfo" name="tabTitle${index }">
|
||||||
|
<spring:message code='${region[1]}' />
|
||||||
|
<i id="${region[1]}${index}" class="fa" name="tabFlag${index}"></i>
|
||||||
|
</div>
|
||||||
|
</c:forEach>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<c:forEach items="${tabList}" var="region">
|
||||||
|
<c:if test="${region[0] eq 2 }">
|
||||||
|
<c:forEach items="${_cfg.ntcSubscribeIdCfgList}" var="cfg">
|
||||||
|
<c:if test="${region[1] eq cfg.cfgType }">
|
||||||
|
<div id="${region[1]}Info${index}" class="content" name="subCfg${index}">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-8">
|
||||||
|
<div class="form-group">
|
||||||
|
<label><spring:message code='keywords' />:</label><label>
|
||||||
|
${fn:replace(cfg.cfgKeywords, "***and***", " ")}</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="form-group">
|
||||||
|
<label><spring:message code='expression_type' />:</label>
|
||||||
|
<label>
|
||||||
|
<c:choose>
|
||||||
|
<c:when test="${cfg.exprType eq 1}"><spring:message code='and_expression'/></c:when>
|
||||||
|
<c:when test="${cfg.exprType eq 0}"><spring:message code='null_expression'/></c:when>
|
||||||
|
</c:choose>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="form-group">
|
||||||
|
<label><spring:message code='match_method' />:</label>
|
||||||
|
<label>
|
||||||
|
<c:forEach items="${fns:getDictList('MATCH_METHOD')}" var="matchMethodC">
|
||||||
|
<c:if test="${cfg.matchMethod==matchMethodC.itemCode }"><spring:message code="${matchMethodC.itemValue}"/></c:if>
|
||||||
|
</c:forEach>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="form-group">
|
||||||
|
<label><spring:message code='whether_hexbinary' />:</label>
|
||||||
|
<label>
|
||||||
|
<c:forEach items="${fns:getDictList('WHETHER_HEXBINARY')}" var="isHexbinC">
|
||||||
|
<c:if test="${cfg.isHexbin==isHexbinC.itemCode }"><spring:message code="${isHexbinC.itemValue}"/></c:if>
|
||||||
|
</c:forEach>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</c:if>
|
||||||
|
</c:forEach>
|
||||||
|
</c:if>
|
||||||
|
|
||||||
|
</c:forEach>
|
||||||
|
</html>
|
||||||
Reference in New Issue
Block a user