Merge branch 'develop' of http://10.0.6.99/gwall/gwall.git into develop
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
package com.nis.domain.configuration;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 内置文件上传
|
||||
* @author dell
|
||||
*
|
||||
*/
|
||||
public class AppBuiltInFeatureFile extends BaseCfg<AppBuiltInFeatureFile> {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -2720862431960415564L;
|
||||
private String filePath;
|
||||
public String getFilePath() {
|
||||
return filePath;
|
||||
}
|
||||
public void setFilePath(String filePath) {
|
||||
this.filePath = filePath;
|
||||
}
|
||||
}
|
||||
@@ -28,7 +28,7 @@ public class AppByteCfg extends BaseCfg<AppByteCfg> {
|
||||
@Expose
|
||||
private Integer compileId;
|
||||
@Expose
|
||||
private Integer ratelimit;
|
||||
private String ratelimit;
|
||||
private Integer appCode;//specific_service_cfg表一级节点的spec_service_code
|
||||
private Integer behavCode;//specific_service_cfg表二级节点的spec_service_code
|
||||
private Integer specServiceId;
|
||||
@@ -93,11 +93,11 @@ public class AppByteCfg extends BaseCfg<AppByteCfg> {
|
||||
return tableName;
|
||||
}
|
||||
|
||||
public Integer getRatelimit() {
|
||||
public String getRatelimit() {
|
||||
return ratelimit;
|
||||
}
|
||||
|
||||
public void setRatelimit(Integer ratelimit) {
|
||||
public void setRatelimit(String ratelimit) {
|
||||
this.ratelimit = ratelimit;
|
||||
}
|
||||
public Integer getAppCode() {
|
||||
|
||||
@@ -35,6 +35,7 @@ import com.nis.domain.SysDataDictionaryItem;
|
||||
import com.nis.domain.basics.PolicyGroupInfo;
|
||||
import com.nis.domain.basics.ServiceDictInfo;
|
||||
import com.nis.domain.basics.SysDictInfo;
|
||||
import com.nis.domain.configuration.AppBuiltInFeatureFile;
|
||||
import com.nis.domain.configuration.AreaBean;
|
||||
import com.nis.domain.configuration.AreaIpCfg;
|
||||
import com.nis.domain.configuration.BaseCfg;
|
||||
@@ -66,6 +67,7 @@ import com.nis.web.service.UserService;
|
||||
import com.nis.web.service.basics.PolicyGroupInfoService;
|
||||
import com.nis.web.service.basics.ServiceDictInfoService;
|
||||
import com.nis.web.service.basics.SysDictInfoService;
|
||||
import com.nis.web.service.configuration.AppBuiltInFeatureService;
|
||||
import com.nis.web.service.configuration.AppCfgService;
|
||||
import com.nis.web.service.configuration.AvCfgService;
|
||||
import com.nis.web.service.configuration.AvContentCfgService;
|
||||
@@ -191,6 +193,8 @@ public class BaseController {
|
||||
protected ProxyFileStrategyService proxyFileStrategyService;//代理文件策略service
|
||||
@Autowired
|
||||
protected PxyObjKeyringService pxyObjKeyringService;//拦截策略service
|
||||
@Autowired
|
||||
protected AppBuiltInFeatureService appBuiltInFeatureService;//拦截策略service
|
||||
|
||||
/**
|
||||
* 管理基础路径
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
package com.nis.web.controller.configuration;
|
||||
|
||||
import java.io.File;
|
||||
import java.security.cert.X509Certificate;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
@@ -13,10 +16,14 @@ 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.ResponseBody;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||
|
||||
import com.google.common.collect.Maps;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.SysDataDictionaryItem;
|
||||
import com.nis.domain.configuration.AppBuiltInFeatureFile;
|
||||
import com.nis.domain.configuration.AppByteCfg;
|
||||
import com.nis.domain.configuration.AppDomainCfg;
|
||||
import com.nis.domain.configuration.AppHeaderCfg;
|
||||
@@ -28,13 +35,21 @@ import com.nis.domain.configuration.AppTcpCfg;
|
||||
import com.nis.domain.configuration.AppTopicDomainCfg;
|
||||
import com.nis.domain.configuration.IpPortCfg;
|
||||
import com.nis.domain.configuration.NtcSubscribeIdCfg;
|
||||
import com.nis.domain.configuration.AppBuiltInFeatureFile;
|
||||
import com.nis.domain.maat.ToMaatResult;
|
||||
import com.nis.domain.maat.ToMaatResult.ResponseData;
|
||||
import com.nis.domain.specific.SpecificServiceCfg;
|
||||
import com.nis.exceptions.CallExternalProceduresException;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
import com.nis.util.CodeDicUtils;
|
||||
import com.nis.util.ConfigServiceUtil;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DictUtils;
|
||||
import com.nis.util.FileUtils;
|
||||
import com.nis.util.JsonMapper;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.web.controller.BaseController;
|
||||
import com.nis.web.dao.configuration.AppBuiltInFeatureDao;
|
||||
import com.nis.web.dao.dashboard.codedic.CodeResult;
|
||||
import com.nis.web.security.UserUtils;
|
||||
|
||||
@@ -1135,4 +1150,126 @@ public class AppCfgController extends BaseController {
|
||||
}
|
||||
return "redirect:" + adminPath +"/app/topicDomainCfgList?functionId="+functionId;
|
||||
}
|
||||
|
||||
|
||||
/**********************内置APP特征文件上传*******************************/
|
||||
@RequestMapping(value = {"/appBuiltinFeatureFileForm"})
|
||||
@RequiresPermissions(value={"app:built_in_file:config"})
|
||||
public String from(Model model,
|
||||
HttpServletRequest request,
|
||||
HttpServletResponse response,
|
||||
String ids,
|
||||
@ModelAttribute("cfg")AppBuiltInFeatureFile cfg
|
||||
,RedirectAttributes redirectAttributes){
|
||||
if(cfg == null){
|
||||
cfg=new AppBuiltInFeatureFile();
|
||||
}
|
||||
if(!StringUtil.isEmpty(ids)){
|
||||
cfg = appBuiltInFeatureService.getAppBuiltInFeatureFile(Long.valueOf(ids),-1);
|
||||
initFormCondition(model, cfg);
|
||||
model.addAttribute("isAdd", false);
|
||||
}else{
|
||||
initFormCondition(model, cfg);
|
||||
model.addAttribute("isAdd", true);
|
||||
}
|
||||
|
||||
model.addAttribute("_cfg", cfg);
|
||||
return "/cfg/app/appBuiltinFeatureFileForm";
|
||||
}
|
||||
|
||||
@RequestMapping(value = {"/appBuiltinFeatureFileSaveOrUpdate"})
|
||||
@RequiresPermissions(value={"app:built_in_file:config"})
|
||||
public String saveOrUpdate(Model model,HttpServletRequest request,HttpServletResponse response,
|
||||
@ModelAttribute("cfg")AppBuiltInFeatureFile cfg,
|
||||
MultipartFile file,
|
||||
RedirectAttributes redirectAttributes){
|
||||
File fileD=null;
|
||||
try{
|
||||
|
||||
if(file != null) {
|
||||
String filename = file.getOriginalFilename();
|
||||
String prefix = FileUtils.getPrefix(filename, false);
|
||||
String suffix = FileUtils.getSuffix(filename, false);
|
||||
fileD = File.createTempFile("file_"+ prefix, suffix);
|
||||
file.transferTo(fileD);//复制文件
|
||||
String md5 = FileUtils.getFileMD5(fileD);
|
||||
Map<String,Object> srcMap = Maps.newHashMap();
|
||||
srcMap.put("filetype", suffix);
|
||||
srcMap.put("datatype", "dbSystem");//源文件存入数据中心
|
||||
srcMap.put("createTime",new Date());
|
||||
srcMap.put("key",prefix);
|
||||
srcMap.put("fileName", filename);
|
||||
srcMap.put("checksum", md5);
|
||||
ToMaatResult result = ConfigServiceUtil.postFileCfg(null, fileD, JsonMapper.toJsonString(srcMap));
|
||||
logger.info("APP 内置特征 文件上传响应信息:"+JsonMapper.toJsonString(result));
|
||||
String accessUrl = null;
|
||||
if(!StringUtil.isEmpty(result)){
|
||||
ResponseData data = result.getData();
|
||||
accessUrl=data.getAccessUrl();
|
||||
cfg.setFilePath(accessUrl);;
|
||||
}
|
||||
}
|
||||
appBuiltInFeatureService.saveOrUpdate(cfg);
|
||||
|
||||
addMessage(redirectAttributes,"save_success");
|
||||
}catch(Exception e){
|
||||
e.printStackTrace();
|
||||
addMessage(redirectAttributes,"save_failed");
|
||||
}
|
||||
|
||||
return "redirect:" + adminPath +"/app/appBuiltinFeatureFileList?functionId="+cfg.getFunctionId();
|
||||
}
|
||||
|
||||
@RequestMapping(value = {"/appBuiltinFeatureFileList"})
|
||||
public String list(Model model,HttpServletRequest request,HttpServletResponse response
|
||||
,@ModelAttribute("cfg")AppBuiltInFeatureFile entity
|
||||
,RedirectAttributes redirectAttributes){
|
||||
Page<AppBuiltInFeatureFile> page = appBuiltInFeatureService.findPage(new Page<AppBuiltInFeatureFile>(request, response,"r"), entity);
|
||||
model.addAttribute("page", page);
|
||||
initPageCondition(model);
|
||||
return "/cfg/app/appBuiltinFeatureFileList";
|
||||
}
|
||||
|
||||
@RequestMapping(value = {"/appBuiltinFeatureFileDelete"})
|
||||
@RequiresPermissions(value={"app:built_in_file:config"})
|
||||
public String delete(Integer isAudit,Integer isValid,String ids,Integer functionId
|
||||
,Model model,HttpServletRequest request
|
||||
,HttpServletResponse response
|
||||
,RedirectAttributes redirectAttributes){
|
||||
if(!StringUtil.isEmpty(ids)){
|
||||
appBuiltInFeatureService.delete(isAudit,isValid,ids,functionId);
|
||||
}
|
||||
|
||||
return "redirect:" + adminPath +"/app/appBuiltinFeatureFileList?functionId="+functionId;
|
||||
}
|
||||
|
||||
@RequestMapping(value = {"/audit"})
|
||||
@RequiresPermissions(value={"app:built_in_file:confirm"})
|
||||
public String audit(Integer isAudit,Integer isValid,String ids,Integer functionId,
|
||||
RedirectAttributes redirectAttributes) {
|
||||
if(!StringUtil.isEmpty(ids)){
|
||||
String[] idArray = ids.split(",");
|
||||
Date auditTime=new Date();
|
||||
for(String id :idArray){
|
||||
try {
|
||||
appBuiltInFeatureService.audit(isAudit,isValid,functionId,id,auditTime);
|
||||
} catch (MaatConvertException e) {
|
||||
addMessage(redirectAttributes, e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return "redirect:" + adminPath +"/app/appBuiltinFeatureFileList?functionId="+functionId;
|
||||
}
|
||||
@ResponseBody
|
||||
@RequestMapping(value = "/validCfgId")
|
||||
public boolean validCfgId(Long cfgId) {
|
||||
AppBuiltInFeatureFile dns=appBuiltInFeatureService.getAppBuiltInFeatureFile(cfgId,null);
|
||||
if(dns == null ){
|
||||
return false;
|
||||
}else{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -22,10 +22,12 @@ import com.nis.domain.Page;
|
||||
import com.nis.domain.PageLog;
|
||||
import com.nis.domain.log.DkBehaviorLog;
|
||||
import com.nis.domain.maat.LogRecvData;
|
||||
import com.nis.util.CodeDicUtils;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DictUtils;
|
||||
import com.nis.util.httpclient.HttpClientUtil;
|
||||
import com.nis.web.controller.BaseController;
|
||||
import com.nis.web.dao.dashboard.codedic.CodeResult;
|
||||
|
||||
@Controller
|
||||
@RequestMapping(value = "${adminPath}/log/manipulation/dkbehaviorLogs")
|
||||
@@ -42,19 +44,45 @@ public class DkBehaviorLogController extends BaseController{
|
||||
*/
|
||||
@RequestMapping(value={"list",""})
|
||||
public String list(Model model,@ModelAttribute("log")DkBehaviorLog entry,HttpServletRequest request, HttpServletResponse response) throws ClientProtocolException, IOException {
|
||||
|
||||
try {
|
||||
|
||||
PageLog<DkBehaviorLog> page = new PageLog<DkBehaviorLog>(request, response);
|
||||
Map<String, Object> params=new HashMap<>();
|
||||
String searchService=null;
|
||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(entry.getFunctionId());
|
||||
model.addAttribute("serviceList", serviceList);
|
||||
if(entry.getAction()!=null){
|
||||
for(FunctionServiceDict service:serviceList){
|
||||
if(service.getAction().intValue()==entry.getAction().intValue()){
|
||||
searchService=service.getServiceId().toString();
|
||||
}
|
||||
}
|
||||
}else{
|
||||
for(int i=0;i<serviceList.size();i++){
|
||||
if(serviceList.get(i).getServiceId()!=32 && serviceList.get(i).getServiceId()!=128){
|
||||
searchService = serviceList.get(i).getServiceId().toString();
|
||||
entry.setAction(serviceList.get(i).getAction());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
params.put("searchService", searchService);
|
||||
params.put("pageSize", page.getPageSize());
|
||||
params.put("pageNo", page.getPageNo());
|
||||
//查询值判断
|
||||
initLogSearchValue(entry,params);
|
||||
|
||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(entry.getFunctionId());
|
||||
model.addAttribute("serviceList", serviceList);
|
||||
|
||||
//获取字典信息
|
||||
List<CodeResult> protocolList=CodeDicUtils.getCodeList("protocolCode");
|
||||
List<CodeResult> osList=CodeDicUtils.getCodeList("osCode");
|
||||
List<CodeResult> browserList=CodeDicUtils.getCodeList("browserCode");
|
||||
List<CodeResult> behaviorList=CodeDicUtils.getCodeList("behaviorCode");
|
||||
List<CodeResult> appList=CodeDicUtils.getCodeList("appCode");
|
||||
model.addAttribute("protocolList", protocolList);
|
||||
model.addAttribute("osList", osList);
|
||||
model.addAttribute("browserList", browserList);
|
||||
model.addAttribute("behaviorList", behaviorList);
|
||||
model.addAttribute("appList", appList);
|
||||
String url = "";
|
||||
url = Constants.LOG_BASE_URL+Constants.NTC_DKBEHAVIOR_LOG;
|
||||
String jsonString = HttpClientUtil.getMsg(url,params,request);
|
||||
@@ -81,4 +109,5 @@ public class DkBehaviorLogController extends BaseController{
|
||||
return "/log/manipulation/dkBehaviorList";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.nis.web.dao.configuration;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import com.nis.domain.configuration.AppBuiltInFeatureFile;
|
||||
import com.nis.domain.configuration.DnsResStrategy;
|
||||
import com.nis.domain.configuration.PxyObjKeyring;
|
||||
import com.nis.web.dao.CrudDao;
|
||||
import com.nis.web.dao.MyBatisDao;
|
||||
|
||||
@MyBatisDao
|
||||
public interface AppBuiltInFeatureDao extends CrudDao< AppBuiltInFeatureFile> {
|
||||
List<AppBuiltInFeatureFile> findPage( AppBuiltInFeatureFile entity);
|
||||
List<AppBuiltInFeatureFile> findList(@Param("cfgId")Long cfgId
|
||||
,@Param("isAudit")Integer isAudit
|
||||
,@Param("isValid")Integer isValid);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,260 @@
|
||||
<?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.AppBuiltInFeatureDao" >
|
||||
|
||||
<resultMap id="AppBuiltInFeatureFileMap" type="com.nis.domain.configuration.AppBuiltInFeatureFile" >
|
||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
||||
<result column="file_path" property="filePath" jdbcType="VARCHAR" />
|
||||
<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="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="compile_id" property="compileId" jdbcType="INTEGER" />
|
||||
</resultMap>
|
||||
<sql id="AppBuiltInFeatureFileColumns">
|
||||
r.cfg_id,r.cfg_desc
|
||||
, r.file_path
|
||||
,r.cfg_type,r.action
|
||||
,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.is_area_effective,r.classify,r.attribute,r.lable
|
||||
,r.area_effective_ids,r.function_id,r.cfg_region_code,r.compile_id
|
||||
</sql>
|
||||
|
||||
<!-- 查出所有 有效数据-->
|
||||
<select id="findPage" resultMap="AppBuiltInFeatureFileMap">
|
||||
SELECT
|
||||
<include refid="AppBuiltInFeatureFileColumns"/>
|
||||
<trim prefix="," prefixOverrides=",">
|
||||
,s.name as creator_name,e.name as editor_name,u.name as auditor_name
|
||||
</trim>
|
||||
FROM app_builtin_feature_file 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
|
||||
<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="compileId != null">
|
||||
AND r.compile_id=#{compileId,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="cfgDesc != null and cfgDesc != ''">
|
||||
AND r.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%')
|
||||
</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="editorName != null and editorName != ''">
|
||||
AND r.EDITOR_NAME like concat(concat('%',#{editorName,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="auditorName != null and auditorName != ''">
|
||||
AND AUDITOR_NAME like concat(concat('%',#{auditorName,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="serviceId != null">
|
||||
AND r.SERVICE_ID=#{serviceId,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="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="findList" resultMap="AppBuiltInFeatureFileMap">
|
||||
SELECT
|
||||
<include refid="AppBuiltInFeatureFileColumns"/>
|
||||
FROM app_builtin_feature_file r
|
||||
<where>
|
||||
<if test="isValid == -1">
|
||||
AND r.is_valid !=-1
|
||||
</if>
|
||||
<if test="isValid == 1">
|
||||
AND r.is_valid =1
|
||||
</if>
|
||||
<if test="isValid == 0">
|
||||
AND r.is_valid =0
|
||||
</if>
|
||||
<if test="isAudit == 0">
|
||||
AND r.is_audit =0
|
||||
</if>
|
||||
<if test="isAudit == 1">
|
||||
AND r.is_audit =1
|
||||
</if>
|
||||
<if test="cfgType != null">
|
||||
AND r.cfg_type =#{cfgType,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="cfgId != null">
|
||||
AND r.CFG_ID=#{cfgId,jdbcType=BIGINT}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<insert id="insert" parameterType="com.nis.domain.configuration.AppBuiltInFeatureFile" >
|
||||
insert into app_builtin_feature_file (
|
||||
CFG_ID,
|
||||
CFG_DESC,
|
||||
ACTION,
|
||||
IS_VALID,
|
||||
IS_AUDIT,
|
||||
CREATOR_ID,
|
||||
CREATE_TIME,
|
||||
EDITOR_ID,
|
||||
EDIT_TIME,
|
||||
AUDITOR_ID,
|
||||
AUDIT_TIME,
|
||||
SERVICE_ID,
|
||||
REQUEST_ID,
|
||||
IS_AREA_EFFECTIVE,
|
||||
CLASSIFY,
|
||||
ATTRIBUTE,
|
||||
LABLE,
|
||||
AREA_EFFECTIVE_IDS,
|
||||
function_id,
|
||||
file_path,
|
||||
cfg_type,
|
||||
compile_Id,
|
||||
cfg_region_code
|
||||
)values (
|
||||
#{cfgId,jdbcType=VARCHAR},
|
||||
#{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},
|
||||
#{isAreaEffective,jdbcType=INTEGER},
|
||||
#{classify,jdbcType=VARCHAR},
|
||||
#{attribute,jdbcType=VARCHAR},
|
||||
#{lable,jdbcType=VARCHAR},
|
||||
#{areaEffectiveIds,jdbcType=VARCHAR},
|
||||
#{functionId,jdbcType=INTEGER},
|
||||
#{filePath, jdbcType=VARCHAR},
|
||||
#{cfgType,jdbcType=VARCHAR},
|
||||
#{compileId,jdbcType=INTEGER},
|
||||
#{cfgRegionCode,jdbcType=INTEGER}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="update" parameterType="com.nis.domain.configuration.AppBuiltInFeatureFile" >
|
||||
update app_builtin_feature_file
|
||||
<set >
|
||||
<trim suffixOverrides=",">
|
||||
<if test="cfgDesc != null and cfgDesc != ''" >
|
||||
cfg_desc = #{cfgDesc,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="compileId != null " >
|
||||
compile_Id = #{compileId,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="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="filePath != null" >
|
||||
file_path = #{filePath,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</set>
|
||||
<where>
|
||||
and cfg_id = #{cfgId,jdbcType=INTEGER}
|
||||
<if test="functionId != null" >
|
||||
and function_id = #{functionId,jdbcType=INTEGER}
|
||||
</if>
|
||||
</where>
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,171 @@
|
||||
package com.nis.web.service.configuration;
|
||||
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
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.configuration.AppBuiltInFeatureFile;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
import com.nis.util.ConfigServiceUtil;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.web.dao.configuration.AppBuiltInFeatureDao;
|
||||
import com.nis.web.security.UserUtils;
|
||||
import com.nis.web.service.BaseService;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 内置文件
|
||||
* @author dell
|
||||
*
|
||||
*/
|
||||
@Service
|
||||
public class AppBuiltInFeatureService extends BaseService{
|
||||
@Autowired
|
||||
protected AppBuiltInFeatureDao appBuiltInFeatureDao;
|
||||
|
||||
|
||||
/**
|
||||
* 查询分页数据
|
||||
* @param page 分页对象
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
public Page<AppBuiltInFeatureFile> findPage(Page<AppBuiltInFeatureFile> page, AppBuiltInFeatureFile entity) {
|
||||
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"r"));
|
||||
entity.setPage(page);
|
||||
List<AppBuiltInFeatureFile> list=appBuiltInFeatureDao.findPage(entity);
|
||||
page.setList(list);
|
||||
return page;
|
||||
}
|
||||
public List<AppBuiltInFeatureFile> findAppBuiltInFeatureFiles(Long cfgId,Integer isValid,Integer isAudit,String cfgType) {
|
||||
List<AppBuiltInFeatureFile> list=appBuiltInFeatureDao.findList(cfgId,isValid,isAudit);
|
||||
return list;
|
||||
}
|
||||
|
||||
public AppBuiltInFeatureFile getAppBuiltInFeatureFile(Long id,Integer isValid) {
|
||||
List<AppBuiltInFeatureFile> list=appBuiltInFeatureDao.findList(id,isValid,null);
|
||||
AppBuiltInFeatureFile dnsResStrategy=null;
|
||||
if(list != null && list.size()>0){
|
||||
dnsResStrategy=list.get(0);
|
||||
}
|
||||
return dnsResStrategy;
|
||||
}
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void saveOrUpdate(AppBuiltInFeatureFile entity){
|
||||
Date createTime=new Date();
|
||||
setAreaEffectiveIds(entity);
|
||||
entity.setIsValid(1);
|
||||
entity.setIsAudit(1);
|
||||
//新增
|
||||
if(StringUtil.isEmpty(entity.getCfgId())){
|
||||
entity.initDefaultValue();
|
||||
entity.setCreatorId(UserUtils.getUser().getId());
|
||||
entity.setCreateTime(createTime);
|
||||
/*//调用服务接口获取compileId
|
||||
List<Integer> compileIds = new ArrayList<Integer>();
|
||||
try {
|
||||
compileIds = ConfigServiceUtil.getId(1,1);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.info("获取编译ID出错");
|
||||
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>:"+e.getMessage());
|
||||
}
|
||||
if(compileIds != null && compileIds.size() >0 && compileIds.get(0) != 0){
|
||||
entity.setCompileId(compileIds.get(0));
|
||||
}*/
|
||||
appBuiltInFeatureDao.insert(entity);
|
||||
//修改
|
||||
}else{
|
||||
Date editTime=new Date();
|
||||
entity.setEditorId(UserUtils.getUser().getId());
|
||||
entity.setEditTime(editTime);
|
||||
|
||||
appBuiltInFeatureDao.update(entity);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param isAudit
|
||||
* @param isValid
|
||||
* @param ids compileIds
|
||||
*/
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void delete(Integer isAudit,Integer isValid,String ids,Integer functionId){
|
||||
AppBuiltInFeatureFile entity = new AppBuiltInFeatureFile();
|
||||
String[] idArray = ids.split(",");
|
||||
for(String id :idArray){
|
||||
entity.setCfgId(Long.valueOf(id));
|
||||
entity.setFunctionId(functionId);
|
||||
entity.setIsAudit(isAudit);
|
||||
entity.setIsValid(isValid);
|
||||
entity.setEditorId(UserUtils.getUser().getId());
|
||||
entity.setEditTime(new Date());
|
||||
appBuiltInFeatureDao.update(entity);
|
||||
}
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param isAudit
|
||||
* @param isValid
|
||||
* @param ids cfgId
|
||||
* @param functionId
|
||||
*/
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void audit(Integer isAudit,Integer isValid,Integer functionId,String id,Date auditTime){
|
||||
AppBuiltInFeatureFile cfg=new AppBuiltInFeatureFile();
|
||||
cfg.setCfgId(Long.valueOf(id));
|
||||
cfg.setIsValid(isValid);
|
||||
cfg.setIsAudit(isAudit);
|
||||
cfg.setEditTime(auditTime);
|
||||
cfg.setEditorId(UserUtils.getUser().getId());
|
||||
cfg.setAuditorId(UserUtils.getUser().getId());
|
||||
cfg.setAuditTime(auditTime);
|
||||
appBuiltInFeatureDao.update(cfg);
|
||||
/*cfg=getAppBuiltInFeatureFile(cfg.getCfgId(), null);
|
||||
String json="";
|
||||
if(cfg.getIsAudit()==1){
|
||||
List<ProxyObjKeyring> resStrategyList=new ArrayList<ProxyObjKeyring>();
|
||||
ProxyObjKeyring resStrategy=convertCallBackProxyObjKeyring(cfg);
|
||||
resStrategyList.add(resStrategy);
|
||||
//调用服务接口下发配置数据
|
||||
json=gsonToJson(resStrategyList);
|
||||
logger.info("拦截策略配置下发配置参数:"+json);
|
||||
//调用服务接口下发配置
|
||||
try {
|
||||
ToMaatResult result = ConfigServiceUtil.postCallbackCfg(json);
|
||||
if(result!=null){
|
||||
logger.info("拦截策略配置下发响应信息:"+result.getMsg());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("拦截策略配置配置下发失败",e);
|
||||
throw e;
|
||||
}
|
||||
}else if(cfg.getIsAudit()==3){
|
||||
List<ProxyObjKeyring> resStrategyList=new ArrayList<>();
|
||||
ProxyObjKeyring ntcAppBuiltInFeatureFile=convertCallBackProxyObjKeyring(cfg);
|
||||
resStrategyList.add(ntcAppBuiltInFeatureFile);
|
||||
//调用服务接口取消配置
|
||||
json=gsonToJson(resStrategyList);
|
||||
logger.info("拦截策略配置配置参数:"+json);
|
||||
//调用服务接口取消配置
|
||||
try {
|
||||
ToMaatResult result = ConfigServiceUtil.put(json, 2);
|
||||
logger.info("拦截策略配置响应信息:"+result.getMsg());
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.info("拦截策略配置配置失败");
|
||||
throw e;
|
||||
}
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1108,8 +1108,8 @@ intermediate=\u4E2D\u95F4\u8BC1\u4E66
|
||||
end_entity=\u5B9E\u4F53\u8BC1\u4E66
|
||||
keyring_name=\u79D8\u94A5\u5BF9\u540D\u79F0
|
||||
keyring_type=\u8BC1\u4E66\u7C7B\u578B
|
||||
private_key_file=\u79C1\u94A5\u8DEF\u5F84
|
||||
public_key_file=\u516C\u94A5\u8DEF\u5F84
|
||||
private_key_file=\u79C1\u94A5\u6587\u4EF6
|
||||
public_key_file=\u516C\u94A5\u6587\u4EF6
|
||||
header=\u5173\u952E\u5B57
|
||||
layer=\u5339\u914D\u533A\u57DF
|
||||
expire_after=\u518D\u6B21\u9881\u53D1\u6709\u6548\u671F
|
||||
|
||||
@@ -0,0 +1,163 @@
|
||||
<%@ 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">
|
||||
$(function(){
|
||||
$("#fileInfo,#uploadFile").on('click', function() {
|
||||
$("#file").trigger("click");
|
||||
});
|
||||
$("#file").on('change', function() {
|
||||
$("#fileInfo").val($("#file").val());
|
||||
});
|
||||
$("#cfgFrom").validate({
|
||||
errorPlacement: function(error,element){
|
||||
if($(element).parents().hasClass("tagsinput")){
|
||||
$(element).parents(".col-md-6").next("div").append(error);
|
||||
}else{
|
||||
$(element).parents(".form-group").find("div[for='"+element.attr("name")+"']").append(error);
|
||||
}
|
||||
},
|
||||
submitHandler: function(form){
|
||||
|
||||
|
||||
var file = $("#file").val();
|
||||
var fileInfo = $("#fileInfo").val();
|
||||
if((file==null||file=="") && (fileInfo==null || fileInfo=="")){
|
||||
$("div[for='fileInfo']").append("<label id='level-error' class='error' for='file'><spring:message code='required'></spring:message></label>");
|
||||
return false;
|
||||
}else{
|
||||
loading('onloading...');
|
||||
form.submit();
|
||||
}
|
||||
},
|
||||
errorContainer: "#messageBox"
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="page-content">
|
||||
<h3 class="page-title">
|
||||
<spring:message code="app_built_in_features_config"></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>
|
||||
<c:if test="${isAdd eq true}"><spring:message code="add"></spring:message></c:if>
|
||||
<c:if test="${isAdd eq false}"><spring:message code="edit"></spring:message></c:if>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body form">
|
||||
<!-- BEGIN FORM-->
|
||||
<form id="cfgFrom" action="${ctx}/app/appBuiltinFeatureFileSaveOrUpdate" method="post" enctype="multipart/form-data" class="form-horizontal">
|
||||
<input type="hidden" name="functionId" value="${_cfg.functionId}">
|
||||
<input type="hidden" id="compileId" name="compileId" value="${_cfg.compileId}">
|
||||
<input type="hidden" id="cfgId" name="cfgId" value="${_cfg.cfgId}">
|
||||
<input type="hidden" id="isAreaEffective" name="isAreaEffective" value="0">
|
||||
<input type="hidden" id="isAdd" name="isAdd" value="${isAdd}">
|
||||
<!-- 配置域类型 -->
|
||||
<c:forEach items="${regionList}" var="region">
|
||||
<c:if test="${_cfg.functionId eq region.functionId}">
|
||||
<input type="hidden" name="cfgRegionCode" value="${region.configRegionCode}">
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<c:forEach items="${serviceList}" var="service">
|
||||
<c:if test="${_cfg.functionId eq service.functionId}">
|
||||
<input type="hidden" name="serviceId" value="${service.serviceId}">
|
||||
<input type="hidden" name="action" value="${service.action}">
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<div class="form-body">
|
||||
<div class="row">
|
||||
<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>
|
||||
<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="desc"/></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control required" type="text" name="cfgDesc" value="${_cfg.cfgDesc}">
|
||||
</div>
|
||||
<div for="cfgDesc"></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="file" /></label>
|
||||
<div class="col-md-6">
|
||||
<input id="file" name="file" type="file"
|
||||
style="width: 330px; display: none" />
|
||||
<div class="input-group">
|
||||
<input id="fileInfo" name="fileInfo" readonly="readonly"
|
||||
data-msg-required=""
|
||||
placeholder="<spring:message code="select_file"/>"
|
||||
class="required form-control"
|
||||
style="background-color: transparent" aria-required="true"
|
||||
type="text" value="${_cfg.filePath }">
|
||||
|
||||
<div class="input-group-btn">
|
||||
<a id="uploadFile" class="btn btn-default btn-search"
|
||||
href="javascript:" style=""><i class="fa fa-search"></i></a>
|
||||
</div>
|
||||
<input id="filePath" name="filePath" type="hidden" value="${_cfg.filePath }"/>
|
||||
</div>
|
||||
</div>
|
||||
<div for="fileInfo"></div>
|
||||
</div>
|
||||
</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>
|
||||
@@ -0,0 +1,368 @@
|
||||
<%@ 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.cfgDesc}"){
|
||||
$("#intype").val("${cfg.cfgDesc}");
|
||||
}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();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="page-content">
|
||||
<div class="theme-panel hidden-xs hidden-sm">
|
||||
|
||||
<shiro:hasPermission name="app:built_in_file:config">
|
||||
<button type="button" class="btn btn-primary"
|
||||
onClick="javascript:window.location='${ctx}/app/appBuiltinFeatureFileForm?functionId=${cfg.functionId}'">
|
||||
<i class="fa fa-plus"></i>
|
||||
<spring:message code="add"></spring:message></button>
|
||||
</shiro:hasPermission>
|
||||
</div>
|
||||
|
||||
<h3 class="page-title">
|
||||
<spring:message code="app_built_in_features_config"></spring:message>
|
||||
</h3>
|
||||
<h5 class="page-header"></h5>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet">
|
||||
<div class="portlet-body">
|
||||
<div class="row" >
|
||||
<form:form id="searchForm" modelAttribute="cfg" action="${ctx}/app/appBuiltinFeatureFileList?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="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='state'/></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="cfgDesc"><spring:message code="desc"></spring:message></form:option>
|
||||
</form:select>
|
||||
|
||||
</div>
|
||||
|
||||
<input id="intype" class="form-control input-medium" type="text" value="">
|
||||
|
||||
</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="app:built_in_file:config">
|
||||
<sys:delRow url="${ctx}/app/appBuiltinFeatureFileForm" id="contentTable" label="update"></sys:delRow>
|
||||
<sys:delRow url="${ctx}/app/appBuiltinFeatureFileDelete?isValid=-1&functionId=${cfg.functionId }" 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-3">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label"><spring:message code='request_number'/></label>
|
||||
<c:set var="select"><spring:message code='select'/></c:set>
|
||||
<form:select path="requestId" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<c:forEach items="${requestInfos}" var="requestInfo" >
|
||||
<form:option value="${requestInfo.id}"><spring:message code="${requestInfo.requestTitle}"></spring:message></form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label"><spring:message code='type'/></label>
|
||||
<form:select path="classify" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<c:forEach items="${fls}" var="fl" >
|
||||
<form:option value="${fl.serviceDictId}"><spring:message code="${fl.itemValue}"></spring:message></form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label"><spring:message code='attribute'/></label>
|
||||
<c:set var="select"><spring:message code='select'/></c:set>
|
||||
<form:select path="attribute" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<c:forEach items="${xzs}" var="xz" >
|
||||
<form:option value="${xz.serviceDictId}"><spring:message code="${xz.itemValue}"></spring:message></form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label"><spring:message code='label'/></label>
|
||||
<form:select path="lable" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<c:forEach items="${lables}" var="lable" >
|
||||
<form:option value="${lable.serviceDictId}"><spring:message code="${lable.itemValue}"></spring:message></form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
--%>
|
||||
<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>
|
||||
<div class="table-responsive">
|
||||
<sys:message content="${message}" />
|
||||
<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="seq"/></th> --%>
|
||||
<th><spring:message code="desc"/></th>
|
||||
<th><spring:message code="file"/></th>
|
||||
<%-- <th><spring:message code="is_audit"/></th> --%>
|
||||
<%-- <th><spring:message code="whether_area_block"/></th> --%>
|
||||
<%-- <th><spring:message code="letter"/></th>
|
||||
<th><spring:message code="classification"/></th>
|
||||
<th><spring:message code="attribute"/></th>
|
||||
<th><spring:message code="label"/></th> --%>
|
||||
<th><spring:message code="valid_identifier"/></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> --%>
|
||||
<%-- <th><spring:message code="auditor"/></th>
|
||||
<th class="sort-column r.audit_time"><spring:message code="audit_time"/></th> --%>
|
||||
<%-- <th><spring:message code="operation"></spring:message></th> --%>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:forEach items="${page.list }" var="cfg" varStatus="status" step="1">
|
||||
<tr>
|
||||
<td>
|
||||
<input type="checkbox" class="i-checks" serviceId="${cfg.serviceId}" id="${cfg.cfgId}" value="${cfg.isAudit}">
|
||||
</td>
|
||||
<td>${cfg.cfgDesc }</td>
|
||||
<td>
|
||||
<a href="${cfg.filePath }" target="_blank" data-original-title="${cfg.filePath }"
|
||||
class="tooltips" data-flag="false" data-html="true" data-placement="top">
|
||||
${fn:substring(cfg.filePath,0,20) }
|
||||
</a>
|
||||
</td>
|
||||
<%-- <td>
|
||||
<c:choose>
|
||||
<c:when test="${cfg.isAudit eq '0'}"><span class="label label-danger"><spring:message code="created"></spring:message></span></c:when>
|
||||
<c:when test="${cfg.isAudit eq '1'}"><span class="label label-success"><spring:message code="approved"></spring:message></span></c:when>
|
||||
<c:when test="${cfg.isAudit eq '2'}"><span class="label label-warning"><spring:message code="unapproved"></spring:message></span></c:when>
|
||||
<c:when test="${cfg.isAudit eq '3'}"><span class="label label-warning"><spring:message code="cancel_approved"></spring:message></span></c:when>
|
||||
</c:choose>
|
||||
</td> --%>
|
||||
<%-- <td>${cfg.requestName }</td>
|
||||
<td >
|
||||
<c:set var="classify"></c:set>
|
||||
<c:forEach items="${fn:split(cfg.classify,',')}" var="classifyId" varStatus="status">
|
||||
<c:forEach items="${fls}" var="fl">
|
||||
<c:if test="${classifyId eq fn:trim(fl.serviceDictId)}">
|
||||
<c:if test="${status.index+1 eq 1}">
|
||||
<c:set var="classify" value="${fl.itemValue}"></c:set>
|
||||
</c:if>
|
||||
<c:if test="${status.index+1 ne 1}">
|
||||
<c:set var="classify" value="${classify},${fl.itemValue}"></c:set>
|
||||
</c:if>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
<a href="javascript:;" data-original-title="${classify}"
|
||||
class="tooltips" data-flag="false" data-html="true" data-placement="top">
|
||||
${fns:abbr(classify,20)}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<c:set var="attribute"></c:set>
|
||||
<c:forEach items="${fn:split(cfg.attribute,',')}" var="attributeId" varStatus="status">
|
||||
<c:forEach items="${xzs}" var="xz">
|
||||
<c:if test="${attributeId eq fn:trim(xz.serviceDictId)}">
|
||||
<c:if test="${status.index+1 eq 1}">
|
||||
<c:set var="attribute" value="${xz.itemValue}"></c:set>
|
||||
</c:if>
|
||||
<c:if test="${status.index+1 ne 1}">
|
||||
<c:set var="attribute" value="${attribute},${xz.itemValue}"></c:set>
|
||||
</c:if>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
<a href="javascript:;" data-original-title="${attribute}"
|
||||
class="tooltips" data-flag="false" data-html="true" data-placement="top">
|
||||
${fns:abbr(attribute,20)}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<c:set var="lableInfo"></c:set>
|
||||
<c:forEach items="${fn:split(cfg.lable,',')}" var="lableId" varStatus="status">
|
||||
<c:forEach items="${lables}" var="lable">
|
||||
<c:if test="${lableId eq fn:trim(lable.serviceDictId)}">
|
||||
<c:if test="${status.index+1 eq 1}">
|
||||
<c:set var="lableInfo" value="${lable.itemValue}"></c:set>
|
||||
</c:if>
|
||||
<c:if test="${status.index+1 ne 1}">
|
||||
<c:set var="lableInfo" value="${lableInfo},${lable.itemValue}"></c:set>
|
||||
</c:if>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
<a href="javascript:;" data-original-title="${lableInfo}"
|
||||
class="tooltips" data-flag="false" data-html="true" data-placement="top">
|
||||
${fns:abbr(lableInfo,20)}
|
||||
</a>
|
||||
</td> --%>
|
||||
<%-- <td>${cfg.areaEffectiveIds }</td> --%>
|
||||
<td>
|
||||
<c:if test="${cfg.isValid==0}"><spring:message code="no"/></c:if>
|
||||
<c:if test="${cfg.isValid==1}"><spring:message code="yes"/></c:if>
|
||||
<c:if test="${cfg.isValid==-1}"><spring:message code="deleted"/></c:if>
|
||||
</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> --%>
|
||||
<%-- <td>${cfg.auditorName }</td>
|
||||
<td><fmt:formatDate value="${cfg.auditTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td> --%>
|
||||
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="page">${page}</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -315,7 +315,7 @@
|
||||
<th><input type="checkbox" class="i-checks" id="checkAll"></th>
|
||||
<th style="display: none"><spring:message code="cfg_id"/></th>
|
||||
<th class="cfgDesc"><spring:message code="config_describe"/></th>
|
||||
<th><spring:message code="rate_limit"/></th>
|
||||
<th><spring:message code="ratelimit"/></th>
|
||||
<th><spring:message code="certificate"/></th>
|
||||
<c:if test="${interceptType eq 'Ip' }">
|
||||
<th><spring:message code="replace_zone"/></th>
|
||||
|
||||
@@ -184,7 +184,7 @@ var switchKeyringType=function(){
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font
|
||||
color="red">*</font> <spring:message code="file" /></label>
|
||||
color="red">*</font> <spring:message code="public_key_file" /></label>
|
||||
<div class="col-md-6">
|
||||
<input id="publicKeyFileI" name="publicKeyFileI" type="file"
|
||||
style="width: 330px; display: none" />
|
||||
@@ -209,7 +209,7 @@ var switchKeyringType=function(){
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font
|
||||
color="red">*</font> <spring:message code="file" /></label>
|
||||
color="red">*</font> <spring:message code="private_key_file" /></label>
|
||||
<div class="col-md-6">
|
||||
<input id="privateKeyFileI" name="privateKeyFileI" type="file"
|
||||
style="width: 330px; display: none" />
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
//筛选功能
|
||||
filterActionInit();
|
||||
|
||||
//reset
|
||||
$("#resetBtn").on("click",function(){
|
||||
$("select.selectpicker").each(function(){
|
||||
@@ -20,7 +19,8 @@ $(document).ready(function(){
|
||||
.attr("value",'');
|
||||
$("#searchForm")[0].reset();
|
||||
});
|
||||
|
||||
//筛选功能
|
||||
filterActionInit();
|
||||
});
|
||||
|
||||
</script>
|
||||
@@ -58,24 +58,19 @@ $(document).ready(function(){
|
||||
<!-- 搜索内容与操作按钮栏 -->
|
||||
<div class="col-md-12">
|
||||
<div class="pull-left">
|
||||
<select path="action" class="selectpicker select2 input-small">
|
||||
<option value=""><spring:message code="action"/></option>
|
||||
<c:forEach items="${serviceList}" var="service"
|
||||
<form:select path="action" class="selectpicker select2 input-small">
|
||||
<%-- <form:option value=""><spring:message code="action"/></form:option>
|
||||
--%> <c:forEach items="${serviceList}" var="service"
|
||||
varStatus="satus">
|
||||
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
|
||||
<c:if test="${(dict.itemCode eq service.action) && (service.action ne 128) && (service.action ne 32)}"> --%>
|
||||
<option value="${dict.itemCode}"
|
||||
<c:if test="${log.action eq dict.itemCode}">
|
||||
selected
|
||||
</c:if>
|
||||
>
|
||||
<spring:message code="${dict.itemValue}"/>
|
||||
</option>
|
||||
<c:if test="${(dict.itemCode eq service.action) && (service.action ne 128) && (service.action ne 32)}">
|
||||
<form:option value="${dict.itemCode}"><spring:message code="${dict.itemValue}"/></form:option>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
<div class="pull-left">
|
||||
<div class="input-group">
|
||||
<div class="input-group-btn">
|
||||
@@ -232,35 +227,35 @@ $(document).ready(function(){
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<c:forEach items="${fns:getCodeList('protocolCode')}" var="dict">
|
||||
<c:forEach items="${protocolList}" var="dict">
|
||||
<c:if test="${dict.code eq log.labelProtoId}">
|
||||
<spring:message code="${dict.item}"/>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td>
|
||||
<c:forEach items="${fns:getCodeList('osCode')}" var="dict">
|
||||
<c:forEach items="${osList}" var="dict">
|
||||
<c:if test="${dict.code eq log.labelOsId}">
|
||||
<spring:message code="${dict.item}"/>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td>
|
||||
<c:forEach items="${fns:getCodeList('browserCode')}" var="dict">
|
||||
<c:forEach items="${browserList}" var="dict">
|
||||
<c:if test="${dict.code eq log.labelBsId}">
|
||||
<spring:message code="${dict.item}"/>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td>
|
||||
<c:forEach items="${fns:getCodeList('behaviorCode')}" var="dict">
|
||||
<c:forEach items="${behaviorList}" var="dict">
|
||||
<c:if test="${dict.code eq log.labelBehavId}">
|
||||
<spring:message code="${dict.item}"/>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td>
|
||||
<c:forEach items="${fns:getCodeList('appCode')}" var="dict">
|
||||
<c:forEach items="${appList}" var="dict">
|
||||
<c:if test="${dict.code eq log.labelAppId}">
|
||||
<spring:message code="${dict.item}"/>
|
||||
</c:if>
|
||||
|
||||
@@ -46,24 +46,18 @@
|
||||
<input id="isFilterAction" name="isFilterAction" type="hidden" value="${log.isFilterAction }"/>
|
||||
<!-- 搜索内容与操作按钮栏 -->
|
||||
<div class="col-md-12">
|
||||
<div class="pull-left">
|
||||
<select path="action" class="selectpicker select2 input-small">
|
||||
<option value=""><spring:message code="action"/></option>
|
||||
<div class="pull-left">
|
||||
<form:select path="action" class="selectpicker select2 input-small">
|
||||
<form:option value=""><spring:message code="action"/></form:option>
|
||||
<c:forEach items="${serviceList}" var="service"
|
||||
varStatus="satus">
|
||||
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
|
||||
<c:if test="${(dict.itemCode eq service.action) && (service.action ne 128) && (service.action ne 32)}"> --%>
|
||||
<option value="${dict.itemCode}"
|
||||
<c:if test="${log.action eq dict.itemCode}">
|
||||
selected
|
||||
</c:if>
|
||||
>
|
||||
<spring:message code="${dict.itemValue}"/>
|
||||
</option>
|
||||
<c:if test="${(dict.itemCode eq service.action) && (service.action ne 128) && (service.action ne 32)}">
|
||||
<form:option value="${dict.itemCode}"><spring:message code="${dict.itemValue}"/></form:option>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</form:select>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
<div class="input-group">
|
||||
|
||||
@@ -243,7 +243,7 @@
|
||||
<c:if test="${dict.itemCode==1}">
|
||||
<label class="col-md-3 control-label"><font color="red">*</font><spring:message code="app_business_type"/>:</label>
|
||||
<div class="col-md-4">
|
||||
<select id="businessType1" name="businessType" class="form-control required">
|
||||
<select id="businessType1" name="businessType" class="selectpicker form-control required" data-live-search="true" data-live-search-placeholder="search">
|
||||
<option value=""><spring:message code="select"/></option>
|
||||
<c:forEach items="${fns:getDictList('APP_BUSINESS_TYPE')}" var="dict">
|
||||
<option value="${dict.itemCode}"
|
||||
@@ -256,7 +256,7 @@
|
||||
<c:if test="${dict.itemCode==3}">
|
||||
<label class="col-md-3 control-label"><font color="red">*</font><spring:message code="basic_protocol_business_type"/>:</label>
|
||||
<div class="col-md-4">
|
||||
<select id="businessType3" name="businessType" class="form-control required">
|
||||
<select id="businessType3" name="businessType" class="selectpicker form-control required" data-live-search="true" data-live-search-placeholder="search">
|
||||
<option value=""><spring:message code="select"/></option>
|
||||
<c:forEach items="${fns:getDictList('BASIC_PROTOCOL_BUSINESS_TYPE')}" var="dict">
|
||||
<option value="${dict.itemCode}"
|
||||
@@ -269,7 +269,7 @@
|
||||
<c:if test="${dict.itemCode==2}">
|
||||
<label class="col-md-3 control-label"><font color="red">*</font><spring:message code="tunnel_behavior_business_type"/>:</label>
|
||||
<div class="col-md-4">
|
||||
<select id="businessType2" name="businessType" class="form-control required">
|
||||
<select id="businessType2" name="businessType" class="selectpicker form-control required" data-live-search="true" data-live-search-placeholder="search">
|
||||
<option value=""><spring:message code="select"/></option>
|
||||
<c:forEach items="${fns:getDictList('TUNNEL_BEHAV_BUSINESS_TYPE')}" var="dict">
|
||||
<option value="${dict.itemCode}"
|
||||
|
||||
@@ -1,4 +1,15 @@
|
||||
$(function(){
|
||||
//扩展jquery,增加全局函数
|
||||
$.ipcommon=function(){
|
||||
return {};
|
||||
}
|
||||
$.extend($.ipcommon, {
|
||||
ipType:[],
|
||||
ipPattern:[],
|
||||
portPattern:[],
|
||||
protocol:[],
|
||||
direction:[]
|
||||
});
|
||||
$("select[name$='isHexbin']").each(function(){
|
||||
setIsHexBin(this);
|
||||
});
|
||||
@@ -1389,12 +1400,14 @@ var setHexCaseSenstive=function(){
|
||||
* ip默认选项处理
|
||||
*/
|
||||
var initCommIpVal=function(){
|
||||
var regionCode,serviceType,ipPortShow,ipType,
|
||||
var action,regionCode,serviceType,ipPortShow,ipType,
|
||||
ipPattern,portPattern,direction,protocol,regionType;
|
||||
if($("input[name$='action']:checked").length>0){
|
||||
regionCode=$("input[name$='action']:checked").attr("regionCode");
|
||||
action=$("input[name$='action']:checked").val();
|
||||
}else{
|
||||
regionCode=$("input[name$='action']").attr("regionCode");
|
||||
action=$("input[name$='action']").val();
|
||||
}
|
||||
if(regionCode){
|
||||
if(regionCode.indexOf(",")==-1){
|
||||
@@ -1453,6 +1466,7 @@ var initCommIpVal=function(){
|
||||
//ip类型处理
|
||||
if(ipType){
|
||||
var arr=ipType.split(',');
|
||||
$.ipcommon.ipType=$("select[name$='ipType'] option");
|
||||
$("select[name$='ipType'] option").each(function(){
|
||||
var has=false;
|
||||
for(var type in arr){
|
||||
@@ -1465,13 +1479,16 @@ var initCommIpVal=function(){
|
||||
}
|
||||
}
|
||||
if(!has){
|
||||
$(this).attr("disabled",true);
|
||||
$(this).remove();
|
||||
}
|
||||
});
|
||||
}else{
|
||||
$.ipcommon.ipType=[];
|
||||
}
|
||||
//ip格式处理
|
||||
if(ipPattern){
|
||||
arr=ipPattern.split(',');
|
||||
$.ipcommon.ipPattern=$("select[name$='ipPattern'] option");
|
||||
$("select[name$='ipPattern'] option").each(function(){
|
||||
var has=false;
|
||||
for(var type in arr){
|
||||
@@ -1484,13 +1501,16 @@ var initCommIpVal=function(){
|
||||
}
|
||||
}
|
||||
if(!has){
|
||||
$(this).attr("disabled",true);
|
||||
$(this).remove();
|
||||
}
|
||||
});
|
||||
}else{
|
||||
$.ipcommon.ipPattern=[];
|
||||
}
|
||||
//端口格式处理
|
||||
if(portPattern){
|
||||
arr=portPattern.split(',');
|
||||
$.ipcommon.portPattern=$("select[name$='portPattern'] option");
|
||||
$("select[name$='portPattern'] option").each(function(){
|
||||
var has=false;
|
||||
for(var type in arr){
|
||||
@@ -1503,13 +1523,16 @@ var initCommIpVal=function(){
|
||||
}
|
||||
}
|
||||
if(!has){
|
||||
$(this).attr("disabled",true);
|
||||
$(this).remove();
|
||||
}
|
||||
});
|
||||
}else{
|
||||
$.ipcommon.portPattern=[];
|
||||
}
|
||||
//方向处理
|
||||
if(direction){
|
||||
arr=direction.split(',');
|
||||
$.ipcommon.direction=$("select[name$='direction'] option");
|
||||
$("select[name$='direction'] option").each(function(){
|
||||
var has=false;
|
||||
for(var type in arr){
|
||||
@@ -1522,13 +1545,16 @@ var initCommIpVal=function(){
|
||||
}
|
||||
}
|
||||
if(!has){
|
||||
$(this).attr("disabled",true);
|
||||
$(this).remove();
|
||||
}
|
||||
});
|
||||
}else{
|
||||
$.ipcommon.direction=[];
|
||||
}
|
||||
//协议处理
|
||||
if(protocol){
|
||||
arr=protocol.split(',');
|
||||
$.ipcommon.protocol=$("select[name$='protocol'] option");
|
||||
$("select[name$='protocol'] option").each(function(){
|
||||
var has=false;
|
||||
for(var type in arr){
|
||||
@@ -1541,8 +1567,10 @@ var initCommIpVal=function(){
|
||||
}
|
||||
}
|
||||
if(!has){
|
||||
$(this).attr("disabled",true);
|
||||
$(this).remove();
|
||||
}
|
||||
});
|
||||
}else{
|
||||
$.ipcommon.protocol=[];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user