新增用户管理和vpn服务器ip功能
This commit is contained in:
37
src/main/java/com/nis/domain/basics/IpReuseIpCfg.java
Normal file
37
src/main/java/com/nis/domain/basics/IpReuseIpCfg.java
Normal file
@@ -0,0 +1,37 @@
|
||||
/**
|
||||
*@Title: DnsIpConfig.java
|
||||
*@Package com.nis.domain.restful
|
||||
*@Description 欺骗IP实体类
|
||||
*@author dell
|
||||
*@date 2018年2月5日 下午2:57:17
|
||||
*@version 版本号
|
||||
*/
|
||||
package com.nis.domain.basics;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.google.gson.annotations.Expose;
|
||||
import com.nis.domain.BaseEntity;
|
||||
import com.nis.domain.SysUser;
|
||||
import com.nis.domain.configuration.BaseIpCfg;
|
||||
import com.nis.util.excel.ExcelField;
|
||||
|
||||
/**
|
||||
* @ClassName: DnsIpConfig.java
|
||||
* @author (dell)
|
||||
* @date 2018年2月5日 下午2:57:17
|
||||
* @version V1.0
|
||||
*/
|
||||
public class IpReuseIpCfg extends BaseIpCfg {
|
||||
|
||||
private static final long serialVersionUID = 5956694477140186483L;
|
||||
private String tableName="user_ip_cfg";
|
||||
|
||||
public String getTableName() {
|
||||
return tableName;
|
||||
}
|
||||
public void setTableName(String tableName) {
|
||||
this.tableName = tableName;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -14,6 +14,7 @@ import java.util.Map;
|
||||
import org.apache.ibatis.cache.CacheKey;
|
||||
|
||||
import com.nis.domain.basics.AsnIpCfg;
|
||||
import com.nis.domain.basics.IpReuseIpCfg;
|
||||
import com.nis.util.excel.ExcelField;
|
||||
|
||||
|
||||
@@ -65,7 +66,7 @@ public class CfgIndexInfo extends BaseCfg<CfgIndexInfo> {
|
||||
private List<AvContUrlCfg> avContUrlCfgList;
|
||||
private BaseStringCfg strCfg;
|
||||
private ComplexkeywordCfg complexCfg;
|
||||
|
||||
private List<IpReuseIpCfg> ipReuseIpCfgs;
|
||||
private Long dnsStrategyId;
|
||||
@ExcelField(title="policy_name",sort=21)
|
||||
private String dnsStrategyName;
|
||||
@@ -94,6 +95,12 @@ public class CfgIndexInfo extends BaseCfg<CfgIndexInfo> {
|
||||
public Integer getSourceCompileId() {
|
||||
return sourceCompileId;
|
||||
}
|
||||
public List<IpReuseIpCfg> getIpReuseIpCfgs() {
|
||||
return ipReuseIpCfgs;
|
||||
}
|
||||
public void setIpReuseIpCfgs(List<IpReuseIpCfg> ipReuseIpCfgs) {
|
||||
this.ipReuseIpCfgs = ipReuseIpCfgs;
|
||||
}
|
||||
public void setSourceCompileId(Integer sourceCompileId) {
|
||||
this.sourceCompileId = sourceCompileId;
|
||||
}
|
||||
|
||||
283
src/main/java/com/nis/domain/configuration/UserManage.java
Normal file
283
src/main/java/com/nis/domain/configuration/UserManage.java
Normal file
@@ -0,0 +1,283 @@
|
||||
package com.nis.domain.configuration;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.nis.domain.BaseEntity;
|
||||
|
||||
public class UserManage extends BaseEntity<UserManage>{
|
||||
|
||||
private static final long serialVersionUID = -2749633756272829982L;
|
||||
|
||||
private static final String tableName="user_manage";
|
||||
private String userName;
|
||||
private String userPwd;
|
||||
private String serverIp;
|
||||
private String authMethod;
|
||||
private Integer numLogins;
|
||||
private String lastLogin;
|
||||
private String transferBytes;
|
||||
private String transferPackets;
|
||||
private Long creatorId;
|
||||
private Date createTime;
|
||||
private Long editorId;
|
||||
private Date editTime;
|
||||
private Integer isValid;
|
||||
private String remarks;
|
||||
|
||||
private String newUserPwd;
|
||||
private String oldUserName;//原用户名
|
||||
//用户名详细信息
|
||||
private String authType;
|
||||
private Date createOn;
|
||||
private Date updatedOn;
|
||||
private String outgoingUnicastPackets;
|
||||
private String outgoingUnicastTotalSize;
|
||||
private String outgoingBroadcastPackets;
|
||||
private String outgoingBroadcastTotalSize;
|
||||
private String incomingUnicastPackets;
|
||||
private String incomingUnicastTotalSize;
|
||||
private String incomingBroadcastPackets;
|
||||
private String incomingBroadcastTotalSize;
|
||||
private Integer numberOfLogins;
|
||||
|
||||
private String creatorName;
|
||||
private String editorName;
|
||||
private Date search_create_time_start;
|
||||
private Date search_create_time_end;
|
||||
private Date search_edit_time_start;
|
||||
private Date search_edit_time_end;
|
||||
|
||||
private String seltype;
|
||||
private Integer functionId;
|
||||
private String isAudit;
|
||||
|
||||
public String getIsAudit() {
|
||||
return isAudit;
|
||||
}
|
||||
public void setIsAudit(String isAudit) {
|
||||
this.isAudit = isAudit;
|
||||
}
|
||||
public String getOldUserName() {
|
||||
return oldUserName;
|
||||
}
|
||||
public void setOldUserName(String oldUserName) {
|
||||
this.oldUserName = oldUserName;
|
||||
}
|
||||
|
||||
public String getNewUserPwd() {
|
||||
return newUserPwd;
|
||||
}
|
||||
public void setNewUserPwd(String newUserPwd) {
|
||||
this.newUserPwd = newUserPwd;
|
||||
}
|
||||
public String getRemarks() {
|
||||
return remarks;
|
||||
}
|
||||
public void setRemarks(String remarks) {
|
||||
this.remarks = remarks;
|
||||
}
|
||||
public Integer getFunctionId() {
|
||||
return functionId;
|
||||
}
|
||||
public void setFunctionId(Integer functionId) {
|
||||
this.functionId = functionId;
|
||||
}
|
||||
public Integer getIsValid() {
|
||||
return isValid;
|
||||
}
|
||||
public void setIsValid(Integer isValid) {
|
||||
this.isValid = isValid;
|
||||
}
|
||||
public Long getCreatorId() {
|
||||
return creatorId;
|
||||
}
|
||||
public void setCreatorId(Long creatorId) {
|
||||
this.creatorId = creatorId;
|
||||
}
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
public Long getEditorId() {
|
||||
return editorId;
|
||||
}
|
||||
public void setEditorId(Long editorId) {
|
||||
this.editorId = editorId;
|
||||
}
|
||||
public Date getEditTime() {
|
||||
return editTime;
|
||||
}
|
||||
public void setEditTime(Date editTime) {
|
||||
this.editTime = editTime;
|
||||
}
|
||||
public String getCreatorName() {
|
||||
return creatorName;
|
||||
}
|
||||
public void setCreatorName(String creatorName) {
|
||||
this.creatorName = creatorName;
|
||||
}
|
||||
public String getEditorName() {
|
||||
return editorName;
|
||||
}
|
||||
public void setEditorName(String editorName) {
|
||||
this.editorName = editorName;
|
||||
}
|
||||
public Date getSearch_create_time_start() {
|
||||
return search_create_time_start;
|
||||
}
|
||||
public void setSearch_create_time_start(Date search_create_time_start) {
|
||||
this.search_create_time_start = search_create_time_start;
|
||||
}
|
||||
public Date getSearch_create_time_end() {
|
||||
return search_create_time_end;
|
||||
}
|
||||
public void setSearch_create_time_end(Date search_create_time_end) {
|
||||
this.search_create_time_end = search_create_time_end;
|
||||
}
|
||||
public Date getSearch_edit_time_start() {
|
||||
return search_edit_time_start;
|
||||
}
|
||||
public void setSearch_edit_time_start(Date search_edit_time_start) {
|
||||
this.search_edit_time_start = search_edit_time_start;
|
||||
}
|
||||
public Date getSearch_edit_time_end() {
|
||||
return search_edit_time_end;
|
||||
}
|
||||
public void setSearch_edit_time_end(Date search_edit_time_end) {
|
||||
this.search_edit_time_end = search_edit_time_end;
|
||||
}
|
||||
public String getSeltype() {
|
||||
return seltype;
|
||||
}
|
||||
public void setSeltype(String seltype) {
|
||||
this.seltype = seltype;
|
||||
}
|
||||
public String getUserName() {
|
||||
return userName;
|
||||
}
|
||||
public void setUserName(String userName) {
|
||||
this.userName = userName;
|
||||
}
|
||||
public String getUserPwd() {
|
||||
return userPwd;
|
||||
}
|
||||
public void setUserPwd(String userPwd) {
|
||||
this.userPwd = userPwd;
|
||||
}
|
||||
public String getServerIp() {
|
||||
return serverIp;
|
||||
}
|
||||
public void setServerIp(String serverIp) {
|
||||
this.serverIp = serverIp;
|
||||
}
|
||||
public String getAuthMethod() {
|
||||
return authMethod;
|
||||
}
|
||||
public void setAuthMethod(String authMethod) {
|
||||
this.authMethod = authMethod;
|
||||
}
|
||||
public Integer getNumLogins() {
|
||||
return numLogins;
|
||||
}
|
||||
public void setNumLogins(Integer numLogins) {
|
||||
this.numLogins = numLogins;
|
||||
}
|
||||
public String getLastLogin() {
|
||||
return lastLogin;
|
||||
}
|
||||
public void setLastLogin(String lastLogin) {
|
||||
this.lastLogin = lastLogin;
|
||||
}
|
||||
public String getTransferBytes() {
|
||||
return transferBytes;
|
||||
}
|
||||
public void setTransferBytes(String transferBytes) {
|
||||
this.transferBytes = transferBytes;
|
||||
}
|
||||
public String getTransferPackets() {
|
||||
return transferPackets;
|
||||
}
|
||||
public void setTransferPackets(String transferPackets) {
|
||||
this.transferPackets = transferPackets;
|
||||
}
|
||||
public String getAuthType() {
|
||||
return authType;
|
||||
}
|
||||
public void setAuthType(String authType) {
|
||||
this.authType = authType;
|
||||
}
|
||||
public Date getCreateOn() {
|
||||
return createOn;
|
||||
}
|
||||
public void setCreateOn(Date createOn) {
|
||||
this.createOn = createOn;
|
||||
}
|
||||
public Date getUpdatedOn() {
|
||||
return updatedOn;
|
||||
}
|
||||
public void setUpdatedOn(Date updatedOn) {
|
||||
this.updatedOn = updatedOn;
|
||||
}
|
||||
public String getOutgoingUnicastPackets() {
|
||||
return outgoingUnicastPackets;
|
||||
}
|
||||
public void setOutgoingUnicastPackets(String outgoingUnicastPackets) {
|
||||
this.outgoingUnicastPackets = outgoingUnicastPackets;
|
||||
}
|
||||
public String getOutgoingUnicastTotalSize() {
|
||||
return outgoingUnicastTotalSize;
|
||||
}
|
||||
public void setOutgoingUnicastTotalSize(String outgoingUnicastTotalSize) {
|
||||
this.outgoingUnicastTotalSize = outgoingUnicastTotalSize;
|
||||
}
|
||||
public String getOutgoingBroadcastPackets() {
|
||||
return outgoingBroadcastPackets;
|
||||
}
|
||||
public void setOutgoingBroadcastPackets(String outgoingBroadcastPackets) {
|
||||
this.outgoingBroadcastPackets = outgoingBroadcastPackets;
|
||||
}
|
||||
public String getOutgoingBroadcastTotalSize() {
|
||||
return outgoingBroadcastTotalSize;
|
||||
}
|
||||
public void setOutgoingBroadcastTotalSize(String outgoingBroadcastTotalSize) {
|
||||
this.outgoingBroadcastTotalSize = outgoingBroadcastTotalSize;
|
||||
}
|
||||
|
||||
public String getIncomingUnicastPackets() {
|
||||
return incomingUnicastPackets;
|
||||
}
|
||||
public void setIncomingUnicastPackets(String incomingUnicastPackets) {
|
||||
this.incomingUnicastPackets = incomingUnicastPackets;
|
||||
}
|
||||
public String getIncomingUnicastTotalSize() {
|
||||
return incomingUnicastTotalSize;
|
||||
}
|
||||
public void setIncomingUnicastTotalSize(String incomingUnicastTotalSize) {
|
||||
this.incomingUnicastTotalSize = incomingUnicastTotalSize;
|
||||
}
|
||||
public String getIncomingBroadcastPackets() {
|
||||
return incomingBroadcastPackets;
|
||||
}
|
||||
public void setIncomingBroadcastPackets(String incomingBroadcastPackets) {
|
||||
this.incomingBroadcastPackets = incomingBroadcastPackets;
|
||||
}
|
||||
public String getIncomingBroadcastTotalSize() {
|
||||
return incomingBroadcastTotalSize;
|
||||
}
|
||||
public void setIncomingBroadcastTotalSize(String incomingBroadcastTotalSize) {
|
||||
this.incomingBroadcastTotalSize = incomingBroadcastTotalSize;
|
||||
}
|
||||
public Integer getNumberOfLogins() {
|
||||
return numberOfLogins;
|
||||
}
|
||||
public void setNumberOfLogins(Integer numberOfLogins) {
|
||||
this.numberOfLogins = numberOfLogins;
|
||||
}
|
||||
public static String getTablename() {
|
||||
return tableName;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -103,6 +103,7 @@ import com.nis.web.service.RoleService;
|
||||
import com.nis.web.service.SystemService;
|
||||
import com.nis.web.service.UserService;
|
||||
import com.nis.web.service.basics.AsnIpCfgService;
|
||||
import com.nis.web.service.basics.IpReuseIpCfgService;
|
||||
import com.nis.web.service.basics.PolicyGroupInfoService;
|
||||
import com.nis.web.service.basics.ServiceDictInfoService;
|
||||
import com.nis.web.service.basics.SysDictInfoService;
|
||||
@@ -132,6 +133,7 @@ import com.nis.web.service.configuration.NumCfgService;
|
||||
import com.nis.web.service.configuration.ProxyFileStrategyService;
|
||||
import com.nis.web.service.configuration.PxyObjKeyringService;
|
||||
import com.nis.web.service.configuration.RequestInfoService;
|
||||
import com.nis.web.service.configuration.UserManageService;
|
||||
import com.nis.web.service.configuration.WebsiteCfgService;
|
||||
import com.nis.web.service.configuration.XmppCfgService;
|
||||
import com.nis.web.service.configuration.statistics.ConfigureStatisticsService;
|
||||
@@ -254,6 +256,11 @@ public class BaseController {
|
||||
protected CachePolicyService cachePolicyService;
|
||||
@Autowired
|
||||
protected ConfigSynchronizationService configSynchronizationService;
|
||||
|
||||
@Autowired
|
||||
protected UserManageService userManageService;
|
||||
@Autowired
|
||||
protected IpReuseIpCfgService ipReuseIpCfgService;
|
||||
/**
|
||||
* 管理基础路径
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,135 @@
|
||||
package com.nis.web.controller.basics;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||
import com.nis.domain.FunctionRegionDict;
|
||||
import com.nis.domain.FunctionServiceDict;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.basics.IpReuseIpCfg;
|
||||
import com.nis.domain.configuration.CfgIndexInfo;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
import com.nis.util.DictUtils;
|
||||
import com.nis.web.controller.BaseController;
|
||||
@Controller
|
||||
@RequestMapping(value = "${adminPath}/basics/vpn")
|
||||
public class IpReuseIpCfgController extends BaseController{
|
||||
@RequestMapping(value = {"/list"})
|
||||
public String list(Model model,HttpServletRequest request
|
||||
,HttpServletResponse response,@ModelAttribute("cfg")IpReuseIpCfg entity
|
||||
,RedirectAttributes redirectAttributes){
|
||||
Page<IpReuseIpCfg> page = ipReuseIpCfgService.findPage(new Page<IpReuseIpCfg>(request, response,"r"), entity);
|
||||
model.addAttribute("page", page);
|
||||
|
||||
List<FunctionRegionDict> regionList = DictUtils.getFunctionRegionDictList(entity.getFunctionId());
|
||||
model.addAttribute("regionList", regionList);
|
||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(entity.getFunctionId());
|
||||
model.addAttribute("serviceList", serviceList);
|
||||
|
||||
return "/basics/userIpCfgList";
|
||||
}
|
||||
@RequestMapping(value = {"/addForm"})
|
||||
public String addForm(Model model,HttpServletRequest request
|
||||
,HttpServletResponse response,@ModelAttribute("cfg")CfgIndexInfo cfg
|
||||
,RedirectAttributes redirectAttributes){
|
||||
initFormCondition(model,cfg);
|
||||
model.addAttribute("_cfg", cfg);
|
||||
return "/basics/userIpCfgFormAdd";
|
||||
}
|
||||
@RequestMapping(value = {"/updateForm"})
|
||||
@RequiresPermissions(value={"other:bgp:config"})
|
||||
public String updateForm(Model model,HttpServletRequest request
|
||||
,HttpServletResponse response,String ids,@ModelAttribute("cfg")IpReuseIpCfg cfg
|
||||
,RedirectAttributes redirectAttributes){
|
||||
if(StringUtils.isNotBlank(ids)){
|
||||
cfg = ipReuseIpCfgService.getUserIpCfg(Long.parseLong(ids));
|
||||
initUpdateFormCondition(model,cfg);
|
||||
}else{
|
||||
initFormCondition(model,cfg);
|
||||
}
|
||||
model.addAttribute("_cfg", cfg);
|
||||
return "/basics/userIpCfgFormUpdate";
|
||||
}
|
||||
|
||||
|
||||
|
||||
@RequestMapping(value = {"save"})
|
||||
@RequiresPermissions(value={"other:bgp:config"})
|
||||
public String saveBgpCfg(Model model,HttpServletRequest request,HttpServletResponse response
|
||||
,String ids,CfgIndexInfo entity
|
||||
,RedirectAttributes redirectAttributes) {
|
||||
try{
|
||||
ipReuseIpCfgService.save(entity);;
|
||||
addMessage(redirectAttributes,"save_success");
|
||||
}catch(Exception e){
|
||||
logger.error("信息保存失败",e);
|
||||
e.printStackTrace();
|
||||
addMessage(redirectAttributes,"save_failed");
|
||||
}
|
||||
return "redirect:" + adminPath +"/basics/vpn/list?functionId="+entity.getFunctionId();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@RequestMapping(value = {"/update"})
|
||||
@RequiresPermissions(value={"asn:ip:config"})
|
||||
public String update(Model model,HttpServletRequest request,HttpServletResponse response,@ModelAttribute("cfg")IpReuseIpCfg cfg,RedirectAttributes redirectAttributes){
|
||||
try{
|
||||
ipReuseIpCfgService.update(cfg);
|
||||
addMessage(redirectAttributes,"save_success");
|
||||
}catch(Exception e){
|
||||
logger.error("信息保存失败",e);
|
||||
e.printStackTrace();
|
||||
addMessage(redirectAttributes,"save_failed");
|
||||
}
|
||||
return "redirect:" + adminPath +"/basics/vpn/list?functionId="+cfg.getFunctionId();
|
||||
}
|
||||
@RequestMapping(value = {"/delete"})
|
||||
@RequiresPermissions(value={"asn:ip:config"})
|
||||
public String delete(Integer isValid
|
||||
,String ids,Integer functionId
|
||||
,RedirectAttributes redirectAttributes){
|
||||
try{
|
||||
ipReuseIpCfgService.delete(isValid,ids);
|
||||
addMessage(redirectAttributes,"delete_success");
|
||||
}catch(Exception e){
|
||||
logger.error("Delete failed",e);
|
||||
if(e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes,e.getMessage());
|
||||
}else {
|
||||
addMessage(redirectAttributes,"delete_failed");
|
||||
}
|
||||
}
|
||||
|
||||
return "redirect:" + adminPath +"/basics/vpn/list?functionId="+functionId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 验证登录名是否有效
|
||||
* @param oldLoginName
|
||||
* @param loginName
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequiresPermissions("user:manage:edit")
|
||||
@RequestMapping(value = "checkIp")
|
||||
public String checkIp(String oldDestIpAddress, String destIpAddress) {
|
||||
if (destIpAddress !=null && destIpAddress.equals(oldDestIpAddress)) {
|
||||
return "true";
|
||||
} else if (destIpAddress !=null && ipReuseIpCfgService.getIpByIp(destIpAddress) == null) {
|
||||
return "true";
|
||||
}
|
||||
return "false";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,177 @@
|
||||
package com.nis.web.controller.configuration.maintenance;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.basics.IpReuseIpCfg;
|
||||
import com.nis.domain.configuration.UserManage;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
import com.nis.util.StringUtils;
|
||||
import com.nis.web.controller.BaseController;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("${adminPath}/maintenance/userManage")
|
||||
public class UserManageController extends BaseController{
|
||||
|
||||
@RequestMapping(value = {"/list"})
|
||||
@RequiresPermissions(value={"user:manage:view"})
|
||||
public String list(Model model,HttpServletRequest request,HttpServletResponse response
|
||||
,@ModelAttribute("cfg")UserManage entity
|
||||
,RedirectAttributes redirectAttributes){
|
||||
Page<UserManage> page = userManageService.findPage(new Page<UserManage>(request, response,"r"), entity);
|
||||
model.addAttribute("page", page);
|
||||
// initPageCondition(model,entity);
|
||||
return "/cfg/maintenance/userManage/list";
|
||||
}
|
||||
|
||||
/**
|
||||
* 进入用户添加或修改页面
|
||||
* @param user
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value={"form"})
|
||||
@RequiresPermissions(value={"user:manage:config"})
|
||||
public String form(UserManage user, Model model,String ids) {
|
||||
if(StringUtils.isNotBlank(ids)){
|
||||
user = userManageService.getUserById(ids);
|
||||
}
|
||||
model.addAttribute("user", user);
|
||||
return "/cfg/maintenance/userManage/userForm";
|
||||
}
|
||||
|
||||
@RequestMapping(value = {"/delete"})
|
||||
@RequiresPermissions(value={"user:manage:config"})
|
||||
public String delete(Integer isValid
|
||||
,String ids
|
||||
,RedirectAttributes redirectAttributes){
|
||||
try{
|
||||
userManageService.delete(isValid,ids);
|
||||
addMessage(redirectAttributes,"delete_success");
|
||||
}catch(Exception e){
|
||||
logger.error("Delete failed",e);
|
||||
if(e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes,e.getMessage());
|
||||
}else {
|
||||
addMessage(redirectAttributes,"delete_failed");
|
||||
}
|
||||
}
|
||||
|
||||
return "redirect:" + adminPath +"/maintenance/userManage/list";
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value = {"save"})
|
||||
@RequiresPermissions(value={"user:manage:config"})
|
||||
public String save(Model model,HttpServletRequest request,HttpServletResponse response
|
||||
,String ids,UserManage entity
|
||||
,RedirectAttributes redirectAttributes) {
|
||||
try{
|
||||
userManageService.save(entity,model,request);
|
||||
addMessage(redirectAttributes,"save_success");
|
||||
}catch(Exception e){
|
||||
logger.error("信息保存失败",e);
|
||||
e.printStackTrace();
|
||||
addMessage(redirectAttributes,"save_failed");
|
||||
}
|
||||
return "redirect:" + adminPath +"/maintenance/userManage/list";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 验证登录名是否有效
|
||||
* @param oldLoginName
|
||||
* @param loginName
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequiresPermissions("user:manage:edit")
|
||||
@RequestMapping(value = "checkLoginName")
|
||||
public String checkLoginName(String oldUserName, String userName) {
|
||||
if (userName !=null && userName.equals(oldUserName)) {
|
||||
return "true";
|
||||
} else if (userName !=null && userManageService.getUserByLoginName(userName) == null) {
|
||||
return "true";
|
||||
}
|
||||
return "false";
|
||||
}
|
||||
|
||||
/**
|
||||
* 父节点选择树形结构
|
||||
* @param extId排除节点id
|
||||
* @param isShowHide
|
||||
* @param isLeafShow:叶子节点是否显示
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping(value = "treeData")
|
||||
public List<Map<String, Object>> treeData(@RequestParam(required=false)Boolean specific,@RequestParam(required=false) String extId,@RequestParam(required=false) String isShowHide,
|
||||
@RequestParam(required=false)boolean isLeafShow,@RequestParam(required=true)Integer cfgType,HttpServletResponse response){
|
||||
List<Map<String, Object>> mapList = Lists.newArrayList();
|
||||
Map<String, Object> map2 = Maps.newHashMap();
|
||||
map2.put("id", 0);
|
||||
map2.put("pId", 0);
|
||||
map2.put("groupId",0);
|
||||
map2.put("name","root_node");
|
||||
mapList.add(map2);
|
||||
IpReuseIpCfg ip=new IpReuseIpCfg();
|
||||
ip.setFunctionId(636);
|
||||
List<IpReuseIpCfg> list=ipReuseIpCfgService.findList(ip);
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
IpReuseIpCfg ipReuseIpCfg=list.get(i);
|
||||
Map<String, Object> map = Maps.newHashMap();
|
||||
map.put("id", ipReuseIpCfg.getDestIpAddress());
|
||||
map.put("pId", 0);
|
||||
map.put("name",ipReuseIpCfg.getDestIpAddress());
|
||||
mapList.add(map);
|
||||
}
|
||||
return mapList;
|
||||
}
|
||||
|
||||
@ResponseBody
|
||||
@RequestMapping(value = "userInfo")
|
||||
public List<UserManage> getUserInfo(String serverIp,HttpServletRequest request,HttpServletResponse response){
|
||||
String[] ipArray = serverIp.split(",");
|
||||
List<UserManage> userManageList=new ArrayList<UserManage>();
|
||||
for(String ip :ipArray){
|
||||
UserManage user=new UserManage();
|
||||
IpReuseIpCfg ipReuseIpCfg=ipReuseIpCfgService.getIpByIp(ip);
|
||||
//根据ip调用接口获取数据
|
||||
//user=userManageService.getUserManage(ip, request);
|
||||
if(ipReuseIpCfg!=null){
|
||||
user.setServerIp(ipReuseIpCfg.getDestIpAddress());
|
||||
user.setRemarks(ipReuseIpCfg.getCfgDesc());
|
||||
userManageList.add(user);
|
||||
}
|
||||
}
|
||||
return userManageList;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "view")
|
||||
@RequiresPermissions(value={"user:manage:config"})
|
||||
public String view(String serverIp,String userName,HttpServletResponse response,Model model){
|
||||
UserManage user=new UserManage();
|
||||
user=userManageService.getUserByLoginName(userName);
|
||||
IpReuseIpCfg ipReuseIpCfg=ipReuseIpCfgService.getIpByIp(serverIp);
|
||||
if(ipReuseIpCfg!=null){
|
||||
user.setServerIp(ipReuseIpCfg.getDestIpAddress());
|
||||
user.setRemarks(ipReuseIpCfg.getCfgDesc());
|
||||
}
|
||||
model.addAttribute("user", user);
|
||||
return "/cfg/maintenance/userManage/userView";
|
||||
}
|
||||
}
|
||||
17
src/main/java/com/nis/web/dao/basics/IpReuseIpCfgDao.java
Normal file
17
src/main/java/com/nis/web/dao/basics/IpReuseIpCfgDao.java
Normal file
@@ -0,0 +1,17 @@
|
||||
package com.nis.web.dao.basics;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import com.nis.domain.basics.IpReuseIpCfg;
|
||||
import com.nis.domain.configuration.DnsIpCfg;
|
||||
import com.nis.web.dao.CrudDao;
|
||||
import com.nis.web.dao.MyBatisDao;
|
||||
|
||||
@MyBatisDao
|
||||
public interface IpReuseIpCfgDao extends CrudDao<IpReuseIpCfg> {
|
||||
List<IpReuseIpCfg> findPage(IpReuseIpCfg userIpCfg);
|
||||
IpReuseIpCfg getUserIpCfg(Long cfgId);
|
||||
IpReuseIpCfg getIpByIp(String destIpAddress);
|
||||
}
|
||||
360
src/main/java/com/nis/web/dao/basics/IpReuseIpCfgDao.xml
Normal file
360
src/main/java/com/nis/web/dao/basics/IpReuseIpCfgDao.xml
Normal file
@@ -0,0 +1,360 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.nis.web.dao.basics.IpReuseIpCfgDao">
|
||||
<resultMap id="reuserIpCfgMap" type="com.nis.domain.basics.IpReuseIpCfg">
|
||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
||||
<result column="ip_type" property="ipType" jdbcType="INTEGER" />
|
||||
<result column="ip_pattern" property="ipPattern" jdbcType="INTEGER" />
|
||||
<result column="dest_ip_address" property="destIpAddress" jdbcType="VARCHAR" />
|
||||
<result column="src_ip_address" property="srcIpAddress" jdbcType="VARCHAR" />
|
||||
<result column="dest_port" property="destPort" jdbcType="VARCHAR" />
|
||||
<result column="src_port" property="srcPort" jdbcType="VARCHAR" />
|
||||
<result column="port_pattern" property="portPattern" jdbcType="INTEGER" />
|
||||
<result column="direction" property="direction" jdbcType="INTEGER" />
|
||||
<result column="protocol" property="protocol" jdbcType="INTEGER" />
|
||||
<result column="protocol_id" property="protocolId" jdbcType="INTEGER" />
|
||||
<result column="action" property="action" jdbcType="INTEGER" />
|
||||
<result column="is_valid" property="isValid" jdbcType="INTEGER" />
|
||||
<result column="is_audit" property="isAudit" jdbcType="INTEGER" />
|
||||
<result column="creator_id" property="creatorId" jdbcType="INTEGER" />
|
||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
|
||||
<result column="editor_id" property="editorId" jdbcType="INTEGER" />
|
||||
<result column="edit_time" property="editTime" jdbcType="TIMESTAMP" />
|
||||
<result column="auditor_id" property="auditorId" jdbcType="INTEGER" />
|
||||
<result column="audit_time" property="auditTime" jdbcType="TIMESTAMP" />
|
||||
<result column="service_id" property="serviceId" jdbcType="INTEGER" />
|
||||
<result column="request_id" property="requestId" jdbcType="INTEGER" />
|
||||
<result column="compile_id" property="compileId" jdbcType="INTEGER" />
|
||||
<result column="is_area_effective" property="isAreaEffective" jdbcType="INTEGER" />
|
||||
<result column="classify" property="classify" jdbcType="VARCHAR" />
|
||||
<result column="attribute" property="attribute" jdbcType="VARCHAR" />
|
||||
<result column="lable" property="lable" jdbcType="VARCHAR" />
|
||||
<result column="area_effective_ids" property="areaEffectiveIds" jdbcType="VARCHAR" />
|
||||
<result column="function_id" property="functionId" jdbcType="INTEGER" />
|
||||
<result column="cfg_region_code" property="cfgRegionCode" jdbcType="INTEGER" />
|
||||
<result column="cfg_type" property="cfgType" jdbcType="VARCHAR" />
|
||||
<result column="dns_strategy_id" property="dnsStrategyId" jdbcType="INTEGER" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="columns">
|
||||
r.cfg_id,r.cfg_desc,r.ip_type,r.src_ip_address,r.ip_pattern,r.port_pattern,r.src_port
|
||||
,r.protocol,r.protocol_id,r.direction,r.cfg_type,r.action,r.dest_port,r.dest_ip_address
|
||||
,r.is_valid,r.is_audit,r.creator_id,r.create_time,r.editor_id
|
||||
,r.edit_time,r.auditor_id,r.audit_time,r.service_id,r.request_id,
|
||||
r.compile_id,r.is_area_effective,r.classify,r.attribute,r.lable
|
||||
,r.area_effective_ids,r.function_id,r.cfg_region_code,r.dns_strategy_id
|
||||
</sql>
|
||||
|
||||
<select id="findPage" resultMap="reuserIpCfgMap">
|
||||
select
|
||||
<include refid="columns"></include>
|
||||
<trim prefix="," prefixOverrides=",">
|
||||
,s.name as creator_name,e.name as editor_name,u.name as auditor_name
|
||||
,ri.request_title as requestName
|
||||
</trim>
|
||||
from ip_reuse_ip_cfg r
|
||||
left join sys_user s on r.creator_id=s.id
|
||||
left join sys_user e on r.editor_id=e.id
|
||||
left join sys_user u on r.auditor_id=u.id
|
||||
left join request_info ri on r.request_id=ri.id
|
||||
<trim prefix="WHERE" prefixOverrides="AND |OR ">
|
||||
<if test="page !=null and page.where != null and page.where != ''">
|
||||
AND ${page.where}
|
||||
</if>
|
||||
<if test="cfgId != null">
|
||||
AND r.CFG_ID=#{cfgId,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="cfgDesc != null and cfgDesc != ''">
|
||||
AND r.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="cfgRegionCode != null">
|
||||
AND r.CFG_REGION_CODE=#{cfgRegionCode,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="cfgType != null and cfgType != ''">
|
||||
AND r.CFG_TYPE like concat(concat('%',#{CFG_TYPE,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="ipType != null">
|
||||
AND r.IP_TYPE=#{ipType,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="ipPattern != null">
|
||||
AND r.IP_PATTERN=#{ipPattern,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="srcIpAddress != null and srcIpAddress != ''">
|
||||
AND r.SRC_IP_ADDRESS=#{srcIpAddress,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="destIpAddress != null and destIpAddress != ''">
|
||||
AND r.DEST_IP_ADDRESS=#{destIpAddress,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="portPattern != null">
|
||||
AND r.PORT_PATTERN=#{portPattern,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="srcPort != null and srcPort !=''">
|
||||
AND r.SRC_PORT=#{srcPort,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="destPort != null and destPort !=''">
|
||||
AND r.DEST_PORT=#{destPort,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="direction != null">
|
||||
AND r.DIRECTION=#{direction,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="protocol != null">
|
||||
AND r.PROTOCOL=#{protocol,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="protocolId != null">
|
||||
AND r.PROTOCOL_ID=#{protocolId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="action != null">
|
||||
AND r.ACTION=#{action,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isValid != null">
|
||||
AND r.IS_VALID=#{isValid,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isValid == null">
|
||||
AND r.IS_VALID != -1
|
||||
</if>
|
||||
<if test="isAudit != null">
|
||||
AND r.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="creatorName != null and creatorName !=''">
|
||||
AND CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="createTime != null and createTime !=''">
|
||||
AND r.CREATE_TIME=#{createTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="editorName != null and editorName !=''">
|
||||
AND EDITOR_NAME like concat(concat('%',#{editorName,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="editTime != null and editTime !='' ">
|
||||
AND r.EDIT_TIME=#{editTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="auditorName != null and auditorName !=''">
|
||||
AND AUDITOR_NAME like concat(concat('%',#{auditorName,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="auditTime != null and auditTime !=''">
|
||||
AND r.AUDIT_TIME=#{auditTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="serviceId != null">
|
||||
AND r.SERVICE_ID=#{serviceId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="requestId != null">
|
||||
AND r.REQUEST_ID=#{requestId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="compileId != null">
|
||||
AND r.COMPILE_ID=#{compileId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isAreaEffective != null">
|
||||
AND r.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="classify != null and classify !=''">
|
||||
AND r.classify like concat(concat('%',#{classify,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="attribute != null and attribute !=''">
|
||||
AND r.attribute like concat(concat('%',#{attribute,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="lable != null and lable !=''">
|
||||
AND r.lable like concat(concat('%',#{lable,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="areaEffectiveIds != null and areaEffectiveIds !=''">
|
||||
AND r.AREA_EFFECTIVE_IDS like concat(concat('%',#{areaEffectiveIds,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="functionId != null">
|
||||
AND r.FUNCTION_ID=#{functionId,jdbcType=INTEGER}
|
||||
</if>
|
||||
|
||||
<!-- 数据范围过滤 -->
|
||||
${sqlMap.dsf}
|
||||
</trim>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY r.CFG_ID desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
<select id="getUserIpCfg" resultMap="reuserIpCfgMap">
|
||||
select
|
||||
<include refid="columns"></include>
|
||||
from ip_reuse_ip_cfg r
|
||||
where r.is_valid !=-1 and r.cfg_id=#{cfgId}
|
||||
</select>
|
||||
|
||||
<insert id="insert" parameterType="com.nis.domain.basics.IpReuseIpCfg" >
|
||||
insert into ip_reuse_ip_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,
|
||||
ip_type,
|
||||
src_ip_address,
|
||||
ip_pattern,
|
||||
port_pattern,
|
||||
src_port,
|
||||
protocol,
|
||||
protocol_id,
|
||||
direction,
|
||||
dest_port,
|
||||
dest_ip_address,
|
||||
cfg_type,
|
||||
cfg_region_code,
|
||||
dns_strategy_id
|
||||
)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},
|
||||
#{ipType,jdbcType=INTEGER},
|
||||
#{srcIpAddress,jdbcType=VARCHAR},
|
||||
#{ipPattern,jdbcType=INTEGER},
|
||||
#{portPattern,jdbcType=INTEGER},
|
||||
#{srcPort,jdbcType=VARCHAR},
|
||||
#{protocol,jdbcType=INTEGER},
|
||||
#{protocolId,jdbcType=INTEGER},
|
||||
#{direction,jdbcType=INTEGER},
|
||||
#{destPort,jdbcType=VARCHAR},
|
||||
#{destIpAddress,jdbcType=VARCHAR},
|
||||
#{cfgType,jdbcType=VARCHAR},
|
||||
#{cfgRegionCode,jdbcType=INTEGER},
|
||||
#{dnsStrategyId,jdbcType=INTEGER}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="update" parameterType="com.nis.domain.basics.IpReuseIpCfg" >
|
||||
update ip_reuse_ip_cfg
|
||||
<set >
|
||||
<trim suffixOverrides=",">
|
||||
<if test="cfgDesc != null and cfgDesc != ''" >
|
||||
cfg_desc = #{cfgDesc,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="action != null" >
|
||||
action = #{action,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isValid != null" >
|
||||
is_valid = #{isValid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isAudit != null" >
|
||||
is_audit = #{isAudit,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="editorId != null" >
|
||||
editor_id = #{editorId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="editTime != null and editTime != ''" >
|
||||
edit_time = #{editTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="auditorId != null" >
|
||||
AUDITOR_ID = #{auditorId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="auditTime != null and auditTime != ''" >
|
||||
AUDIT_TIME = #{auditTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="compileId != null" >
|
||||
COMPILE_ID = #{compileId,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="requestId != null" >
|
||||
request_id = #{requestId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isAreaEffective != null" >
|
||||
is_area_effective = #{isAreaEffective,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="classify != null and classify != ''" >
|
||||
classify = #{classify,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="attribute != null and attribute != ''" >
|
||||
attribute = #{attribute,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="lable != null and lable != ''" >
|
||||
lable = #{lable,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="areaEffectiveIds != null" >
|
||||
area_effective_ids = #{areaEffectiveIds,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="functionId != null" >
|
||||
function_id = #{functionId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="serviceId != null" >
|
||||
service_id = #{serviceId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="ipType != null" >
|
||||
ip_type = #{ipType,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="srcIpAddress != null and srcIpAddress != ''" >
|
||||
src_ip_address = #{srcIpAddress,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="ipPattern != null" >
|
||||
ip_pattern = #{ipPattern,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="portPattern != null" >
|
||||
port_pattern = #{portPattern,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="srcPort != null and srcPort != ''" >
|
||||
src_port = #{srcPort,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="protocol != null" >
|
||||
protocol = #{protocol,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="protocolId != null" >
|
||||
protocol_id = #{protocolId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="direction != null" >
|
||||
direction = #{direction,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="destPort != null and destPort != ''" >
|
||||
dest_port = #{destPort,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="destIpAddress != null and destIpAddress != ''" >
|
||||
dest_ip_address = #{destIpAddress,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="cfgType != null and cfgType != ''" >
|
||||
cfg_type = #{cfgType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="cfgRegionCode != null " >
|
||||
cfg_region_code = #{cfgRegionCode,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="dnsStrategyId != null " >
|
||||
dns_strategy_id = #{dnsStrategyId,jdbcType=INTEGER},
|
||||
</if>
|
||||
</trim>
|
||||
</set>
|
||||
<where>
|
||||
and cfg_id = #{cfgId,jdbcType=INTEGER}
|
||||
</where>
|
||||
</update>
|
||||
<select id="getIpByIp" resultMap="reuserIpCfgMap">
|
||||
select
|
||||
<include refid="columns"/>
|
||||
from ip_reuse_ip_cfg r where r.is_valid !=-1 and r.dest_ip_address=#{destIpAddress}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.nis.web.dao.configuration;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import com.nis.domain.configuration.UserManage;
|
||||
import com.nis.web.dao.CrudDao;
|
||||
import com.nis.web.dao.MyBatisDao;
|
||||
|
||||
@MyBatisDao
|
||||
public interface UserManageDao extends CrudDao<UserManage>{
|
||||
void saveInfo(UserManage entity);
|
||||
void updateInfo(UserManage entity);
|
||||
UserManage getUserByLoginName(@Param("userName") String userName);
|
||||
List<UserManage> findList(UserManage entity);
|
||||
UserManage getUserById(@Param("id") String id);
|
||||
}
|
||||
145
src/main/java/com/nis/web/dao/configuration/UserManageDao.xml
Normal file
145
src/main/java/com/nis/web/dao/configuration/UserManageDao.xml
Normal file
@@ -0,0 +1,145 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.nis.web.dao.configuration.UserManageDao">
|
||||
|
||||
<resultMap id="userManageMap" type="com.nis.domain.configuration.UserManage" >
|
||||
<id column="id" property="id" jdbcType="INTEGER"/>
|
||||
<result column="user_name" property="userName" jdbcType="VARCHAR"/>
|
||||
<result column="user_pwd" property="userPwd" jdbcType="VARCHAR"/>
|
||||
<result column="server_ip" property="serverIp" jdbcType="VARCHAR"/>
|
||||
<result column="is_valid" property="isValid" jdbcType="INTEGER"/>
|
||||
<result column="is_audit" property="isAudit" jdbcType="INTEGER" />
|
||||
<result column="creator_id" property="creatorId" jdbcType="INTEGER" />
|
||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
|
||||
<result column="editor_id" property="editorId" jdbcType="INTEGER" />
|
||||
<result column="edit_time" property="editTime" jdbcType="TIMESTAMP" />
|
||||
<result column="remarks" property="remarks" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Columns">
|
||||
r.ID,r.USER_NAME,r.USER_PWD,r.SERVER_IP,r.is_audit,
|
||||
r.IS_VALID,r.CREATOR_ID,r.CREATE_TIME,r.EDITOR_ID,r.EDIT_TIME,remarks
|
||||
</sql>
|
||||
|
||||
<select id="findList" parameterType="com.nis.domain.configuration.UserManage" resultMap="userManageMap">
|
||||
SELECT
|
||||
<include refid="Columns"/>
|
||||
<trim prefix="," prefixOverrides=",">
|
||||
,s.name as creator_name ,e.name as editor_name
|
||||
</trim>
|
||||
FROM user_manage r
|
||||
left join sys_user s on r.creator_id=s.id
|
||||
left join sys_user e on r.editor_id=e.id
|
||||
<trim prefix="WHERE" prefixOverrides="AND |OR ">
|
||||
<if test="page !=null and page.where != null and page.where != ''">
|
||||
AND ${page.where}
|
||||
</if>
|
||||
<if test="isValid != null">
|
||||
AND r.is_valid=#{isValid,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isValid == null">
|
||||
AND r.is_valid != -1
|
||||
</if>
|
||||
<if test="userName != null and userName != ''">
|
||||
AND r.user_name like concat(concat('%',#{userName,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="serverIp != null and serverIp != ''">
|
||||
AND r.server_ip like concat(concat('%',#{serverIp,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="remarks != null and remarks != ''">
|
||||
AND r.remarks like concat(concat('%',#{remarks,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<!-- <if test="creatorName != null and creatorName != ''">
|
||||
AND r.CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="editorName != null and editorName != ''">
|
||||
AND r.EDITOR_NAME like concat(concat('%',#{editorName,jdbcType=VARCHAR}),'%')
|
||||
</if> -->
|
||||
<!-- 数据范围过滤 -->
|
||||
${sqlMap.dsf}
|
||||
</trim>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY r.id desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
|
||||
</select>
|
||||
|
||||
<insert id="insert" parameterType="com.nis.domain.configuration.UserManage">
|
||||
insert into user_manage(
|
||||
USER_NAME,
|
||||
USER_PWD,
|
||||
SERVER_IP,
|
||||
IS_VALID,
|
||||
is_audit,
|
||||
CREATOR_ID,
|
||||
CREATE_TIME,
|
||||
EDITOR_ID,
|
||||
EDIT_TIME,
|
||||
remarks
|
||||
)values (
|
||||
#{userName,jdbcType=VARCHAR},
|
||||
#{userPwd,jdbcType=VARCHAR},
|
||||
#{serverIp,jdbcType=VARCHAR},
|
||||
#{isValid,jdbcType=INTEGER},
|
||||
0,
|
||||
#{creatorId,jdbcType=INTEGER},
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
#{editorId,jdbcType=INTEGER},
|
||||
#{editTime,jdbcType=TIMESTAMP},
|
||||
#{remarks,jdbcType=VARCHAR}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="update" parameterType="com.nis.domain.configuration.UserManage">
|
||||
update user_manage
|
||||
<set>
|
||||
<trim suffixOverrides=",">
|
||||
<if test="userName != null and userName != ''" >
|
||||
user_name = #{userName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="userPwd != null and userPwd != ''">
|
||||
user_pwd=#{userPwd,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="isValid != null" >
|
||||
is_valid = #{isValid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="serverIp != null and serverIp != ''" >
|
||||
server_ip = #{serverIp,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="creatorId != null" >
|
||||
creator_id = #{creatorId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="createTime != null and createTime != ''" >
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="editorId != null" >
|
||||
editor_id = #{editorId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="editTime != null" >
|
||||
edit_time = #{editTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="remarks != null and remarks != ''" >
|
||||
remarks = #{remarks,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
|
||||
|
||||
<select id="getUserByLoginName" resultMap="userManageMap">
|
||||
select
|
||||
<include refid="Columns"/>
|
||||
from user_manage r where is_valid !=-1 and r.user_name=#{userName}
|
||||
</select>
|
||||
<select id="getUserById" resultMap="userManageMap">
|
||||
select
|
||||
<include refid="Columns"/>
|
||||
from user_manage r where r.is_valid !=-1 and r.id=#{id}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,105 @@
|
||||
package com.nis.web.service.basics;
|
||||
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.ibatis.session.ExecutorType;
|
||||
import org.apache.ibatis.session.SqlSession;
|
||||
import org.apache.ibatis.session.SqlSessionFactory;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.basics.AsnIpCfg;
|
||||
import com.nis.domain.basics.IpReuseIpCfg;
|
||||
import com.nis.domain.callback.InlineIp;
|
||||
import com.nis.domain.configuration.BaseIpCfg;
|
||||
import com.nis.domain.configuration.CfgIndexInfo;
|
||||
import com.nis.domain.maat.ToMaatResult;
|
||||
import com.nis.domain.specific.ConfigGroupInfo;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
import com.nis.util.ConfigServiceUtil;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.web.dao.basics.IpReuseIpCfgDao;
|
||||
import com.nis.web.security.UserUtils;
|
||||
import com.nis.web.service.BaseService;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 音视频文本
|
||||
* @author dell
|
||||
*
|
||||
*/
|
||||
@Service
|
||||
public class IpReuseIpCfgService extends BaseService{
|
||||
@Autowired
|
||||
protected IpReuseIpCfgDao ipReuseIpCfgDao;
|
||||
|
||||
|
||||
public Page<IpReuseIpCfg> findPage(Page page, IpReuseIpCfg entity) {
|
||||
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"r"));
|
||||
entity.setPage(page);
|
||||
List<IpReuseIpCfg> list=ipReuseIpCfgDao.findPage(entity);
|
||||
page.setList(list);
|
||||
return page;
|
||||
}
|
||||
|
||||
public List<IpReuseIpCfg> findList(IpReuseIpCfg entity){
|
||||
List<IpReuseIpCfg> list=ipReuseIpCfgDao.findPage(entity);
|
||||
return list;
|
||||
}
|
||||
public IpReuseIpCfg getUserIpCfg(Long cfgId) {
|
||||
return ipReuseIpCfgDao.getUserIpCfg(cfgId);
|
||||
}
|
||||
|
||||
public IpReuseIpCfg getIpByIp(String destIpAddress) {
|
||||
return ipReuseIpCfgDao.getIpByIp(destIpAddress);
|
||||
}
|
||||
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void save(CfgIndexInfo entity){
|
||||
Date createTime=new Date();
|
||||
for(IpReuseIpCfg cfg:entity.getIpReuseIpCfgs()) {
|
||||
if(cfg.getCfgId()==null){
|
||||
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||
cfg.setCreateTime(createTime);
|
||||
cfg.setCreatorId(entity.getCurrentUser().getId());
|
||||
cfg.setIsValid(Constants.VALID_NO);
|
||||
ipReuseIpCfgDao.insert(cfg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void update(IpReuseIpCfg entity){
|
||||
Date editTime=new Date();
|
||||
entity.setEditTime(editTime);
|
||||
entity.setEditorId(entity.getCurrentUser().getId());
|
||||
ipReuseIpCfgDao.update(entity);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param isAudit
|
||||
* @param isValid
|
||||
* @param ids compileIds
|
||||
*/
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void delete(Integer isValid,String ids){
|
||||
String[] idArray = ids.split(",");
|
||||
for(String id :idArray){
|
||||
IpReuseIpCfg entity = new IpReuseIpCfg();
|
||||
entity.setCfgId(Long.valueOf(id));
|
||||
entity.setIsValid(isValid);
|
||||
entity.setEditorId(UserUtils.getUser().getId());
|
||||
entity.setEditTime(new Date());
|
||||
ipReuseIpCfgDao.update(entity);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,162 @@
|
||||
package com.nis.web.service.configuration;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.ui.Model;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.basics.IpReuseIpCfg;
|
||||
import com.nis.domain.configuration.UserManage;
|
||||
import com.nis.domain.log.NtcIpLog;
|
||||
import com.nis.domain.maat.LogRecvData;
|
||||
import com.nis.domain.maat.MaatCfg;
|
||||
import com.nis.domain.maat.ToMaatBean;
|
||||
import com.nis.domain.maat.ToMaatResult;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
import com.nis.util.ConfigServiceUtil;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.util.httpclient.HttpClientUtil;
|
||||
import com.nis.web.dao.configuration.UserManageDao;
|
||||
import com.nis.web.security.UserUtils;
|
||||
import com.nis.web.service.BaseService;
|
||||
|
||||
@Service
|
||||
public class UserManageService extends BaseService{
|
||||
|
||||
@Autowired
|
||||
protected UserManageDao userManageDao;
|
||||
|
||||
public Page<UserManage> findPage(Page<UserManage> page, UserManage entity) {
|
||||
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"r"));
|
||||
entity.setPage(page);
|
||||
List<UserManage> list=userManageDao.findList(entity);
|
||||
page.setList(list);
|
||||
return page;
|
||||
}
|
||||
public UserManage getUserByLoginName(String userName) {
|
||||
return userManageDao.getUserByLoginName(userName);
|
||||
}
|
||||
|
||||
public UserManage getUserById(String id) {
|
||||
return userManageDao.getUserById(id);
|
||||
}
|
||||
|
||||
public void save(UserManage entity,Model model, HttpServletRequest request){
|
||||
Date createTime=new Date();
|
||||
if(entity.getId()==null){
|
||||
try {
|
||||
entity.setCreateTime(createTime);
|
||||
entity.setCreatorId(entity.getCurrentUser().getId());
|
||||
entity.setIsValid(Constants.VALID_NO);
|
||||
userManageDao.insert(entity);
|
||||
} catch (MaatConvertException e) {
|
||||
e.printStackTrace();
|
||||
logger.info("获取编译ID出错");
|
||||
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>");
|
||||
}
|
||||
//cgi接口添加
|
||||
/*String[] ipArray = entity.getServerIp().split(",");
|
||||
for(String ip :ipArray){
|
||||
//循环调用接口增加
|
||||
String url="?cmd=UserCreate&server_ip="+ip+"&user_name="+entity.getUserName()+"&user_pwd="+entity.getUserPwd();
|
||||
System.out.println(url);
|
||||
}*/
|
||||
}else{
|
||||
entity.setEditTime(createTime);
|
||||
entity.setEditorId(entity.getCurrentUser().getId());
|
||||
//获取修改之前数据
|
||||
UserManage olduser=userManageDao.getUserById(String.valueOf(entity.getId()));
|
||||
userManageDao.update(entity);
|
||||
//cgi接口删除旧数据
|
||||
/*String[] ipArray = olduser.getServerIp().split(",");
|
||||
for(String ip :ipArray){
|
||||
//循环调用接口删除
|
||||
String url="?cmd=UserDelete&server_ip="+ip+"&user_name="+olduser.getUserName();
|
||||
System.out.println(url);
|
||||
}*/
|
||||
if(StringUtil.isEmpty(entity.getUserName())){
|
||||
entity.setUserName(olduser.getUserName());
|
||||
}
|
||||
if(StringUtil.isEmpty(entity.getUserPwd())){
|
||||
entity.setUserPwd(olduser.getUserPwd());
|
||||
}
|
||||
/*String[] newIpArray = entity.getServerIp().split(",");
|
||||
for(String newIp :newIpArray){
|
||||
//循环调用接口添加
|
||||
String url="?cmd=UserCreate&server_ip="+newIp+"&user_name="+entity.getUserName()+"&user_pwd="+entity.getUserPwd();
|
||||
System.out.println(url);
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
//根据vpn服务器ip获取用户vpn服务器ip信息
|
||||
public UserManage getUserManage(String serverIp,HttpServletRequest request){
|
||||
UserManage user=new UserManage();
|
||||
/*Map<String, Object> params = new HashMap<String, Object>();
|
||||
params.put("server_ip", serverIp);
|
||||
try{
|
||||
String url ="URL"+ Constants.NTC_IP_REUSE_USER_LIST;
|
||||
String recv = HttpClientUtil.getUserMsg(url, params, request);
|
||||
logger.info("查询结果:" + recv);
|
||||
if (StringUtils.isNotBlank(recv)) {
|
||||
Gson gson = new GsonBuilder().create();
|
||||
LogRecvData<UserManage> fromJson = gson.fromJson(recv, new TypeToken<LogRecvData<UserManage>>(){}.getType());
|
||||
if (fromJson.getStatus().intValue() == 200) {
|
||||
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("查询失败", e);
|
||||
}*/
|
||||
return user;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param isAudit
|
||||
* @param isValid
|
||||
* @param ids compileIds
|
||||
*/
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void delete(Integer isValid,String ids){
|
||||
String[] idArray = ids.split(",");
|
||||
List<UserManage> userList=new ArrayList<UserManage>();
|
||||
for(String id :idArray){
|
||||
UserManage entity = new UserManage();
|
||||
entity=userManageDao.getUserById(id);
|
||||
if(entity!=null){
|
||||
userList.add(entity);
|
||||
}
|
||||
entity.setId(Long.valueOf(id));
|
||||
entity.setIsValid(isValid);
|
||||
entity.setEditorId(UserUtils.getUser().getId());
|
||||
entity.setEditTime(new Date());
|
||||
userManageDao.update(entity);
|
||||
}
|
||||
//cgi接口删除旧数据
|
||||
for (int i = 0; i < userList.size(); i++) {
|
||||
String[] ipArray = userList.get(i).getServerIp().split(",");
|
||||
for(String ip :ipArray){
|
||||
//循环调用接口删除
|
||||
String url="?cmd=UserDelete&server_ip="+ip+"&user_name="+userList.get(i).getUserName();
|
||||
System.out.println(url);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1315,3 +1315,19 @@ crl_issuer_null=Issuer of CRL file is empty
|
||||
block_by_app_server_ip=Block by application server ip
|
||||
certificate_file=Certificate File
|
||||
crl_file=Crl File
|
||||
vpn_ip=VPN Server IP
|
||||
num_logins=Num Logins
|
||||
last_login=Last Login
|
||||
transfer_packets=Transfer Packets
|
||||
transfer_bytes=Transfer Bytes
|
||||
user_info=User Info
|
||||
user_list=User List
|
||||
equal_password=Password Inconsistent!
|
||||
outgoing_unicast_packets=Outgoing Unicast Packets
|
||||
outgoing_unicast_total_size=Outgoing Unicast Total Size
|
||||
outgoing_broadcast_packets=Outgoing Broadcast Packets
|
||||
outgoing_broadcast_total_size=Outgoing Broadcast Total Size
|
||||
incoming_unicast_packets=Incoming Unicast_packets
|
||||
incoming_unicast_total_size=Incoming Unicast Total Size
|
||||
incoming_broadcast_packets=Incoming Broadcast Packets
|
||||
incoming_broadcast_total_size=Incoming Broadcast Total Size
|
||||
@@ -1311,3 +1311,19 @@ crl_issuer_null=CRL\u6587\u4EF6\u7684\u9881\u53D1\u8005\u4E3A\u7A7A
|
||||
block_by_app_server_ip=Block by application server ip
|
||||
certificate_file=\u8BC1\u4E66\u6587\u4EF6
|
||||
crl_file=Crl\u6587\u4EF6
|
||||
vpn_ip=VPN\u670D\u52A1\u5668IP
|
||||
num_logins=\u767B\u5F55\u6B21\u6570
|
||||
last_login=\u6700\u8FD1\u767B\u5F55\u65F6\u95F4
|
||||
transfer_packets=\u4F20\u8F93\u6570\u636E\u5305\u6570
|
||||
transfer_bytes=\u4F20\u8F93\u6570\u636E\u5B57\u8282
|
||||
user_info=\u7528\u6237\u4FE1\u606F
|
||||
user_list=\u7528\u6237\u5217\u8868
|
||||
equal_password=\u5BC6\u7801\u4E0D\u4E00\u81F4\uFF01
|
||||
outgoing_unicast_packets=\u8F93\u51FA\u5355\u5305
|
||||
outgoing_unicast_total_size=\u8F93\u51FA\u5355\u64AD\u603B\u5927\u5C0F
|
||||
outgoing_broadcast_packets=\u8F93\u51FA\u5E7F\u64AD\u6570\u636E\u5305
|
||||
outgoing_broadcast_total_size=\u8F93\u51FA\u5E7F\u64AD\u603B\u5927\u5C0F
|
||||
incoming_unicast_packets=\u8F93\u5165\u5355\u5305
|
||||
incoming_unicast_total_size=\u8F93\u5165\u5355\u64AD\u603B\u5927\u5C0F
|
||||
incoming_broadcast_packets=\u8F93\u5165\u5E7F\u64AD\u6570\u636E\u5305
|
||||
incoming_broadcast_total_size=\u8F93\u5165\u5E7F\u64AD\u603B\u5927\u5C0F
|
||||
278
src/main/webapp/WEB-INF/views/basics/userIpCfgFormAdd.jsp
Normal file
278
src/main/webapp/WEB-INF/views/basics/userIpCfgFormAdd.jsp
Normal file
@@ -0,0 +1,278 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title><spring:message code="asn_ip_configuration"></spring:message></title>
|
||||
<script type="text/javascript">
|
||||
var defaultIpInfo;
|
||||
$(document).ready(function(){
|
||||
$("input[name$='destPort']").parents(".form-group").addClass("hidden");
|
||||
$("select[name$='portPattern']").parents(".form-group").addClass("hidden");
|
||||
$("select[name$='protocol']").parents(".form-group").addClass("hidden");
|
||||
$("select[name$='direction']").parents(".form-group").addClass("hidden");
|
||||
|
||||
$("select[name$='ipType']").parents(".form-group").addClass("hidden");
|
||||
$("select[name$='ipPattern']").parents(".form-group").addClass("hidden");
|
||||
defaultIpInfo=$(".ipInfo").clone();
|
||||
|
||||
$("#cfgFrom").validate({
|
||||
rules : {
|
||||
destIpAddress : {
|
||||
remote : "${ctx}/basics/vpn/checkIp?oldDestIpAddress="
|
||||
+ encodeURIComponent('${_cfg.ipReuseIpCfgs[0].destIpAddress}')
|
||||
},
|
||||
},
|
||||
messages : {
|
||||
destIpAddress : {
|
||||
remote : "<spring:message code='name_existed'/>"
|
||||
}
|
||||
},
|
||||
errorPlacement: function(error,element){
|
||||
$(element).parents(".form-group").find("div[for='"+element.attr("name")+"']").append(error);
|
||||
},
|
||||
submitHandler: function(form){
|
||||
loading('onloading...');
|
||||
form.submit();
|
||||
},
|
||||
errorContainer: "#messageBox",
|
||||
});
|
||||
});
|
||||
var reSort=function(obj,index){
|
||||
$(obj).find("input,select").each(function(){
|
||||
var name=$(this).attr("name");
|
||||
if(name.indexOf("ipReuseIpCfgs[")>-1){
|
||||
var namePrefix="ipReuseIpCfgs[";
|
||||
var nameSubfix=name.substring(name.indexOf("]"));
|
||||
var nameNew=namePrefix+index+nameSubfix;
|
||||
if(nameNew!=name){
|
||||
$(this).attr("name",nameNew);
|
||||
$(this).parents(".form-group").find("div[for='"+name+"']").attr("for",nameNew);
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="page-content">
|
||||
<h3 class="page-title">
|
||||
<spring:message code="vpn_ip"></spring:message>
|
||||
</h3>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet box blue">
|
||||
<div class="portlet-title">
|
||||
<div class="caption">
|
||||
<i class="fa fa-gift"></i>
|
||||
<spring:message code="add"></spring:message>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body form">
|
||||
<!-- BEGIN FORM-->
|
||||
<form id="cfgFrom" action="${ctx}/basics/vpn/save" method="post" class="form-horizontal">
|
||||
<input type="hidden" name="functionId" value="${_cfg.functionId}">
|
||||
<input type="hidden" id="serviceId" name="serviceId" value="0">
|
||||
<input type="hidden" id="isAreaEffective" name="isAreaEffective" value="0">
|
||||
<input type="hidden" id="action" name="action" value="0">
|
||||
<input type="hidden" id="compileId" name="compileId" value="0">
|
||||
<input type="hidden" id="requestId" name="requestId" value="0">
|
||||
<!-- 配置域类型 -->
|
||||
<c:forEach items="${regionList}" var="region">
|
||||
<c:if test="${_cfg.functionId eq region.functionId}">
|
||||
<input type="hidden" name="cfgType" value="${region.configRegionValue}">
|
||||
<input type="hidden" name="cfgRegionCode"
|
||||
isMaat="${region.isMaat}"
|
||||
serviceType="${region.configServiceType}"
|
||||
ipPortShow="${region.configIpPortShow}"
|
||||
ipType="${region.configIpType}"
|
||||
ipPattern="${region.configIpPattern}"
|
||||
portPattern="${region.configPortPattern}"
|
||||
direction="${region.configDirection}"
|
||||
protocol="${region.configProtocol}"
|
||||
regionType="${region.regionType}"
|
||||
value="${region.configRegionCode}">
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<div class="form-body">
|
||||
<!-- desc and action -->
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="vpn_ip"/></label>
|
||||
<div class="col-md-6">
|
||||
<input id="oldDestIpAddress" name="oldDestIpAddress" type="hidden"
|
||||
value="${_cfg.ipReuseIpCfgs[0].destIpAddress}">
|
||||
<input class="form-control required ipCheck destIpAddress" id="destIpAddress" type="text" name="ipReuseIpCfgs[0].destIpAddress" value="${_cfg.ipReuseIpCfgs[0].destIpAddress}">
|
||||
</div>
|
||||
<div for="ipReuseIpCfgs[0].destIpAddress"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message code="desc"/></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control" type="text" name="cfgDesc" value="${_cfg.cfgDesc}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- desc and action -->
|
||||
<%-- <h4 class="form-section">
|
||||
<spring:message code="asn_ip_configuration" />
|
||||
<small> <span
|
||||
class="glyphicon glyphicon-plus asnIpAdd"
|
||||
onClick="addContent(this,'ipInfo')" title="add"></span></small>
|
||||
</h4> --%>
|
||||
<div class="row ipInfo boxSolid asnIp hidden disabled">
|
||||
<input type="hidden" name="ipReuseIpCfgs[0].protocolId" value="0">
|
||||
<!-- <div class="row">
|
||||
<div class="pull-right">
|
||||
<span class="glyphicon glyphicon-remove pull-right" title="remove"
|
||||
onClick="delContent(this,'ipInfo');" />
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="ip_type"/></label>
|
||||
<div class="col-md-6">
|
||||
<select name="ipReuseIpCfgs[0].ipType" class="selectpicker show-tick form-control required">
|
||||
<c:forEach items="${fns:getDictList('IP_TYPE')}" var="ipTypeC">
|
||||
<option value="${ipTypeC.itemCode}"
|
||||
<c:if test="${_cfg.ipReuseIpCfgs[0].ipType==ipTypeC.itemCode
|
||||
|| (_cfg.ipReuseIpCfgs[0].ipType==null && ipTypeC.itemCode==4)}">
|
||||
selected
|
||||
</c:if>
|
||||
>
|
||||
<spring:message code="${ipTypeC.itemValue}"/>
|
||||
</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
<div for="ipReuseIpCfgs[0].ipType"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row ip">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="ip_pattern"/></label>
|
||||
<div class="col-md-6">
|
||||
<select name="ipReuseIpCfgs[0].ipPattern" class="selectpicker show-tick form-control required">
|
||||
<c:forEach items="${fns:getDictList('IP_PATTERN')}" var="ipPatternC">
|
||||
<option value="${ipPatternC.itemCode}" <c:if test="${_cfg.ipReuseIpCfgs[0].ipPattern==ipPatternC.itemCode || (_cfg.ipReuseIpCfgs[0].ipPattern==null && ipPatternC.itemCode==3)}">selected</c:if>><spring:message code="${ipPatternC.itemValue}"/></option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
<div for="ipReuseIpCfgs[0].ipPattern"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="client_ip"/></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control required ipCheck" type="text" name="ipReuseIpCfgs[0].srcIpAddress" value="${_cfg.ipReuseIpCfgs[0].srcIpAddress}">
|
||||
</div>
|
||||
<div for="ipReuseIpCfgs[0].srcIpAddress"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row port">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="port_pattern"/></label>
|
||||
<div class="col-md-6">
|
||||
<select name="ipReuseIpCfgs[0].portPattern" class="selectpicker show-tick form-control required">
|
||||
<c:forEach items="${fns:getDictList('PORT_PATTERN')}" var="portPatternC">
|
||||
<option value="${portPatternC.itemCode}" <c:if test="${_cfg.ipReuseIpCfgs[0].portPattern==portPatternC.itemCode || (_cfg.ipReuseIpCfgs[0].portPattern==null && portPatternC.itemCode==1)}">selected</c:if>><spring:message code="${portPatternC.itemValue}"/></option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
<div for="ipReuseIpCfgs[0].portPattern"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="client_port"/></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control required portCheck" type="text" name="ipReuseIpCfgs[0].srcPort" value="${_cfg.ipReuseIpCfgs[0].srcPort}">
|
||||
</div>
|
||||
<div for="ipReuseIpCfgs[0].srcPort"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row destPort">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="server_port"/></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control required portCheck" type="text" name="ipReuseIpCfgs[0].destPort" value="${_cfg.ipReuseIpCfgs[0].destPort}">
|
||||
</div>
|
||||
<div for="ipReuseIpCfgs[0].destPort"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row protocol">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="protocol" /></label>
|
||||
<div class="col-md-6">
|
||||
<select name="ipReuseIpCfgs[0].protocol"
|
||||
class="selectpicker show-tick form-control required">
|
||||
<c:forEach items="${fns:getDictList('PROTOCOL')}" var="protocolC">
|
||||
<option value="${protocolC.itemCode}" <c:if test="${_cfg.ipReuseIpCfgs[0].protocol==protocolC.itemCode || (_cfg.ipReuseIpCfgs[0].protocol==null && protocolC.itemCode==0)}">selected</c:if>><spring:message code="${protocolC.itemValue}"/></option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
<div for="ipReuseIpCfgs[0].protocol"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="direction" /></label>
|
||||
<div class="col-md-6">
|
||||
<select name="ipReuseIpCfgs[0].direction"
|
||||
class="selectpicker show-tick form-control required">
|
||||
<c:forEach items="${fns:getDictList('DIRECTION')}" var="directionC">
|
||||
<option value="${directionC.itemCode}" <c:if test="${_cfg.ipReuseIpCfgs[0].direction==directionC.itemCode || (_cfg.ipReuseIpCfgs[0].direction==null && directionC.itemCode==0)}">selected</c:if>><spring:message code="${directionC.itemValue}"/></option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
<div for="ipReuseIpCfgs[0].direction"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<%-- <div class="row">
|
||||
<button type="button" class="btn btn-red-hollow center-block"
|
||||
onClick="more(this);" data-click-times="0">
|
||||
<spring:message code="show_more" />
|
||||
</button>
|
||||
</div> --%>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<div class="row">
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6"> </div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<!-- END FORM-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
264
src/main/webapp/WEB-INF/views/basics/userIpCfgFormUpdate.jsp
Normal file
264
src/main/webapp/WEB-INF/views/basics/userIpCfgFormUpdate.jsp
Normal file
@@ -0,0 +1,264 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title><spring:message code="asn_ip_configuration"></spring:message></title>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
$("input[name='destPort']").parents(".form-group").addClass("hidden");
|
||||
$("select[name='portPattern']").parents(".form-group").addClass("hidden");
|
||||
$("select[name='protocol']").parents(".form-group").addClass("hidden");
|
||||
$("select[name='direction']").parents(".form-group").addClass("hidden");
|
||||
$("select[name$='ipType']").parents(".form-group").addClass("hidden");
|
||||
$("select[name$='ipPattern']").parents(".form-group").addClass("hidden");
|
||||
$("#cfgFrom").validate({
|
||||
errorPlacement: function(error,element){
|
||||
$(element).parents(".form-group").find("div[for='"+element.attr("name")+"']").append(error);
|
||||
},
|
||||
submitHandler: function(form){
|
||||
loading('onloading...');
|
||||
form.submit();
|
||||
},
|
||||
errorContainer: "#messageBox",
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="page-content">
|
||||
|
||||
<h3 class="page-title">
|
||||
<spring:message code="vpn_ip"></spring:message>
|
||||
</h3>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet box blue">
|
||||
<div class="portlet-title">
|
||||
<div class="caption">
|
||||
<i class="fa fa-gift"></i>
|
||||
<spring:message code="edit"></spring:message>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body form">
|
||||
<!-- BEGIN FORM-->
|
||||
<form id="cfgFrom" action="${ctx}/basics/vpn/update" method="post" class="form-horizontal">
|
||||
<input type="hidden" name="cfgId" value="${_cfg.cfgId}">
|
||||
<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" id="isAreaEffective" name="isAreaEffective" value="0">
|
||||
<input type="hidden" id="requestId" name="requestId" value="${_cfg.requestId}">
|
||||
<input type="hidden" id="protocolId" name="protocolId" value="${_cfg.protocolId}">
|
||||
<!-- 配置域类型 -->
|
||||
<c:forEach items="${regionList}" var="region">
|
||||
<c:if test="${_cfg.functionId eq region.functionId}">
|
||||
<input type="hidden" name="cfgType" value="${region.configRegionValue}">
|
||||
<input type="hidden" name="cfgRegionCode"
|
||||
isMaat="${region.isMaat}"
|
||||
serviceType="${region.configServiceType}"
|
||||
ipPortShow="${region.configIpPortShow}"
|
||||
ipType="${region.configIpType}"
|
||||
ipPattern="${region.configIpPattern}"
|
||||
portPattern="${region.configPortPattern}"
|
||||
direction="${region.configDirection}"
|
||||
protocol="${region.configProtocol}"
|
||||
regionType="${region.regionType}"
|
||||
value="${region.configRegionCode}">
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<div class="form-body">
|
||||
<!-- desc and action -->
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="vpn_ip"/></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control required ipCheck" type="text" name="destIpAddress" value="${_cfg.destIpAddress}">
|
||||
</div>
|
||||
<div for="destIpAddress"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message code="desc"/></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control" type="text" name="cfgDesc" value="${_cfg.cfgDesc}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 hidden">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message code="action"/></label>
|
||||
<div class="col-md-6">
|
||||
<c:forEach items="${serviceList}" var="service"
|
||||
varStatus="satus">
|
||||
<label class="radio-inline"> <c:if
|
||||
test="${_cfg.functionId eq service.functionId}">
|
||||
<input type="radio" name="action"
|
||||
serviceId="${service.serviceId }"
|
||||
protocolId="${service.protocolId }"
|
||||
value="${service.action }" class="required action"
|
||||
<c:if test="${_cfg.action==service.action || (_cfg.action==null && satus.index==0)}">checked</c:if>>
|
||||
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
|
||||
<c:if test="${dict.itemCode eq service.action }">
|
||||
<spring:message code="${dict.itemValue }"/>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
</label>
|
||||
</c:forEach>
|
||||
</div>
|
||||
<div for="action"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- desc and action -->
|
||||
<%-- <%@include file="/WEB-INF/include/form/complexIpInfo.jsp" %> --%>
|
||||
<div class="row ipInfo">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="ip_type"/></label>
|
||||
<div class="col-md-6">
|
||||
<select name="ipType" class="selectpicker show-tick form-control required">
|
||||
<c:forEach items="${fns:getDictList('WHITELIST_IPTYPE')}" var="ipTypeC">
|
||||
<option value="${ipTypeC.itemCode}"
|
||||
<c:if test="${_cfg.ipType==ipTypeC.itemCode
|
||||
|| (_cfg.ipType==null && ipTypeC.itemCode==4)}">
|
||||
selected
|
||||
</c:if>
|
||||
>
|
||||
<spring:message code="${ipTypeC.itemValue}"/>
|
||||
</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
<div for="ipType"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="ip_pattern"/></label>
|
||||
<div class="col-md-6">
|
||||
<select name="ipPattern" class="selectpicker show-tick form-control required">
|
||||
<c:forEach items="${fns:getDictList('IP_PATTERN')}" var="ipPatternC">
|
||||
<option value="${ipPatternC.itemCode}" <c:if test="${_cfg.ipPattern==ipPatternC.itemCode || (_cfg.ipPattern==null && ipPatternC.itemCode==3)}">selected</c:if>><spring:message code="${ipPatternC.itemValue}"/></option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
<div for="ipPattern"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="client_ip"/></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control required ipCheck" type="text" name="srcIpAddress" value="${_cfg.srcIpAddress}">
|
||||
</div>
|
||||
<div for="srcIpAddress"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row port">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="port_pattern"/></label>
|
||||
<div class="col-md-6">
|
||||
<select name="portPattern" class="selectpicker show-tick form-control required">
|
||||
<c:forEach items="${fns:getDictList('PORT_PATTERN')}" var="portPatternC">
|
||||
<option value="${portPatternC.itemCode}" <c:if test="${_cfg.portPattern==portPatternC.itemCode || (_cfg.portPattern==null && portPatternC.itemCode==1)}">selected</c:if>><spring:message code="${portPatternC.itemValue}"/></option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
<div for="portPattern"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="client_port"/></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control required portCheck" type="text" name="srcPort" value="${_cfg.srcPort}">
|
||||
</div>
|
||||
<div for="srcPort"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row destPort">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="server_port"/></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control required portCheck" type="text" name="destPort" value="${_cfg.destPort}">
|
||||
</div>
|
||||
<div for="destPort"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row protocol">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="protocol" /></label>
|
||||
<div class="col-md-6">
|
||||
<select name="protocol"
|
||||
class="selectpicker show-tick form-control required">
|
||||
<c:forEach items="${fns:getDictList('PROTOCOL')}" var="protocolC">
|
||||
<option value="${protocolC.itemCode}" <c:if test="${_cfg.protocol==protocolC.itemCode || (_cfg.protocol==null && protocolC.itemCode==0)}">selected</c:if>><spring:message code="${protocolC.itemValue}"/></option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
<div for="protocol"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="direction" /></label>
|
||||
<div class="col-md-6">
|
||||
<select name="direction"
|
||||
class="selectpicker show-tick form-control required">
|
||||
<c:forEach items="${fns:getDictList('DIRECTION')}" var="directionC">
|
||||
<option value="${directionC.itemCode}" <c:if test="${_cfg.direction==directionC.itemCode || (_cfg.direction==null && directionC.itemCode==0)}">selected</c:if>><spring:message code="${directionC.itemValue}"/></option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
<div for="direction"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<%-- <div class="row">
|
||||
<button type="button" class="btn btn-red-hollow center-block"
|
||||
onClick="more(this);" data-click-times="0">
|
||||
<spring:message code="show_more" />
|
||||
</button>
|
||||
</div> --%>
|
||||
</div>
|
||||
<%-- <%@include file="/WEB-INF/include/form/basicInfo.jsp" %> --%>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<div class="row">
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6"> </div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<!-- END FORM-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
265
src/main/webapp/WEB-INF/views/basics/userIpCfgList.jsp
Normal file
265
src/main/webapp/WEB-INF/views/basics/userIpCfgList.jsp
Normal file
@@ -0,0 +1,265 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title><spring:message code="asn_ip_configuration"></spring:message></title>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
//搜索框提示语初始化
|
||||
if("${cfg.cfgDesc}"){
|
||||
$("#intype").val("${cfg.cfgDesc}");
|
||||
}else if("${cfg.destIpAddress}"){
|
||||
$("#intype").val("${cfg.destIpAddress}");
|
||||
}else{
|
||||
$("#intype").attr("placeholder","<spring:message code='input'/> "+$("#seltype").find("option:selected").text());
|
||||
}
|
||||
$("#seltype").change(function(){
|
||||
$("#intype").attr("placeholder","<spring:message code='input'/> "+$(this).find("option:selected").text());
|
||||
});
|
||||
//筛选功能初始化
|
||||
filterActionInit();
|
||||
//$("#isAudit").change(function(){
|
||||
// page();
|
||||
//});
|
||||
//reset
|
||||
$("#resetBtn").on("click",function(){
|
||||
$("select.selectpicker").each(function(){
|
||||
$(this).selectpicker('val',$(this).find('option:first').val());
|
||||
$(this).find("option").attr("selected",false);
|
||||
$(this).find("option:first").attr("selected",true);
|
||||
});
|
||||
$(".Wdate").attr("value",'');
|
||||
$("#description").attr("value",'');
|
||||
$("#searchForm")[0].reset();
|
||||
});
|
||||
|
||||
if($("#exportType").val() != null && $("#exportType").val() != ""){
|
||||
if($("#intype").val() != null && $("#intype").val() != ""){
|
||||
$("#exportValue").val($("#intype").val());
|
||||
}
|
||||
}
|
||||
});
|
||||
var edit=function(url){
|
||||
var cked = $('tbody tr td input.i-checks:checkbox:checked');
|
||||
if(cked.val()==1){
|
||||
top.$.jBox.tip("<spring:message code='has_approved'/>", "<spring:message code='info'/>");
|
||||
return;
|
||||
}
|
||||
if(cked.length==1){
|
||||
window.location = url+"&compileId="+cked.attr("id");
|
||||
}else{
|
||||
top.$.jBox.tip("<spring:message code='check_one'/>", "<spring:message code='info'/>");
|
||||
return;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="page-content">
|
||||
<div class="theme-panel hidden-xs hidden-sm">
|
||||
|
||||
<shiro:hasPermission name="asn:ip:config">
|
||||
<button type="button" class="btn btn-primary"
|
||||
onClick="javascript:window.location='${ctx}/basics/vpn/addForm?functionId=${cfg.functionId}'">
|
||||
<i class="fa fa-plus"></i>
|
||||
<spring:message code="add"></spring:message></button>
|
||||
<%-- <c:set var="regionImport" value="false"></c:set>
|
||||
<c:forEach items="${regionList}" var="region" >
|
||||
<c:if test="${(cfg.functionId eq region.functionId) && region.isImport eq 1}">
|
||||
<c:set var="regionImport" value="true"></c:set>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<c:if test="${regionImport eq 'true'}">
|
||||
<button type="button" class="btn btn-primary import" >
|
||||
<i class="fa fa-plus"></i>
|
||||
<spring:message code="import"></spring:message></button>
|
||||
</c:if> --%>
|
||||
</shiro:hasPermission>
|
||||
</div>
|
||||
|
||||
<h3 class="page-title">
|
||||
<spring:message code="vpn_ip"></spring:message>
|
||||
<%-- <small><spring:message code="date_list"/></small> --%>
|
||||
</h3>
|
||||
<h5 class="page-header"></h5>
|
||||
<div class="col-md-12">
|
||||
<div class="portlet">
|
||||
<div class="portlet-body">
|
||||
<div class="row" >
|
||||
<form:form id="searchForm" modelAttribute="cfg" action="${ctx}/basics/vpn/list?functionId=${cfg.functionId}" method="post" class="form-search">
|
||||
<input id="functionId" name="functionId" type="hidden" value="${cfg.functionId}"/>
|
||||
<input id="audit" name="audit" type="hidden" value="${audit}"/>
|
||||
<input id="exportType" type="hidden" value="${cfg.seltype}"/>
|
||||
<input id="exportValue" type="hidden" value=""/>
|
||||
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
|
||||
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
|
||||
<sys:tableSort id="orderBy" name="orderBy" value="${page.orderBy}"
|
||||
callback="page();" />
|
||||
<!-- 筛选按钮展开状态-->
|
||||
<input id="isFilterAction" name="isFilterAction" type="hidden" value="${cfg.isFilterAction }"/>
|
||||
<!-- 搜索内容与操作按钮栏 -->
|
||||
<div class="col-md-12">
|
||||
<%--<div class="pull-left">
|
||||
<c:set var="state"><spring:message code='group'/></c:set>
|
||||
<form:select path="isAudit" class="selectpicker select2 input-small">
|
||||
<form:option value=""><spring:message code="all_states"/></form:option>
|
||||
<form:option value="0"><spring:message code="created"></spring:message></form:option>
|
||||
<form:option value="1"><spring:message code="approved"></spring:message></form:option>
|
||||
<form:option value="2"><spring:message code="unapproved"></spring:message></form:option>
|
||||
<form:option value="3"><spring:message code="cancel_approved"></spring:message></form:option>
|
||||
</form:select>
|
||||
</div>--%>
|
||||
<div class="pull-left">
|
||||
<div class="input-group">
|
||||
<div class="input-group-btn">
|
||||
<form:select path="seltype" class="selectpicker select2 input-small" >
|
||||
<form:option value="destIpAddress"><spring:message code="vpn_ip"></spring:message></form:option>
|
||||
<form:option value="cfgDesc"><spring:message code="desc"></spring:message></form:option>
|
||||
<%-- <form:option value="isValid"><spring:message code="is_issued"></spring:message></form:option> --%>
|
||||
</form:select>
|
||||
</div>
|
||||
<input id="intype" class="form-control input-medium" type="text" value="">
|
||||
<div class="input-group-btn">
|
||||
<form:select path="isValid" class="selectpicker select2 input-small" >
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<form:option value="1"><spring:message code="yes"/></form:option>
|
||||
<form:option value="0"><spring:message code="no"/></form:option>
|
||||
</form:select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
<button type="button" class="btn blue" onClick="return page()"> <i class="fa fa-search"></i> <spring:message code="search"/> </button>
|
||||
<button type="button" class="btn btn-default" id="resetBtn"> <i class="fa fa-refresh"></i> <spring:message code="reset"/> </button>
|
||||
<button type="button" class="btn btn-default" id="filter-btn"> <spring:message code="filter"/> <i class="fa fa-angle-double-down"></i></button>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<shiro:hasPermission name="asn:ip:config">
|
||||
<sys:delRow url="${ctx}/basics/vpn/updateForm?functionId=${cfg.functionId}" id="contentTable" label="update"></sys:delRow>
|
||||
<sys:delRow url="${ctx}/basics/vpn/delete?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
|
||||
<%-- <sys:delRow url="${ctx}/basics/vpn/exportIp?functionId=${cfg.functionId }" searchUrl="${ctx}/basics/asn/list?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="export"></sys:delRow>
|
||||
--%> </shiro:hasPermission>
|
||||
<%-- <shiro:hasPermission name="asn:ip:confirm">
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
<i class="fa fa-wrench"></i> <spring:message code="examine"></spring:message>
|
||||
<i class="fa fa-angle-down"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu pull-right">
|
||||
<li><sys:delRow url="${ctx}/basics/asn/audit?isAudit=1&isValid=1&functionId=${cfg.functionId }" id="contentTable" label="approved"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/basics/asn/audit?isAudit=2&isValid=0&functionId=${cfg.functionId }" id="contentTable" label="unapproved"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/basics/asn/audit?isAudit=3&isValid=0&functionId=${cfg.functionId }" id="contentTable" label="cancelPass"></sys:delRow></li>
|
||||
</ul>
|
||||
</div>
|
||||
</shiro:hasPermission> --%>
|
||||
<a class="btn btn-icon-only btn-default setfields tooltips"
|
||||
data-container="body" data-placement="top" data-original-title=<spring:message code="custom_columns"/> href="javascript:;">
|
||||
<i class="icon-wrench"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /搜索内容与操作按钮栏 -->
|
||||
|
||||
<!-- 筛选搜索内容栏默认隐藏-->
|
||||
<div class="col-md-12 filter-action-select-panle hide" >
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="config_time"/>:</label>
|
||||
<input name="search_create_time_start" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value='${cfg.search_create_time_start}' pattern='yyyy-MM-dd HH:mm:ss'/>" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label> </label>
|
||||
<input name="search_create_time_end" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_create_time_end}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="edit_time"/>:</label>
|
||||
<input name="search_edit_time_start" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_edit_time_start}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label> </label>
|
||||
<input name="search_edit_time_end" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_edit_time_end}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%-- <div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="audit_time"/>:</label>
|
||||
<input name="search_audit_time_start" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_audit_time_start}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label> </label>
|
||||
<input name="search_audit_time_end" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_audit_time_end}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div> --%>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<!-- /筛选搜索内容栏 结束-->
|
||||
</form:form>
|
||||
</div>
|
||||
<sys:message content="${message}" type="${messageType }"/>
|
||||
<div class="table-responsive">
|
||||
<table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><input type="checkbox" class="i-checks" id="checkAll"></th>
|
||||
<th><spring:message code="vpn_ip"/></th>
|
||||
<th><spring:message code="desc"/></th>
|
||||
<th><spring:message code="creator"/></th>
|
||||
<th class="sort-column r.create_time"><spring:message code="config_time"/></th>
|
||||
<th><spring:message code="editor"/></th>
|
||||
<th class="sort-column r.edit_time"><spring:message code="edit_time"/></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:forEach items="${page.list }" var="cfg" varStatus="status" step="1">
|
||||
<tr>
|
||||
<td><input type="checkbox" class="i-checks" id="${cfg.cfgId}" isValid="${cfg.isValid}" value="0"></td>
|
||||
<td>${cfg.destIpAddress }</td>
|
||||
<td>${cfg.cfgDesc }</td>
|
||||
<td>${cfg.creatorName }</td>
|
||||
<td><fmt:formatDate value="${cfg.createTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td>${cfg.editorName }</td>
|
||||
<td><fmt:formatDate value="${cfg.editTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="page">${page}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<c:set var="importPath" value="/basics/vpn/list?functionId=${cfg.functionId}"/>
|
||||
<!-- 模板导入,start -->
|
||||
<%@include file="/WEB-INF/include/excel/importModal.jsp" %>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,325 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title><spring:message code="${cfgName}"></spring:message></title>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
if("${cfg.userName}"){
|
||||
$("#intype").val("${cfg.userName}");
|
||||
} else if("${cfg.remarks}"){
|
||||
$("#intype").val("${cfg.remarks}");
|
||||
} else{
|
||||
$("#intype").attr("placeholder","<spring:message code='input'/> "+$("#seltype").find("option:selected").text());
|
||||
}
|
||||
$("#seltype").change(function(){
|
||||
$("#intype").attr("placeholder","<spring:message code='input'/> "+$(this).find("option:selected").text());
|
||||
});
|
||||
//筛选功能初始化
|
||||
filterActionInit();
|
||||
$("#resetBtn").on("click",function(){
|
||||
$("select.selectpicker").each(function(){
|
||||
$(this).selectpicker('val',$(this).find('option:first').val());
|
||||
$(this).find("option").attr("selected",false);
|
||||
$(this).find("option:first").attr("selected",true);
|
||||
});
|
||||
$(".Wdate").attr("value",'');
|
||||
$("#level").attr("value",'');
|
||||
$("#searchForm")[0].reset();
|
||||
});
|
||||
$("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();
|
||||
});
|
||||
|
||||
if($("#exportType").val() != null && $("#exportType").val() != ""){
|
||||
if($("#intype").val() != null && $("#intype").val() != ""){
|
||||
$("#exportValue").val($("#intype").val());
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
function dictDetail(serverIp,userName){
|
||||
$.ajax({
|
||||
type:'post',
|
||||
url:'${ctx}/maintenance/userManage/userInfo',
|
||||
data:{"serverIp":serverIp},
|
||||
dataType:'json',
|
||||
async:false,
|
||||
success:function(data){
|
||||
$("#userTable tbody").empty("");
|
||||
var html = ""
|
||||
for(i=0;i<data.length;i++){
|
||||
html+="<tr>";
|
||||
if(i==0){
|
||||
html+="<td class='taskStatus' rowspan='"+data.length+"'>"+userName;
|
||||
html+="</td>";
|
||||
}
|
||||
html+="<td class='taskStatus'>";
|
||||
html+="<a style='text-decoration: none;' href='${ctx}/maintenance/userManage/view?userName="+userName;
|
||||
html+="&serverIp="+data[i].serverIp+"'>"+data[i].serverIp;
|
||||
html+="</a></td>";
|
||||
html+="<td class='taskStatus'>"+(data[i].numLogins==null?"":data[i].numLogins);
|
||||
html+="</td>";
|
||||
html+="<td class='taskStatus'>"+(data[i].lastLogin==null?"":data[i].lastLogin);
|
||||
html+="</td>";
|
||||
html+="<td class='taskStatus'>"+(data[i].transferPackets==null?"":data[i].transferPackets);
|
||||
html+="</td>";
|
||||
html+="<td class='taskStatus'>"+(data[i].transferBytes==null?"":data[i].transferBytes);
|
||||
html+="</td>";
|
||||
html+="<td class='taskStatus'>"+(data[i].remarks==null?"":data[i].remarks);
|
||||
html+="</td>";
|
||||
html+="</tr>";
|
||||
}
|
||||
$("#userTable tbody").prepend(html);
|
||||
openWindow();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function openWindow(){
|
||||
document.getElementById('light').style.display='block';
|
||||
document.getElementById('fade').style.display='block';
|
||||
}
|
||||
function closeWindow(){
|
||||
document.getElementById('light').style.display='none';
|
||||
document.getElementById('fade').style.display='none';
|
||||
}
|
||||
</script>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
.revisionBox {
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
span.label.label-success{
|
||||
width: 250px;
|
||||
}
|
||||
.popover {
|
||||
max-width: 800px;
|
||||
}
|
||||
|
||||
.btn.purple-stripe {
|
||||
border-left: 3px solid #852B99;
|
||||
}
|
||||
.black_overlay{
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: 0%;
|
||||
left: 0%;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #0c0c0c1f;
|
||||
z-index:1001;
|
||||
-moz-opacity: 0.8;
|
||||
opacity:.80;
|
||||
filter: alpha(opacity=80);
|
||||
}
|
||||
.white_content {
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: 15%;
|
||||
left: 20%;
|
||||
width: 60%;
|
||||
height: 480px;
|
||||
border: 1px solid 42403e52;
|
||||
background-color: white;
|
||||
z-index:1002;
|
||||
overflow: auto;
|
||||
-moz-box-shadow: 2px 2px 10px #909090;
|
||||
-webkit-box-shadow: 2px 2px 10px #909090;
|
||||
box-shadow:2px 2px 10px #909090;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-content">
|
||||
<div class="theme-panel hidden-xs hidden-sm">
|
||||
<button type="button" class="btn btn-primary" onClick="javascript:window.location='${ctx}/maintenance/userManage/form'">
|
||||
<i class="fa fa-plus"></i>
|
||||
<spring:message code="add"/></button>
|
||||
</div>
|
||||
<h3 class="page-title">
|
||||
<spring:message code="user_manage"></spring:message>
|
||||
</h3>
|
||||
<h5 class="page-header"></h5>
|
||||
<div class="col-md-12">
|
||||
<div class="portlet">
|
||||
<div class="portlet-body">
|
||||
<div class="row" >
|
||||
<form:form id="searchForm" modelAttribute="cfg" action="${ctx}/maintenance/userManage/list" method="post" class="form-search">
|
||||
<input id="exportType" type="hidden" value="${cfg.seltype}"/>
|
||||
<input id="exportValue" type="hidden" value=""/>
|
||||
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
|
||||
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
|
||||
<sys:tableSort id="orderBy" name="orderBy" value="${page.orderBy}"
|
||||
callback="page();" />
|
||||
<!-- 筛选按钮展开状态-->
|
||||
<input id="isFilterAction" name="isFilterAction" type="hidden" value="${cfg.isFilterAction }"/>
|
||||
<!-- 搜索内容与操作按钮栏 -->
|
||||
<div class="col-md-12">
|
||||
<div class="pull-left">
|
||||
<div class="input-group">
|
||||
<div class="input-group-btn">
|
||||
<form:select path="seltype" class="selectpicker select2 input-small" >
|
||||
<form:option value="userName"><spring:message code="user_name"></spring:message></form:option>
|
||||
<form:option value="remarks"><spring:message code="desc"></spring:message></form:option>
|
||||
</form:select>
|
||||
|
||||
</div>
|
||||
|
||||
<input id="intype" class="form-control input-medium" type="text" value="">
|
||||
<div class="input-group-btn">
|
||||
<form:select path="isValid" class="selectpicker select2 input-small" >
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<form:option value="1"><spring:message code="yes"/></form:option>
|
||||
<form:option value="0"><spring:message code="no"/></form:option>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
<button type="button" class="btn blue" onClick="return page()"> <i class="fa fa-search"></i> <spring:message code="search"/> </button>
|
||||
<button type="button" class="btn btn-default" id="resetBtn"> <i class="fa fa-refresh"></i> <spring:message code="reset"/> </button>
|
||||
<button type="button" class="btn btn-default" id="filter-btn"> <spring:message code="filter"/> <i class="fa fa-angle-double-down"></i></button>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<shiro:hasPermission name="website:ssl:config">
|
||||
<sys:delRow url="${ctx}/maintenance/userManage/form" id="contentTable" label="update"></sys:delRow>
|
||||
<sys:delRow url="${ctx}/maintenance/userManage/delete?isValid=-1" id="contentTable" label="delete"></sys:delRow>
|
||||
</shiro:hasPermission>
|
||||
<a class="btn btn-icon-only btn-default setfields tooltips"
|
||||
data-container="body" data-placement="top" data-original-title=<spring:message code="custom_columns"/> href="javascript:;">
|
||||
<i class="icon-wrench"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /搜索内容与操作按钮栏 -->
|
||||
<!-- 筛选搜索内容栏默认隐藏-->
|
||||
<div class="col-md-12 filter-action-select-panle hide" >
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="config_time"/>:</label>
|
||||
<input name="search_create_time_start" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value='${cfg.search_create_time_start}' pattern='yyyy-MM-dd HH:mm:ss'/>" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label> </label>
|
||||
<input name="search_create_time_end" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_create_time_end}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="edit_time"/>:</label>
|
||||
<input name="search_edit_time_start" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_edit_time_start}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label> </label>
|
||||
<input name="search_edit_time_end" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_edit_time_end}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<!-- /筛选搜索内容栏 结束-->
|
||||
</form:form>
|
||||
</div>
|
||||
<sys:message content="${message}"/>
|
||||
<div class="table-responsive">
|
||||
<table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><input type="checkbox" class="i-checks" id="checkAll"></th>
|
||||
<th><spring:message code="user_name"/></th>
|
||||
<%-- <th><spring:message code="vpn_ip"/></th> --%>
|
||||
<th><spring:message code="desc"/></th>
|
||||
<th><spring:message code="creator"/></th>
|
||||
<th class="sort-column a.create_time"><spring:message code="config_time"/></th>
|
||||
<th><spring:message code="editor"/></th>
|
||||
<th class="sort-column a.edit_time"><spring:message code="edit_time"/></th>
|
||||
<th width="15%"><spring:message code="operation"/></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:forEach items="${page.list }" var="indexCfg" varStatus="status" step="1">
|
||||
<tr>
|
||||
<td>
|
||||
<input type="checkbox" class="i-checks child-checks" id="${indexCfg.id}" isValid="${cfg.isValid}" value="0" >
|
||||
</td>
|
||||
<td>${indexCfg.userName }</td>
|
||||
<%-- <td>${indexCfg.serverIp }</td> --%>
|
||||
<td>${indexCfg.remarks }</td>
|
||||
<td>${indexCfg.creatorName }</td>
|
||||
<td><fmt:formatDate value="${indexCfg.createTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td>${indexCfg.editorName }</td>
|
||||
<td><fmt:formatDate value="${indexCfg.editTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td class="no_substr">
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-primary" href="#"><i class="icon-cogs"></i> <spring:message code="operation"/></a>
|
||||
<a class="btn btn-primary dropdown-toggle" data-toggle="dropdown" href="#"><span class="caret"></span></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="javascript:dictDetail('${indexCfg.serverIp}','${indexCfg.userName}')"><i class="icon-list"></i> <spring:message code="detail"/></a></li>
|
||||
<li><a href="${ctx}/basics/vpn/addForm?functionId=636&type=userIp"><i class="fa fa-plus"></i><spring:message code="add"/> <spring:message code="vpn_ip"/></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="page">${page}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<c:set var="importPath" value="/ntc/iplist/list?functionId=${cfg.functionId}"/>
|
||||
<!-- 模板导入,start -->
|
||||
<%@include file="/WEB-INF/include/excel/importModal.jsp" %>
|
||||
<div id="light" class="white_content">
|
||||
<div class="jbox-title-panel" style="border-bottom: 1px solid #b9b9b9;height: 40px;width: 100%;padding: 11px;">
|
||||
<span style="font-size: 16px;"><spring:message code="user_list"/></span>
|
||||
<a href="javascript:void(0)" onClick="closeWindow()" style="text-decoration: none;color: #777777;float: right;" > X</a>
|
||||
</div>
|
||||
<div style='font-size: 14px;height: 405px;overflow: auto;' align='center'>
|
||||
<table id="userTable" class='table table-bordered table-condensed' style='width:98%;margin-top: 10px;' >
|
||||
<thead>
|
||||
<th><spring:message code="user_name"/></th>
|
||||
<th><spring:message code="vpn_ip"/></th>
|
||||
<th><spring:message code="num_logins"/></th>
|
||||
<th><spring:message code="last_login"/></th>
|
||||
<th><spring:message code="transfer_packets"/></th>
|
||||
<th><spring:message code="transfer_bytes"/></th>
|
||||
<th><spring:message code="desc"/></th>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div style="border-top: 1px solid #b9b9b9;padding: 4px;background: #eee;height: 35px;">
|
||||
<button onclick="closeWindow();" style="float: right;"><spring:message code="close"/></button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="fade" class="black_overlay"></div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,185 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title><spring:message code="${cfgName}"></spring:message></title>
|
||||
<script type="text/javascript">
|
||||
$(document)
|
||||
.ready(
|
||||
function() {
|
||||
|
||||
//用户名验证
|
||||
jQuery.validator.addMethod("userCheck", function(value, element) {
|
||||
var tel =/^[A-Za-z0-9]+$$/;
|
||||
return this.optional(element) || (tel.test(value));
|
||||
}, "用户名仅支持英文大小写、数字");
|
||||
$("#no").focus();
|
||||
$("#inputForm")
|
||||
.validate(
|
||||
{
|
||||
rules : {
|
||||
userName : {
|
||||
remote : "${ctx}/maintenance/userManage/checkLoginName?oldUserName="
|
||||
+ encodeURIComponent('${user.userName}'),
|
||||
userCheck:true
|
||||
},
|
||||
},
|
||||
messages : {
|
||||
userName : {
|
||||
remote : "<spring:message code='name_existed'/>"
|
||||
},
|
||||
newUserPwd : {
|
||||
equalTo : "<spring:message code='equal_password'/>"
|
||||
}
|
||||
},
|
||||
submitHandler : function(form) {
|
||||
loading('onloading...');
|
||||
form.submit();
|
||||
},
|
||||
errorContainer : "#messageBox",
|
||||
errorPlacement : function(error,
|
||||
element) {
|
||||
$("#messageBox")
|
||||
.text(
|
||||
"<spring:message code='enter_error'/>");
|
||||
if (element.is(":checkbox")
|
||||
|| element.is(":radio")
|
||||
|| element
|
||||
.parent()
|
||||
.is(
|
||||
".input-append")) {
|
||||
error.appendTo(element
|
||||
.parent().parent());
|
||||
} else {
|
||||
error.insertAfter(element);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-content">
|
||||
|
||||
<div class="row">
|
||||
<h3 class="page-title">
|
||||
<spring:message code="userManage" />
|
||||
</h3>
|
||||
<div class="col-md-12">
|
||||
<div class="portlet box blue">
|
||||
<div class="portlet-title">
|
||||
<div class="caption">
|
||||
<i class="fa fa-gift"></i>
|
||||
<c:if test="${not empty user.id}">
|
||||
<spring:message code="edit" />
|
||||
</c:if>
|
||||
<c:if test="${empty user.id}">
|
||||
<spring:message code="add" />
|
||||
</c:if>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="portlet-body form">
|
||||
<form:form id="inputForm" modelAttribute="user"
|
||||
action="${ctx}/maintenance/userManage/save" method="post"
|
||||
class="form-horizontal">
|
||||
<form:hidden path="id" />
|
||||
<spring:message code="${message}" />
|
||||
<div class="form-body">
|
||||
<div class="form-group">
|
||||
<c:set var="vpn_ip">
|
||||
<spring:message code="vpn_ip" />
|
||||
</c:set>
|
||||
<label class="control-label col-md-3"><spring:message
|
||||
code="vpn_ip" /></label>
|
||||
<div class="col-md-4">
|
||||
<sys:treeselect id="serverIp" name="serverIp"
|
||||
value="${user.serverIp}" labelName="user.serverIp"
|
||||
notAllowSelectParent="true" enableSearch="true"
|
||||
notAllowSelectRoot="true" checkedPS="ps" unCheckedPS="ps"
|
||||
labelValue="${user.serverIp}" title="${vpn_ip}"
|
||||
url="/maintenance/userManage/treeData?isLeafShow=false&cfgType=3&specific=true" extId="0"
|
||||
checked="true" cssClass="form-control required" />
|
||||
</div>
|
||||
<span class="help-inline"><font color="red">*</font> </span>
|
||||
<div for="user.serverIp"></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"><spring:message
|
||||
code="user_name" /></label>
|
||||
<div class="col-md-4">
|
||||
<input id="oldUserName" name="oldUserName" type="hidden"
|
||||
value="${user.userName}">
|
||||
<%-- <c:if test="${not empty user.id}" var="exisitUser">
|
||||
<form:input path="userName" htmlEscape="false" maxlength="50"
|
||||
readonly="true" class="required form-control" />
|
||||
</c:if> --%>
|
||||
|
||||
<form:input path="userName" htmlEscape="false" maxlength="50"
|
||||
class="required form-control" />
|
||||
</div>
|
||||
<span class="help-inline"><font color="red">*</font> </span>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"><spring:message
|
||||
code="password" /></label>
|
||||
<div class="col-md-4">
|
||||
<input id="userPwd" name="userPwd" type="password" value=""
|
||||
maxlength="50" minlength="3"
|
||||
class="${empty user.id?'required':''} form-control" />
|
||||
</div>
|
||||
<c:if test="${empty user.id}">
|
||||
<span class="help-inline"><font color="red">*</font> </span>
|
||||
</c:if>
|
||||
<c:if test="${not empty user.id}">
|
||||
<span class="help-inline"><spring:message
|
||||
code="nochange_blank" /></span>
|
||||
</c:if>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"><spring:message
|
||||
code="confirm_password"></spring:message></label>
|
||||
<div class="col-md-4">
|
||||
<input id="newUserPwd" name="newUserPwd" type="password"
|
||||
value="" maxlength="50" minlength="3" equalTo="#userPwd"
|
||||
class="form-control" />
|
||||
<c:if test="${empty user.id}"></c:if>
|
||||
</div>
|
||||
<span class="help-inline"><font color="red">*</font> </span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"><spring:message
|
||||
code="desc" /></label>
|
||||
<div class="col-md-4">
|
||||
<form:textarea path="remarks" htmlEscape="false" rows="3"
|
||||
maxlength="200" class="span6 form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<div class="row">
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6"></div>
|
||||
</div>
|
||||
</div>
|
||||
</form:form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,160 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8" %>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" type="text/css" href="${ctxStatic}/pages/css/dictInfo.css" />
|
||||
<script type="text/javascript" src="${ctxStatic}/pages/scripts/dict.js"></script>
|
||||
<title><spring:message code="${cfgName}"></spring:message></title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
<div class="page-content">
|
||||
<div class="theme-panel hidden-xs hidden-sm">
|
||||
<button type="button" class="btn btn-default" onclick="history.go(-1)"><spring:message code="back"/></button>
|
||||
</div>
|
||||
|
||||
|
||||
<h3 class="page-title">
|
||||
<spring:message code="user_info"/>
|
||||
</h3>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet box blue">
|
||||
<div class="portlet-title">
|
||||
<div class="caption">
|
||||
<i class="fa fa-gift"></i><spring:message code='show'/></div>
|
||||
<div class="tools">
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body form">
|
||||
<div class="form-body">
|
||||
<!-- BEGIN FORM-->
|
||||
<form:form id="inputForm" modelAttribute="user" action="#" method="post" class="form-horizontal">
|
||||
<sys:message content="${message}"/>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-4">
|
||||
<spring:message code="user_name" /></label>
|
||||
<div class="col-md-4">
|
||||
<input value="${user.userName}" maxlength="50" class="form-control" readonly="readonly"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3">
|
||||
<spring:message code="config_time" /></label>
|
||||
<div class="col-md-4">
|
||||
<input value="${user.createOn}" maxlength="50" class="form-control" readonly="readonly"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-4">
|
||||
<spring:message code="edit_time" /></label>
|
||||
<div class="col-md-4">
|
||||
<input value="${user.updatedOn}" maxlength="50" class="form-control" readonly="readonly"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3">
|
||||
<spring:message code="outgoing_unicast_packets" /></label>
|
||||
<div class="col-md-4">
|
||||
<input value="${user.outgoingUnicastPackets}" maxlength="50" class="form-control" readonly="readonly"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-4">
|
||||
<spring:message code="outgoing_broadcast_packets" /></label>
|
||||
<div class="col-md-4">
|
||||
<input value="${user.outgoingBroadcastPackets}" maxlength="50" class="form-control" readonly="readonly"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3">
|
||||
<spring:message code="outgoing_broadcast_total_size" /></label>
|
||||
<div class="col-md-4">
|
||||
<input value="${user.outgoingBroadcastTotalSize}" maxlength="50" class="form-control" readonly="readonly"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-4">
|
||||
<spring:message code="incoming_unicast_packets" /></label>
|
||||
<div class="col-md-4">
|
||||
<input value="${user.incomingUnicastPackets}" maxlength="50" class="form-control" readonly="readonly"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3">
|
||||
<spring:message code="incoming_unicast_total_size" /></label>
|
||||
<div class="col-md-4">
|
||||
<input value="${user.incomingUnicastTotalSize}" maxlength="50" class="form-control" readonly="readonly"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-4">
|
||||
<spring:message code="incoming_broadcast_packets" /></label>
|
||||
<div class="col-md-4">
|
||||
<input value="${user.incomingBroadcastPackets}" maxlength="50" class="form-control" readonly="readonly"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3">
|
||||
<spring:message code="incoming_broadcast_total_size" /></label>
|
||||
<div class="col-md-4">
|
||||
<input value="${user.incomingBroadcastTotalSize}" maxlength="50" class="form-control" readonly="readonly"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-4">
|
||||
<spring:message code="num_logins" /></label>
|
||||
<div class="col-md-4">
|
||||
<input value="${user.numberOfLogins}" maxlength="50" class="form-control" readonly="readonly"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form:form>
|
||||
<!-- END FORM-->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -36,6 +36,8 @@ $(function(){
|
||||
$("#contentTable").find("td").each(function(i,element){
|
||||
//获取td当前对象的文本,如果长度大于25;
|
||||
if(!$(element).find(".tooltips").length>0){
|
||||
var tdclass= $(this).attr("class");//no_substr 不进行截取
|
||||
if(tdclass!='no_substr'){
|
||||
if($(this).text().trim().length>28){
|
||||
//给td设置title属性,并且设置td的完整值.给title属性.
|
||||
var strTitle = $(this).text().trim().replace(/[\r\n]/g,"").replace(/\s+/g, " ");
|
||||
@@ -51,6 +53,7 @@ $(function(){
|
||||
$(this).text(text);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$("input[name$='isCaseSenstive']").on("change",function(){
|
||||
|
||||
Reference in New Issue
Block a user