Merge branch 'develop' of http://10.0.6.99/gwall/gwall.git into develop
Conflicts: src/main/resources/messages/message_en.properties
This commit is contained in:
@@ -27,6 +27,8 @@ public class AvFileSampleCfg extends BaseCfg<AvFileSampleCfg> {
|
||||
private Integer compileId;
|
||||
private String srcPath;
|
||||
private String samplePath;
|
||||
private Integer isSampleCreated;
|
||||
private String resultPath;
|
||||
|
||||
public String getSrcPath() {
|
||||
return srcPath;
|
||||
@@ -76,4 +78,17 @@ public class AvFileSampleCfg extends BaseCfg<AvFileSampleCfg> {
|
||||
public void setLevel(Integer level) {
|
||||
this.level = level;
|
||||
}
|
||||
public Integer getIsSampleCreated() {
|
||||
return isSampleCreated;
|
||||
}
|
||||
public void setIsSampleCreated(Integer isSampleCreated) {
|
||||
this.isSampleCreated = isSampleCreated;
|
||||
}
|
||||
public String getResultPath() {
|
||||
return resultPath;
|
||||
}
|
||||
public void setResultPath(String resultPath) {
|
||||
this.resultPath = resultPath;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -434,11 +434,18 @@ public final class Constants {
|
||||
public static final String AV_FILE_PATH = Configurations.getStringProperty("av_file_path", "/home/ysp/");
|
||||
public static final String AV_SAMPLE_AUDIO_REGION = Configurations.getStringProperty("av_sample_audio_region", "av_sample_audio");
|
||||
public static final String AV_SAMPLE_VEDIO_REGION = Configurations.getStringProperty("av_sample_vedio_region", "av_sample_vedio");
|
||||
public static final String AV_SAMPLE_PITURE_REGION = Configurations.getStringProperty("av_sample_pitrue_region", "av_sample_pitrue");
|
||||
public static final String AV_SAMPLE_PICTURE_REGION = Configurations.getStringProperty("av_sample_picture_region", "av_sample_picture");
|
||||
public static final String AV_SAMPLE_VOIP_REGION = Configurations.getStringProperty("av_sample_voip_region", "av_sample_voip");
|
||||
public static final String AUDIO_SAMPLE_CREATE_PROC = Configurations.getStringProperty("audio_sample_create_proc", "./audio_convert_proc");
|
||||
public static final String VEDIO_SAMPLE_CREATE_PROC = Configurations.getStringProperty("vedio_sample_create_proc", "./vedio_convert_proc");
|
||||
public static final String PICTURE_SAMPLE_CREATE_PROC = Configurations.getStringProperty("picture_sample_create_proc", "./picture_convert_proc");
|
||||
public static final boolean AUDIO_SAMPLE_PROC_PARAM_IS_QUOTATION = Configurations.getBooleanProperty("audio_sample_proc_param_is_quotation", true);
|
||||
public static final boolean VEDIO_SAMPLE_PROC_PARAM_IS_QUOTATION = Configurations.getBooleanProperty("vedio_sample_proc_param_is_quotation", true);
|
||||
public static final boolean PICTURE_SAMPLE_PROC_PARAM_IS_QUOTATION = Configurations.getBooleanProperty("picture_sample_proc_param_is_quotation", true);
|
||||
public static final boolean AUDIO_SAMPLE_PROC_PARAM_IS_TRANSLATION = Configurations.getBooleanProperty("audio_sample_proc_param_is_translation", false);
|
||||
public static final boolean VEDIO_SAMPLE_PROC_PARAM_IS_TRANSLATION = Configurations.getBooleanProperty("vedio_sample_proc_param_is_translation", false);
|
||||
public static final boolean PICTURE_SAMPLE_PROC_PARAM_IS_TRANSLATION = Configurations.getBooleanProperty("picture_sample_proc_param_is_translation", false);
|
||||
|
||||
//HTTP自定义域相关参数
|
||||
public static String HTTP_HEADER_USER_REGION_KEY=Configurations.getStringProperty("http_header_user_region_key", "HTTP_HEADER");
|
||||
public static String HTTP_HEADER_DICT_MODULE=Configurations.getStringProperty("http_header_dict_module", "REQUEST_HEADER_DISTRICT");
|
||||
|
||||
@@ -97,7 +97,7 @@ public class IpMultiplexPoolCfgController extends BaseController {
|
||||
}
|
||||
|
||||
@RequestMapping(value = {"/audit"})
|
||||
//@RequiresPermissions(value={"ip:mulitiplex:pool:audit"})
|
||||
@RequiresPermissions(value={"ip:mulitiplex:pool:audit"})
|
||||
public String audit(Integer isAudit,Integer isValid,String ids,Integer functionId,RedirectAttributes redirectAttributes) {
|
||||
if(!StringUtil.isEmpty(ids)){
|
||||
String[] idArray = ids.split(",");
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
package com.nis.web.controller.configuration.ntc;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.lang.reflect.Type;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
@@ -39,6 +42,7 @@ import com.nis.domain.maat.ToMaatResult;
|
||||
import com.nis.domain.maat.ToMaatResult.ResponseData;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
import com.nis.util.ConfigServiceUtil;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DictUtils;
|
||||
import com.nis.util.FileUtils;
|
||||
import com.nis.util.JsonMapper;
|
||||
@@ -107,33 +111,45 @@ public class AvController extends BaseController {
|
||||
public String saveFileSample(Model model,HttpServletRequest request,HttpServletResponse response, RedirectAttributes redirectAttributes,
|
||||
String ids,AvFileSampleCfg entity,MultipartFile srcFile,MultipartFile sampleFile){
|
||||
try{
|
||||
if(srcFile!=null && sampleFile!=null &&
|
||||
srcFile.getSize()>0 && sampleFile.getSize()>0){
|
||||
|
||||
// if(srcFile!=null && sampleFile!=null &&
|
||||
// srcFile.getSize()>0 && sampleFile.getSize()>0){
|
||||
if(srcFile!=null && srcFile.getSize()>0){
|
||||
String sep = System.getProperty("file.separator");
|
||||
String srcFilePath = request.getRealPath("/")+"srcFile";
|
||||
String sampleFilePath = request.getRealPath("/")+"sampleFile";
|
||||
String srcFilePath = Constants.AV_FILE_PATH+entity.getCfgType()+sep+"srcFile";//源文件保存路径
|
||||
String sampleFilePath = Constants.AV_FILE_PATH+entity.getCfgType()+sep+"sampleFile";//样例文件保存路径
|
||||
String resultFilePath = Constants.AV_FILE_PATH+entity.getCfgType()+sep+"resultFile";//结果文件保存路径
|
||||
FileUtils.createDirectory(srcFilePath);
|
||||
FileUtils.createDirectory(sampleFilePath);
|
||||
String srcFileName = UUID.randomUUID()+FileUtils.getSuffix(srcFile.getOriginalFilename(), true);
|
||||
String sampleFileName = UUID.randomUUID()+FileUtils.getSuffix(sampleFile.getOriginalFilename(), true);
|
||||
File uploadSrcFile = new File(srcFilePath+sep+srcFileName);
|
||||
File uploadSampleFile = new File(sampleFilePath+sep+sampleFileName);
|
||||
FileCopyUtils.copy(srcFile.getBytes(), uploadSrcFile);
|
||||
FileCopyUtils.copy(sampleFile.getBytes(),uploadSampleFile);
|
||||
|
||||
String fileName = UUID.randomUUID()+"";
|
||||
String srcFileAllPath = srcFilePath+sep+fileName+FileUtils.getSuffix(srcFile.getOriginalFilename(), true);
|
||||
String sampleFileAllPath = sampleFilePath+sep+fileName+".sample";
|
||||
String resultFileAllPath = resultFilePath+sep+fileName+".result";
|
||||
entity.setSrcPath(srcFileAllPath);
|
||||
entity.setSamplePath(sampleFileAllPath);
|
||||
entity.setResultPath(resultFileAllPath);
|
||||
|
||||
File uploadSrcFile = new File(srcFileAllPath);
|
||||
File uploadSampleFile = new File(sampleFileAllPath);
|
||||
FileCopyUtils.copy(srcFile.getBytes(), uploadSrcFile);//保存源文件
|
||||
String host = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+request.getContextPath();
|
||||
String srcUrl = host+"/srcFile/"+uploadSrcFile.getName();
|
||||
String sampleUrl = host+"/sampleFile/"+uploadSampleFile.getName();
|
||||
String srcUrl = host+srcFilePath.substring(srcFilePath.indexOf(Constants.AV_FILE_PATH)+Constants.AV_FILE_PATH.length()-1)+sep+uploadSrcFile.getName();
|
||||
String sampleUrl = host+sampleFilePath.substring(sampleFilePath.indexOf(Constants.AV_FILE_PATH)+Constants.AV_FILE_PATH.length()-1)+sep+uploadSampleFile.getName();
|
||||
srcUrl = srcUrl.replace("\\", "/");
|
||||
sampleUrl = sampleUrl.replace("\\", "/");
|
||||
logger.info("srcUrl:"+srcUrl);
|
||||
logger.info("sampleUrl:"+sampleUrl);
|
||||
String srcMd5 = FileUtils.getFileMD5(uploadSrcFile);
|
||||
String sampleMd5 = FileUtils.getFileMD5(uploadSampleFile);
|
||||
entity.setSrcUrl(srcUrl);
|
||||
entity.setSrcPath(uploadSrcFile.getPath());
|
||||
entity.setSampleUrl(sampleUrl);
|
||||
entity.setSamplePath(uploadSampleFile.getPath());
|
||||
entity.setSrcMd5(srcMd5);
|
||||
entity.setSampleMd5(sampleMd5);
|
||||
|
||||
// File uploadSrcFile = new File(srcFilePath);
|
||||
// FileCopyUtils.copy(srcFile.getBytes(), uploadSrcFile);
|
||||
// String srcMd5 = FileUtils.getFileMD5(uploadSrcFile);
|
||||
// File uploadSampleFile = new File(sampleFilePath);
|
||||
// String sampleMd5 = FileUtils.getFileMD5(uploadSampleFile);
|
||||
|
||||
// entity.setSrcMd5(srcMd5);
|
||||
// entity.setSampleMd5(sampleMd5);
|
||||
}
|
||||
|
||||
avCfgService.saveOrUpdateAvFileSample(entity);
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*@date 2018年6月12日 下午2:09:41
|
||||
*@version 版本号
|
||||
*/
|
||||
package com.nis.web.controller.log.ntc;
|
||||
package com.nis.web.controller.report;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
@@ -37,7 +37,7 @@ import com.nis.web.controller.BaseController;
|
||||
* @version V1.0
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("${adminPath}/logs")
|
||||
@RequestMapping("${adminPath}/report")
|
||||
public class NtcPzReportController extends BaseController{
|
||||
@RequestMapping(value="ajaxGetLogTotal",method=RequestMethod.POST)
|
||||
@ResponseBody
|
||||
@@ -69,4 +69,5 @@ public class NtcPzReportController extends BaseController{
|
||||
// }
|
||||
return data;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -297,7 +297,8 @@
|
||||
SRC_URL,SAMPLE_URL, SRC_MD5,SAMPLE_MD5,LEVEL,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,cfg_type,cfg_region_code,src_path,sample_path
|
||||
ATTRIBUTE,LABLE,AREA_EFFECTIVE_IDS,function_id,cfg_type,cfg_region_code,src_path,sample_path,
|
||||
is_sample_created
|
||||
)values (
|
||||
#{srcUrl,jdbcType=VARCHAR},#{sampleUrl,jdbcType=VARCHAR},#{srcMd5,jdbcType=VARCHAR},
|
||||
#{sampleMd5,jdbcType=VARCHAR},#{level,jdbcType=INTEGER},#{cfgDesc,jdbcType=VARCHAR},#{action,jdbcType=INTEGER},
|
||||
@@ -307,7 +308,8 @@
|
||||
#{requestId,jdbcType=INTEGER},#{compileId,jdbcType=INTEGER},#{isAreaEffective,jdbcType=INTEGER},
|
||||
#{classify,jdbcType=VARCHAR},#{attribute,jdbcType=VARCHAR},#{lable,jdbcType=VARCHAR},
|
||||
#{areaEffectiveIds,jdbcType=VARCHAR},#{functionId,jdbcType=INTEGER},
|
||||
#{cfgType,jdbcType=VARCHAR},#{cfgRegionCode,jdbcType=INTEGER},#{srcPath,jdbcType=VARCHAR},#{samplePath,jdbcType=VARCHAR}
|
||||
#{cfgType,jdbcType=VARCHAR},#{cfgRegionCode,jdbcType=INTEGER},#{srcPath,jdbcType=VARCHAR},#{samplePath,jdbcType=VARCHAR},
|
||||
#{isSampleCreated,jdbcType=INTEGER}
|
||||
)
|
||||
</insert>
|
||||
|
||||
@@ -403,6 +405,15 @@
|
||||
<if test="samplePath != null and samplePath != ''">
|
||||
sample_path = #{samplePath,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="isSampleCreated != null" >
|
||||
is_sample_created = #{isSampleCreated,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="srcMd5 != null and srcMd5 != ''">
|
||||
src_md5 = #{srcMd5,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="sampleMd5 != null and sampleMd5 != ''">
|
||||
sample_md5 = #{sampleMd5,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</set>
|
||||
where cfg_id = #{cfgId,jdbcType=BIGINT}
|
||||
|
||||
@@ -2,15 +2,20 @@ package com.nis.web.service.configuration;
|
||||
|
||||
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import net.sf.json.JSONArray;
|
||||
import net.sf.json.JSONObject;
|
||||
|
||||
import org.apache.commons.lang.StringEscapeUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@@ -23,6 +28,7 @@ import com.nis.domain.maat.ToMaatResult;
|
||||
import com.nis.domain.maat.ToMaatResult.ResponseData;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
import com.nis.util.ConfigServiceUtil;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.FileUtils;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.web.dao.configuration.AvCfgDao;
|
||||
@@ -86,7 +92,77 @@ public class AvCfgService extends BaseService{
|
||||
}
|
||||
if(compileId!=0){
|
||||
entity.setCompileId(compileId);
|
||||
entity.setIsSampleCreated(0);
|
||||
File uploadSrcFile = new File(entity.getSrcPath());
|
||||
String srcMd5 = FileUtils.getFileMD5(uploadSrcFile);
|
||||
entity.setSrcMd5(srcMd5);
|
||||
avCfgDao.insertAvFileSample(entity);
|
||||
|
||||
//调用外部脚本,生成样例文件
|
||||
List list = new ArrayList();
|
||||
Map<String,Object> map = new HashMap();
|
||||
map.put("srcFile", entity.getSrcPath());
|
||||
map.put("dstFile", entity.getSamplePath());
|
||||
map.put("resultFile", entity.getResultPath());
|
||||
map.put("fileId", entity.getCfgId());
|
||||
list.add(map);
|
||||
String param = gsonToJson(list);
|
||||
String sampleCreatelProc = "";
|
||||
if(entity.getCfgType().equals(Constants.AV_SAMPLE_AUDIO_REGION)||
|
||||
entity.getCfgType().equals(Constants.AV_SAMPLE_VOIP_REGION)){//音频样例配置或VOIP样例配置
|
||||
sampleCreatelProc = Constants.AUDIO_SAMPLE_CREATE_PROC;
|
||||
if(Constants.AUDIO_SAMPLE_PROC_PARAM_IS_TRANSLATION){
|
||||
param = StringEscapeUtils.escapeJava(param);
|
||||
}
|
||||
if(Constants.AUDIO_SAMPLE_PROC_PARAM_IS_QUOTATION){//json参数是否需要前后单引号处理
|
||||
param = "'"+param+"'";
|
||||
}
|
||||
}else if(entity.getCfgType().equals(Constants.AV_SAMPLE_VEDIO_REGION)){//视频样例配置
|
||||
sampleCreatelProc = Constants.VEDIO_SAMPLE_CREATE_PROC;
|
||||
if(Constants.VEDIO_SAMPLE_PROC_PARAM_IS_TRANSLATION){
|
||||
param = StringEscapeUtils.escapeJava(param);
|
||||
}
|
||||
if(Constants.VEDIO_SAMPLE_PROC_PARAM_IS_QUOTATION){//json参数是否需要前后单引号处理
|
||||
param = "'"+param+"'";
|
||||
}
|
||||
}else if(entity.getCfgType().equals(Constants.AV_SAMPLE_PICTURE_REGION)){//图片样例配置
|
||||
sampleCreatelProc = Constants.PICTURE_SAMPLE_CREATE_PROC;
|
||||
if(Constants.PICTURE_SAMPLE_PROC_PARAM_IS_TRANSLATION){
|
||||
param = StringEscapeUtils.escapeJava(param);
|
||||
}
|
||||
if(Constants.PICTURE_SAMPLE_PROC_PARAM_IS_QUOTATION){//json参数是否需要前后单引号处理
|
||||
param = "'"+param+"'";
|
||||
}
|
||||
}
|
||||
|
||||
logger.info("调用外部程序输入参数:"+param);
|
||||
Map resultMap = execShell(sampleCreatelProc,param);
|
||||
logger.info("调用外部程序结果:"+resultMap);
|
||||
|
||||
if(resultMap.get("exitStatus").equals(0)){//调用外部程序成功
|
||||
String out = resultMap.get("out").toString();//输出参数
|
||||
JSONArray resArray =JSONArray.fromObject(out);
|
||||
JSONObject resObject = resArray.getJSONObject(0);
|
||||
logger.info("调用外部程序输出参数:"+resObject);
|
||||
int state = resObject.getInt("state");
|
||||
int fileSize = resObject.getInt("fileSize");
|
||||
Integer fileId = resObject.getInt("fileId");
|
||||
if(state==1 && fileSize>0){//成功
|
||||
entity.setIsSampleCreated(1);//样例文件创建成功
|
||||
}else{
|
||||
entity.setIsSampleCreated(-1);//样例文件创建失败
|
||||
}
|
||||
if(fileId.equals(entity.getCfgId().intValue())){
|
||||
File uploadSampleFile = new File(entity.getSamplePath());
|
||||
String sampleMd5 = FileUtils.getFileMD5(uploadSampleFile);
|
||||
entity.setSampleMd5(sampleMd5);
|
||||
avCfgDao.updateAvFileSample(entity);
|
||||
}else{
|
||||
logger.info("调用外部程序返回fileId错误,输入的fileId为:"+entity.getCfgId()+",输出的fileId为:"+fileId);
|
||||
}
|
||||
}else{
|
||||
throw new MaatConvertException(resultMap.get("error")!=null?resultMap.get("error").toString():resultMap.get("message").toString());
|
||||
}
|
||||
}else{
|
||||
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>");
|
||||
}
|
||||
@@ -212,4 +288,73 @@ public class AvCfgService extends BaseService{
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* 调用shell脚本 返回运行结果
|
||||
*
|
||||
* @param shellName
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
public Map<String, Object> execShell(String shellName,
|
||||
String... params) {
|
||||
Map<String, Object> result = new HashMap<String, Object>();
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(shellName);
|
||||
for (String temp : params) {
|
||||
sb.append(" " + temp);
|
||||
}
|
||||
String os = System.getProperty("os.name").toLowerCase();
|
||||
String cmd1 = "";
|
||||
String cmd2 = "";
|
||||
if(os.contains("windows")){
|
||||
cmd1 = "cmd.exe";
|
||||
cmd2 = "/c";
|
||||
}else{
|
||||
cmd1 = "/bin/sh";
|
||||
cmd2 = "-c";
|
||||
}
|
||||
logger.info("调用脚本信息,cmd1:"+cmd1+",cmd2:"+cmd2);
|
||||
String cmdarray[] = new String[] {cmd1, cmd2 ,sb.toString() };
|
||||
BufferedReader br = null;
|
||||
BufferedReader bre = null;
|
||||
try {
|
||||
Process exec = Runtime.getRuntime().exec(cmdarray);
|
||||
exec.getInputStream();
|
||||
br = new BufferedReader(
|
||||
new InputStreamReader(exec.getInputStream()));
|
||||
bre = new BufferedReader(new InputStreamReader(
|
||||
exec.getErrorStream()));
|
||||
String s = null;
|
||||
StringBuilder out = new StringBuilder();
|
||||
while ((s = br.readLine()) != null) {
|
||||
out.append(s);
|
||||
}
|
||||
result.put("out", out.toString());//输出参数
|
||||
out.setLength(0);//清空
|
||||
while ((s = bre.readLine()) != null) {
|
||||
out.append(s);
|
||||
}
|
||||
result.put("error", out.toString());//错误信息
|
||||
int waitFor = exec.waitFor();
|
||||
logger.info("调用脚本:"+shellName+",执行返回状态值:"+waitFor);
|
||||
result.put("exitStatus", waitFor);//执行状态
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.error("调用 " + shellName + " 脚本异常", e);
|
||||
} finally {
|
||||
if (br != null)
|
||||
try {
|
||||
br.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (bre != null)
|
||||
try {
|
||||
bre.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -562,7 +562,10 @@ av_sample_voip_control=VoIPSample Control
|
||||
av_sample_audio_porn_control=Audio Porn Sign Sample Control
|
||||
av_sample_vedio_porn_control=Vedio Porn Sign Sample Control
|
||||
av_sample_control=Sample Control
|
||||
<<<<<<< HEAD
|
||||
configure_statistics_info=Configure statistics info
|
||||
=======
|
||||
>>>>>>> branch 'develop' of http://10.0.6.99/gwall/gwall.git
|
||||
harm_level=Degree of harm
|
||||
src_file=Source File
|
||||
select_file=Please Select Upload File
|
||||
@@ -845,6 +848,7 @@ single_file_upload_size_error=Filesize of file %s is %s,Allow the maximum value
|
||||
total_file_upload_size_error=The maximum size of the uploaded file is %s,The total size of the file allowed to upload is %s\uFF01
|
||||
file_upload_type_error=%s file type is incorrect,Allow uploaded files type contains %s\uFF01
|
||||
file_upload_error=File upload failure\uFF01
|
||||
<<<<<<< HEAD
|
||||
#=============multipart upload error info=================
|
||||
#=============function_service_dict==>service_name=================
|
||||
audio_sample_reject=Audio and video sample control
|
||||
@@ -933,3 +937,6 @@ ip_reuse_adress_pool_loop=IP reuse address pool
|
||||
app_strategy_monit=APP strategy monitoring
|
||||
app_strategy_drop=APP strategy drop
|
||||
#=============function_service_dict==>service_name=================
|
||||
=======
|
||||
#=============multipart upload error info=================
|
||||
>>>>>>> branch 'develop' of http://10.0.6.99/gwall/gwall.git
|
||||
|
||||
@@ -331,16 +331,32 @@ digest_single_file_max_size=10485760
|
||||
#12M12582912
|
||||
digest_total_file_max_size=12582912
|
||||
#YSP文件保存路径
|
||||
av_file_path=d:\\ysp\\
|
||||
av_file_path=/home/ysp/
|
||||
#av_file_path=D:\\ysp\\
|
||||
#YSP文件特征类型
|
||||
av_sample_audio_region=av_sample_audio
|
||||
av_sample_vedio_region=av_sample_vedio
|
||||
av_sample_pitrue_region=av_sample_pitrue
|
||||
av_sample_picture_region=av_sample_picture
|
||||
av_sample_voip_region=av_sample_voip
|
||||
#样例文件生成程序
|
||||
audio_sample_create_proc=java -jar d:\\sampleTest.jar
|
||||
vedio_sample_create_proc=java -jar d:\\sampleTest.jar
|
||||
picture_sample_create_proc=java -jar d:\\sampleTest.jar
|
||||
audio_sample_create_proc=java -jar /home/sampleTest.jar
|
||||
vedio_sample_create_proc=java -jar /home/sampleTest.jar
|
||||
picture_sample_create_proc=java -jar /home/sampleTest.jar
|
||||
audio_sample_proc_param_is_quotation=true
|
||||
vedio_sample_proc_param_is_quotation=true
|
||||
picture_sample_proc_param_is_quotation=true
|
||||
audio_sample_proc_param_is_translation=false
|
||||
vedio_sample_proc_param_is_translation=false
|
||||
picture_sample_proc_param_is_translation=false
|
||||
#audio_sample_create_proc=java -jar D:\\sampleTest.jar
|
||||
#vedio_sample_create_proc=java -jar D:\\sampleTest.jar
|
||||
#picture_sample_create_proc=java -jar D:\\sampleTest.jar
|
||||
#audio_sample_proc_param_is_quotation=false
|
||||
#vedio_sample_proc_param_is_quotation=false
|
||||
#picture_sample_proc_param_is_quotation=false
|
||||
#audio_sample_proc_param_is_translation=true
|
||||
#vedio_sample_proc_param_is_translation=true
|
||||
#picture_sample_proc_param_is_translation=true
|
||||
#http自定义域相关参数
|
||||
http_header_user_region_key=HTTP_HEADER
|
||||
http_header_dict_module=REQUEST_HEADER_DISTRICT
|
||||
|
||||
@@ -34,10 +34,10 @@
|
||||
cache-period="31536000" />
|
||||
<mvc:resources mapping="/upload/**" location="/upload/"
|
||||
cache-period="31536000" />
|
||||
<mvc:resources mapping="/sampleFile/**" location="/sampleFile/"
|
||||
<!-- <mvc:resources mapping="/sampleFile/**" location="/sampleFile/"
|
||||
cache-period="31536000" />
|
||||
<mvc:resources mapping="/srcFile/**" location="/srcFile/"
|
||||
cache-period="31536000" />
|
||||
cache-period="31536000" /> -->
|
||||
<!-- <mvc:resources mapping="/swagger/**" location="/swagger/"
|
||||
cache-period="31536000" /> -->
|
||||
|
||||
|
||||
146
src/main/webapp/WEB-INF/include/form/pageGroup.jsp
Normal file
146
src/main/webapp/WEB-INF/include/form/pageGroup.jsp
Normal file
@@ -0,0 +1,146 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<script>
|
||||
function pagination() {
|
||||
|
||||
pageNo = 1;
|
||||
count = $('tbody').children().size();// 总记录数
|
||||
//处理ajax时jquery选择器缓存的问题
|
||||
/* dataLength = "${fn:length(datas)}";
|
||||
preCount = 0;
|
||||
if (dataLength < count) {
|
||||
preCount = count - dataLength;
|
||||
count = count - preCount;
|
||||
alert(count)
|
||||
//$('tbody').children().slice(0, preCount).remove();
|
||||
} */
|
||||
|
||||
|
||||
pageSize = 30; // 页面大小
|
||||
first = 1;// 首页索引
|
||||
last = Math.ceil(count/pageSize);// 尾页索引
|
||||
length = 8;// 显示页面长度
|
||||
slider = 1;// 前后显示页面长度
|
||||
funcParam = "";
|
||||
if (last == 0) {
|
||||
last++;
|
||||
}
|
||||
if (last < first) {
|
||||
last = first;
|
||||
}
|
||||
if (pageNo <= 1) {
|
||||
pageNo = first;
|
||||
firstPage = true;
|
||||
}
|
||||
if (pageNo >= last) {
|
||||
pageNo = last;
|
||||
lastPage = true;
|
||||
}
|
||||
if (pageNo < last - 1) {
|
||||
next = pageNo + 1;
|
||||
} else {
|
||||
next = last;
|
||||
}
|
||||
if (pageNo > 1) {
|
||||
prev = pageNo - 1;
|
||||
} else {
|
||||
prev = first;
|
||||
}
|
||||
if (pageNo < first) {
|
||||
pageNo = first;
|
||||
}
|
||||
|
||||
if (pageNo > last) {
|
||||
pageNo = last;
|
||||
}
|
||||
toPage(1, pageSize, '');
|
||||
}
|
||||
|
||||
//跳页
|
||||
function toPage(pageNo, pageSize, funcParam) {
|
||||
prev = pageNo - 1;
|
||||
next = pageNo + 1;
|
||||
|
||||
var inhtml = getFootHtml(pageNo);
|
||||
|
||||
$(".page").html(inhtml);
|
||||
|
||||
//隐藏该对象下面的所有子元素
|
||||
$('tbody').children().css('display', 'none');
|
||||
//显示元素
|
||||
$('tbody').children().slice((pageNo-1)*pageSize, pageNo*pageSize).css('display', '');
|
||||
}
|
||||
|
||||
//底部跳页按钮
|
||||
function getFootHtml(pageNo) {
|
||||
var htm = "";
|
||||
if (count == 0) {
|
||||
htm = "<div class=\"none-data\"><i class=\"fa fa-warning font-red-flamingo\"></i> " + "<spring:message code="noneData"/>" + "</div>";
|
||||
return htm;
|
||||
}
|
||||
htm = "<ul>";
|
||||
if (pageNo == first) {
|
||||
htm += "<li class=\"disabled\"><a href=\"javascript:\">« " + "<spring:message code="previousPage"/>" + "</a></li>";
|
||||
} else {
|
||||
htm += "<li><a href=\"javascript:\" onclick=\"toPage(" + prev + "," + pageSize + ",'" + funcParam + "');\">« " + "<spring:message code="previousPage"/>" + "</a></li>";
|
||||
}
|
||||
|
||||
var begin = pageNo - (length / 2);
|
||||
|
||||
if (begin < first) {
|
||||
begin = first;
|
||||
}
|
||||
|
||||
var end = begin + length - 1;
|
||||
|
||||
if (end >= last) {
|
||||
end = last;
|
||||
begin = end - length + 1;
|
||||
if (begin < first) {
|
||||
begin = first;
|
||||
}
|
||||
}
|
||||
|
||||
if (begin > first) {
|
||||
var i = 0;
|
||||
for (i = first; i < first + slider && i < begin; i++) {
|
||||
htm += "<li tmp=\"" + i + "\"><a href=\"javascript:\" onclick=\"toPage(" + i + "," + pageSize + ",'" + funcParam + "');\">" + (i + 1 - first) + "</a></li>";
|
||||
}
|
||||
if (i < begin) {
|
||||
htm += "<li class=\"disabled\"><a href=\"javascript:\">...</a></li>";
|
||||
}
|
||||
}
|
||||
|
||||
for (var i = begin; i <= end; i++) {
|
||||
if (i == pageNo) {
|
||||
htm += "<li class=\"active\"><a href=\"javascript:\">" + (i + 1 - first) + "</a></li>";
|
||||
} else {
|
||||
htm += "<li><a href=\"javascript:\" onclick=\"toPage(" + i + "," + pageSize + ",'" + funcParam + "');\">" + (i + 1 - first) + "</a></li>";
|
||||
}
|
||||
}
|
||||
|
||||
if (last - end > slider) {
|
||||
htm += "<li class=\"disabled\"><a href=\"javascript:\">...</a></li>";
|
||||
end = last - slider;
|
||||
}
|
||||
|
||||
for (var i = end + 1; i <= last; i++) {
|
||||
htm += "<li><a href=\"javascript:\" onclick=\"toPage(" + i + "," + pageSize + ",'" + funcParam + "');\">" + (i + 1 - first) + "</a></li>";
|
||||
}
|
||||
|
||||
if (pageNo == last) {
|
||||
htm += "<li class=\"disabled\"><a href=\"javascript:\">" + "<spring:message code="nextPage"/>" + " »</a></li>";
|
||||
} else {
|
||||
htm += "<li><a href=\"javascript:\" onclick=\"toPage(" + next + "," + pageSize + ",'" + funcParam + "');\">" + "" + "<spring:message code="nextPage"/>" + " »</a></li>";
|
||||
}
|
||||
|
||||
htm += "<li class=\"disabled controls\"><a href=\"javascript:\">" + "<spring:message code="current"/>" + " ";
|
||||
htm += "<input type=\"text\" value=\"" + pageNo + "\" onkeypress=\"var e=window.event||this;var c=e.keyCode||e.which;if(c==13)";
|
||||
htm += "toPage(this.value," + pageSize + ",'" + funcParam + "');\" onclick=\"this.select();\"/> / ";
|
||||
htm += "<input type=\"text\" value=\"" + last + "\" onkeypress=\"var e=window.event||this;var c=e.keyCode||e.which;if(c==13)";
|
||||
htm += "(toPage" + pageNo + ",this.value,'" + funcParam + "');\" onclick=\"this.select();\"/> " + "<spring:message code="page"/>" + ",";
|
||||
htm += "" + "<spring:message code="total"/>" + " <span id='showTotalCount'>" + count + "</span> " + "<spring:message code="count"/>" + "</a></li>";
|
||||
htm += "</ul>";
|
||||
return htm;
|
||||
}
|
||||
</script>
|
||||
@@ -31,12 +31,12 @@ $(function(){
|
||||
$("#srcFile").on('change',function(){
|
||||
$("#srcFileInfo").val($("#srcFile").val());
|
||||
});
|
||||
$("#uploadSample,#sampleFileInfo").on('click',function(){
|
||||
/* $("#uploadSample,#sampleFileInfo").on('click',function(){
|
||||
$("#sampleFile").trigger("click");
|
||||
});
|
||||
$("#sampleFile").on('change',function(){
|
||||
$("#sampleFileInfo").val($("#sampleFile").val());
|
||||
});
|
||||
}); */
|
||||
$("input[name='areaType']").on('change',function(){
|
||||
var val=$(this).val();
|
||||
if($(this).is(":visible")){
|
||||
@@ -62,16 +62,16 @@ $(function(){
|
||||
$("#cfgFrom").validate({
|
||||
submitHandler: function(form){
|
||||
var srcFile = $("#srcFile").val();
|
||||
var sampleFile = $("#sampleFile").val();
|
||||
//var sampleFile = $("#sampleFile").val();
|
||||
var srcUrl = $("#srcUrl").val();
|
||||
var sampleUrl = $("#sampleUrl").val();
|
||||
//var sampleUrl = $("#sampleUrl").val();
|
||||
if((srcUrl==null||srcUrl=="") && (srcFile==null || srcFile=="")){
|
||||
$("div[for='srcFile']").append("<label id='level-error' class='error' for='srcFile'><spring:message code='required'></spring:message></label>");
|
||||
return false;
|
||||
}else if((sampleUrl==null || sampleUrl=="") && (sampleFile==null || sampleFile=="")){
|
||||
}/* else if((sampleUrl==null || sampleUrl=="") && (sampleFile==null || sampleFile=="")){
|
||||
$("div[for='sampleFile']").append("<label id='level-error' class='error' for='sampleFile'><spring:message code='required'></spring:message></label>");
|
||||
return false;
|
||||
}else{
|
||||
} */else{
|
||||
loading('onloading...');
|
||||
form.submit();
|
||||
}
|
||||
@@ -164,11 +164,11 @@ $(function(){
|
||||
<div for="srcFileInfo"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<%-- <div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="sample_file"/></label>
|
||||
<div class="col-md-6">
|
||||
<%-- <input class="form-control required" type="text" name="sampleUrl" value="${_cfg.sampleUrl}"> --%>
|
||||
<input class="form-control required" type="text" name="sampleUrl" value="${_cfg.sampleUrl}">
|
||||
<input id="sampleFile" name="sampleFile" type="file"style="width: 330px;display:none" />
|
||||
<div class="input-group">
|
||||
<input id="sampleFileInfo" name="sampleFileInfo" readonly="readonly" data-msg-required=""
|
||||
@@ -178,18 +178,15 @@ $(function(){
|
||||
<div class="input-group-btn">
|
||||
<a id="uploadSample" class="btn btn-default btn-search" href="javascript:" style=""><i class="fa fa-search"></i></a>
|
||||
</div>
|
||||
<%-- <span id="srcFileInfo" style="margin-top:20px;margin-left:10px;">${_cfg.srcUrl }</span> --%>
|
||||
<span id="srcFileInfo" style="margin-top:20px;margin-left:10px;">${_cfg.srcUrl }</span>
|
||||
</div>
|
||||
<%-- <button id="uploadSample" type="button" class="btn btn-default btn-search"><spring:message code="select_file"/></button>
|
||||
<span id="sampleFileInfo">${_cfg.sampleUrl }</span> --%>
|
||||
<button id="uploadSample" type="button" class="btn btn-default btn-search"><spring:message code="select_file"/></button>
|
||||
<span id="sampleFileInfo">${_cfg.sampleUrl }</span>
|
||||
<input id="sampleUrl" name="sampleUrl" type="hidden" value="${_cfg.sampleUrl }" />
|
||||
</div>
|
||||
<div for="sampleFileInfo"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
</div> --%>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="action"/></label>
|
||||
@@ -212,6 +209,29 @@ $(function(){
|
||||
</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="action"/></label>
|
||||
<div class="col-md-6">
|
||||
<c:forEach items="${serviceList}" var="service">
|
||||
<label class="radio-inline">
|
||||
<c:if test="${_cfg.functionId eq service.functionId}">
|
||||
<input type="radio" name="action" serviceId="${service.serviceId }" value="${service.action }" class="required action"
|
||||
<c:if test="${_cfg.action==service.action || _cfg.action==null}">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> --%>
|
||||
<%-- <%@include file="/WEB-INF/include/form/areaInfo.jsp" %> --%>
|
||||
<input type="hidden" name="isAreaEffective" value="0">
|
||||
<%@include file="/WEB-INF/include/form/basicInfo.jsp" %>
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
});
|
||||
</script>
|
||||
<%@ include file="/WEB-INF/include/form/pageGroup.jsp"%>
|
||||
<table id="tagTable" class="table table-striped table-bordered table-condensed text-nowrap">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -15,18 +12,25 @@ $(function(){
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:forEach items="${datas}" var="data">
|
||||
<tr>
|
||||
<td>
|
||||
<c:forEach items="${labels}" var="label">
|
||||
<c:if test="${label.serviceDictId==data.key}">${label.itemValue}</c:if>
|
||||
<script type="text/javascript">
|
||||
var trContent = "";
|
||||
<c:forEach items="${datas}" var="data">
|
||||
trContent += "<tr>";
|
||||
<c:forEach items="${labels}" var="label">
|
||||
<c:if test="${label.serviceDictId==data.key}">
|
||||
trContent += "<td>${label.itemValue}</td>";
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<c:forEach items="${data.value}" var="cloumn" varStatus="status">
|
||||
<td>${cloumn}</td>
|
||||
<c:forEach items="${data.value}" var="cloumn" varStatus="status">
|
||||
trContent += "<td>${cloumn}</td>";
|
||||
</c:forEach>
|
||||
trContent += "</tr>";
|
||||
</c:forEach>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
$('tbody').remove();
|
||||
$('#tagTable').append("<tbody></tbody>");
|
||||
$('tbody').html(trContent);
|
||||
pagination();
|
||||
</script>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="page">${page}</div>
|
||||
<div class="page"></div>
|
||||
@@ -105,11 +105,12 @@
|
||||
}
|
||||
|
||||
var ajaxReport=function(url,target){
|
||||
loading('<spring:message code="onloading"/>');
|
||||
//loading('<spring:message code="onloading"/>');
|
||||
$.ajax({
|
||||
type:'post',
|
||||
async:false,
|
||||
url:'${ctx}'+url,///report/ajaxNtcTagReport
|
||||
cache:false,
|
||||
url:'${ctx}'+url+"?random="+Math.random,///report/ajaxNtcTagReport
|
||||
data:{
|
||||
"action":$('[name="action"]').val(),
|
||||
"reportType":$('[name="reportType"]').val(),
|
||||
@@ -118,10 +119,10 @@ var ajaxReport=function(url,target){
|
||||
dataType:"html",
|
||||
success:function(data){
|
||||
$(target).html(data);//#label
|
||||
closeTip();
|
||||
//closeTip();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
});
|
||||
</script>
|
||||
<%@ include file="/WEB-INF/include/form/pageGroup.jsp"%>
|
||||
<table id="lwhhTable" class="table table-striped table-bordered table-condensed text-nowrap">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -15,18 +12,25 @@ $(function(){
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:forEach items="${datas}" var="data">
|
||||
<tr>
|
||||
<td>
|
||||
<c:forEach items="${requestInfos}" var="lwhh">
|
||||
<c:if test="${lwhh.id eq data.key}">${lwhh.requestTitle}</c:if>
|
||||
<script type="text/javascript">
|
||||
var trContent = "";
|
||||
<c:forEach items="${datas}" var="data">
|
||||
trContent += "<tr>";
|
||||
<c:forEach items="${requestInfos}" var="lwhh">
|
||||
<c:if test="${lwhh.id eq data.key}">
|
||||
trContent += "<td>${lwhh.requestTitle}</td>";
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<c:forEach items="${data.value}" var="cloumn" varStatus="status">
|
||||
<td>${cloumn}</td>
|
||||
<c:forEach items="${data.value}" var="cloumn" varStatus="status">
|
||||
trContent += "<td>${cloumn}</td>";
|
||||
</c:forEach>
|
||||
trContent += "</tr>";
|
||||
</c:forEach>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
$('tbody').remove();
|
||||
$('#lwhhTable').append("<tbody></tbody>");
|
||||
$('tbody').html(trContent);
|
||||
pagination();
|
||||
</script>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="page">${page}</div>
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
});
|
||||
</script>
|
||||
<%@ include file="/WEB-INF/include/form/pageGroup.jsp"%>
|
||||
<table id="contentTable1" class="table table-striped table-bordered table-condensed text-nowrap">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -16,16 +13,23 @@ $(function(){
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:forEach items="${datas}" var="data">
|
||||
<tr>
|
||||
<c:forEach items="${fn:split(data.key,splitor)}" var="location">
|
||||
<td>${location}</td>
|
||||
<script type="text/javascript">
|
||||
var trContent = "";
|
||||
<c:forEach items="${datas}" var="data">
|
||||
trContent += "<tr>";
|
||||
<c:forEach items="${fn:split(data.key,splitor)}" var="location">
|
||||
trContent += "<td>${location}</td>";
|
||||
</c:forEach>
|
||||
<c:forEach items="${data.value}" var="cloumn" varStatus="status">
|
||||
trContent += "<td>${cloumn}</td>";
|
||||
</c:forEach>
|
||||
trContent += "</tr>";
|
||||
</c:forEach>
|
||||
<c:forEach items="${data.value}" var="cloumn" varStatus="status">
|
||||
<td>${cloumn}</td>
|
||||
</c:forEach>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
$('tbody').remove();
|
||||
$('#contentTable1').append("<tbody></tbody>");
|
||||
$('tbody').html(trContent);
|
||||
pagination();
|
||||
</script>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="page">${page}</div>
|
||||
<div class="page"></div>
|
||||
|
||||
@@ -767,7 +767,7 @@ var GetLogTotal=function(data){
|
||||
var request=$.ajax({
|
||||
type:'post',
|
||||
timeout:1000,//超时时间设置,查询接口时间过长超时
|
||||
url:pathName+'/logs/ajaxGetLogTotal',
|
||||
url:pathName+'/report/ajaxGetLogTotal',
|
||||
data:{"endTime":timeStamp,"action":data.action,"functionId":data.functionId,"compileId":data.compileId},
|
||||
dataType:'json',
|
||||
async:true,
|
||||
|
||||
Reference in New Issue
Block a user