Merge branch 'develop' of http://192.168.10.125/k18_web/NFS.git into
develop Conflicts: src/main/java/com/nis/web/controller/configuration/proxy/PxyObjKeyringController.java 证书增加CN和SAN列,修改时间类型 common.js去掉无用字符 国际化增加cert_not_match_domain
This commit is contained in:
@@ -69,10 +69,14 @@ public class ControlPolicyController extends BaseController{
|
||||
,RedirectAttributes redirectAttributes){
|
||||
try{
|
||||
controlPolicyService.saveOrUpdate(cfg,areaCfgIds);
|
||||
addMessage(redirectAttributes,"save_success");
|
||||
addMessage(redirectAttributes,"success","save_success");
|
||||
}catch(Exception e){
|
||||
logger.error("信息保存失败",e);
|
||||
addMessage(redirectAttributes,"save_failed");
|
||||
if(e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes,"error", "request_service_failed");
|
||||
}else {
|
||||
addMessage(redirectAttributes,"error","save_failed");
|
||||
}
|
||||
}
|
||||
|
||||
return "redirect:" + adminPath +"/proxy/control/httpReqReplace/list?functionId="+cfg.getFunctionId();
|
||||
@@ -95,9 +99,13 @@ public class ControlPolicyController extends BaseController{
|
||||
for(String id :idArray){
|
||||
try {
|
||||
controlPolicyService.audit(isAudit,isValid,functionId,id,auditTime,Constants.REPLACE_REQ_KEY_VALUE);
|
||||
} catch (MaatConvertException e) {
|
||||
} catch ( Exception e) {
|
||||
logger.error("配置下发失败",e);
|
||||
addMessage(redirectAttributes, e.getMessage());
|
||||
if(e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes,"error","request_service_failed");
|
||||
}else {
|
||||
addMessage(redirectAttributes,"error","audit_failed");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -137,10 +145,14 @@ public class ControlPolicyController extends BaseController{
|
||||
,RedirectAttributes redirectAttributes){
|
||||
try{
|
||||
controlPolicyService.saveOrUpdate(cfg,areaCfgIds);
|
||||
addMessage(redirectAttributes,"save_success");
|
||||
addMessage(redirectAttributes,"success","save_success");
|
||||
}catch(Exception e){
|
||||
logger.error("信息保存失败",e);
|
||||
addMessage(redirectAttributes,"save_failed");
|
||||
if(e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes,"error", "request_service_failed");
|
||||
}else {
|
||||
addMessage(redirectAttributes,"error","save_failed");
|
||||
}
|
||||
}
|
||||
|
||||
return "redirect:" + adminPath +"/proxy/control/httpResReplace/list?functionId="+cfg.getFunctionId();
|
||||
@@ -163,10 +175,14 @@ public class ControlPolicyController extends BaseController{
|
||||
for(String id :idArray){
|
||||
try {
|
||||
controlPolicyService.audit(isAudit,isValid,functionId,id,auditTime,Constants.REPLACE_RES_KEY_VALUE);
|
||||
} catch (MaatConvertException e) {
|
||||
} catch ( Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.error("配置下发失败",e);
|
||||
addMessage(redirectAttributes, e.getMessage());
|
||||
if(e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes,"error", "request_service_failed");
|
||||
}else {
|
||||
addMessage(redirectAttributes,"error","audit_failed");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@ import com.nis.domain.Page;
|
||||
import com.nis.domain.callback.ProxyFileStrategyCfg;
|
||||
import com.nis.domain.maat.ToMaatResult;
|
||||
import com.nis.domain.maat.ToMaatResult.ResponseData;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
import com.nis.util.ConfigServiceUtil;
|
||||
import com.nis.util.FileUtils;
|
||||
import com.nis.util.JsonMapper;
|
||||
@@ -116,10 +117,14 @@ public class FileStrategyController extends CommonController {
|
||||
cfg.setContentLength(file.length());//文件长度
|
||||
}
|
||||
proxyFileStrategyService.saveOrUpdate(cfg);
|
||||
addMessage(redirectAttributes,"save_success");
|
||||
addMessage(redirectAttributes,"success","save_success");
|
||||
}catch(Exception e){
|
||||
logger.error("信息保存失败",e);
|
||||
addMessage(redirectAttributes,"save_failed");
|
||||
if(e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes,"error","request_service_failed");
|
||||
}else {
|
||||
addMessage(redirectAttributes,"error","save_failed");
|
||||
}
|
||||
}finally {
|
||||
if(file != null) {
|
||||
file.delete();//删除临时文件
|
||||
|
||||
@@ -185,11 +185,15 @@ public class HttpRedirectPolicyController extends BaseController{
|
||||
@ModelAttribute("cfg")CfgIndexInfo cfg,RedirectAttributes redirectAttributes){
|
||||
try{
|
||||
httpRedirectCfgService.saveHttpCfg(cfg);
|
||||
addMessage(redirectAttributes,"save_success");
|
||||
addMessage(redirectAttributes,"success","save_success");
|
||||
}catch(Exception e){
|
||||
logger.error("信息保存失败",e);
|
||||
e.printStackTrace();
|
||||
addMessage(redirectAttributes,"save_failed");
|
||||
if(e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes,"error","request_service_failed");
|
||||
}else {
|
||||
addMessage(redirectAttributes,"error","save_failed");
|
||||
}
|
||||
}
|
||||
|
||||
return "redirect:" + adminPath +"/proxy/control/httpRedirect/httpRedirectList?functionId="+cfg.getFunctionId();
|
||||
@@ -231,10 +235,14 @@ public class HttpRedirectPolicyController extends BaseController{
|
||||
entity.setFunctionId(functionId);
|
||||
try {
|
||||
httpRedirectCfgService.auditHttpCfg(entity,isAudit);
|
||||
} catch (MaatConvertException e) {
|
||||
} catch ( Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.info("http重定向配置下发失败:"+e.getMessage());
|
||||
addMessage(redirectAttributes,"error", e.getMessage());
|
||||
if(e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes,"error","request_service_failed");
|
||||
}else {
|
||||
addMessage(redirectAttributes,"error","audit_failed");
|
||||
}
|
||||
}
|
||||
}
|
||||
return "redirect:" + adminPath +"/proxy/control/httpRedirect/httpRedirectList?functionId="+functionId;
|
||||
|
||||
@@ -85,10 +85,14 @@ public class InterceptController extends CommonController{
|
||||
public String saveInterceptIpCfg(RedirectAttributes redirectAttributes,Model model,HttpServletRequest request,HttpServletResponse response,String ids,CfgIndexInfo entity) {
|
||||
try {
|
||||
interceptCfgService.saveInterceptCfg(entity);
|
||||
addMessage(redirectAttributes,"save_success");
|
||||
addMessage(redirectAttributes,"success","save_success");
|
||||
} catch (Exception e) {
|
||||
logger.error("save_failed", e);
|
||||
addMessage(redirectAttributes,"save_failed");
|
||||
if(e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes,"error","request_service_failed");
|
||||
}else {
|
||||
addMessage(redirectAttributes,"error","save_failed");
|
||||
}
|
||||
}
|
||||
return "redirect:" + adminPath +"/proxy/intercept/ip/list?functionId="+entity.getFunctionId();
|
||||
}
|
||||
@@ -144,9 +148,13 @@ public class InterceptController extends CommonController{
|
||||
try {
|
||||
interceptCfgService.auditInterceptIpCfg(entity,isAudit);
|
||||
addMessage(redirectAttributes,"audit_success");
|
||||
} catch (MaatConvertException e) {
|
||||
} catch ( Exception e) {
|
||||
logger.error("intercept ip audit failed",e);
|
||||
addMessage(redirectAttributes,"audit_failed");
|
||||
if(e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes,"error", "request_service_failed");
|
||||
}else {
|
||||
addMessage(redirectAttributes,"error", "audit_failed");
|
||||
}
|
||||
}
|
||||
}
|
||||
return "redirect:" + adminPath +"/proxy/intercept/ip/list?functionId="+functionId;
|
||||
|
||||
Reference in New Issue
Block a user