批量下发功能增加,delRow.tag中暂时不打开此功能。
app topic domain和app domain业务修改domain存储cfgkeyword属性。 摘要修改level属性存储为下发的最终数值。 同步的单域配置的增加时间和状态属性从entity中获取
This commit is contained in:
@@ -9,6 +9,7 @@ import java.util.Map;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.commons.beanutils.BeanUtils;
|
||||
import org.apache.cxf.common.util.StringUtils;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.stereotype.Controller;
|
||||
@@ -87,7 +88,14 @@ public class DdosCfgController extends BaseController {
|
||||
}
|
||||
@RequestMapping(value = {"/audit"})
|
||||
//@RequiresPermissions(value={"ddos:ip:confirm"})
|
||||
public String audit(Integer isAudit,Integer isValid,String ids,Integer functionId, RedirectAttributes redirectAttributes) {
|
||||
public String audit(Model model,@ModelAttribute("cfg")DdosIpCfg cfg,
|
||||
Integer isValid,
|
||||
Integer isAudit,
|
||||
String ids,
|
||||
Integer functionId,
|
||||
RedirectAttributes redirectAttributes,
|
||||
HttpServletResponse response,
|
||||
HttpServletRequest request) {
|
||||
if(!StringUtil.isEmpty(ids)){
|
||||
String[] idArray = ids.split(",");
|
||||
Date auditTime=new Date();
|
||||
@@ -105,7 +113,24 @@ public class DdosCfgController extends BaseController {
|
||||
}
|
||||
|
||||
}
|
||||
}else {
|
||||
Page<DdosIpCfg> searchPage=new Page<DdosIpCfg>(request,response,"r");
|
||||
Page<DdosIpCfg> auditPage=new Page<DdosIpCfg>(request,response,"r");
|
||||
|
||||
try {
|
||||
BeanUtils.copyProperties(searchPage, auditPage);
|
||||
auditAll(auditPage,isValid , cfg);
|
||||
} catch (Exception e) {
|
||||
logger.error("配置下发失败:",e);
|
||||
if(e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes,"error", "request_service_failed");
|
||||
}else {
|
||||
addMessage(redirectAttributes,"error", "audit_failed");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return list(model, request, response, cfg);
|
||||
}
|
||||
return "redirect:" + adminPath +"/manipulation/ddos/list?functionId="+functionId;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user