diff --git a/pom.xml b/pom.xml
index 25f43d168..ea3fda28f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -700,5 +700,18 @@
+
+
+ org.apache.xmlgraphics
+ batik-all
+ 1.10
+
+
+ org.lucee
+ xml-apis-ext
+ 1.3.04
+
+
+
diff --git a/src/main/java/com/nis/web/controller/dashboard/DashboardController.java b/src/main/java/com/nis/web/controller/dashboard/DashboardController.java
index d6b350fb8..989774028 100644
--- a/src/main/java/com/nis/web/controller/dashboard/DashboardController.java
+++ b/src/main/java/com/nis/web/controller/dashboard/DashboardController.java
@@ -1,15 +1,35 @@
package com.nis.web.controller.dashboard;
+import java.awt.Color;
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+import java.io.StringReader;
import java.lang.reflect.Type;
+import java.text.SimpleDateFormat;
import java.util.ArrayList;
+import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
+import javax.servlet.ServletException;
+import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
+import org.apache.batik.transcoder.SVGAbstractTranscoder;
+import org.apache.batik.transcoder.TranscoderException;
+import org.apache.batik.transcoder.TranscoderInput;
+import org.apache.batik.transcoder.TranscoderOutput;
+import org.apache.batik.transcoder.image.ImageTranscoder;
+import org.apache.batik.transcoder.image.JPEGTranscoder;
+import org.apache.batik.transcoder.image.PNGTranscoder;
+import org.jcodings.transcode.Transcoder;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
@@ -32,6 +52,8 @@ import com.nis.domain.SysDataDictionaryItem;
import com.nis.domain.configuration.WebsiteDomainTopic;
import com.nis.util.CodeDicUtils;
import com.nis.util.Constants;
+import com.nis.util.DateUtil;
+import com.nis.util.DateUtils;
import com.nis.util.DictUtils;
import com.nis.util.StringUtil;
import com.nis.util.httpclient.HttpClientUtil;
@@ -767,4 +789,78 @@ public class DashboardController extends BaseController{
System.out.println(map2.get("c"));
}
+ /**
+ * HighCharts导出图片
+ * @param response
+ * @param request
+ * @param page
+ * @throws ServletException, IOException
+ */
+ @RequestMapping(value="saveAsImage")
+ public void toSaveAsImage(HttpServletResponse response,HttpServletRequest request) throws ServletException, IOException{
+ request.setCharacterEncoding("utf-8"); //设置UTF-8编码,解决乱码问题
+ String type = request.getParameter("type");
+ String svg = request.getParameter("svg");
+ String filename = request.getParameter("filename");
+ filename = filename==null?"chart":filename;
+ ServletOutputStream out = response.getOutputStream();
+ if (null != type && null != svg) {
+ svg = svg.replaceAll(":rect", "rect");
+ String ext = "";
+ PNGTranscoder t = null;
+ JPEGTranscoder t1=null;
+ if (type.equals("image/png")) {
+ ext = "png";
+ t = new PNGTranscoder();
+ t.addTranscodingHint( ImageTranscoder.KEY_BACKGROUND_COLOR, Color.black);
+ } else if (type.equals("image/jpeg")) {
+ ext = "jpg";
+ t1 = new JPEGTranscoder();
+ t1.addTranscodingHint( ImageTranscoder.KEY_BACKGROUND_COLOR, Color.black);
+ } /*else if (type.equals("application/pdf")) {
+ ext = "pdf";
+ t = new PDFTranscoder();
+ }*/ else if(type.equals("image/svg+xml"))
+ ext = "svg";
+ String dateTime = DateUtils.getDateTime();
+ response.addHeader("Content-Disposition", "attachment; filename="+ filename+"-"+dateTime + "."+ext);
+ response.addHeader("Content-Type", type);
+
+ if (null != t) {
+ TranscoderInput input = new TranscoderInput(new StringReader(svg));
+ TranscoderOutput output = new TranscoderOutput(out);
+
+ try {
+ ((SVGAbstractTranscoder) t).transcode(input, output);
+ } catch (TranscoderException e) {
+ out.print("Problem transcoding stream. See the web logs for more details.");
+ e.printStackTrace();
+ }
+ } else if (null != t1) {
+ TranscoderInput input = new TranscoderInput(new StringReader(svg));
+ TranscoderOutput output = new TranscoderOutput(out);
+
+ try {
+ ((SVGAbstractTranscoder) t1).transcode(input, output);
+ } catch (TranscoderException e) {
+ out.print("Problem transcoding stream. See the web logs for more details.");
+ e.printStackTrace();
+ }
+ } else if (ext.equals("svg")) {
+ // out.print(svg);
+ OutputStreamWriter writer = new OutputStreamWriter(out, "UTF-8");
+ writer.append(svg);
+ writer.close();
+ } else
+ out.print("Invalid type: " + type);
+ } else {
+ response.addHeader("Content-Type", "text/html");
+ out.println("Usage:\n\tParameter [svg]: The DOM Element to be converted." +
+ "\n\tParameter [type]: The destination MIME type for the elment to be transcoded.");
+ }
+ out.flush();
+ out.close();
+ }
+
+
}
diff --git a/src/main/resources/messages/message_en.properties b/src/main/resources/messages/message_en.properties
index 9837aefee..5183b0299 100644
--- a/src/main/resources/messages/message_en.properties
+++ b/src/main/resources/messages/message_en.properties
@@ -1364,4 +1364,5 @@ inactive_time=Inactive Time
max_cache_obj_size=Max Cache Object Size
cache_time_error=Cache time can not exceed 24 hours(1440 minutes,86400 seconds).
cache_size_error=Cache size can not exceed 1024TB(1048576GB,1073741824MB).
-ignore_qs_error=Ignore query string has invisible character or comma
\ No newline at end of file
+ignore_qs_error=Ignore query string has invisible character or comma
+NTC_DDOS_PROTECT_TARGET_IP=DDOS IP Configuration
\ No newline at end of file
diff --git a/src/main/resources/messages/message_ru.properties b/src/main/resources/messages/message_ru.properties
index 0ec3e3f38..4d04086f2 100644
--- a/src/main/resources/messages/message_ru.properties
+++ b/src/main/resources/messages/message_ru.properties
@@ -550,7 +550,7 @@ port_mask=\u041C\u0430\u0441\u043A\u0430 \u041F\u043E\u0440\u0442\u0430
ip_range=IP \u0414\u0438\u0430\u043F\u0430\u0437\u043E\u043D
ip_subnet=\u041C\u0430\u0441\u043A\u0430 IP/\u041F\u043E\u0434\u0441\u0435\u0442\u0438
district=\u0420\u0430\u0439\u043E\u043D
-\u0421\u043e\u0433\u043b\u0430\u0441\u043e\u0432\u0430\u043d\u0438\u044f
+\u0421\u043E\u0433\u043B\u0430\u0441\u043E\u0432\u0430\u043D\u0438\u044F
keywords=\u041A\u043B\u044E\u0447\u0435\u0432\u044B\u0435 \u0421\u043B\u043E\u0432\u0430
http_ip_title=HTTP IP
http_url_title=HTTP URL
@@ -885,7 +885,7 @@ file_upload_error=\u041E\u0448\u0438\u0431\u043A\u0430 \u0437\u0430\u0433\u0440\
audio_sample_reject=\u0423\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435 \u041C\u0443\u043B\u044C\u0442\u0438\u043C\u0435\u0434\u0438\u0439\u043D\u044B\u043C \u041E\u0431\u0440\u0430\u0437\u0446\u043E\u043C
audio_sample_monit=\u041C\u043E\u043D\u0438\u0442\u043E\u0440\u0438\u043D\u0433 \u041C\u0443\u043B\u044C\u0442\u0438\u043C\u0435\u0434\u0438\u0439\u043D\u044B\u0445 \u041E\u0431\u0440\u0430\u0437\u0446\u043E\u0432
video_sample_reject=\u0423\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435 \u041E\u0431\u0440\u0430\u0437\u0446\u043E\u043C
- \u0412\u0438\u0434\u0435\u043e
+ \u0412\u0438\u0434\u0435\u043E
video_sample_monit=\u041C\u043E\u043D\u0438\u0442\u043E\u0440\u0438\u043D\u0433 \u041E\u0431\u0440\u0430\u0437\u0446\u043E\u0432 \u0412\u0438\u0434\u0435\u043E
pic_sample_reject=\u0423\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435 \u041E\u0431\u0440\u0430\u0437\u0446\u043E\u043C \u0418\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u044F
pic_sample_monit=\u041C\u043E\u043D\u0438\u0442\u043E\u0440\u0438\u043D\u0433 \u041E\u0431\u0440\u0430\u0437\u0446\u043E\u0432 \u0418\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u044F
@@ -1354,4 +1354,5 @@ inactive_time=Inactive Time
max_cache_obj_size=Max Cache Object Size
cache_time_error=Cache time can not exceed 24 hours(1440 minutes,86400 seconds).
cache_size_error=Cache size can not exceed 1024TB(1048576GB,1073741824MB).
-ignore_qs_error=Ignore query string has invisible character or comma
\ No newline at end of file
+ignore_qs_error=Ignore query string has invisible character or comma
+NTC_DDOS_PROTECT_TARGET_IP=\u041A\u043E\u043D\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044F IP-\u0410\u0434\u0440\u0435\u0441\u0430 DDOS
\ No newline at end of file
diff --git a/src/main/resources/messages/message_zh_CN.properties b/src/main/resources/messages/message_zh_CN.properties
index b308e88c6..74d6ff21e 100644
--- a/src/main/resources/messages/message_zh_CN.properties
+++ b/src/main/resources/messages/message_zh_CN.properties
@@ -1357,4 +1357,5 @@ inactive_time=\u672A\u88AB\u8BF7\u6C42\u7684\u6587\u4EF6\u65F6\u95F4
max_cache_obj_size=\u6700\u5927\u7F13\u5B58\u5BF9\u8C61\u5927\u5C0F
cache_time_error=\u7F13\u5B58\u65F6\u95F4\u4E0D\u80FD\u8D85\u8FC7 24 \u5C0F\u65F6(1440\u5206\u949F,86400\u79D2).
cache_size_error=\u7F13\u5B58\u5927\u5C0F\u4E0D\u80FD\u8D85\u8FC71024TB(1048576GB,1073741824MB).
-ignore_qs_error=\u5FFD\u7565\u7684\u67E5\u8BE2\u53C2\u6570\u4E2D\u5305\u542B\u4E0D\u53EF\u89C1\u5B57\u7B26\u6216\u8005\u9017\u53F7
\ No newline at end of file
+ignore_qs_error=\u5FFD\u7565\u7684\u67E5\u8BE2\u53C2\u6570\u4E2D\u5305\u542B\u4E0D\u53EF\u89C1\u5B57\u7B26\u6216\u8005\u9017\u53F7
+NTC_DDOS_PROTECT_TARGET_IP=\u76EE\u6807\u9632\u62A4IP\u914D\u7F6E
\ No newline at end of file
diff --git a/src/main/webapp/WEB-INF/views/dashboard/dashBoardIndex.jsp b/src/main/webapp/WEB-INF/views/dashboard/dashBoardIndex.jsp
index 789f0df25..1aa753886 100644
--- a/src/main/webapp/WEB-INF/views/dashboard/dashBoardIndex.jsp
+++ b/src/main/webapp/WEB-INF/views/dashboard/dashBoardIndex.jsp
@@ -373,6 +373,7 @@
+
<%-- --%>
diff --git a/src/main/webapp/static/global/plugins/highcharts/js/exporting.js b/src/main/webapp/static/global/plugins/highcharts/js/exporting.js
new file mode 100644
index 000000000..5625f1143
--- /dev/null
+++ b/src/main/webapp/static/global/plugins/highcharts/js/exporting.js
@@ -0,0 +1,26 @@
+/*
+ Highcharts JS v6.1.0 (2018-04-13)
+ Exporting module
+
+ (c) 2010-2017 Torstein Honsi
+
+ License: www.highcharts.com/license
+*/
+(function(h){"object"===typeof module&&module.exports?module.exports=h:h(Highcharts)})(function(h){(function(f){var h=f.defaultOptions,z=f.doc,A=f.Chart,w=f.addEvent,H=f.removeEvent,D=f.fireEvent,q=f.createElement,B=f.discardElement,u=f.css,p=f.merge,r=f.pick,k=f.each,E=f.objectEach,t=f.extend,I=f.isTouchDevice,C=f.win,F=C.navigator.userAgent,J=f.Renderer.prototype.symbols;/Edge\/|Trident\/|MSIE /.test(F);/firefox/i.test(F);t(h.lang,{/*printChart:"Print chart",*/downloadPNG:"Download PNG image",downloadJPEG:"Download JPEG image",
+/*downloadPDF:"Download PDF document",*/downloadSVG:"Download SVG vector image",contextButtonTitle:"Chart context menu"});h.navigation={buttonOptions:{theme:{},symbolSize:14,symbolX:12.5,symbolY:10.5,align:"right",buttonSpacing:3,height:22,verticalAlign:"top",width:24}};p(!0,h.navigation,{menuStyle:{border:"1px solid #999999",background:"#ffffff",padding:"5px 0"},menuItemStyle:{padding:"0.5em 1em",background:"none",color:"#333333",fontSize:I?"14px":"11px",transition:"background 250ms, color 250ms"},menuItemHoverStyle:{background:"#335cad",
+color:"#ffffff"},buttonOptions:{symbolFill:"#666666",symbolStroke:"#666666",symbolStrokeWidth:3,theme:{fill:"#ffffff",stroke:"none",padding:5}}});h.exporting={type:"image/png",url:"${pageContext.request.contextPath}/",printMaxWidth:780,scale:2,buttons:{contextButton:{className:"highcharts-contextbutton",menuClassName:"highcharts-contextmenu",symbol:"menu",_titleKey:"contextButtonTitle",menuItems:"printChart separator downloadPNG downloadJPEG downloadPDF downloadSVG".split(" ")}},menuItemDefinitions:{/*printChart:{textKey:"printChart",
+onclick:function(){this.print()}},*/separator:{separator:!0},downloadPNG:{textKey:"downloadPNG",onclick:function(){this.exportChart()}},downloadJPEG:{textKey:"downloadJPEG",onclick:function(){this.exportChart({type:"image/jpeg"})}},/*downloadPDF:{textKey:"downloadPDF",onclick:function(){this.exportChart({type:"application/pdf"})}},*/downloadSVG:{textKey:"downloadSVG",onclick:function(){this.exportChart({type:"image/svg+xml"})}}}};f.post=function(a,b,e){var c=q("form",p({method:"post",action:a,enctype:"multipart/form-data"},
+e),{display:"none"},z.body);E(b,function(a,b){q("input",{type:"hidden",name:b,value:a},null,c)});c.submit();B(c)};t(A.prototype,{sanitizeSVG:function(a,b){if(b&&b.exporting&&b.exporting.allowHTML){var e=a.match(/<\/svg>(.*?$)/);e&&e[1]&&(e='\x3cforeignObject x\x3d"0" y\x3d"0" width\x3d"'+b.chart.width+'" height\x3d"'+b.chart.height+'"\x3e\x3cbody xmlns\x3d"http://www.w3.org/1999/xhtml"\x3e'+e[1]+"\x3c/body\x3e\x3c/foreignObject\x3e",a=a.replace("\x3c/svg\x3e",e+"\x3c/svg\x3e"))}a=a.replace(/zIndex="[^"]+"/g,
+"").replace(/isShadow="[^"]+"/g,"").replace(/symbolName="[^"]+"/g,"").replace(/jQuery[0-9]+="[^"]+"/g,"").replace(/url\(("|")(\S+)("|")\)/g,"url($2)").replace(/url\([^#]+#/g,"url(#").replace(/