Yue 2 éve
szülő
commit
80ed3e5251
34 módosított fájl, 1312 hozzáadás és 21 törlés
  1. 1 0
      VB_DSM_V2.1/Scripts/Cmds/7085_gov.run.xml
  2. 33 0
      VB_DSM_V2.1/Scripts/Cmds/7087_charts.run.xml
  3. 1 1
      VB_DSM_V2.1/Scripts/Cmds/7090_analysis.run.xml
  4. 17 1
      VB_DSM_V2.1/Scripts/Dockers/docker-compose-iwb.yml
  5. 18 2
      VB_DSM_V2.1/Scripts/Dockers/docker-compose.yml
  6. 1 1
      VB_DSM_V2.1/vbdsm-data-upload/vbdsm-acquis-ws/src/main/resources/local/redis-host.properties
  7. 1 1
      VB_DSM_V2.1/vbdsm-statistics/vbdsm-analysis/pom.xml
  8. 1 1
      VB_DSM_V2.1/vbdsm-statistics/vbdsm-analysis/src/main/resources/local/redis-host.properties
  9. 1 0
      VB_DSM_V2.1/vbdsm-web/pom.xml
  10. 19 0
      VB_DSM_V2.1/vbdsm-web/vbdsm-charts/Dockerfile
  11. 109 0
      VB_DSM_V2.1/vbdsm-web/vbdsm-charts/pom.xml
  12. 133 0
      VB_DSM_V2.1/vbdsm-web/vbdsm-charts/src/main/java/cn/vbdsm/common/config/CustomConfig.java
  13. 68 0
      VB_DSM_V2.1/vbdsm-web/vbdsm-charts/src/main/java/cn/vbdsm/common/converts/ChartsConverter.java
  14. 124 0
      VB_DSM_V2.1/vbdsm-web/vbdsm-charts/src/main/java/cn/vbdsm/common/servlets/ApplicationServlet.java
  15. 14 0
      VB_DSM_V2.1/vbdsm-web/vbdsm-charts/src/main/resources/application-beans.xml
  16. 33 0
      VB_DSM_V2.1/vbdsm-web/vbdsm-charts/src/main/resources/application-common.xml
  17. 10 0
      VB_DSM_V2.1/vbdsm-web/vbdsm-charts/src/main/resources/application-context.xml
  18. 27 0
      VB_DSM_V2.1/vbdsm-web/vbdsm-charts/src/main/resources/application-web.xml
  19. 14 0
      VB_DSM_V2.1/vbdsm-web/vbdsm-charts/src/main/resources/auth-rule.properties
  20. 61 0
      VB_DSM_V2.1/vbdsm-web/vbdsm-charts/src/main/resources/local/log4j-cfg.xml
  21. 1 0
      VB_DSM_V2.1/vbdsm-web/vbdsm-charts/src/main/resources/local/redis-host.properties
  22. 61 0
      VB_DSM_V2.1/vbdsm-web/vbdsm-charts/src/main/resources/product/log4j-cfg.xml
  23. 1 0
      VB_DSM_V2.1/vbdsm-web/vbdsm-charts/src/main/resources/product/redis-host.properties
  24. 9 0
      VB_DSM_V2.1/vbdsm-web/vbdsm-charts/src/main/resources/system.properties
  25. 61 0
      VB_DSM_V2.1/vbdsm-web/vbdsm-charts/src/main/resources/test/log4j-cfg.xml
  26. 1 0
      VB_DSM_V2.1/vbdsm-web/vbdsm-charts/src/main/resources/test/redis-host.properties
  27. 410 0
      VB_DSM_V2.1/vbdsm-web/vbdsm-charts/src/main/resources/webdefault.xml
  28. 3 0
      VB_DSM_V2.1/vbdsm-web/vbdsm-charts/src/main/webapp/META-INF/MANIFEST.MF
  29. 74 0
      VB_DSM_V2.1/vbdsm-web/vbdsm-charts/src/main/webapp/WEB-INF/web.xml
  30. 1 1
      VB_DSM_V2.1/vbdsm-web/vbdsm-explorer/src/main/resources/local/redis-host.properties
  31. 1 1
      VB_DSM_V2.1/vbdsm-web/vbdsm-gov/src/main/resources/local/redis-host.properties
  32. 1 1
      VB_DSM_V2.1/vbdsm-web/vbdsm-manage/src/main/resources/local/redis-host.properties
  33. 1 10
      VB_DSM_V2.1/vbdsm-web/vbdsm-passport/src/main/resources/local/redis-host.properties
  34. 1 1
      VB_DSM_V2.1/vbdsm-web/vbdsm-powerservice/src/main/resources/local/redis-host.properties

+ 1 - 0
VB_DSM_V2.1/Scripts/Cmds/7085_gov.run.xml

@@ -1,5 +1,6 @@
 <component name="ProjectRunConfigurationManager">
   <configuration default="false" name="7085_gov" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot">
+    <option name="ACTIVE_PROFILES" value="dev" />
     <module name="vbdsm-gov-new" />
     <option name="SPRING_BOOT_MAIN_CLASS" value="cn.vbdsm.VbdsmGovNewApplication" />
     <method v="2">

+ 33 - 0
VB_DSM_V2.1/Scripts/Cmds/7087_charts.run.xml

@@ -0,0 +1,33 @@
+<component name="ProjectRunConfigurationManager">
+  <configuration default="false" name="7087_charts" type="MavenRunConfiguration" factoryName="Maven">
+    <MavenSettings>
+      <option name="myGeneralSettings" />
+      <option name="myRunnerSettings" />
+      <option name="myRunnerParameters">
+        <MavenRunnerParameters>
+          <option name="cmdOptions" />
+          <option name="profiles">
+            <set />
+          </option>
+          <option name="goals">
+            <list>
+              <option value="jetty:run" />
+            </list>
+          </option>
+          <option name="pomFileName" />
+          <option name="profilesMap">
+            <map>
+              <entry key="local" value="true" />
+            </map>
+          </option>
+          <option name="projectsCmdOptionValues">
+            <list />
+          </option>
+          <option name="resolveToWorkspace" value="false" />
+          <option name="workingDirPath" value="$PROJECT_DIR$/vbdsm-web/vbdsm-charts" />
+        </MavenRunnerParameters>
+      </option>
+    </MavenSettings>
+    <method v="2" />
+  </configuration>
+</component>

+ 1 - 1
VB_DSM_V2.1/Scripts/Cmds/7087_analysis.run.xml → VB_DSM_V2.1/Scripts/Cmds/7090_analysis.run.xml

@@ -1,5 +1,5 @@
 <component name="ProjectRunConfigurationManager">
-  <configuration default="false" name="7087_analysis" type="MavenRunConfiguration" factoryName="Maven">
+  <configuration default="false" name="7090_analysis" type="MavenRunConfiguration" factoryName="Maven">
     <MavenSettings>
       <option name="myGeneralSettings" />
       <option name="myRunnerSettings" />

+ 17 - 1
VB_DSM_V2.1/Scripts/Dockers/docker-compose-iwb.yml

@@ -162,13 +162,29 @@ services:
     networks:
       - vbdsm-net
 
+  vber-server-charts:
+    build: ../../vbdsm-web/vbdsm-charts
+    image: vbdsm-charts:2.1.1
+    container_name: vbdsm-charts
+    restart: always
+    ports:
+      - "7087:8080"
+    environment:
+      TZ: Asia/Shanghai
+    volumes:
+      # 日志文件
+      - /home/yue/vbdsm/server-logs/charts/:/vbdsm/logs/
+    privileged: true
+    networks:
+      - vbdsm-net
+
   vber-server-analysis:
     build: ../../vbdsm-statistics/vbdsm-analysis
     image: vbdsm-analysis:2.1.1
     container_name: vbdsm-analysis
     restart: always
     ports:
-      - "7087:8080"
+      - "7090:8080"
     environment:
       - TZ
       - SERVER_PORT

+ 18 - 2
VB_DSM_V2.1/Scripts/Dockers/docker-compose.yml

@@ -61,7 +61,7 @@ services:
 
   vber-server-passport:
     build: ../../vbdsm-web/vbdsm-passport
-    image: vbdsm-passport:2.1.0
+    image: vbdsm-passport:2.1.1
     container_name: vbdsm-passport
     restart: always
     ports:
@@ -162,13 +162,29 @@ services:
     networks:
       - vbdsm-net
 
+  vber-server-charts:
+    build: ../../vbdsm-web/vbdsm-charts
+    image: vbdsm-charts:2.1.0
+    container_name: vbdsm-charts
+    restart: always
+    ports:
+      - "7087:8080"
+    environment:
+      TZ: Asia/Shanghai
+    volumes:
+      # 日志文件
+      - /home/yue/vbdsm/server-logs/charts/:/vbdsm/logs/
+    privileged: true
+    networks:
+      - vbdsm-net
+
   vber-server-analysis:
     build: ../../vbdsm-statistics/vbdsm-analysis
     image: vbdsm-analysis:2.1.0
     container_name: vbdsm-analysis
     restart: always
     ports:
-      - "7087:8080"
+      - "7090:8080"
     environment:
       TZ: Asia/Shanghai
     volumes:

+ 1 - 1
VB_DSM_V2.1/vbdsm-data-upload/vbdsm-acquis-ws/src/main/resources/local/redis-host.properties

@@ -1 +1 @@
-redis_ref_hosts=47.112.30.247:16379
+redis_ref_hosts=47.112.30.247:6399:Iwb-2017

+ 1 - 1
VB_DSM_V2.1/vbdsm-statistics/vbdsm-analysis/pom.xml

@@ -123,7 +123,7 @@
                     <contextPath>/</contextPath>
                     <connectors>
                         <connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
-                            <port>7087</port>
+                            <port>7090</port>
                         </connector>
                     </connectors>
                     <scanIntervalSeconds>0</scanIntervalSeconds>

+ 1 - 1
VB_DSM_V2.1/vbdsm-statistics/vbdsm-analysis/src/main/resources/local/redis-host.properties

@@ -1 +1 @@
-redis_ref_hosts=47.112.30.247:16379
+redis_ref_hosts=47.112.30.247:6399:Iwb-2017

+ 1 - 0
VB_DSM_V2.1/vbdsm-web/pom.xml

@@ -20,6 +20,7 @@
         <module>vbdsm-gov</module>
         <module>vbdsm-gov-new</module>
         <module>vbdsm-explorer</module>
+        <module>vbdsm-charts</module>
     </modules>
 
     <build>

+ 19 - 0
VB_DSM_V2.1/vbdsm-web/vbdsm-charts/Dockerfile

@@ -0,0 +1,19 @@
+FROM tomcat:8.5.38
+MAINTAINER Vber
+
+RUN rm -rf webapps
+
+RUN mkdir -p /vbdsm/logs
+
+ENV TZ=Asia/Shanghai
+RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
+
+ADD ./target/ROOT.war /usr/local/tomcat/webapps/
+
+WORKDIR /vbdsm
+
+#端口
+EXPOSE 8080
+
+#设置启动命令
+ENTRYPOINT ["/usr/local/tomcat/bin/catalina.sh","run"]

+ 109 - 0
VB_DSM_V2.1/vbdsm-web/vbdsm-charts/pom.xml

@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xmlns="http://maven.apache.org/POM/4.0.0"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>cn.vbdsm</groupId>
+        <artifactId>vbdsm-web</artifactId>
+        <version>2.1.0</version>
+    </parent>
+    <packaging>war</packaging>
+
+    <artifactId>vbdsm-charts</artifactId>
+    <properties>
+        <javacc.version>4.1</javacc.version>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>javacc</groupId>
+            <artifactId>javacc</artifactId>
+            <version>${javacc.version}</version>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>bouncycastle</groupId>
+            <artifactId>bouncycastle-jce-jdk13</artifactId>
+            <version>112</version>
+        </dependency>
+
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>servlet-api</artifactId>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>cn.vbdsm</groupId>
+            <artifactId>vbdsm-base</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-test</artifactId>
+            <version>${spring.version}</version>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>batik</groupId>
+            <artifactId>batik-all</artifactId>
+            <version>1.7</version>
+        </dependency>
+
+        <dependency>
+            <groupId>pdf-transcoder</groupId>
+            <artifactId>pdf-transcoder</artifactId>
+            <version>1.0</version>
+        </dependency>
+        <dependency>
+            <groupId>xalan</groupId>
+            <artifactId>xalan</artifactId>
+            <version>2.7.0</version>
+        </dependency>
+
+        <dependency>
+            <groupId>xerces</groupId>
+            <artifactId>org-apache-xerces</artifactId>
+            <version>2.5.0</version>
+        </dependency>
+        <dependency>
+            <groupId>xml-apis</groupId>
+            <artifactId>xml-apis-ext</artifactId>
+            <version>1.3.04</version>
+        </dependency>
+        <dependency>
+            <groupId>xml-apis</groupId>
+            <artifactId>xml-apis</artifactId>
+            <version>1.3.04</version>
+        </dependency>
+        <dependency>
+            <groupId>xmlgraphics</groupId>
+            <artifactId>xmlgraphics-commons</artifactId>
+            <version>1.4</version>
+        </dependency>
+
+    </dependencies>
+
+    <build>
+        <finalName>ROOT</finalName>
+        <plugins>
+            <plugin>
+                <groupId>org.mortbay.jetty</groupId>
+                <artifactId>maven-jetty-plugin</artifactId>
+                <configuration>
+                    <webDefaultXml>src/main/resources/webdefault.xml</webDefaultXml>
+                    <contextPath>/</contextPath>
+                    <connectors>
+                        <connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
+                            <port>7087</port>
+                        </connector>
+                    </connectors>
+                </configuration>
+            </plugin>
+        </plugins>
+
+    </build>
+</project>

+ 133 - 0
VB_DSM_V2.1/vbdsm-web/vbdsm-charts/src/main/java/cn/vbdsm/common/config/CustomConfig.java

@@ -0,0 +1,133 @@
+package cn.vbdsm.common.config;
+
+import org.springframework.beans.BeansException;
+import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
+import org.springframework.beans.factory.config.PropertyPlaceholderConfigurer;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Properties;
+
+/**
+ * 加载自定义配置
+ *
+ * @author tanyongde
+ */
+public class CustomConfig extends PropertyPlaceholderConfigurer {
+
+    private static Map<String, String> ctxPropertiesMap;
+    private final String PLACEHOLDER_START = "${";
+
+    /**
+     * 获取已加载的配置信息
+     *
+     * @param name
+     * @return
+     */
+    public static String getContextProperty(String name) {
+        return ctxPropertiesMap.get(name);
+    }
+
+    @Override
+    protected void processProperties(ConfigurableListableBeanFactory beanFactoryToProcess, Properties props) throws BeansException {
+        resolvePlaceHolders(props);
+        super.processProperties(beanFactoryToProcess, props);
+        ctxPropertiesMap = new HashMap<String, String>();
+        for (Object key : props.keySet()) {
+            String keyStr = key.toString();
+            String value = props.getProperty(keyStr);
+            ctxPropertiesMap.put(keyStr, value);
+        }
+    }
+
+    /**
+     * 解析占位符
+     *
+     * @param properties
+     */
+    private void resolvePlaceHolders(Properties properties) {
+        Iterator itr = properties.entrySet().iterator();
+        while (itr.hasNext()) {
+            final Map.Entry entry = (Map.Entry) itr.next();
+            final Object value = entry.getValue();
+            if (value instanceof String) {
+                final String resolved = resolvePlaceHolder(properties, (String) value);
+                if (!value.equals(resolved)) {
+                    if (resolved == null) {
+                        itr.remove();
+                    } else {
+                        entry.setValue(resolved);
+                    }
+                }
+            }
+        }
+    }
+
+    /**
+     * 解析占位符具体操作
+     *
+     * @param property
+     * @return
+     */
+    private String resolvePlaceHolder(Properties prots, String property) {
+        if (property.indexOf(PLACEHOLDER_START) < 0) {
+            return property;
+        }
+        StringBuffer buff = new StringBuffer();
+        char[] chars = property.toCharArray();
+        for (int pos = 0; pos < chars.length; pos++) {
+            if (chars[pos] == '$') {
+                // peek ahead  
+                if (chars[pos + 1] == '{') {
+                    // we have a placeholder, spin forward till we find the end  
+                    String propertyName = "";
+                    int x = pos + 2;
+                    for (; x < chars.length && chars[x] != '}'; x++) {
+                        propertyName += chars[x];
+                        // if we reach the end of the string w/o finding the  
+                        // matching end, that is an exception  
+                        if (x == chars.length - 1) {
+                            throw new IllegalArgumentException("unmatched placeholder start [" + property + "]");
+                        }
+                    }
+                    String value = extractFromSystem(prots, propertyName);
+                    buff.append(value == null ? "" : value);
+                    pos = x + 1;
+                    // make sure spinning forward did not put us past the end of the buffer...  
+                    if (pos >= chars.length) {
+                        break;
+                    }
+                }
+            }
+            buff.append(chars[pos]);
+        }
+        String rtn = buff.toString();
+        return isEmpty(rtn) ? null : rtn;
+    }
+
+
+    /**
+     * 获得系统属性 当然 你可以选择从别的地方获取值
+     *
+     * @param systemPropertyName
+     * @return
+     */
+    private String extractFromSystem(Properties prots, String propertyName) {
+        try {
+            return prots.getProperty(propertyName);
+        } catch (Throwable t) {
+            return null;
+        }
+    }
+
+    /**
+     * 判断字符串的空(null或者.length=0)
+     *
+     * @param string
+     * @return
+     */
+    private boolean isEmpty(String string) {
+        return string == null || string.length() == 0;
+    }
+}

+ 68 - 0
VB_DSM_V2.1/vbdsm-web/vbdsm-charts/src/main/java/cn/vbdsm/common/converts/ChartsConverter.java

@@ -0,0 +1,68 @@
+package cn.vbdsm.common.converts;
+
+import org.apache.batik.apps.rasterizer.DestinationType;
+import org.apache.batik.apps.rasterizer.SVGConverter;
+import org.apache.batik.apps.rasterizer.SVGConverterException;
+
+import java.io.File;
+
+/**
+ * 导出文件转换
+ *
+ * @author tanyongde
+ */
+public class ChartsConverter extends SVGConverter {
+
+    /**
+     * 转换方法
+     *
+     * @param sources     SVG文件路径
+     * @param destination 目标文件路径
+     * @param type        转换类型,有 image/png | image/jpeg | application/pdf |
+     *                    image/svg+xml 可选
+     * @param width       导出图片宽度
+     * @return 目标文件名
+     * @throws SVGConverterException
+     */
+    public String conver(String sources, String destination, String type, float width) throws SVGConverterException {
+
+        SVGConverter converter = new ChartsConverter();
+
+        // 设置高度,默认是400
+        converter.setHeight(400);
+
+        // 设置宽度,传入的值
+        converter.setWidth(width);
+
+        // 设置svg源文件路径,是一个数组,支持多个文件同时转换
+        String[] src = {sources};
+        converter.setSources(src);
+
+        // 设置图片质量
+        converter.setQuality(MAXIMUM_QUALITY);
+
+        // 记录文件后缀
+        String ext = "";
+
+        // 更具传入的类型设置导出类型和文件后缀
+        if (type.equals("image/png")) {
+            converter.setDestinationType(DestinationType.PNG);
+            ext = "png";
+        } else if (type.equals("image/jpeg")) {
+            converter.setDestinationType(DestinationType.JPEG);
+            ext = "jpg";
+        } else if (type.equals("application/pdf")) {
+            converter.setDestinationType(DestinationType.PDF);
+            ext = "pdf";
+        } else {
+            return null;
+        }
+
+        // 设置目标文件路径
+        converter.setDst(new File(destination + "/chart." + ext));
+        // 执行导出
+        converter.execute();
+
+        return "chart." + ext;
+    }
+}

+ 124 - 0
VB_DSM_V2.1/vbdsm-web/vbdsm-charts/src/main/java/cn/vbdsm/common/servlets/ApplicationServlet.java

@@ -0,0 +1,124 @@
+package cn.vbdsm.common.servlets;
+
+import cn.vbdsm.common.converts.ChartsConverter;
+import org.apache.batik.apps.rasterizer.SVGConverterException;
+import org.springframework.web.servlet.DispatcherServlet;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.OutputStreamWriter;
+
+/**
+ * Highcharts Servlet导出服务器 Servlet文件
+ *
+ * @author tanyongde
+ */
+public class ApplicationServlet extends DispatcherServlet {
+    private static final long serialVersionUID = 1L;
+
+    @Override
+    protected void doService(HttpServletRequest request, HttpServletResponse response) throws Exception {
+
+        request.setCharacterEncoding("utf-8");
+
+        response.setContentType("text/html");
+
+        /*
+         * 第一步:获取参数
+         */
+        String svg = request.getParameter("svg");
+
+        String width = request.getParameter("width");
+
+        String type = request.getParameter("type");
+
+        String filename = request.getParameter("filename");
+
+        // method,有两种情况,download为将生成的文件下载、show为将图片显示在页面上
+        String method = request.getParameter("method");
+
+        if (svg == null || type == null || method == null) {
+            response.getWriter().print("the parameter is error, please check the parameters!");
+            response.getWriter().close();
+            return;
+        }
+        /*
+         * 第二步:生成 .svg文件
+         */
+        @SuppressWarnings("deprecation")
+        String webRoot = request.getRealPath("") + "/temp/";// 获取项目的绝对路径
+        File dir = new File(webRoot);
+        if (!dir.exists()) {
+            dir.mkdirs();
+        }
+
+        // SVG临时文件名
+        String temp = webRoot + System.currentTimeMillis() + (int) (Math.random() * 1000) + ".svg";
+
+        // 将svg代码写入到临时文件中,文件后缀的.svg
+        File svgTempFile = new File(temp);
+        // 写入文件,注意文件编码
+        OutputStreamWriter svgFileOsw = new OutputStreamWriter(new FileOutputStream(svgTempFile), "UTF-8");
+        svgFileOsw.write(svg);
+        svgFileOsw.flush();
+        svgFileOsw.close();
+
+        /**
+         * 第三步:调用转换函数,生成目标文件
+         */
+
+        try {
+            File resultFile = null;
+            // 如果是导出SVG,直接调用下载,不需要将svg转换成其他格式
+            if (type.equals("image/svg+xml")) {
+                resultFile = new File(temp);
+                filename = "chart.svg";
+            } else {
+                ChartsConverter mc = new ChartsConverter();
+                // 调用转换函数,返回目标文件名
+                filename = mc.conver(temp, webRoot, type, Float.parseFloat(width));
+                // 读取目标文件流,转换调用下载
+                resultFile = new File(webRoot + filename);
+            }
+            FileInputStream resultFileFi = new FileInputStream(resultFile);
+            long l = resultFile.length();
+            int k = 0;
+            byte[] abyte0 = new byte[65000];
+
+            /**
+             * 第四步:调用浏览器下载
+             */
+            if (method.equals("download")) {
+                // 调用下载
+                response.setContentType("application/x-msdownload");
+                response.setContentLength((int) l);
+                response.setHeader("Content-Disposition", "attachment; filename=" + filename);
+                while ((long) k < l) {
+                    int j;
+                    j = resultFileFi.read(abyte0, 0, 65000);
+                    k += j;
+                    response.getOutputStream().write(abyte0, 0, j);
+                }
+                resultFileFi.close();
+                resultFile.delete();
+            } else {
+                // 直接将图片显示在页面上
+                response.setCharacterEncoding("utf-8");
+                String filepath = (webRoot + filename).replaceAll("\\\\", "\\\\\\\\");
+                // 写包含图片路径的Json字符串
+                response.getWriter().write("{\"filename\":\"" + filepath + "\"}");
+            }
+            // 转换成功后,删除临时文件
+            svgTempFile.delete();
+
+        } catch (NumberFormatException e) {
+            e.printStackTrace();
+        } catch (SVGConverterException e) {
+            e.printStackTrace();
+        }
+    }
+
+}

+ 14 - 0
VB_DSM_V2.1/vbdsm-web/vbdsm-charts/src/main/resources/application-beans.xml

@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:mvc="http://www.springframework.org/schema/mvc"
+	xmlns:context="http://www.springframework.org/schema/context"
+	xmlns:aop="http://www.springframework.org/schema/aop" xmlns:util="http://www.springframework.org/schema/util"
+	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+       http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
+       http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
+       http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd 
+       http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.0.xsd">
+
+	<bean name="restTemplate" class="org.springframework.web.client.RestTemplate"></bean>
+
+</beans>

+ 33 - 0
VB_DSM_V2.1/vbdsm-web/vbdsm-charts/src/main/resources/application-common.xml

@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	   xmlns:context="http://www.springframework.org/schema/context"
+	   xmlns="http://www.springframework.org/schema/beans"
+	   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+
+	   http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">
+
+    <context:component-scan base-package="com.cn95598"/>
+    <context:annotation-config/>
+
+    <bean id="log4jInitialization"
+          class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
+        <property name="targetClass" value="org.springframework.util.Log4jConfigurer"/>
+        <property name="targetMethod" value="initLogging"/>
+        <property name="arguments">
+            <list>
+                <value>classpath:log4j-cfg.xml</value>
+            </list>
+        </property>
+    </bean>
+
+    <bean id="propertyConfigurer" class="cn.vbdsm.common.config.CustomConfig">
+        <property name="locations">
+            <list>
+                <value>classpath:system.properties</value>
+                <value>classpath:auth-rule.properties</value>
+            </list>
+        </property>
+    </bean>
+
+
+</beans>

+ 10 - 0
VB_DSM_V2.1/vbdsm-web/vbdsm-charts/src/main/resources/application-context.xml

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
+	
+	<import resource="classpath:application-beans.xml"/>
+	<import resource="classpath:application-common.xml"/>
+	
+	
+</beans>

+ 27 - 0
VB_DSM_V2.1/vbdsm-web/vbdsm-charts/src/main/resources/application-web.xml

@@ -0,0 +1,27 @@
+<beans xmlns="http://www.springframework.org/schema/beans"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
+	xmlns:mvc="http://www.springframework.org/schema/mvc"
+	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+           http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd">
+           
+	<mvc:annotation-driven />
+
+	<bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter"></bean>
+	
+	<bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver"
+		p:defaultEncoding="UTF-8" p:maxUploadSize="2199023255552" />
+		
+	<!-- <mvc:interceptors>
+		<mvc:interceptor>
+			<mvc:mapping path="/**"/>
+			<bean class="com.cn95598.common.interceptors.LoginInterceptor"></bean>
+		</mvc:interceptor>
+		<mvc:interceptor>
+			<mvc:mapping path="/**"/>
+			<bean class="com.cn95598.common.interceptors.AuthInterceptor"></bean>
+		</mvc:interceptor>
+	</mvc:interceptors> -->
+	
+	<import resource="classpath:application-context.xml" />
+	
+</beans>

+ 14 - 0
VB_DSM_V2.1/vbdsm-web/vbdsm-charts/src/main/resources/auth-rule.properties

@@ -0,0 +1,14 @@
+#allow request common modes
+auth.rule.allow.modes=lang,desktop,setting,app,buildingmornitor,plugins
+#allow request urls
+auth.rule.allow.urls=web/menu/getList,web/getMonitorTree/.*
+
+#allow request methods
+auth.rule.method.query=get,config
+auth.rule.method.add=add,save
+auth.rule.method.edit=modify,update
+auth.rule.method.remove=remove,recovery,delete,realDel
+auth.rule.method.upload=upload
+auth.rule.method.download=download
+auth.rule.method.import=import
+auth.rule.method.export=export

+ 61 - 0
VB_DSM_V2.1/vbdsm-web/vbdsm-charts/src/main/resources/local/log4j-cfg.xml

@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE log4j:configuration PUBLIC "-//LOGGER"
+        "http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/xml/doc-files/log4j.dtd">
+<log4j:configuration>
+
+    <appender name="stdout" class="org.apache.log4j.ConsoleAppender">
+        <layout class="org.apache.log4j.PatternLayout">
+            <param name="ConversionPattern" value="[%-5p] [%d{HH:mm:ss}] %c - %m%n"/>
+        </layout>
+    </appender>
+
+    <appender name="file" class="org.apache.log4j.DailyRollingFileAppender">
+        <param name="file" value="D:/logs/vbdsm/charts/logs/webapp.log"/>
+        <param name="append" value="true"/>
+        <param name="datePattern" value="'.'yyyy-MM-dd"/>
+        <layout class="org.apache.log4j.PatternLayout">
+            <param name="ConversionPattern" value="[%-5p] [%d{yyyy-MM-dd HH:mm:ss}] %c - %m%n"/>
+        </layout>
+        <filter class="org.apache.log4j.varia.LevelRangeFilter">
+            <param name="AcceptOnMatch" value="true"/>
+        </filter>
+    </appender>
+
+    <appender name="warn" class="org.apache.log4j.DailyRollingFileAppender">
+        <param name="file" value="/opt/cn95598-charts/logs/warn.log"/>
+        <param name="append" value="true"/>
+        <param name="datePattern" value="'.'yyyy-MM-dd"/>
+        <layout class="org.apache.log4j.PatternLayout">
+            <param name="ConversionPattern" value="[%-5p][ %t ] [%d{yyyy-MM-dd HH:mm:ss}] %c - %m%n"/>
+        </layout>
+        <filter class="org.apache.log4j.varia.LevelRangeFilter">
+            <param name="LevelMin" value="WARN"/>
+            <param name="LevelMax" value="WARN"/>
+            <param name="AcceptOnMatch" value="true"/>
+        </filter>
+    </appender>
+
+    <appender name="error" class="org.apache.log4j.DailyRollingFileAppender">
+        <param name="file" value="/opt/cn95598-charts/logs/error.log"/>
+        <param name="append" value="true"/>
+        <param name="datePattern" value="'.'yyyy-MM-dd"/>
+        <layout class="org.apache.log4j.PatternLayout">
+            <param name="ConversionPattern" value="[%-5p][ %t ] [%d{yyyy-MM-dd HH:mm:ss}] %c - %m%n"/>
+        </layout>
+        <filter class="org.apache.log4j.varia.LevelRangeFilter">
+            <param name="LevelMin" value="ERROR"/>
+            <param name="LevelMax" value="ERROR"/>
+            <param name="AcceptOnMatch" value="true"/>
+        </filter>
+    </appender>
+
+    <logger name="org.springframework.jdbc.core.JdbcTemplate" additivity="true">
+        <level value="info"/>
+    </logger>
+
+    <root>
+        <level value="info"/>
+        <appender-ref ref="stdout"/>
+    </root>
+
+</log4j:configuration>

+ 1 - 0
VB_DSM_V2.1/vbdsm-web/vbdsm-charts/src/main/resources/local/redis-host.properties

@@ -0,0 +1 @@
+redis_ref_hosts=47.112.30.247:6399

+ 61 - 0
VB_DSM_V2.1/vbdsm-web/vbdsm-charts/src/main/resources/product/log4j-cfg.xml

@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE log4j:configuration PUBLIC "-//LOGGER"
+        "http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/xml/doc-files/log4j.dtd">
+<log4j:configuration>
+
+    <appender name="stdout" class="org.apache.log4j.ConsoleAppender">
+        <layout class="org.apache.log4j.PatternLayout">
+            <param name="ConversionPattern" value="[%-5p] [%d{HH:mm:ss}] %c - %m%n"/>
+        </layout>
+    </appender>
+
+    <appender name="file" class="org.apache.log4j.DailyRollingFileAppender">
+        <param name="file" value="D:/logs/vbdsm/charts/logs/webapp.log"/>
+        <param name="append" value="true"/>
+        <param name="datePattern" value="'.'yyyy-MM-dd"/>
+        <layout class="org.apache.log4j.PatternLayout">
+            <param name="ConversionPattern" value="[%-5p] [%d{yyyy-MM-dd HH:mm:ss}] %c - %m%n"/>
+        </layout>
+        <filter class="org.apache.log4j.varia.LevelRangeFilter">
+            <param name="AcceptOnMatch" value="true"/>
+        </filter>
+    </appender>
+
+    <appender name="warn" class="org.apache.log4j.DailyRollingFileAppender">
+        <param name="file" value="D:/CN95598_2.0/cn95598-charts/logs/warn.log"/>
+        <param name="append" value="true"/>
+        <param name="datePattern" value="'.'yyyy-MM-dd"/>
+        <layout class="org.apache.log4j.PatternLayout">
+            <param name="ConversionPattern" value="[%-5p][ %t ] [%d{yyyy-MM-dd HH:mm:ss}] %c - %m%n"/>
+        </layout>
+        <filter class="org.apache.log4j.varia.LevelRangeFilter">
+            <param name="LevelMin" value="WARN"/>
+            <param name="LevelMax" value="WARN"/>
+            <param name="AcceptOnMatch" value="true"/>
+        </filter>
+    </appender>
+
+    <appender name="error" class="org.apache.log4j.DailyRollingFileAppender">
+        <param name="file" value="D:/CN95598_2.0/cn95598-charts/logs/error.log"/>
+        <param name="append" value="true"/>
+        <param name="datePattern" value="'.'yyyy-MM-dd"/>
+        <layout class="org.apache.log4j.PatternLayout">
+            <param name="ConversionPattern" value="[%-5p][ %t ] [%d{yyyy-MM-dd HH:mm:ss}] %c - %m%n"/>
+        </layout>
+        <filter class="org.apache.log4j.varia.LevelRangeFilter">
+            <param name="LevelMin" value="ERROR"/>
+            <param name="LevelMax" value="ERROR"/>
+            <param name="AcceptOnMatch" value="true"/>
+        </filter>
+    </appender>
+
+    <logger name="org.springframework.jdbc.core.JdbcTemplate" additivity="true">
+        <level value="info"/>
+    </logger>
+
+    <root>
+        <level value="info"/>
+        <appender-ref ref="stdout"/>
+    </root>
+
+</log4j:configuration>

+ 1 - 0
VB_DSM_V2.1/vbdsm-web/vbdsm-charts/src/main/resources/product/redis-host.properties

@@ -0,0 +1 @@
+redis_ref_hosts=47.112.30.247:6399

+ 9 - 0
VB_DSM_V2.1/vbdsm-web/vbdsm-charts/src/main/resources/system.properties

@@ -0,0 +1,9 @@
+chartset=utf-8
+
+#andsm DEPOT_HOME path
+filesDepot=/opt/DSM/DEPOT_HOME/files/
+rootDir=/opt/DSM/DEPOT_HOME/
+usersRootDir=/opt/DSM/DEPOT_HOME/users/
+classRootDir=/opt/DSM/DEPOT_HOME/class/
+resourceRootDir=/opt/DSM/DEPOT_HOME/resource/
+ftpPort=21

+ 61 - 0
VB_DSM_V2.1/vbdsm-web/vbdsm-charts/src/main/resources/test/log4j-cfg.xml

@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE log4j:configuration PUBLIC "-//LOGGER"
+        "http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/xml/doc-files/log4j.dtd">
+<log4j:configuration>
+
+    <appender name="stdout" class="org.apache.log4j.ConsoleAppender">
+        <layout class="org.apache.log4j.PatternLayout">
+            <param name="ConversionPattern" value="[%-5p] [%d{HH:mm:ss}] %c - %m%n"/>
+        </layout>
+    </appender>
+
+    <appender name="file" class="org.apache.log4j.DailyRollingFileAppender">
+        <param name="file" value="/vbdsm-charts/logs/webapp.log"/>
+        <param name="append" value="true"/>
+        <param name="datePattern" value="'.'yyyy-MM-dd"/>
+        <layout class="org.apache.log4j.PatternLayout">
+            <param name="ConversionPattern" value="[%-5p] [%d{yyyy-MM-dd HH:mm:ss}] %c - %m%n"/>
+        </layout>
+        <filter class="org.apache.log4j.varia.LevelRangeFilter">
+            <param name="AcceptOnMatch" value="true"/>
+        </filter>
+    </appender>
+
+    <appender name="warn" class="org.apache.log4j.DailyRollingFileAppender">
+        <param name="file" value="/opt/NXDSM_2.0/nxdsm-charts/logs/warn.log"/>
+        <param name="append" value="true"/>
+        <param name="datePattern" value="'.'yyyy-MM-dd"/>
+        <layout class="org.apache.log4j.PatternLayout">
+            <param name="ConversionPattern" value="[%-5p][ %t ] [%d{yyyy-MM-dd HH:mm:ss}] %c - %m%n"/>
+        </layout>
+        <filter class="org.apache.log4j.varia.LevelRangeFilter">
+            <param name="LevelMin" value="WARN"/>
+            <param name="LevelMax" value="WARN"/>
+            <param name="AcceptOnMatch" value="true"/>
+        </filter>
+    </appender>
+
+    <appender name="error" class="org.apache.log4j.DailyRollingFileAppender">
+        <param name="file" value="/opt/NXDSM_2.0/nxdsm-charts/logs/error.log"/>
+        <param name="append" value="true"/>
+        <param name="datePattern" value="'.'yyyy-MM-dd"/>
+        <layout class="org.apache.log4j.PatternLayout">
+            <param name="ConversionPattern" value="[%-5p][ %t ] [%d{yyyy-MM-dd HH:mm:ss}] %c - %m%n"/>
+        </layout>
+        <filter class="org.apache.log4j.varia.LevelRangeFilter">
+            <param name="LevelMin" value="ERROR"/>
+            <param name="LevelMax" value="ERROR"/>
+            <param name="AcceptOnMatch" value="true"/>
+        </filter>
+    </appender>
+
+    <logger name="org.springframework.jdbc.core.JdbcTemplate" additivity="true">
+        <level value="info"/>
+    </logger>
+
+    <root>
+        <level value="info"/>
+        <appender-ref ref="stdout"/>
+    </root>
+
+</log4j:configuration>

+ 1 - 0
VB_DSM_V2.1/vbdsm-web/vbdsm-charts/src/main/resources/test/redis-host.properties

@@ -0,0 +1 @@
+redis_ref_hosts=vbdsm-redis:6379

+ 410 - 0
VB_DSM_V2.1/vbdsm-web/vbdsm-charts/src/main/resources/webdefault.xml

@@ -0,0 +1,410 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!-- ===================================================================== -->
+<!-- This file contains the default descriptor for web applications.       -->
+<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+<!-- The intent of this descriptor is to include jetty specific or common  -->
+<!-- configuration for all webapps.   If a context has a webdefault.xml    -->
+<!-- descriptor, it is applied before the contexts own web.xml file        -->
+<!--                                                                       -->
+<!-- A context may be assigned a default descriptor by:                    -->
+<!--  + Calling WebApplicationContext.setDefaultsDescriptor                -->
+<!--  + Passed an arg to addWebApplications                                -->
+<!--                                                                       -->
+<!-- This file is used both as the resource within the jetty.jar (which is -->
+<!-- used as the default if no explicit defaults descriptor is set) and it -->
+<!-- is copied to the etc directory of the Jetty distro and explicitly     -->
+<!-- by the jetty.xml file.                                                -->
+<!--                                                                       -->
+<!-- ===================================================================== -->
+<web-app 
+   xmlns="http://java.sun.com/xml/ns/javaee" 
+   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+   xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" 
+   metadata-complete="true"
+   version="2.5"> 
+
+  <description>
+    Default web.xml file.  
+    This file is applied to a Web application before it's own WEB_INF/web.xml file
+  </description>
+
+
+  <!-- ==================================================================== -->
+  <!-- Context params to control Session Cookies                            -->
+  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->
+  <!-- UNCOMMENT TO ACTIVATE
+  <context-param>
+    <param-name>org.mortbay.jetty.servlet.SessionDomain</param-name>
+    <param-value>127.0.0.1</param-value>
+  </context-param>
+
+  <context-param>
+    <param-name>org.mortbay.jetty.servlet.SessionPath</param-name>
+    <param-value>/</param-value>
+  </context-param>
+
+  <context-param>
+    <param-name>org.mortbay.jetty.servlet.MaxAge</param-name>
+    <param-value>-1</param-value>
+  </context-param>
+  -->
+
+  <context-param>
+    <param-name>org.mortbay.jetty.webapp.NoTLDJarPattern</param-name>
+    <param-value>start.jar|ant-.*\.jar|dojo-.*\.jar|jetty-.*\.jar|jsp-api-.*\.jar|junit-.*\.jar|servlet-api-.*\.jar|dnsns\.jar|rt\.jar|jsse\.jar|tools\.jar|sunpkcs11\.jar|sunjce_provider\.jar|xerces.*\.jar</param-value>
+  </context-param>
+            
+
+
+  <!-- ==================================================================== -->
+  <!-- The default servlet.                                                 -->
+  <!-- This servlet, normally mapped to /, provides the handling for static -->
+  <!-- content, OPTIONS and TRACE methods for the context.                  -->
+  <!-- The following initParameters are supported:                          -->
+  <!--                                                                      -->
+  <!--   acceptRanges     If true, range requests and responses are         -->
+  <!--                    supported                                         -->
+  <!--                                                                      -->
+  <!--   dirAllowed       If true, directory listings are returned if no    -->
+  <!--                    welcome file is found. Else 403 Forbidden.        -->
+  <!--                                                                      -->
+  <!--   welcomeServlets  If true, attempt to dispatch to welcome files     -->
+  <!--                    that are servlets, if no matching static          --> 
+  <!--                    resources can be found.                           -->
+  <!--                                                                      -->
+  <!--   redirectWelcome  If true, redirect welcome file requests           -->
+  <!--                    else use request dispatcher forwards              -->
+  <!--                                                                      -->
+  <!--   gzip             If set to true, then static content will be served--> 
+  <!--                    as gzip content encoded if a matching resource is -->
+  <!--                    found ending with ".gz"                           -->
+  <!--                                                                      -->
+  <!--   resoureBase      Can be set to replace the context resource base   -->
+  <!--                                                                      -->
+  <!--   relativeResourceBase                                               -->
+  <!--                    Set with a pathname relative to the base of the   -->
+  <!--                    servlet context root. Useful for only serving     -->
+  <!--                    static content from only specific subdirectories. -->
+  <!--                                                                      -->
+  <!--   useFileMappedBuffer                                                -->
+  <!--                    If set to true (the default), a  memory mapped    -->
+  <!--                    file buffer will be used to serve static content  -->
+  <!--                    when using an NIO connector. Setting this value   -->
+  <!--                    to false means that a direct buffer will be used  -->
+  <!--                    instead. If you are having trouble with Windows   -->
+  <!--                    file locking, set this to false.                  -->
+  <!--                                                                      -->
+  <!--  cacheControl      If set, all static content will have this value   -->
+  <!--                    set as the cache-control header.                  -->
+  <!--                                                                      -->
+  <!--  maxCacheSize      Maximum size of the static resource cache         -->
+  <!--                                                                      -->
+  <!--  maxCachedFileSize Maximum size of any single file in the cache      -->
+  <!--                                                                      -->
+  <!--  maxCachedFiles    Maximum number of files in the cache              -->
+  <!--                                                                      -->
+  <!--  cacheType         "nio", "bio" or "both" to determine the type(s)   -->
+  <!--                    of resource cache. A bio cached buffer may be used-->
+  <!--                    by nio but is not as efficient as a nio buffer.   -->
+  <!--                    An nio cached buffer may not be used by bio.      -->
+  <!--                                                                      -->
+  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->
+  <servlet>
+    <servlet-name>default</servlet-name>
+    <servlet-class>org.mortbay.jetty.servlet.DefaultServlet</servlet-class>
+    <init-param>
+      <param-name>acceptRanges</param-name>
+      <param-value>true</param-value>
+    </init-param>
+    <init-param>
+      <param-name>dirAllowed</param-name>
+      <param-value>true</param-value>
+    </init-param>
+    <init-param>
+      <param-name>welcomeServlets</param-name>
+      <param-value>false</param-value>
+    </init-param>
+    <init-param>
+      <param-name>redirectWelcome</param-name>
+      <param-value>false</param-value>
+    </init-param>
+    <init-param>
+      <param-name>maxCacheSize</param-name>
+      <param-value>256000000</param-value>
+    </init-param>
+    <init-param>
+      <param-name>maxCachedFileSize</param-name>
+      <param-value>10000000</param-value>
+    </init-param>
+    <init-param>
+      <param-name>maxCachedFiles</param-name>
+      <param-value>1000</param-value>
+    </init-param>
+    <init-param>
+      <param-name>cacheType</param-name>
+      <param-value>both</param-value>
+    </init-param>
+    <init-param>
+      <param-name>gzip</param-name>
+      <param-value>true</param-value>
+    </init-param>
+    <init-param>
+      <param-name>useFileMappedBuffer</param-name>
+      <param-value>false</param-value>
+    </init-param>  
+    <!--
+    <init-param>
+      <param-name>cacheControl</param-name>
+      <param-value>max-age=3600,public</param-value>
+    </init-param>
+    -->
+    <load-on-startup>0</load-on-startup>
+  </servlet> 
+
+  <servlet-mapping> <servlet-name>default</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping>
+  
+
+  <!-- ==================================================================== -->
+  <!-- JSP Servlet                                                          -->
+  <!-- This is the jasper JSP servlet from the jakarta project              -->
+  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->
+  <!-- The JSP page compiler and execution servlet, which is the mechanism  -->
+  <!-- used by Glassfish to support JSP pages.  Traditionally, this servlet -->
+  <!-- is mapped to URL patterh "*.jsp".  This servlet supports the         -->
+  <!-- following initialization parameters (default values are in square    -->
+  <!-- brackets):                                                           -->
+  <!--                                                                      -->
+  <!--   checkInterval       If development is false and reloading is true, -->
+  <!--                       background compiles are enabled. checkInterval -->
+  <!--                       is the time in seconds between checks to see   -->
+  <!--                       if a JSP page needs to be recompiled. [300]    -->
+  <!--                                                                      -->
+  <!--   compiler            Which compiler Ant should use to compile JSP   -->
+  <!--                       pages.  See the Ant documenation for more      -->
+  <!--                       information. [javac]                           -->
+  <!--                                                                      -->
+  <!--   classdebuginfo      Should the class file be compiled with         -->
+  <!--                       debugging information?  [true]                 -->
+  <!--                                                                      -->
+  <!--   classpath           What class path should I use while compiling   -->
+  <!--                       generated servlets?  [Created dynamically      -->
+  <!--                       based on the current web application]          -->
+  <!--                       Set to ? to make the container explicitly set  -->
+  <!--                       this parameter.                                -->
+  <!--                                                                      -->
+  <!--   development         Is Jasper used in development mode (will check -->
+  <!--                       for JSP modification on every access)?  [true] -->
+  <!--                                                                      -->
+  <!--   enablePooling       Determines whether tag handler pooling is      -->
+  <!--                       enabled  [true]                                -->
+  <!--                                                                      -->
+  <!--   fork                Tell Ant to fork compiles of JSP pages so that -->
+  <!--                       a separate JVM is used for JSP page compiles   -->
+  <!--                       from the one Tomcat is running in. [true]      -->
+  <!--                                                                      -->
+  <!--   ieClassId           The class-id value to be sent to Internet      -->
+  <!--                       Explorer when using <jsp:plugin> tags.         -->
+  <!--                       [clsid:8AD9C840-044E-11D1-B3E9-00805F499D93]   -->
+  <!--                                                                      -->
+  <!--   javaEncoding        Java file encoding to use for generating java  -->
+  <!--                       source files. [UTF-8]                          -->
+  <!--                                                                      -->
+  <!--   keepgenerated       Should we keep the generated Java source code  -->
+  <!--                       for each page instead of deleting it? [true]   -->
+  <!--                                                                      -->
+  <!--   logVerbosityLevel   The level of detailed messages to be produced  -->
+  <!--                       by this servlet.  Increasing levels cause the  -->
+  <!--                       generation of more messages.  Valid values are -->
+  <!--                       FATAL, ERROR, WARNING, INFORMATION, and DEBUG. -->
+  <!--                       [WARNING]                                      -->
+  <!--                                                                      -->
+  <!--   mappedfile          Should we generate static content with one     -->
+  <!--                       print statement per input line, to ease        -->
+  <!--                       debugging?  [false]                            -->
+  <!--                                                                      -->
+  <!--                                                                      -->
+  <!--   reloading           Should Jasper check for modified JSPs?  [true] -->
+  <!--                                                                      -->
+  <!--   suppressSmap        Should the generation of SMAP info for JSR45   -->
+  <!--                       debugging be suppressed?  [false]              -->
+  <!--                                                                      -->
+  <!--   dumpSmap            Should the SMAP info for JSR45 debugging be    -->
+  <!--                       dumped to a file? [false]                      -->
+  <!--                       False if suppressSmap is true                  -->
+  <!--                                                                      -->
+  <!--   scratchdir          What scratch directory should we use when      -->
+  <!--                       compiling JSP pages?  [default work directory  -->
+  <!--                       for the current web application]               -->
+  <!--                                                                      -->
+  <!--   tagpoolMaxSize      The maximum tag handler pool size  [5]         -->
+  <!--                                                                      -->
+  <!--   xpoweredBy          Determines whether X-Powered-By response       -->
+  <!--                       header is added by generated servlet  [false]  -->
+  <!--                                                                      -->
+  <!-- If you wish to use Jikes to compile JSP pages:                       -->
+  <!--   Set the init parameter "compiler" to "jikes".  Define              -->
+  <!--   the property "-Dbuild.compiler.emacs=true" when starting Jetty     -->
+  <!--   to cause Jikes to emit error messages in a format compatible with  -->
+  <!--   Jasper.                                                            -->
+  <!--   If you get an error reporting that jikes can't use UTF-8 encoding, -->
+  <!--   try setting the init parameter "javaEncoding" to "ISO-8859-1".     -->
+  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->
+  <servlet id="jsp">
+    <servlet-name>jsp</servlet-name>
+    <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
+    <init-param>
+        <param-name>logVerbosityLevel</param-name>
+        <param-value>DEBUG</param-value>
+    </init-param>
+    <init-param>
+        <param-name>fork</param-name>
+        <param-value>false</param-value>
+    </init-param>
+    <init-param>
+        <param-name>xpoweredBy</param-name>
+        <param-value>false</param-value>
+    </init-param>
+    <!--  
+    <init-param>
+        <param-name>classpath</param-name>
+        <param-value>?</param-value>
+    </init-param>
+    -->
+    <load-on-startup>0</load-on-startup>
+  </servlet>
+
+  <servlet-mapping> 
+    <servlet-name>jsp</servlet-name> 
+    <url-pattern>*.jsp</url-pattern> 
+    <url-pattern>*.jspf</url-pattern>
+    <url-pattern>*.jspx</url-pattern>
+    <url-pattern>*.xsp</url-pattern>
+    <url-pattern>*.JSP</url-pattern> 
+    <url-pattern>*.JSPF</url-pattern>
+    <url-pattern>*.JSPX</url-pattern>
+    <url-pattern>*.XSP</url-pattern>
+  </servlet-mapping>
+  
+  <!-- ==================================================================== -->
+  <!-- Dynamic Servlet Invoker.                                             -->
+  <!-- This servlet invokes anonymous servlets that have not been defined   -->
+  <!-- in the web.xml or by other means. The first element of the pathInfo  -->
+  <!-- of a request passed to the envoker is treated as a servlet name for  -->
+  <!-- an existing servlet, or as a class name of a new servlet.            -->
+  <!-- This servlet is normally mapped to /servlet/*                        -->
+  <!-- This servlet support the following initParams:                       -->
+  <!--                                                                      -->
+  <!--  nonContextServlets       If false, the invoker can only load        -->
+  <!--                           servlets from the contexts classloader.    -->
+  <!--                           This is false by default and setting this  -->
+  <!--                           to true may have security implications.    -->
+  <!--                                                                      -->
+  <!--  verbose                  If true, log dynamic loads                 -->
+  <!--                                                                      -->
+  <!--  *                        All other parameters are copied to the     -->
+  <!--                           each dynamic servlet as init parameters    -->
+  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->
+  <!-- Uncomment for dynamic invocation
+  <servlet>
+    <servlet-name>invoker</servlet-name>
+    <servlet-class>org.mortbay.jetty.servlet.Invoker</servlet-class>
+    <init-param>
+      <param-name>verbose</param-name>
+      <param-value>false</param-value>
+    </init-param>
+    <init-param>
+      <param-name>nonContextServlets</param-name>
+      <param-value>false</param-value>
+    </init-param>
+    <init-param>
+      <param-name>dynamicParam</param-name>
+      <param-value>anyValue</param-value>
+    </init-param>
+    <load-on-startup>0</load-on-startup>
+  </servlet>
+
+  <servlet-mapping> <servlet-name>invoker</servlet-name> <url-pattern>/servlet/*</url-pattern> </servlet-mapping>
+  -->
+
+
+
+  <!-- ==================================================================== -->
+  <session-config>
+    <session-timeout>30</session-timeout>
+  </session-config>
+
+  <!-- ==================================================================== -->
+  <!-- Default MIME mappings                                                -->
+  <!-- The default MIME mappings are provided by the mime.properties        -->
+  <!-- resource in the org.mortbay.jetty.jar file.  Additional or modified  -->
+  <!-- mappings may be specified here                                       -->
+  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->
+  <!-- UNCOMMENT TO ACTIVATE
+  <mime-mapping>
+    <extension>mysuffix</extension>
+    <mime-type>mymime/type</mime-type>
+  </mime-mapping>
+  -->
+
+  <!-- ==================================================================== -->
+  <welcome-file-list>
+    <welcome-file>index.html</welcome-file>
+    <welcome-file>index.htm</welcome-file>
+    <welcome-file>index.jsp</welcome-file>
+  </welcome-file-list>
+
+  <!-- ==================================================================== -->
+  <locale-encoding-mapping-list>
+    <locale-encoding-mapping><locale>ar</locale><encoding>ISO-8859-6</encoding></locale-encoding-mapping>
+    <locale-encoding-mapping><locale>be</locale><encoding>ISO-8859-5</encoding></locale-encoding-mapping>
+    <locale-encoding-mapping><locale>bg</locale><encoding>ISO-8859-5</encoding></locale-encoding-mapping>
+    <locale-encoding-mapping><locale>ca</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
+    <locale-encoding-mapping><locale>cs</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
+    <locale-encoding-mapping><locale>da</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
+    <locale-encoding-mapping><locale>de</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
+    <locale-encoding-mapping><locale>el</locale><encoding>ISO-8859-7</encoding></locale-encoding-mapping>
+    <locale-encoding-mapping><locale>en</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
+    <locale-encoding-mapping><locale>es</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
+    <locale-encoding-mapping><locale>et</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
+    <locale-encoding-mapping><locale>fi</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
+    <locale-encoding-mapping><locale>fr</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
+    <locale-encoding-mapping><locale>hr</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
+    <locale-encoding-mapping><locale>hu</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
+    <locale-encoding-mapping><locale>is</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
+    <locale-encoding-mapping><locale>it</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
+    <locale-encoding-mapping><locale>iw</locale><encoding>ISO-8859-8</encoding></locale-encoding-mapping>
+    <locale-encoding-mapping><locale>ja</locale><encoding>Shift_JIS</encoding></locale-encoding-mapping>
+    <locale-encoding-mapping><locale>ko</locale><encoding>EUC-KR</encoding></locale-encoding-mapping>     
+    <locale-encoding-mapping><locale>lt</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
+    <locale-encoding-mapping><locale>lv</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
+    <locale-encoding-mapping><locale>mk</locale><encoding>ISO-8859-5</encoding></locale-encoding-mapping>
+    <locale-encoding-mapping><locale>nl</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
+    <locale-encoding-mapping><locale>no</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
+    <locale-encoding-mapping><locale>pl</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
+    <locale-encoding-mapping><locale>pt</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
+    <locale-encoding-mapping><locale>ro</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
+    <locale-encoding-mapping><locale>ru</locale><encoding>ISO-8859-5</encoding></locale-encoding-mapping>
+    <locale-encoding-mapping><locale>sh</locale><encoding>ISO-8859-5</encoding></locale-encoding-mapping>
+    <locale-encoding-mapping><locale>sk</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
+    <locale-encoding-mapping><locale>sl</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
+    <locale-encoding-mapping><locale>sq</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
+    <locale-encoding-mapping><locale>sr</locale><encoding>ISO-8859-5</encoding></locale-encoding-mapping>
+    <locale-encoding-mapping><locale>sv</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
+    <locale-encoding-mapping><locale>tr</locale><encoding>ISO-8859-9</encoding></locale-encoding-mapping>
+    <locale-encoding-mapping><locale>uk</locale><encoding>ISO-8859-5</encoding></locale-encoding-mapping>
+    <locale-encoding-mapping><locale>zh</locale><encoding>GB2312</encoding></locale-encoding-mapping>
+    <locale-encoding-mapping><locale>zh_TW</locale><encoding>Big5</encoding></locale-encoding-mapping>   
+  </locale-encoding-mapping-list>
+  
+  <security-constraint>
+    <web-resource-collection>
+      <web-resource-name>Disable TRACE</web-resource-name>
+      <url-pattern>/</url-pattern>
+      <http-method>TRACE</http-method>
+    </web-resource-collection>
+    <auth-constraint/>
+  </security-constraint>
+  
+</web-app>
+

+ 3 - 0
VB_DSM_V2.1/vbdsm-web/vbdsm-charts/src/main/webapp/META-INF/MANIFEST.MF

@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path: 
+

+ 74 - 0
VB_DSM_V2.1/vbdsm-web/vbdsm-charts/src/main/webapp/WEB-INF/web.xml

@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+         xmlns="http://java.sun.com/xml/ns/javaee"
+         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+	http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+    <servlet>
+        <servlet-name>dispatcher</servlet-name>
+        <servlet-class>cn.vbdsm.common.servlets.ApplicationServlet</servlet-class>
+        <init-param>
+            <param-name>contextConfigLocation</param-name>
+            <param-value>classpath:application-web.xml</param-value>
+        </init-param>
+        <load-on-startup>0</load-on-startup>
+    </servlet>
+    <servlet-mapping>
+        <servlet-name>dispatcher</servlet-name>
+        <url-pattern>/open/exporting</url-pattern>
+    </servlet-mapping>
+
+    <servlet>
+        <servlet-name>DruidStatView</servlet-name>
+        <servlet-class>com.alibaba.druid.support.http.StatViewServlet</servlet-class>
+    </servlet>
+    <servlet-mapping>
+        <servlet-name>DruidStatView</servlet-name>
+        <url-pattern>/druid/*</url-pattern>
+    </servlet-mapping>
+
+    <filter>
+        <filter-name>DruidWebStatFilter</filter-name>
+        <filter-class>com.alibaba.druid.support.http.WebStatFilter</filter-class>
+        <!-- 排除一些不必要的url,比如.js,/jslib/等等。配置在init-param中 -->
+        <init-param>
+            <param-name>exclusions</param-name>
+            <param-value>*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*</param-value>
+        </init-param>
+        <!-- 缺省sessionStatMaxCount是1000个。你可以按需要进行配置 -->
+        <init-param>
+            <param-name>sessionStatMaxCount</param-name>
+            <param-value>1000</param-value>
+        </init-param>
+        <!-- 你可以关闭session统计功能 -->
+        <init-param>
+            <param-name>sessionStatEnable</param-name>
+            <param-value>true</param-value>
+        </init-param>
+        <!-- 保存在session中的sessionName 此处 userinfo 为系统中SessionName。如果你session中保存的是非string类型的对象,需要重载toString方法 -->
+        <init-param>
+            <param-name>principalSessionName</param-name>
+            <param-value>userinfo.toString()</param-value>
+        </init-param>
+        <!-- 保存在Cookie中的CookieName。此处 _uname 为系统中CookieName -->
+        <init-param>
+            <param-name>principalCookieName</param-name>
+            <param-value>_uname</param-value>
+        </init-param>
+        <!-- druid 0.2.7版本开始支持profile,配置profileEnable能够监控单个url调用的sql列表 -->
+        <init-param>
+            <param-name>profileEnable</param-name>
+            <param-value>true</param-value>
+        </init-param>
+    </filter>
+    <filter-mapping>
+        <filter-name>DruidWebStatFilter</filter-name>
+        <url-pattern>/*</url-pattern>
+    </filter-mapping>
+
+
+    <welcome-file-list>
+        <welcome-file>/index.html</welcome-file>
+    </welcome-file-list>
+
+</web-app>

+ 1 - 1
VB_DSM_V2.1/vbdsm-web/vbdsm-explorer/src/main/resources/local/redis-host.properties

@@ -1 +1 @@
-redis_ref_hosts=47.112.30.247:16379
+redis_ref_hosts=47.112.30.247:6399:Iwb-2017

+ 1 - 1
VB_DSM_V2.1/vbdsm-web/vbdsm-gov/src/main/resources/local/redis-host.properties

@@ -2,7 +2,7 @@
 #222.92.214.198:6379
 #192.168.81.17:6379
 #static.chnmooc.com:6379
-redis_ref_hosts=47.112.30.247:16379
+redis_ref_hosts=47.112.30.247:6399:Iwb-2017
 #redis.host=127.0.0.1
 #redis.port=6379
 #redis.expire=1800

+ 1 - 1
VB_DSM_V2.1/vbdsm-web/vbdsm-manage/src/main/resources/local/redis-host.properties

@@ -1 +1 @@
-redis_ref_hosts=47.112.30.247:16379
+redis_ref_hosts=47.112.30.247:6399:Iwb-2017

+ 1 - 10
VB_DSM_V2.1/vbdsm-web/vbdsm-passport/src/main/resources/local/redis-host.properties

@@ -1,10 +1 @@
-#redis_ref_hosts=222.92.214.198:6379
-#222.92.214.198:6379
-#192.168.81.17:6379
-#static.chnmooc.com:6379
-redis_ref_hosts=47.112.30.247:16379
-#redis.host=127.0.0.1
-#redis.port=6379
-#redis.expire=1800
-#redis.timeout=10000
-#redis.password=123456
+redis_ref_hosts=47.112.30.247:6399:Iwb-2017

+ 1 - 1
VB_DSM_V2.1/vbdsm-web/vbdsm-powerservice/src/main/resources/local/redis-host.properties

@@ -2,7 +2,7 @@
 #222.92.214.198:6379
 #192.168.81.17:6379
 #static.chnmooc.com:6379
-redis_ref_hosts=47.112.30.247:16379
+redis_ref_hosts=47.112.30.247:6399:Iwb-2017
 #redis.host=127.0.0.1
 #redis.port=6379
 #redis.expire=1800