From 24c37c18349a48789105be069f9dbd3edc876cab Mon Sep 17 00:00:00 2001 From: zhangwei Date: Mon, 4 Jun 2018 12:43:06 +0800 Subject: [PATCH] =?UTF-8?q?dns=E9=85=8D=E7=BD=AE=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhangwei --- .../domain/configuration/CfgIndexInfo.java | 7 + .../com/nis/domain/maat/ToMaatResult.java | 11 +- .../configuration/ntc/WebsiteController.java | 77 +++- .../web/dao/configuration/WebsiteCfgDao.java | 11 +- .../web/dao/configuration/WebsiteCfgDao.xml | 80 ++++ .../configuration/WebsiteCfgService.java | 245 +++++++++- .../WEB-INF/views/cfg/website/dnsForm.jsp | 268 +++++++++++ .../WEB-INF/views/cfg/website/dnsList.jsp | 433 ++++++++++++++++++ .../WEB-INF/views/cfg/website/dnsSubList.jsp | 185 ++++++++ 9 files changed, 1306 insertions(+), 11 deletions(-) create mode 100644 src/main/webapp/WEB-INF/views/cfg/website/dnsForm.jsp create mode 100644 src/main/webapp/WEB-INF/views/cfg/website/dnsList.jsp create mode 100644 src/main/webapp/WEB-INF/views/cfg/website/dnsSubList.jsp diff --git a/src/main/java/com/nis/domain/configuration/CfgIndexInfo.java b/src/main/java/com/nis/domain/configuration/CfgIndexInfo.java index 197e9891f..603d022b1 100644 --- a/src/main/java/com/nis/domain/configuration/CfgIndexInfo.java +++ b/src/main/java/com/nis/domain/configuration/CfgIndexInfo.java @@ -43,6 +43,7 @@ public class CfgIndexInfo extends BaseCfg { private List httpResBodyList; private SslKeywordCfg sslCfg; private List sslList; + private List domainList; public AvVoipAccountCfg getVoipAccount() { return voipAccount; @@ -152,6 +153,12 @@ public class CfgIndexInfo extends BaseCfg { public void setHttpResBodyList(List httpResBodyList) { this.httpResBodyList = httpResBodyList; } + public List getDomainList() { + return domainList; + } + public void setDomainList(List domainList) { + this.domainList = domainList; + } public static String getTablename() { return tableName; } diff --git a/src/main/java/com/nis/domain/maat/ToMaatResult.java b/src/main/java/com/nis/domain/maat/ToMaatResult.java index ec36e1e9d..cea002a98 100644 --- a/src/main/java/com/nis/domain/maat/ToMaatResult.java +++ b/src/main/java/com/nis/domain/maat/ToMaatResult.java @@ -11,8 +11,6 @@ package com.nis.domain.maat; import java.io.Serializable; import java.util.List; -import org.codehaus.jackson.annotate.JsonIgnoreProperties; - /** * @ClassName: ToMaatResult.java * @Description: TODO @@ -20,7 +18,6 @@ import org.codehaus.jackson.annotate.JsonIgnoreProperties; * @date 2018年3月27日 下午5:10:01 * @version V1.0 */ -@JsonIgnoreProperties(ignoreUnknown=true) public class ToMaatResult implements Serializable{ /** * @Fields serialVersionUID:TODO(用一句话描述这个变量表示什么) @@ -35,7 +32,6 @@ public class ToMaatResult implements Serializable{ private String msg; private String fromuri; private ResponseData data; - @JsonIgnoreProperties(ignoreUnknown=true) public static class ResponseData{ private String sourceName; private Integer num; @@ -44,6 +40,13 @@ public class ToMaatResult implements Serializable{ private Long rawLen; private String digest; private List configCompileList; + private List updateStatCfgList; + public List getUpdateStatCfgList() { + return updateStatCfgList; + } + public void setUpdateStatCfgList(List updateStatCfgList) { + this.updateStatCfgList = updateStatCfgList; + } public String getSourceName() { return sourceName; } diff --git a/src/main/java/com/nis/web/controller/configuration/ntc/WebsiteController.java b/src/main/java/com/nis/web/controller/configuration/ntc/WebsiteController.java index ab7f3ebc2..b5cdd28c8 100644 --- a/src/main/java/com/nis/web/controller/configuration/ntc/WebsiteController.java +++ b/src/main/java/com/nis/web/controller/configuration/ntc/WebsiteController.java @@ -24,6 +24,8 @@ import com.nis.domain.Page; import com.nis.domain.configuration.BaseIpCfg; import com.nis.domain.configuration.BaseStringCfg; import com.nis.domain.configuration.CfgIndexInfo; +import com.nis.domain.configuration.ComplexkeywordCfg; +import com.nis.domain.configuration.DnsDomainCfg; import com.nis.domain.configuration.HttpBodyCfg; import com.nis.domain.configuration.HttpReqHeadCfg; import com.nis.domain.configuration.HttpResHeadCfg; @@ -58,7 +60,7 @@ public class WebsiteController extends BaseController{ @RequiresPermissions(value={"website:dns:config"}) public String dnsList(Model model,@ModelAttribute("cfg")CfgIndexInfo cfg,HttpServletRequest request,HttpServletResponse response) { Page searchPage=new Page(request,response,"a"); - Page page = websiteCfgService.findPage(searchPage, cfg); + Page page = websiteCfgService.getWebsiteList(searchPage, cfg); model.addAttribute("page", page); initPageCondition(model,cfg); return "/cfg/website/dnsList"; @@ -278,4 +280,77 @@ public class WebsiteController extends BaseController{ } return "redirect:" + adminPath +"/ntc/website/sslList?functionId="+functionId; } + + @RequestMapping(value = {"dnsForm"}) + @RequiresPermissions(value={"website:dns:config"}) + public String dnsForm(Model model,String ids,CfgIndexInfo entity) { + if(StringUtils.isNotBlank(ids)){ + entity = websiteCfgService.getDnsCfg(Long.parseLong(ids)); + model.addAttribute("areaCfgs", entity.getAreaCfg()); + } + initFormCondition(model,entity); + model.addAttribute("_cfg", entity); + return "/cfg/website/dnsForm"; + } + @RequestMapping(value = {"saveDnsCfg"}) + @RequiresPermissions(value={"website:dns:config"}) + public String saveDnsCfg(Model model,HttpServletRequest request,HttpServletResponse response,String ids,CfgIndexInfo entity) { + websiteCfgService.saveDnsCfg(entity); + return "redirect:" + adminPath +"/ntc/website/dnsList?functionId="+entity.getFunctionId(); + } + @RequestMapping(value = {"ajaxDnsSubList"}) + public String ajaxDnsSubList(Model model,Long cfgId,Integer index) { + CfgIndexInfo cfg = websiteCfgService.getDnsCfg(cfgId); + List tabList = new ArrayList(); + if(cfg.getIpPortList()!=null){ + String cfgType = null; + for(IpPortCfg ip:cfg.getIpPortList()){ + if(!ip.getCfgType().equals(cfgType)){ + tabList.add(new String[]{"1",ip.getCfgType()}); + cfgType = ip.getCfgType(); + } + } + } + if(cfg.getDomainList()!=null){ + String cfgType = null; + for(ComplexkeywordCfg keyword:cfg.getDomainList()){ + if(!keyword.getCfgType().equals(cfgType)){ + tabList.add(new String[]{"3",keyword.getCfgType()}); + cfgType = keyword.getCfgType(); + } + } + } + model.addAttribute("_cfg", cfg); + model.addAttribute("index", index); + model.addAttribute("tabList", tabList); + return "/cfg/website/dnsSubList"; + } + @RequestMapping(value = {"updateDnsCfgValid"}) + @RequiresPermissions(value={"website:dns:config"}) + public String updateDnsCfgValid(Integer isValid,String ids,Integer functionId) { + websiteCfgService.updateDnsCfgValid(isValid,ids,functionId); + return "redirect:" + adminPath +"/ntc/website/dnsList?functionId="+functionId; + } + @RequestMapping(value = {"auditDnsCfg"}) + @RequiresPermissions(value={"website:dns:audit"}) + public String auditDnsCfg(Integer isAudit,Integer isValid,String ids,Integer functionId, RedirectAttributes redirectAttributes) { + CfgIndexInfo entity = new CfgIndexInfo(); + String[] idArray = ids.split(","); + for(String id :idArray){ + entity = websiteCfgService.getDnsCfg(Long.parseLong(id)); + entity.setIsAudit(isAudit); + entity.setIsValid(isValid); + entity.setAuditorId(UserUtils.getUser().getId()); + entity.setAuditTime(new Date()); + entity.setFunctionId(functionId); + try { + websiteCfgService.auditDnsCfg(entity,isAudit); + } catch (MaatConvertException e) { + e.printStackTrace(); + logger.info("dns配置下发失败:"+e.getMessage()); + addMessage(redirectAttributes, e.getMessage()); + } + } + return "redirect:" + adminPath +"/ntc/website/dnsList?functionId="+functionId; + } } diff --git a/src/main/java/com/nis/web/dao/configuration/WebsiteCfgDao.java b/src/main/java/com/nis/web/dao/configuration/WebsiteCfgDao.java index 75c01d61e..e9b937626 100644 --- a/src/main/java/com/nis/web/dao/configuration/WebsiteCfgDao.java +++ b/src/main/java/com/nis/web/dao/configuration/WebsiteCfgDao.java @@ -7,6 +7,7 @@ import com.nis.domain.configuration.AvSignSampleCfg; import com.nis.domain.configuration.BaseCfg; import com.nis.domain.configuration.BaseStringCfg; import com.nis.domain.configuration.CfgIndexInfo; +import com.nis.domain.configuration.ComplexkeywordCfg; import com.nis.domain.configuration.DnsDomainCfg; import com.nis.domain.configuration.DnsIpCfg; import com.nis.domain.configuration.HttpBodyCfg; @@ -51,11 +52,11 @@ public interface WebsiteCfgDao extends CrudDao{ public void updateCfgValid(BaseCfg entity); public void auditCfg(BaseCfg entity); - public List getDnsList(CfgIndexInfo entity); - public List getDnsIp(CfgIndexInfo entity); - public List getDnsDomain(CfgIndexInfo entity); - public void saveDnsIpCfg(DnsIpCfg entity); - public void saveDnsDomainCfg(DnsDomainCfg entity); +// public List getDnsList(CfgIndexInfo entity); +// public List getDnsIp(CfgIndexInfo entity); + public List getDnsDomainList(CfgIndexInfo entity); +// public void saveDnsIpCfg(DnsIpCfg entity); + public void saveDnsDomainCfg(ComplexkeywordCfg entity); public void deleteDnsIpCfg(CfgIndexInfo entity); public void deleteDnsDomainCfg(CfgIndexInfo entity); diff --git a/src/main/java/com/nis/web/dao/configuration/WebsiteCfgDao.xml b/src/main/java/com/nis/web/dao/configuration/WebsiteCfgDao.xml index 6a54c7e61..c337f7190 100644 --- a/src/main/java/com/nis/web/dao/configuration/WebsiteCfgDao.xml +++ b/src/main/java/com/nis/web/dao/configuration/WebsiteCfgDao.xml @@ -346,6 +346,7 @@ FROM http_res_head_cfg a where compile_id=#{compileId} and function_id=#{functionId} + + + @@ -883,4 +893,74 @@ delete from ssl_keyword_cfg where compile_id=#{compileId} and function_id=#{functionId} + + + + + SELECT LAST_INSERT_ID() + + insert into dns_domain_cfg ( + CFG_DESC, + ACTION, + IS_VALID, + IS_AUDIT, + CREATOR_ID, + CREATE_TIME, + EDITOR_ID, + EDIT_TIME, + AUDITOR_ID, + AUDIT_TIME, + SERVICE_ID, + REQUEST_ID, + COMPILE_ID, + IS_AREA_EFFECTIVE, + CLASSIFY, + ATTRIBUTE, + LABLE, + AREA_EFFECTIVE_IDS, + function_id, + district, + cfg_keywords, + cfg_type, + cfg_region_code, + expr_type, + match_method, + is_hexbin + )values ( + #{cfgDesc,jdbcType=VARCHAR}, + #{action,jdbcType=INTEGER}, + 0, + 0, + #{creatorId,jdbcType=INTEGER}, + #{createTime,jdbcType=TIMESTAMP}, + #{editorId,jdbcType=INTEGER}, + #{editTime,jdbcType=TIMESTAMP}, + #{auditorId,jdbcType=INTEGER}, + #{auditTime,jdbcType=TIMESTAMP}, + #{serviceId,jdbcType=INTEGER}, + #{requestId,jdbcType=INTEGER}, + #{compileId,jdbcType=INTEGER}, + #{isAreaEffective,jdbcType=INTEGER}, + #{classify,jdbcType=VARCHAR}, + #{attribute,jdbcType=VARCHAR}, + #{lable,jdbcType=VARCHAR}, + #{areaEffectiveIds,jdbcType=VARCHAR}, + #{functionId,jdbcType=INTEGER}, + #{district,jdbcType=VARCHAR}, + #{cfgKeywords,jdbcType=VARCHAR}, + #{cfgType,jdbcType=VARCHAR}, + #{cfgRegionCode,jdbcType=INTEGER}, + #{exprType,jdbcType=INTEGER}, + #{matchMethod,jdbcType=INTEGER}, + #{isHexbin,jdbcType=INTEGER} + ) + + + + delete from ip_port_cfg where compile_id=#{compileId} and protocol_id=6 and function_id=#{functionId} + + + + delete from dns_domain_cfg where compile_id=#{compileId} and function_id=#{functionId} + \ No newline at end of file diff --git a/src/main/java/com/nis/web/service/configuration/WebsiteCfgService.java b/src/main/java/com/nis/web/service/configuration/WebsiteCfgService.java index feb7dc693..8580ea7e8 100644 --- a/src/main/java/com/nis/web/service/configuration/WebsiteCfgService.java +++ b/src/main/java/com/nis/web/service/configuration/WebsiteCfgService.java @@ -26,6 +26,8 @@ import com.nis.domain.configuration.AvSignSampleCfg; import com.nis.domain.configuration.BaseIpCfg; import com.nis.domain.configuration.BaseStringCfg; import com.nis.domain.configuration.CfgIndexInfo; +import com.nis.domain.configuration.ComplexkeywordCfg; +import com.nis.domain.configuration.DnsDomainCfg; import com.nis.domain.configuration.HttpBodyCfg; import com.nis.domain.configuration.HttpReqHeadCfg; import com.nis.domain.configuration.HttpResHeadCfg; @@ -92,6 +94,16 @@ public class WebsiteCfgService extends CrudService { entity.setAreaCfg(areaCfg); return entity; } + public CfgIndexInfo getDnsCfg(Long cfgId){ + CfgIndexInfo entity = websiteCfgDao.getCfgIndexInfo(cfgId); + List ipPortList = websiteCfgDao.getIpPortList(entity); + List domainList = websiteCfgDao.getDnsDomainList(entity); + List areaCfg = areaIpCfgDao.getByCompileId(entity.getCompileId()); + entity.setIpPortList(ipPortList); + entity.setDomainList(domainList); + entity.setAreaCfg(areaCfg); + return entity; + } public Page getWebsiteList(Page page, CfgIndexInfo entity){ // 生成数据权限过滤条件(dsf为dataScopeFilter的简写,在xml中使用 ${sqlMap.dsf}调用权限SQL) entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"a")); @@ -104,7 +116,7 @@ public class WebsiteCfgService extends CrudService { // 生成数据权限过滤条件(dsf为dataScopeFilter的简写,在xml中使用 ${sqlMap.dsf}调用权限SQL) entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"a")); entity.setPage(page); - List list = websiteCfgDao.getDnsList(entity); + List list = websiteCfgDao.getWebsiteList(entity); page.setList(list); return page; } @@ -642,4 +654,235 @@ public class WebsiteCfgService extends CrudService { logger.info("ssl配置取消配置响应信息:"+result.getMsg()); } } + /** + * 保存dns配置 + * @param entity + */ + + public void saveDnsCfg(CfgIndexInfo entity){ + //设置区域运营商信息 + setAreaEffectiveIds(entity); + if(entity.getCfgId()==null){ + Integer compileId = 0; + try { + List idList = ConfigServiceUtil.getId(1, 1); + if(idList!=null && idList.size()>0){ + compileId = idList.get(0); + } + entity.setCompileId(compileId); + entity.setCreateTime(new Date()); + entity.setCreatorId(entity.getCurrentUser().getId()); + websiteCfgDao.saveCfgIndex(entity); + if(entity.getIpPortList()!=null){ + for(IpPortCfg cfg:entity.getIpPortList()){ + BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"}); + websiteCfgDao.saveIpPortCfg(cfg); + } + } + if(entity.getDomainList()!=null){ + for(ComplexkeywordCfg cfg:entity.getDomainList()){ + if(StringUtils.isNotBlank(cfg.getCfgKeywords())){ + BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"}); + websiteCfgDao.saveDnsDomainCfg(cfg); + } + } + } + //保存区域IP信息 + if(entity.getAreaCfg()!=null){ + for(AreaIpCfg cfg:entity.getAreaCfg()){ + cfg.initDefaultValue(); + BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"}); + areaIpCfgDao.saveAreaIpCfg(cfg); + } + } + } catch (Exception e) { + e.printStackTrace(); + logger.info("获取编译ID出错"); + throw new MaatConvertException(":"+e.getMessage()); + } + + }else{ + websiteCfgDao.updateCfgIndex(entity); + //无效子配置后,再新增子配置 + websiteCfgDao.deleteDnsIpCfg(entity); + websiteCfgDao.deleteDnsDomainCfg(entity); + AreaIpCfg area = new AreaIpCfg(); + area.setCompileId(entity.getCompileId()); + area.setFunctionId(entity.getFunctionId()); + areaIpCfgDao.deleteAreaIpCfg(area); + entity.setCreateTime(new Date()); + entity.setCreatorId(entity.getCurrentUser().getId()); + if(entity.getIpPortList()!=null){ + for(IpPortCfg cfg:entity.getIpPortList()){ + BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"}); + websiteCfgDao.saveIpPortCfg(cfg); + } + } + if(entity.getDomainList()!=null){ + for(ComplexkeywordCfg cfg:entity.getDomainList()){ + if(StringUtils.isNotBlank(cfg.getCfgKeywords())){ + BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"}); + websiteCfgDao.saveDnsDomainCfg(cfg); + } + } + } + //保存区域IP信息 + if(entity.getAreaCfg()!=null){ + for(AreaIpCfg cfg:entity.getAreaCfg()){ + cfg.initDefaultValue(); + BeanUtils.copyProperties(entity, cfg,new String[]{"cfgDesc","cfgRegionCode","cfgType"}); + areaIpCfgDao.saveAreaIpCfg(cfg); + } + } + } + } + /** + * dns配置删除 + * @param isValid + * @param ids + * @param functionId + */ + public void updateDnsCfgValid(Integer isValid,String ids,Integer functionId){ + CfgIndexInfo entity = new CfgIndexInfo(); + String[] idArray = ids.split(","); + for(String id :idArray){ + entity.setCfgId(Long.parseLong(id)); + entity.setIsValid(isValid); + entity.setEditorId(UserUtils.getUser().getId()); + entity.setEditTime(new Date()); + entity.setTableName(CfgIndexInfo.getTablename()); + entity.setFunctionId(functionId); + websiteCfgDao.updateCfgValid(entity); + //查询子配置 + entity = this.getSslCfg(Long.parseLong(id)); + if(entity.getIpPortList()!=null && entity.getIpPortList().size()>0){ + IpPortCfg cfg = new IpPortCfg(); + BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"}); + cfg.setTableName(IpPortCfg.getTablename()); + websiteCfgDao.updateCfgValid(cfg); + } + if(entity.getSslList()!=null && entity.getSslList().size()>0) + { + SslKeywordCfg cfg = new SslKeywordCfg(); + BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"}); + cfg.setTableName(DnsDomainCfg.getTablename()); + websiteCfgDao.updateCfgValid(cfg); + } + //保存区域IP信息 + if(entity.getAreaCfg()!=null && entity.getAreaCfg().size()>0){ + AreaIpCfg cfg = new AreaIpCfg(); + BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"}); + cfg.setTableName(AreaIpCfg.getTablename()); + websiteCfgDao.updateCfgValid(cfg); + } + + } + + } + /** + * dns配置审核 + * @param entity + * @param isAudit + * @throws MaatConvertException + */ + public void auditDnsCfg(CfgIndexInfo entity,Integer isAudit) throws MaatConvertException{ + //修改数据库审核状态信息 + entity.setTableName(CfgIndexInfo.getTablename()); + websiteCfgDao.auditCfg(entity); + + ToMaatBean maatBean = new ToMaatBean(); + MaatCfg maatCfg = new MaatCfg(); + List configCompileList = new ArrayList(); + List groupRelationList = new ArrayList(); + List ipRegionList = new ArrayList(); + List strRegionList = new ArrayList(); + List numRegionList = new ArrayList(); + List digestRegionList = new ArrayList(); + List areaIpRegionList = new ArrayList(); + + //查询子配置并修改审核状态 + entity = this.getDnsCfg(entity.getCfgId()); + if(entity.getIpPortList()!=null && entity.getIpPortList().size()>0){ + IpPortCfg cfg = new IpPortCfg(); + BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"}); + cfg.setTableName(IpPortCfg.getTablename()); + websiteCfgDao.auditCfg(cfg); + if(isAudit==1){ + Map map = cfgConvert(ipRegionList,entity.getIpPortList(),1,entity,groupRelationList); + groupRelationList=map.get("groupList"); + ipRegionList=map.get("dstList"); + if(map.get("numRegionList")!=null){ + numRegionList.addAll(map.get("numRegionList")); + } + } + } + if(entity.getDomainList()!=null && entity.getDomainList().size()>0){ + DnsDomainCfg cfg = new DnsDomainCfg(); + BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"}); + cfg.setTableName(DnsDomainCfg.getTablename()); + websiteCfgDao.auditCfg(cfg); + if(isAudit==1){ + Map map = cfgConvert(strRegionList,entity.getSslList(),2,entity,groupRelationList); + groupRelationList=map.get("groupList"); + strRegionList=map.get("dstList"); + } + } + //保存区域IP信息 + if(entity.getAreaCfg()!=null && entity.getAreaCfg().size()>0){ + AreaIpCfg cfg = new AreaIpCfg(); + BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"}); + cfg.setTableName(AreaIpCfg.getTablename()); + websiteCfgDao.auditCfg(cfg); + if(isAudit==1){ + Map map = cfgConvert(areaIpRegionList,entity.getAreaCfg(),1,entity,groupRelationList); + groupRelationList=map.get("groupList"); + areaIpRegionList=map.get("dstList"); + } + } + + //构造提交综合服务参数格式,一条配置提交一次综合服务 + if(isAudit==1){ + maatCfg.initDefaultValue(); + BeanUtils.copyProperties(entity, maatCfg); + maatCfg.setAction(entity.getAction()); + maatCfg.setAuditTime(entity.getAuditTime()); + maatCfg.setIpRegionList(ipRegionList); + maatCfg.setStrRegionList(strRegionList); + maatCfg.setNumRegionList(numRegionList); + maatCfg.setDigestRegionList(digestRegionList); + maatCfg.setGroupRelationList(groupRelationList); + maatCfg.setGroupNum(groupRelationList.size()); + maatCfg.setAreaIpRegionList(areaIpRegionList); + maatCfg.setIsValid(entity.getIsValid()); + configCompileList.add(maatCfg); + maatBean.setConfigCompileList(configCompileList); + maatBean.setAuditTime(entity.getAuditTime()); + maatBean.setCreatorName(entity.getCurrentUser().getName()); + maatBean.setVersion(Constants.MAAT_VERSION); + maatBean.setOpAction(Constants.INSERT_ACTION); + //调用服务接口下发配置数据 + String json=gsonToJson(maatBean); + logger.info("dns配置下发配置参数:"+json); + //调用服务接口下发配置 + ToMaatResult result = ConfigServiceUtil.postCallbackCfg(json); + logger.info("dns配置下发响应信息:"+result.getMsg()); + + }else if(isAudit==3){ + maatCfg.setCompileId(entity.getCompileId()); + maatCfg.setServiceId(entity.getServiceId()); + maatCfg.setIsValid(0);//无效 + configCompileList.add(maatCfg); + maatBean.setConfigCompileList(configCompileList); + maatBean.setAuditTime(entity.getAuditTime()); + maatBean.setCreatorName(entity.getCurrentUser().getName()); + maatBean.setVersion(Constants.MAAT_VERSION); + maatBean.setOpAction(Constants.UPDATE_ACTION); + //调用服务接口取消配置 + String json=gsonToJson(maatBean); + logger.info("dns配置下发配置参数:"+json); + //调用服务接口下发配置 + ToMaatResult result = ConfigServiceUtil.put(json,1); + logger.info("dns配置取消配置响应信息:"+result.getMsg()); + } + } } diff --git a/src/main/webapp/WEB-INF/views/cfg/website/dnsForm.jsp b/src/main/webapp/WEB-INF/views/cfg/website/dnsForm.jsp new file mode 100644 index 000000000..919246345 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/cfg/website/dnsForm.jsp @@ -0,0 +1,268 @@ +<%@ page contentType="text/html;charset=UTF-8"%> +<%@ include file="/WEB-INF/include/taglib.jsp"%> + + +<spring:message code="${cfgName}"></spring:message> + + + + + + +
+
+
+
+
+
+ + + + + + + +
+
+
+ +
+ + + + + +
+ + +
+
+
+ +
+ +
+
+
+
+
+ +
+ + + +
+
+
+
+
+ + + + + + +

+ + +

+ + + + + + +
+ <%@include file="/WEB-INF/views/cfg/ipCfgForm.jsp"%> +
+ +
+
+
+ + + + +
+ +
+ + +

+ + +

+ + + + + + + + +
+ <%@include file="/WEB-INF/views/cfg/complexCfgForm.jsp"%> +
+ + +
+
+
+ + + + +
+ + + + +
+
+
+
+ <%@include file="/WEB-INF/include/form/areaInfo.jsp"%> +
+ <%@include file="/WEB-INF/include/form/basicInfo.jsp"%> +
+
+
+
+
+ + +
+
+
+
+
+
+ + +
+
+ +
+
+
+
+
+ + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/cfg/website/dnsList.jsp b/src/main/webapp/WEB-INF/views/cfg/website/dnsList.jsp new file mode 100644 index 000000000..526f3e96a --- /dev/null +++ b/src/main/webapp/WEB-INF/views/cfg/website/dnsList.jsp @@ -0,0 +1,433 @@ +<%@ page contentType="text/html;charset=UTF-8"%> +<%@ include file="/WEB-INF/include/taglib.jsp"%> + + +<spring:message code="${cfgName}"></spring:message> + + + + + + +
+ + +

+ + +

+ +
+
+
+
+ + + + + + + + + + +
+
+ + + + + + + + +
+ +
+ +
+
+ + + + <%-- + + + --%> + + +
+ + + +
+
+
+ + + +
+
+ + + + + +
+ + +
+
+ href="javascript:;"> + + +
+
+ + + +
+
+ +
+ +
+ + + + + + + + +
+ +
+ +
+ +
+ + + + + + + +
+ +
+ +
+ +
+ + + + + + + + +
+ +
+ +
+ +
+ + + + + + + +
+ +
+ +
+ +
+
+
+ + +
+
+ +
+
+ + " onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/> + +
+
+ +
+
+ + " onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/> + +
+
+ +
+
+ + " onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/> + +
+
+ +
+
+ + " onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/> + +
+
+ +
+
+ + " onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/> + +
+
+
+ + +
+ + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + ${indexCfg.cfgDesc } + + + + + + + + + ${indexCfg.requestName } + + + + + + + + + + + + + + + ${fns:abbr(classify,20)} + + + + + + + + + + + + + + + + + ${fns:abbr(attribute,20)} + + + + + + + + + + + + + + + + + + ${fns:abbr(lableInfo,20)} + + + + + + + + + + + + + ${indexCfg.creatorName }${indexCfg.editorName }${indexCfg.auditorName }
+
${page}
+
+ +
+
+
+ + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/cfg/website/dnsSubList.jsp b/src/main/webapp/WEB-INF/views/cfg/website/dnsSubList.jsp new file mode 100644 index 000000000..8bd6bdba9 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/cfg/website/dnsSubList.jsp @@ -0,0 +1,185 @@ +<%@ page contentType="text/html;charset=UTF-8"%> +<%@ include file="/WEB-INF/include/taglib.jsp"%> + + + + + + + +
+ + +
+
+ +
+ + + + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+
+
+ + +
+
+
+
+ +
+
+
+
+ +
+
+
+
+
+
+ +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+
+
+
+ + + +
+
+
+
+ +
+
+
+
+ +
+
+
+
+ + +
+
+ +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ +
+
+
+
+
+
+
+
+ \ No newline at end of file