11 Commits

Author SHA1 Message Date
段冬梅
bb7197f098 20190610之前部署的sql记录 2019-07-03 15:01:25 +08:00
duandongmei
de1eb563a3 时间间隔默认5分钟,日志导出最大条数修改为2万 2019-06-03 17:07:53 +08:00
wangwei
af28efc76d 修复审核通过配置修改成功提示信息bug
Conflicts:
	src/main/java/com/nis/web/controller/configuration/proxy/FileStrategyController.java
2019-05-29 14:01:14 +08:00
wangxin
973f071897 删除无必要的判断 2019-05-28 19:51:46 +08:00
wangxin
e8e948ce7d 修复packet ip address asn切换到ip配置时,没有正确获取到配置属性的bug 2019-05-28 19:51:01 +08:00
wangwei
df9665376f 完善修改配置数据时提示信息问题 2019-05-27 10:17:42 +08:00
wangwei
2858e643ac 修复文件摘要修改功能请求服务接口失败 2019-05-27 10:15:59 +08:00
wangxin
8d2e30b952 Steam三个菜单的form表单当action 为monit的时候ip和账号必选一个 2019-05-23 10:22:24 +08:00
duandongmei
19c8492cc8 热修改功能打开 2019-05-20 15:57:52 +08:00
段冬梅
328f266046 Update README.md 2019-05-20 15:48:57 +08:00
duandongmei
a9a15f4c0a 610上线内容回复UPDATE_ACTION 2019-05-20 15:46:21 +08:00
27 changed files with 137 additions and 57 deletions

View File

@@ -1,7 +1,3 @@
520上线功能
Source IP аddress / IP subnet / IP range 的配置 按 1月 29号的 demo实现
系统需要支持配置的批量删除功能,一次删除的配置条数可达 1万 条 ,也需要支持一次
删除所有规则
610功能升级
系统需要支持对 生效中的配置 进行修改的功能;
统计的时间修改为一个月,性能是否可以;

View File

@@ -1262,7 +1262,13 @@ public class AppCfgController extends BaseController {
entity.setAppCode(specificService.getSpecServiceCode());
}
appCfgService.saveOrUpdateAppSslCfg(entity);
//配置仅保存
if(StringUtil.isEmpty(entity.getIsValid()) || entity.getIsValid()!=1) {
addMessage(redirectAttributes, "success", "save_success");
}else {
//配置直接生效
addMessage(redirectAttributes, "success", "audit_success");
}
} catch (Exception e) {
e.printStackTrace();
logger.error("saveAppSslCfg failed", e);

View File

@@ -311,7 +311,13 @@ public class AvController extends BaseController {
}
avCfgService.saveOrUpdateAvFileSample(entity, srcFile);
//配置仅保存
if(StringUtil.isEmpty(entity.getIsValid()) || entity.getIsValid()!=1) {
addMessage(redirectAttributes, "success", "save_success");
}else {
//配置直接生效
addMessage(redirectAttributes, "success", "audit_success");
}
} catch (Exception e) {
logger.error("文件上传失败", e);
e.printStackTrace();
@@ -339,7 +345,13 @@ public class AvController extends BaseController {
RedirectAttributes redirectAttributes, String ids, AvSignSampleCfg entity) {
try {
avCfgService.saveOrUpdateAvSignSample(entity);
//配置仅保存
if(StringUtil.isEmpty(entity.getIsValid()) || entity.getIsValid()!=1) {
addMessage(redirectAttributes, "success", "save_success");
}else {
//配置直接生效
addMessage(redirectAttributes, "success", "audit_success");
}
} catch (Exception e) {
logger.error("saveAudioSignSample failed", e);
e.printStackTrace();
@@ -591,7 +603,13 @@ public class AvController extends BaseController {
// if(!avSignSampleCfg.getAction().equals(avSignSampleCfg.getActionOld())||!avSignSampleCfg.getIsValid().equals(avSignSampleCfg.getIsValidOld())){
try {
avCfgService.auditAvSignSample(avSignSampleCfg);
//配置仅保存
if(StringUtil.isEmpty(avSignSampleCfg.getIsValid()) || avSignSampleCfg.getIsValid()!=1) {
addMessage(redirectAttributes, "success", "save_success");
}else {
//配置直接生效
addMessage(redirectAttributes, "success", "audit_success");
}
} catch (Exception e) {
e.printStackTrace();
if (e instanceof MaatConvertException) {

View File

@@ -157,7 +157,13 @@ public class ControlPolicyController extends BaseController{
,RedirectAttributes redirectAttributes){
try{
controlPolicyService.saveOrUpdate(cfg,areaCfgIds);
//配置仅保存
if(StringUtil.isEmpty(cfg.getIsValid()) || cfg.getIsValid()!=1) {
addMessage(redirectAttributes, "success", "save_success");
}else {
//配置直接生效
addMessage(redirectAttributes, "success", "audit_success");
}
}catch(Exception e){
logger.error("信息保存失败",e);
if(e instanceof MaatConvertException) {

View File

@@ -118,7 +118,13 @@ public class FileStrategyController extends CommonController {
cfg.setContentLength(file.length());//文件长度
}
proxyFileStrategyService.saveOrUpdate(cfg);
//配置仅保存
if(StringUtil.isEmpty(cfg.getIsValid()) || cfg.getIsValid()!=1) {
addMessage(redirectAttributes, "success", "save_success");
}else {
//配置直接生效
addMessage(redirectAttributes, "success", "audit_success");
}
}catch(Exception e){
logger.error("信息保存失败",e);
if(e instanceof MaatConvertException) {

View File

@@ -566,7 +566,7 @@ public class AppCfgService extends BaseService {
if(entity.getFunctionId() == 408){
entity.setConfigType(Constants.SPECIFIC_SERVICE_CFG_TYPE_ENCRYPTED_TUNNEL_BEHAVIOR);
}
auditAppPolicyCfg(entity, entity.getIsAudit(),Constants.INSERT_ACTION);
auditAppPolicyCfg(entity, entity.getIsAudit(),Constants.UPDATE_ACTION);
}
}
}
@@ -829,7 +829,7 @@ public class AppCfgService extends BaseService {
if(isValid==1) {
entity.setIsAudit(1);
entity.setIsValid(1);
auditAppDomainCfg(entity, entity.getIsAudit(),Constants.INSERT_ACTION);
auditAppDomainCfg(entity, entity.getIsAudit(),Constants.UPDATE_ACTION);
}
}
}
@@ -897,7 +897,7 @@ public class AppCfgService extends BaseService {
if(isValid==1) {
entity.setIsAudit(1);
entity.setIsValid(1);
auditAppTopicDomainCfg(entity, entity.getIsAudit(),Constants.INSERT_ACTION);
auditAppTopicDomainCfg(entity, entity.getIsAudit(),Constants.UPDATE_ACTION);
}
}
}
@@ -960,6 +960,10 @@ public class AppCfgService extends BaseService {
public void saveOrUpdateAppSslCfg(AppSslCertCfg entity) throws Exception {
// 设置区域运营商信息
setAreaEffectiveIds(entity);
int isValid=0;
if(!StringUtil.isEmpty(entity.getIsValid()) && entity.getIsValid()==1) {
isValid=1;
}
if (entity.getCfgId() == null) {
Integer compileId = 0;
try {
@@ -1011,6 +1015,12 @@ public class AppCfgService extends BaseService {
}
}
if(isValid==1) {
entity.setIsAudit(1);
entity.setIsValid(1);
entity.setAuditTime(new Date());
auditAppSslCfg(entity, entity.getIsAudit());
}
}

View File

@@ -280,7 +280,7 @@ public class AppMultiFeatureCfgService extends BaseService {
if(isValid==1) {
entity.setIsAudit(1);
entity.setIsValid(1);
auditAppFeatureCfg(entity, entity.getIsAudit(),Constants.INSERT_ACTION);
auditAppFeatureCfg(entity, entity.getIsAudit(),Constants.UPDATE_ACTION);
}
}
}

View File

@@ -311,7 +311,7 @@ public class AvContentCfgService extends BaseService{
if(isValid==1) {
entity.setIsAudit(1);
entity.setIsValid(1);
auditAvVoip(entity,entity.getIsAudit(), Constants.INSERT_ACTION);
auditAvVoip(entity,entity.getIsAudit(), Constants.UPDATE_ACTION);
}
}
}
@@ -1554,7 +1554,7 @@ public class AvContentCfgService extends BaseService{
if(isValid==1) {
entity.setIsAudit(1);
entity.setIsValid(1);
auditContUrl(entity,entity.getIsAudit(), Constants.INSERT_ACTION);
auditContUrl(entity,entity.getIsAudit(), Constants.UPDATE_ACTION);
}
}
}

View File

@@ -246,7 +246,7 @@ public class BgpCfgService extends CrudService<BgpCfgDao,CfgIndexInfo> {
if(isValid==1) {
entity.setIsAudit(1);
entity.setIsValid(1);
auditBgpCfg(entity, entity.getIsAudit(),Constants.INSERT_ACTION);
auditBgpCfg(entity, entity.getIsAudit(),Constants.UPDATE_ACTION);
}
}
}

View File

@@ -262,7 +262,7 @@ public class CachePolicyService extends CrudService<WebsiteCfgDao,CfgIndexInfo>
if(isValid==1) {
entity.setIsAudit(1);
entity.setIsValid(1);
auditCachePolicy(entity, entity.getIsAudit(),Constants.INSERT_ACTION);
auditCachePolicy(entity, entity.getIsAudit(),Constants.UPDATE_ACTION);
}
}
}

View File

@@ -151,7 +151,7 @@ public class ControlPolicyService extends BaseService{
if(isValid==1) {
entity.setIsAudit(1);
entity.setIsValid(1);
audit(entity.getIsAudit(), entity.getIsValid(), entity.getFunctionId(), entity.getId().toString(), new Date(), Constants.REPLACE_REQ_KEY_VALUE, Constants.INSERT_ACTION);
audit(entity.getIsAudit(), entity.getIsValid(), entity.getFunctionId(), entity.getId().toString(), new Date(), Constants.REPLACE_REQ_KEY_VALUE, Constants.UPDATE_ACTION);
}
}
}

View File

@@ -139,7 +139,7 @@ public class DdosCfgService extends BaseService{
if(isValid==1) {
entity.setIsAudit(1);
entity.setIsValid(1);
audit(entity.getIsAudit(), isValid, entity.getFunctionId(),String.valueOf(entity.getCfgId()), new Date(),Constants.INSERT_ACTION);
audit(entity.getIsAudit(), isValid, entity.getFunctionId(),String.valueOf(entity.getCfgId()), new Date(),Constants.UPDATE_ACTION);
}
}
}

View File

@@ -537,7 +537,7 @@ public class DomainService extends CrudService<DomainDao,HttpUrlCfg> {
if(isValid==1) {
entity.setIsAudit(1);
entity.setIsValid(1);
auditDomainCfg(entity, entity.getIsAudit(),Constants.INSERT_ACTION);
auditDomainCfg(entity, entity.getIsAudit(),Constants.UPDATE_ACTION);
}
}
}

View File

@@ -235,7 +235,7 @@ public class FileTransferCfgService extends CrudService<FileTransferCfgDao,CfgIn
if(isValid==1) {
entity.setIsAudit(1);
entity.setIsValid(1);
auditFtpCfg(entity, entity.getIsAudit(),Constants.INSERT_ACTION);
auditFtpCfg(entity, entity.getIsAudit(),Constants.UPDATE_ACTION);
}
}
}
@@ -569,7 +569,7 @@ public class FileTransferCfgService extends CrudService<FileTransferCfgDao,CfgIn
if(isValid==1) {
entity.setIsAudit(1);
entity.setIsValid(1);
auditFileDigestCfg(entity.getIsAudit(), isValid,entity.getFunctionId(),entity.getCfgId()+"",Constants.INSERT_ACTION);
auditFileDigestCfg(entity.getIsAudit(), isValid,entity.getFunctionId(),entity.getCfgId()+"",Constants.UPDATE_ACTION);
}
}
}
@@ -926,7 +926,7 @@ public class FileTransferCfgService extends CrudService<FileTransferCfgDao,CfgIn
if(isValid==1) {
entity.setIsAudit(1);
entity.setIsValid(1);
auditP2pCfg(entity, entity.getIsAudit(),Constants.INSERT_ACTION);
auditP2pCfg(entity, entity.getIsAudit(),Constants.UPDATE_ACTION);
}
}
}

View File

@@ -294,7 +294,7 @@ public class HttpRedirectCfgService extends CrudService<WebsiteCfgDao,CfgIndexIn
if(isValid==1) {
entity.setIsAudit(1);
entity.setIsValid(1);
auditHttpCfg(entity, entity.getIsAudit(),Constants.INSERT_ACTION);
auditHttpCfg(entity, entity.getIsAudit(),Constants.UPDATE_ACTION);
}
}
}

View File

@@ -285,7 +285,7 @@ public class InterceptCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo>
if(isValid==1) {
entity.setIsAudit(1);
entity.setIsValid(1);
auditInterceptIpCfg(entity, entity.getIsAudit(),Constants.INSERT_ACTION);
auditInterceptIpCfg(entity, entity.getIsAudit(),Constants.UPDATE_ACTION);
}
}
}

View File

@@ -287,7 +287,7 @@ public class IpCfgService extends CrudService<IpCfgDao, BaseIpCfg> {
if (isValid == 1) {
entity.setIsAudit(1);
entity.setIsValid(1);
auditIpCfg(entity, entity.getIsAudit(), Constants.INSERT_ACTION);
auditIpCfg(entity, entity.getIsAudit(), Constants.UPDATE_ACTION);
}
}
}

View File

@@ -249,7 +249,7 @@ public class MailCfgService extends CrudService<MailCfgDao,CfgIndexInfo> {
if(isValid==1) {
entity.setIsAudit(1);
entity.setIsValid(1);
auditMailCfg(entity, entity.getIsAudit(),Constants.INSERT_ACTION);
auditMailCfg(entity, entity.getIsAudit(),Constants.UPDATE_ACTION);
}
}
}

View File

@@ -374,7 +374,7 @@ public class WebsiteCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo> {
if(isValid==1) {
entity.setIsAudit(1);
entity.setIsValid(1);
auditHttpCfg(entity, entity.getIsAudit(),Constants.INSERT_ACTION);
auditHttpCfg(entity, entity.getIsAudit(),Constants.UPDATE_ACTION);
}
}
}
@@ -828,7 +828,7 @@ public class WebsiteCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo> {
if(isValid==1) {
entity.setIsAudit(1);
entity.setIsValid(1);
auditSslCfg(entity, entity.getIsAudit(),Constants.INSERT_ACTION);
auditSslCfg(entity, entity.getIsAudit(),Constants.UPDATE_ACTION);
}
}
}
@@ -1131,7 +1131,7 @@ public class WebsiteCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo> {
if(isValid==1) {
entity.setIsAudit(1);
entity.setIsValid(1);
auditDnsCfg(entity, entity.getIsAudit(),Constants.INSERT_ACTION);
auditDnsCfg(entity, entity.getIsAudit(),Constants.UPDATE_ACTION);
}
}
}

View File

@@ -209,10 +209,10 @@ function update(url){
return;
} */
if($(checkboxes).filter(":checked").length==1){
if(cked.val()==1){
/* if(cked.val()==1){
top.$.jBox.tip("<spring:message code='has_approved'/>", "<spring:message code='info'/>");
return;
}/*else if(cked.val()==3){
} *//*else if(cked.val()==3){
top.$.jBox.tip("<spring:message code='cancel_approved'/>", "<spring:message code='info'/>");
return;
}*/

View File

@@ -59,14 +59,15 @@ $(function(){
submitHandler: function(form){
var flag = true;
//代表所有业务都隐藏了,提示必须增加一种业务数据
/* if($(".boxSolid").length ==$(".boxSolid.hidden").length){
if($("[name=action]:checked").val()==1&&$(".boxSolid").length ==$(".boxSolid.hidden").length){
top.$.jBox.tip("<spring:message code='one_more'/>", "<spring:message code='info'/>");
return;
} */
}
/*
if($("[name=action]:checked").val()==1&&$(".ipPortAdd").parents(".form-section").next(".boxSolid").is(":hidden")){
top.$.jBox.tip("<spring:message code='ip_must_select'/>", "<spring:message code='info'/>");
return false;
}
}*/
$(".boxSolid:visible").find("input[name$='cfgKeywords']").each(function(){
if($(this).val()==''){
$(this).parents(".form-group").find(

View File

@@ -95,6 +95,8 @@ function changeDistrict(obj){
<input type="hidden" name="compileId" value="${_cfg.compileId}">
<input type="hidden" name="functionId" value="${_cfg.functionId}">
<input type="hidden" id="serviceId" name="serviceId" value="${_cfg.serviceId}">
<input type="hidden" name="isValid" value="${_cfg.isValid}">
<input type="hidden" name="isAudit" value="${_cfg.isAudit}">
<input type="hidden" id="appCode" name="appCode" value="${_cfg.appCode}">
<input type="hidden" id="behavCode" name="behavCode" value="${_cfg.behavCode}">
<!-- 配置域类型 -->
@@ -438,8 +440,26 @@ function changeDistrict(obj){
<div class="col-md-6">
<div class="row">
<div class="col-md-offset-3 col-md-8">
<button id="save" type="submit" class="btn green"><spring:message code="submit"/></button>
<button id="cancel" type="button" class="btn default"><spring:message code="cancel"/></button>
<c:set var="auditPermission" value="false"></c:set>
<!-- 拥有配置新增直接生效的功能权限 -->
<shiro:hasPermission name="save:audit:permission">
<c:set var="auditPermission" value="true"></c:set>
</shiro:hasPermission>
<c:choose>
<c:when test="${!(fns:getUser().isAdmin()) && auditPermission}">
<button id="audit" type="submit" class="btn green">
<spring:message code="submit" />
</button>
</c:when>
<c:otherwise>
<button id="save" type="submit" class="btn green">
<spring:message code="submit" />
</button>
</c:otherwise>
</c:choose>
<button id="cancel" type="button" class="btn default">
<spring:message code="cancel" />
</button>
</div>
</div>
</div>

View File

@@ -66,11 +66,16 @@ $(function(){
return;
}
*/
var flag = true;
//代表所有业务都隐藏了,提示必须增加一种业务数据
if($("[name=action]:checked").val()==1&&$(".boxSolid").length ==$(".boxSolid.hidden").length) {
top.$.jBox.tip("<spring:message code='one_more'/>", "<spring:message code='info'/>");
return;
}
/*
if($("[name=action]:checked").val()==1&&$(".ipPortAdd").parents(".form-section").next(".boxSolid").is(":hidden")){
top.$.jBox.tip("<spring:message code='ip_must_select'/>", "<spring:message code='info'/>");
return false;
}
}*/
$(".boxSolid:visible").find("input[name$='cfgKeywords']").each(function(){
if($(this).val()==''){

View File

@@ -50,6 +50,11 @@ $(function(){
},
submitHandler: function(form){
var flag = true;
//代表所有业务都隐藏了,提示必须增加一种业务数据
if($("[name=action]:checked").val()==1&&$(".boxSolid").length ==$(".boxSolid.hidden").length){
top.$.jBox.tip("<spring:message code='one_more'/>", "<spring:message code='info'/>");
return;
}
$(".boxSolid:visible").find("input[name$='cfgKeywords']").each(function(){
if($(this).val()==''){
$(this).parents(".form-group").find(

View File

@@ -15,7 +15,8 @@
sampleFileValidate();
});
hiddenlevel($("select[name='cfdsLevel']").val());
//hiddenlevel($("select[name='cfdsLevel']").val());
hiddenlevel(null);
$(".action").on("change", function() {
$("#serviceId").val($(this).attr("serviceId"));
$("#protocolId").val($(this).attr("protocolId"));

View File

@@ -71,15 +71,17 @@ var processPattern=function(selector,pattern){
* ip默认选项处理
*/
var initCommIpVal=function(){
var action,regionCode,serviceType,ipPortShow,ipType,
var action,regionCode,ipPortShow,ipType,serviceId,
srcIpPattern,destIpPattern,srcPortPattern,destPortPattern,
direction,protocol,regionType;
if($("input[name$='action']:checked").length>0){
regionCode=$("input[name$='action']:checked").attr("regionCode");
action=$("input[name$='action']:checked").val();
serviceId=$("input[name$='action']:checked").attr("serviceId");
}else{
regionCode=$("input[name$='action']").attr("regionCode");
action=$("input[name$='action']").val();
serviceId=$("input[name$='action']").attr("serviceId");
}
if(regionCode){
if(regionCode.indexOf(",")==-1){
@@ -102,6 +104,10 @@ var initCommIpVal=function(){
}
}
if(regionCode){//IP域大于1个根据action获取ip属性
if(serviceId==149||serviceId==37){//ASN比较特殊action与ip的相同但是service id不同这里调用regionCode=5的话会导致获取不到正确的属性
regionCode=$("input[name$='action'][value='"+action+"'][serviceId!='"+serviceId+"']").attr("regionCode");
}
ipPortShow=$("input[name$='cfgRegionCode'][value='"+regionCode+"']").attr("ipPortShow"),
ipType=$("input[name$='cfgRegionCode'][value='"+regionCode+"']").attr("ipType"),
srcIpPattern=$("input[name$='cfgRegionCode'][value='"+regionCode+"']").attr("srcIpPattern"),