Browse Source

add log and upload process

guochao 4 years ago
parent
commit
062eaecab3
100 changed files with 257 additions and 26 deletions
  1. 9 11
      .idea/workspace.xml
  2. 0 0
      logging.levelfile_IS_UNDEFINED/data-se-2020-03-03.log
  3. 5 0
      src/main/resources/application.yml
  4. 47 0
      src/main/resources/logback.xml
  5. 49 14
      src/main/resources/static/index.html
  6. 2 1
      src/main/resources/static/index_tem.html
  7. 88 0
      target/classes/application.yml
  8. 57 0
      target/classes/bootstrap.yaml
  9. BIN
      target/classes/cn/iselab/mooctest/site/Application.class
  10. BIN
      target/classes/cn/iselab/mooctest/site/configuration/DefaultView.class
  11. BIN
      target/classes/cn/iselab/mooctest/site/configuration/OSSConfiguration.class
  12. BIN
      target/classes/cn/iselab/mooctest/site/dao/ReportTaskDao.class
  13. BIN
      target/classes/cn/iselab/mooctest/site/domainObject/ReportTask.class
  14. BIN
      target/classes/cn/iselab/mooctest/site/domainObject/ReportTaskStatus.class
  15. BIN
      target/classes/cn/iselab/mooctest/site/domainObject/ReportType.class
  16. BIN
      target/classes/cn/iselab/mooctest/site/domainObject/UploadType.class
  17. BIN
      target/classes/cn/iselab/mooctest/site/exception/BaseException.class
  18. BIN
      target/classes/cn/iselab/mooctest/site/exception/ReportTaskNotExistException.class
  19. BIN
      target/classes/cn/iselab/mooctest/site/factory/ReportTaskFactory.class
  20. BIN
      target/classes/cn/iselab/mooctest/site/model/ReportTaskPO.class
  21. BIN
      target/classes/cn/iselab/mooctest/site/repository/IReportTaskRepo.class
  22. BIN
      target/classes/cn/iselab/mooctest/site/repository/ReportTaskRepo.class
  23. BIN
      target/classes/cn/iselab/mooctest/site/service/AutoReportProductService.class
  24. BIN
      target/classes/cn/iselab/mooctest/site/service/UploadService.class
  25. BIN
      target/classes/cn/iselab/mooctest/site/service/impl/AutoReportProductServiceImpl$1.class
  26. BIN
      target/classes/cn/iselab/mooctest/site/service/impl/AutoReportProductServiceImpl$2.class
  27. BIN
      target/classes/cn/iselab/mooctest/site/service/impl/AutoReportProductServiceImpl.class
  28. BIN
      target/classes/cn/iselab/mooctest/site/service/impl/OSSUploadServiceImpl.class
  29. BIN
      target/classes/cn/iselab/mooctest/site/util/Converter$CopierIdentity.class
  30. BIN
      target/classes/cn/iselab/mooctest/site/util/Converter$PrimitiveConverter.class
  31. BIN
      target/classes/cn/iselab/mooctest/site/util/Converter.class
  32. BIN
      target/classes/cn/iselab/mooctest/site/web/ctrl/HandleReportController.class
  33. BIN
      target/classes/cn/iselab/mooctest/site/web/ctrl/UploadController.class
  34. BIN
      target/classes/cn/iselab/mooctest/site/web/data/AppAutoTestData/AppAutoTestAppScore.class
  35. BIN
      target/classes/cn/iselab/mooctest/site/web/data/AppAutoTestData/AppAutoTestDeviceStatus.class
  36. BIN
      target/classes/cn/iselab/mooctest/site/web/data/AppAutoTestData/AppAutoTestExtraInfo.class
  37. BIN
      target/classes/cn/iselab/mooctest/site/web/data/AppAutoTestData/AppAutoTestReportAction.class
  38. BIN
      target/classes/cn/iselab/mooctest/site/web/data/AppAutoTestData/AppAutoTestReportAppBaseInfo.class
  39. BIN
      target/classes/cn/iselab/mooctest/site/web/data/AppAutoTestData/AppAutoTestReportBug.class
  40. BIN
      target/classes/cn/iselab/mooctest/site/web/data/AppAutoTestData/AppAutoTestReportBugCluster.class
  41. BIN
      target/classes/cn/iselab/mooctest/site/web/data/AppAutoTestData/AppAutoTestReportBugDeviceInfo.class
  42. BIN
      target/classes/cn/iselab/mooctest/site/web/data/AppAutoTestData/AppAutoTestReportBugDistribution.class
  43. BIN
      target/classes/cn/iselab/mooctest/site/web/data/AppAutoTestData/AppAutoTestReportBugInfo.class
  44. BIN
      target/classes/cn/iselab/mooctest/site/web/data/AppAutoTestData/AppAutoTestReportBugListInfoForTable.class
  45. BIN
      target/classes/cn/iselab/mooctest/site/web/data/AppAutoTestData/AppAutoTestReportDeviceInfo.class
  46. BIN
      target/classes/cn/iselab/mooctest/site/web/data/AppAutoTestData/AppAutoTestReportDeviceInfoLogCat.class
  47. BIN
      target/classes/cn/iselab/mooctest/site/web/data/AppAutoTestData/AppAutoTestReportDeviceListInfoForTable.class
  48. BIN
      target/classes/cn/iselab/mooctest/site/web/data/AppAutoTestData/AppAutoTestReportLabel.class
  49. BIN
      target/classes/cn/iselab/mooctest/site/web/data/AppAutoTestData/AppAutoTestReportPie.class
  50. BIN
      target/classes/cn/iselab/mooctest/site/web/data/AppAutoTestData/AppAutoTestReportTableBug.class
  51. BIN
      target/classes/cn/iselab/mooctest/site/web/data/AppAutoTestData/AppAutoTestReportType.class
  52. BIN
      target/classes/cn/iselab/mooctest/site/web/data/AppAutoTestData/AppAutoTestReportVO.class
  53. BIN
      target/classes/cn/iselab/mooctest/site/web/data/ReportVO/AppAutoTestReportVO.class
  54. BIN
      target/classes/cn/iselab/mooctest/site/web/data/ReportVO/ReportDataVO.class
  55. BIN
      target/classes/cn/iselab/mooctest/site/web/data/ReportVO/StaticScanReportDataVO.class
  56. BIN
      target/classes/cn/iselab/mooctest/site/web/data/ReportVO/WebData.class
  57. BIN
      target/classes/cn/iselab/mooctest/site/web/data/StaticScanData/StaticScanData.class
  58. BIN
      target/classes/cn/iselab/mooctest/site/web/data/StaticScanData/StaticScanExample.class
  59. BIN
      target/classes/cn/iselab/mooctest/site/web/data/StaticScanData/StaticScanSolution.class
  60. BIN
      target/classes/cn/iselab/mooctest/site/web/data/StaticScanData/StaticScanVulReference.class
  61. BIN
      target/classes/cn/iselab/mooctest/site/web/data/WebScanData/WebDataBrowserStat.class
  62. BIN
      target/classes/cn/iselab/mooctest/site/web/data/WebScanData/WebDataBugDetail.class
  63. BIN
      target/classes/cn/iselab/mooctest/site/web/data/WebScanData/WebDataCategoryStat.class
  64. BIN
      target/classes/cn/iselab/mooctest/site/web/data/WebScanData/WebDataEnvironment.class
  65. BIN
      target/classes/cn/iselab/mooctest/site/web/data/WebScanData/WebDataPlatformStat.class
  66. BIN
      target/classes/cn/iselab/mooctest/site/web/data/WebScanData/WebDataProjectInfoVO.class
  67. BIN
      target/classes/cn/iselab/mooctest/site/web/data/WebScanData/WebDataRiskLevelStat.class
  68. BIN
      target/classes/cn/iselab/mooctest/site/web/data/WebScanData/WebDataVulStatistic.class
  69. BIN
      target/classes/cn/iselab/mooctest/site/web/data/WebScanData/WebDataVulnerability.class
  70. BIN
      target/classes/cn/iselab/mooctest/site/web/data/enums/VulVerifyStatus.class
  71. BIN
      target/classes/cn/iselab/mooctest/site/web/data/functionalTestData/Bug.class
  72. BIN
      target/classes/cn/iselab/mooctest/site/web/data/functionalTestData/DeviceBugListItem.class
  73. BIN
      target/classes/cn/iselab/mooctest/site/web/data/functionalTestData/DeviceDetailItem.class
  74. BIN
      target/classes/cn/iselab/mooctest/site/web/data/functionalTestData/DeviceDistributionData.class
  75. BIN
      target/classes/cn/iselab/mooctest/site/web/data/functionalTestData/DeviceUCListItem.class
  76. BIN
      target/classes/cn/iselab/mooctest/site/web/data/functionalTestData/FunctionalTestVO.class
  77. BIN
      target/classes/cn/iselab/mooctest/site/web/data/functionalTestData/GeneralResult.class
  78. BIN
      target/classes/cn/iselab/mooctest/site/web/data/functionalTestData/ScreenShot.class
  79. BIN
      target/classes/cn/iselab/mooctest/site/web/data/functionalTestData/TypePassResult.class
  80. BIN
      target/classes/cn/iselab/mooctest/site/web/data/functionalTestData/UCItemCaseInfo.class
  81. BIN
      target/classes/cn/iselab/mooctest/site/web/data/functionalTestData/UCPassResult.class
  82. BIN
      target/classes/cn/iselab/mooctest/site/web/data/functionalTestData/UCResultDeviceItem.class
  83. BIN
      target/classes/cn/iselab/mooctest/site/web/data/functionalTestData/UCResultItem.class
  84. BIN
      target/classes/cn/iselab/mooctest/site/web/data/reportData/ActiveIssueDetailVO.class
  85. BIN
      target/classes/cn/iselab/mooctest/site/web/data/reportData/AppBasicInfoVO.class
  86. BIN
      target/classes/cn/iselab/mooctest/site/web/data/reportData/DeviceDetailVO.class
  87. BIN
      target/classes/cn/iselab/mooctest/site/web/data/reportData/IssueDistributionAttributeVO.class
  88. BIN
      target/classes/cn/iselab/mooctest/site/web/data/reportData/IssueDistributionVO.class
  89. BIN
      target/classes/cn/iselab/mooctest/site/web/data/reportData/IssuePhoneVO.class
  90. BIN
      target/classes/cn/iselab/mooctest/site/web/data/reportData/NeedOptimizedProblemVO.class
  91. BIN
      target/classes/cn/iselab/mooctest/site/web/data/reportData/PerformanceDetailAttributeVO.class
  92. BIN
      target/classes/cn/iselab/mooctest/site/web/data/reportData/PerformanceDetailItemVO.class
  93. BIN
      target/classes/cn/iselab/mooctest/site/web/data/reportData/PerformanceSummaryAttributeVO.class
  94. BIN
      target/classes/cn/iselab/mooctest/site/web/data/reportData/PerformanceSummaryItemVO.class
  95. BIN
      target/classes/cn/iselab/mooctest/site/web/data/reportData/PieDataVO.class
  96. BIN
      target/classes/cn/iselab/mooctest/site/web/data/reportData/TestResultVO.class
  97. BIN
      target/classes/cn/iselab/mooctest/site/web/data/vulData/ProjectInfoVO.class
  98. BIN
      target/classes/cn/iselab/mooctest/site/web/data/vulData/StatVO.class
  99. BIN
      target/classes/cn/iselab/mooctest/site/web/data/vulData/Vul2TaskVo.class
  100. BIN
      target/classes/cn/iselab/mooctest/site/web/data/vulData/VulCheckVo.class

+ 9 - 11
.idea/workspace.xml

@@ -2,15 +2,11 @@
 <project version="4">
 <project version="4">
   <component name="ChangeListManager">
   <component name="ChangeListManager">
     <list default="true" id="c25ee83f-38b8-4a56-8a1f-62ecc8d6cec2" name="Default Changelist" comment="">
     <list default="true" id="c25ee83f-38b8-4a56-8a1f-62ecc8d6cec2" name="Default Changelist" comment="">
+      <change afterPath="$PROJECT_DIR$/src/main/resources/logback.xml" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/src/main/java/cn/iselab/mooctest/site/dao/ReportTaskDao.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/cn/iselab/mooctest/site/dao/ReportTaskDao.java" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/src/main/java/cn/iselab/mooctest/site/domainObject/ReportTask.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/cn/iselab/mooctest/site/domainObject/ReportTask.java" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/src/main/java/cn/iselab/mooctest/site/model/ReportTaskPO.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/cn/iselab/mooctest/site/model/ReportTaskPO.java" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/src/main/java/cn/iselab/mooctest/site/repository/IReportTaskRepo.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/cn/iselab/mooctest/site/repository/IReportTaskRepo.java" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/src/main/java/cn/iselab/mooctest/site/repository/ReportTaskRepo.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/cn/iselab/mooctest/site/repository/ReportTaskRepo.java" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/src/main/java/cn/iselab/mooctest/site/service/AutoReportProductService.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/cn/iselab/mooctest/site/service/AutoReportProductService.java" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/src/main/java/cn/iselab/mooctest/site/service/impl/AutoReportProductServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/cn/iselab/mooctest/site/service/impl/AutoReportProductServiceImpl.java" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/src/main/java/cn/iselab/mooctest/site/web/ctrl/HandleReportController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/cn/iselab/mooctest/site/web/ctrl/HandleReportController.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/resources/application.yml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/application.yml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/resources/static/index.html" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/static/index.html" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/resources/static/index_tem.html" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/static/index_tem.html" afterDir="false" />
     </list>
     </list>
     <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
     <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
     <option name="SHOW_DIALOG" value="false" />
     <option name="SHOW_DIALOG" value="false" />
@@ -23,6 +19,7 @@
       <list>
       <list>
         <option value="Interface" />
         <option value="Interface" />
         <option value="Class" />
         <option value="Class" />
+        <option value="HTML File" />
       </list>
       </list>
     </option>
     </option>
   </component>
   </component>
@@ -41,6 +38,7 @@
     <ConfirmationsSetting value="2" id="Add" />
     <ConfirmationsSetting value="2" id="Add" />
   </component>
   </component>
   <component name="PropertiesComponent">
   <component name="PropertiesComponent">
+    <property name="DefaultHtmlFileTemplate" value="HTML File" />
     <property name="RequestMappingsPanelOrder0" value="0" />
     <property name="RequestMappingsPanelOrder0" value="0" />
     <property name="RequestMappingsPanelOrder1" value="1" />
     <property name="RequestMappingsPanelOrder1" value="1" />
     <property name="RequestMappingsPanelWidth0" value="75" />
     <property name="RequestMappingsPanelWidth0" value="75" />
@@ -48,7 +46,7 @@
     <property name="SHARE_PROJECT_CONFIGURATION_FILES" value="true" />
     <property name="SHARE_PROJECT_CONFIGURATION_FILES" value="true" />
     <property name="WebServerToolWindowFactoryState" value="false" />
     <property name="WebServerToolWindowFactoryState" value="false" />
     <property name="aspect.path.notification.shown" value="true" />
     <property name="aspect.path.notification.shown" value="true" />
-    <property name="last_opened_file_path" value="$PROJECT_DIR$" />
+    <property name="last_opened_file_path" value="$PROJECT_DIR$/src/main/resources" />
     <property name="project.structure.last.edited" value="Modules" />
     <property name="project.structure.last.edited" value="Modules" />
     <property name="project.structure.proportion" value="0.0" />
     <property name="project.structure.proportion" value="0.0" />
     <property name="project.structure.side.proportion" value="0.0" />
     <property name="project.structure.side.proportion" value="0.0" />
@@ -64,11 +62,11 @@
       <recent name="cn.iselab.mooctest.site.service" />
       <recent name="cn.iselab.mooctest.site.service" />
     </key>
     </key>
     <key name="CopyFile.RECENT_KEYS">
     <key name="CopyFile.RECENT_KEYS">
+      <recent name="$PROJECT_DIR$/src/main/resources" />
       <recent name="$PROJECT_DIR$" />
       <recent name="$PROJECT_DIR$" />
       <recent name="$PROJECT_DIR$/src/main" />
       <recent name="$PROJECT_DIR$/src/main" />
       <recent name="$PROJECT_DIR$/src/main/java/cn/iselab/mooctest/site/web/data/ReportVO" />
       <recent name="$PROJECT_DIR$/src/main/java/cn/iselab/mooctest/site/web/data/ReportVO" />
       <recent name="$PROJECT_DIR$/src/main/java/cn/iselab/mooctest/site/web/data/AppAutoTestData" />
       <recent name="$PROJECT_DIR$/src/main/java/cn/iselab/mooctest/site/web/data/AppAutoTestData" />
-      <recent name="$PROJECT_DIR$/src/main/java/cn/iselab/mooctest/site/web/data/webData" />
     </key>
     </key>
   </component>
   </component>
   <component name="RunDashboard">
   <component name="RunDashboard">
@@ -159,7 +157,7 @@
       <workItem from="1582719343080" duration="4019000" />
       <workItem from="1582719343080" duration="4019000" />
       <workItem from="1583024656089" duration="310000" />
       <workItem from="1583024656089" duration="310000" />
       <workItem from="1583115499177" duration="528000" />
       <workItem from="1583115499177" duration="528000" />
-      <workItem from="1583155605297" duration="9435000" />
+      <workItem from="1583155605297" duration="14779000" />
     </task>
     </task>
     <servers />
     <servers />
   </component>
   </component>

File diff suppressed because it is too large
+ 0 - 0
logging.levelfile_IS_UNDEFINED/data-se-2020-03-03.log


+ 5 - 0
src/main/resources/application.yml

@@ -50,6 +50,9 @@ management:
         include: '*'
         include: '*'
   security:
   security:
     enabled: false
     enabled: false
+
+logging.all.level: info
+logging.levelfile: /root/logs/mooctest-report
 ---
 ---
 # 报告服务开发环境
 # 报告服务开发环境
 spring:
 spring:
@@ -65,6 +68,8 @@ order.autoReport.service.template.path: /Users/guochao/Desktop/project/enterpris
 static.resource.autoReport.url: /reportFile/
 static.resource.autoReport.url: /reportFile/
 order.vulReport.json.upload.path: /src/json/
 order.vulReport.json.upload.path: /src/json/
 host.ip: 106.14.81.62
 host.ip: 106.14.81.62
+logging.all.level: info
+logging.levelfile: /Users/guochao/Desktop/logs/report-service-log
 
 
 ---
 ---
 # 报告服务线上环境
 # 报告服务线上环境

+ 47 - 0
src/main/resources/logback.xml

@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration debug="false">
+    <property resource="application.yml"></property>
+    <!--定义日志文件的存储地址 勿在 LogBack 的配置中使用相对路径-->
+    <property name="LOG_HOME" value="${logging.levelfile}" />
+    <property name="LOG_LEVEL" value="${logging.all.level}" />
+    <!-- 控制台输出 -->
+    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+        <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
+            <!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
+            <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50}:%L - %msg  %n</pattern>
+            <charset>UTF-8</charset>
+        </encoder>
+    </appender>
+    <!-- 按照每天生成日志文件 -->
+    <appender name="FILE"  class="ch.qos.logback.core.rolling.RollingFileAppender">
+        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+            <!--日志文件输出的文件名-->
+            <FileNamePattern>${LOG_HOME}/%d{yyyy-MM-dd}.log</FileNamePattern>
+            <!--日志文件保留天数-->
+            <MaxHistory>90</MaxHistory>
+        </rollingPolicy>
+        <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
+            <!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
+            <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
+            <charset>UTF-8</charset>
+        </encoder>
+        <!--日志文件最大的大小-->
+        <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
+            <MaxFileSize>1GB</MaxFileSize>
+        </triggeringPolicy>
+    </appender>
+
+    <!--<logger name="com.zaxxer" level="${LOG_LEVEL}"/>-->
+    <!--<logger name="org.apache.ibatis" level="${LOG_LEVEL}"/>-->
+    <!--<logger name="org.mybatis.spring" level="${LOG_LEVEL}"/>-->
+    <!--<logger name="org.springframework" level="${LOG_LEVEL}"/>-->
+    <!--<logger name="java.sql.Connection" level="${LOG_LEVEL}"/>-->
+    <!--<logger name="java.sql.Statement" level="${LOG_LEVEL}"/>-->
+    <!--<logger name="java.sql.PreparedStatement" level="${LOG_LEVEL}"/>-->
+
+    <!-- 日志输出级别 -->
+    <root level="${LOG_LEVEL}">
+        <appender-ref ref="STDOUT" />
+        <appender-ref ref="FILE" />
+    </root>
+</configuration>

+ 49 - 14
src/main/resources/static/index.html

@@ -43,6 +43,8 @@ body {
   -webkit-transform: translateY(20px);
   -webkit-transform: translateY(20px);
           transform: translateY(20px);
           transform: translateY(20px);
   opacity: 0;
   opacity: 0;
+	text-align: center;
+	margin: 0px auto;
 }
 }
 .upload .upload-files header {
 .upload .upload-files header {
   background: #4db6ac;
   background: #4db6ac;
@@ -345,7 +347,7 @@ body {
   -webkit-transform: translateY(15px);
   -webkit-transform: translateY(15px);
           transform: translateY(15px);
           transform: translateY(15px);
   opacity: 0;
   opacity: 0;
-  margin-left: calc(50% - 40px);
+  /*margin-left: calc(50% - 40px);*/
 }
 }
 .upload .upload-files footer .importar.active {
 .upload .upload-files footer .importar.active {
   -webkit-transition: opacity .5s 1.5s ease, -webkit-transform .5s 1.5s ease;
   -webkit-transition: opacity .5s 1.5s ease, -webkit-transform .5s 1.5s ease;
@@ -432,7 +434,7 @@ body {
 			<div class="list-files">
 			<div class="list-files">
 				<!--   template   -->
 				<!--   template   -->
 			</div>
 			</div>
-			<button class="importar" onclick="UpladFile()">UPDATE FILES</button>
+			<button class="importar" onclick="UpladFile()">上传</button>
 <!--            <button class="importar" onclick="cancleUploadFile()">CALCLE FILES</button>-->
 <!--            <button class="importar" onclick="cancleUploadFile()">CALCLE FILES</button>-->
 		</footer>
 		</footer>
 	</div>
 	</div>
@@ -442,7 +444,7 @@ body {
     var xhr;
     var xhr;
     function UpladFile() {
     function UpladFile() {
         var fileObj = document.getElementById("file").files[0]; // js 获取文件对象
         var fileObj = document.getElementById("file").files[0]; // js 获取文件对象
-		// var url = "http://127.0.0.1:8080" + "/generalReportTemplate"; // 接收上传文件的后台地址
+		// var url = "http://localhost:8080" + "/api/report/generalReportTemplate"; // 接收上传文件的后台地址
         var url = "http://106.14.81.62:8080" + "/api/report/generalReportTemplate"; // 接收上传文件的后台地址
         var url = "http://106.14.81.62:8080" + "/api/report/generalReportTemplate"; // 接收上传文件的后台地址
 
 
         var form = new FormData(); // FormData 对象
         var form = new FormData(); // FormData 对象
@@ -452,9 +454,26 @@ body {
         xhr.open("post", url, true); //post方式,url为服务器请求地址,true 该参数规定请求是否异步处理。
         xhr.open("post", url, true); //post方式,url为服务器请求地址,true 该参数规定请求是否异步处理。
         xhr.onload = uploadComplete; //请求完成
         xhr.onload = uploadComplete; //请求完成
         xhr.onerror = uploadFailed; //请求失败
         xhr.onerror = uploadFailed; //请求失败
+		xhr.upload.onprogress = progressFunction; // 添加 监听函数
         xhr.send(form); //开始上传,发送form数据
         xhr.send(form); //开始上传,发送form数据
     }
     }
 
 
+	// 处理上传进度
+	function progressFunction(e){
+		var progress_bar = document.getElementById("progress_bar");
+		var loading_dom = document.getElementById("loading");
+		var loading = Math.round(e.loaded / e.total * 100);
+		// console.log("loading::", loading);
+
+		if(loading === 100){
+			loading_dom.innerHTML = "上传成功";
+		}else{
+			loading_dom.innerHTML = "上传进度"+loading+"%"
+		}
+
+		progress_bar.style.width = String(loading * 3) + "px";
+	}
+
     //上传成功响应
     //上传成功响应
     function uploadComplete(evt) {
     function uploadComplete(evt) {
         //服务断接收完文件返回的结果
         //服务断接收完文件返回的结果
@@ -466,7 +485,7 @@ body {
         // } else {
         // } else {
         //     alert("上传失败!");
         //     alert("上传失败!");
         // }
         // }
-        alert("上传成功!");
+        alert("服务器模板替换成功!");
     }
     }
 
 
     //上传失败
     //上传失败
@@ -500,7 +519,15 @@ App.init = (function() {
                                 </a>
                                 </a>
                             </div>
                             </div>
                         </div>`)
                         </div>`)
-            .join("")}`;
+            .join("")}`+`
+            <div style="text-align: left;display: inline-block;width: 300px; height: 20px; border: 1px solid #4EB6AC; border-radius: 5px;position: relative">
+				<div id="progress_bar" style="display: inline-block; width: 0px; height: 20px;background-color: #05E1BA"></div>
+				<div style="text-align: center;width: 300px;position: absolute; top: 0; font-size:14px; color: #4EB6AC">
+					<div id="loading">
+						上传进度0%
+					</div>
+				</div>
+			</div>`;
 
 
 		$("#drop").classList.add("hidden");
 		$("#drop").classList.add("hidden");
 		$("footer").classList.add("hasFiles");
 		$("footer").classList.add("hasFiles");
@@ -549,7 +576,15 @@ App.init = (function() {
                                 </a>
                                 </a>
                             </div>
                             </div>
                         </div>`)
                         </div>`)
-        .join("")}`;
+        .join("")}`+`
+            <div style="text-align: left;display: inline-block;width: 300px; height: 20px; border: 1px solid #fff; border-radius: 2px;position: relative">
+				<div id="progress_bar" style="display: inline-block; width: 0px; height: 20px;background-color: #05EED8"></div>
+					<div style="text-align: center;width: 300px;position: absolute; top: 0; font-size:16px; color: #413F43">
+					<div id="loading">
+						上传进度0%
+					</div>
+				</div>
+			</div>`;
 
 
         $("#drop").classList.add("hidden");
         $("#drop").classList.add("hidden");
         $("footer").classList.add("hasFiles");
         $("footer").classList.add("hasFiles");
@@ -577,14 +612,14 @@ App.init = (function() {
 	};
 	};
 
 
 	//upload more
 	//upload more
-	$(".importar").addEventListener("click", () => {
-		$(".list-files").innerHTML = "";
-		$("footer").classList.remove("hasFiles");
-		$(".importar").classList.remove("active");
-		setTimeout(() => {
-			$("#drop").classList.remove("hidden");
-		}, 500);
-	});
+	// $(".importar").addEventListener("click", () => {
+	// 	$(".list-files").innerHTML = "";
+	// 	$("footer").classList.remove("hasFiles");
+	// 	// $(".importar").classList.remove("active");
+	// 	// setTimeout(() => {
+	// 	// 	$("#drop").classList.remove("hidden");
+	// 	// }, 500);
+	// });
 
 
 	// input change
 	// input change
 	$("input[type=file]").addEventListener("change", handleFileSelect);
 	$("input[type=file]").addEventListener("change", handleFileSelect);

+ 2 - 1
src/main/resources/static/index_tem.html

@@ -10,7 +10,7 @@
 		//上传文件方法
 		//上传文件方法
 		function UpladFile() {
 		function UpladFile() {
 			var fileObj = document.getElementById("file").files[0]; // js 获取文件对象
 			var fileObj = document.getElementById("file").files[0]; // js 获取文件对象
-			var url = "http://localhost:8080" + "/generalReportTemplate"; // 接收上传文件的后台地址
+			var url = "http://localhost:8080" + "/api/report/generalReportTemplate"; // 接收上传文件的后台地址
 
 
 			var form = new FormData(); // FormData 对象
 			var form = new FormData(); // FormData 对象
 			form.append("file", fileObj); // 文件对象
 			form.append("file", fileObj); // 文件对象
@@ -34,6 +34,7 @@
 			//服务断接收完文件返回的结果
 			//服务断接收完文件返回的结果
 
 
 			var data = JSON.parse(evt.target.responseText);
 			var data = JSON.parse(evt.target.responseText);
+			console.log(evt);
 			if (data.success) {
 			if (data.success) {
 				alert("上传成功!");
 				alert("上传成功!");
 			} else {
 			} else {

+ 88 - 0
target/classes/application.yml

@@ -0,0 +1,88 @@
+spring:
+  profiles:
+#    active: report-server-dev
+    active: report-server-online
+  datasource:
+    driver-class-name: com.mysql.jdbc.Driver
+    #    url: jdbc:mysql://101.37.175.111:3306/crowd-test-service?useSSL=false&useUnicode=yes&characterEncoding=UTF-8
+    #    username: mooctest
+    #    password: secr3t!
+    # Keep the connection alive if idle for a long time (needed in production)
+    testWhileIdle: true
+    validationQuery: SELECT 1
+    # Show or not log for each sql query
+  jpa:
+    show-sql: true
+  # Hibernate ddl auto (create, create-drop, update)
+  hibernate:
+    ddl-auto: validate
+    #hbm2ddl.auto: update
+    # Naming strategy
+    naming-strategy: org.hibernate.cfg.ImprovedNamingStrategy
+  # The SQL dialect makes Hibernate generate better SQL for the chosen database
+  properties.hibernate.dialect: org.hibernate.dialect.MySQL5Dialect
+
+  servlet:
+    multipart:
+      max-file-size: 1000MB
+      max-request-size: 1000MB
+oss:
+  accessKeyId: LTAI4FdrT3HsfdR5edBVN7ws
+  accessKeySecret: yroxrpm46DzTyzHrLBZzS3MRNIicP6
+  endPoint: oss-cn-hangzhou.aliyuncs.com
+  bucketName: mooctest-share
+
+sleep: 0
+
+# 配置输出日志
+logging:
+  level:
+    org.springframework.cloud.gateway: TRACE
+    org.springframework.http.server.reactive: DEBUG
+    org.springframework.web.reactive: DEBUG
+    reactor.ipc.netty: DEBUG
+
+#开启端点
+management:
+  endpoints:
+    web:
+      exposure:
+        include: '*'
+  security:
+    enabled: false
+
+logging.all.level: info
+logging.levelfile: /root/logs/mooctest-report
+---
+# 报告服务开发环境
+spring:
+  profiles: report-server-dev
+  datasource:
+    url: jdbc:mysql://106.14.81.62:3306/report_service?useSSL=false&useUnicode=yes&characterEncoding=UTF-8
+    username: root
+    password: 123456
+order.autoReport.upload.path: /Users/guochao/Desktop/project/enterprise-mooctest-site/var/www/reportFile/
+order.autoReport.builder.copyPath: /Users/guochao/Desktop/project/enterprise-mooctest-site/var/www/reportBuilder/
+order.autoReport.service.path: /Users/guochao/Desktop/project/enterprise-mooctest-site/projects/mooctest-report-template/
+order.autoReport.service.template.path: /Users/guochao/Desktop/project/enterprise-mooctest-site/projects/mooctest-report-template/
+static.resource.autoReport.url: /reportFile/
+order.vulReport.json.upload.path: /src/json/
+host.ip: 106.14.81.62
+logging.all.level: info
+logging.levelfile: /Users/guochao/Desktop/logs/report-service-log
+
+---
+# 报告服务线上环境
+spring:
+  profiles: report-server-online
+  datasource:
+    url: jdbc:mysql://106.14.81.62:3306/report_service?useSSL=false&useUnicode=yes&characterEncoding=UTF-8
+    username: root
+    password: 123456
+static.resource.autoReport.url: /reportFile/
+order.autoReport.upload.path: /var/www/reportFile/
+order.autoReport.service.path: /root/mooctest-report-template/
+order.autoReport.service.template.path: /root/mooctest-report-template/
+order.autoReport.builder.copyPath: /var/www/reportBuilder/
+order.vulReport.json.upload.path: /src/json/
+host.ip: 106.14.81.62

+ 57 - 0
target/classes/bootstrap.yaml

@@ -0,0 +1,57 @@
+server:
+    port: 8080
+spring:
+    application:
+        name: mooctest-report-service
+    cloud:
+        nacos:
+            discovery:
+                # 指定nacos server的地址
+                server-addr: 106.14.81.62:8848
+#            config:
+#                server-addr: 106.14.81.62:8848
+# actuator相关配置
+management:
+    endpoints:
+        web:
+            exposure:
+                # 暴露所有监控端点
+                include: '*'
+    endpoint:
+        health:
+            # 总是显示健康检测详情
+            show-details: always
+
+#spring:
+#    application:
+#        name: mooctest-report-service
+#    cloud:
+#        nacos:
+#            discovery:
+#                #        namespace: 98123199-6adc-41b1-9c28-a97c6ed0e689 # 分组(dev,test等)
+#                # 指定nacos server的地址
+#                server-addr: 106.14.81.62:8848
+#                namespace: 7b6ae537-56f8-4e80-b551-c143db51a389
+##                server-addr: 192.168.43.174:8848
+##                namespace: 98123199-6adc-41b1-9c28-a97c6ed0e689
+#            config:
+#                server-addr: 106.14.81.62:8848
+#                namespace: 7b6ae537-56f8-4e80-b551-c143db51a389
+##                namespace: 98123199-6adc-41b1-9c28-a97c6ed0e689 # 分组(dev,test等)
+##                server-addr: 192.168.43.174:8848
+#                file-extension: yaml
+#                ##        shared-dataids: pkcs8_rsa_private_key.pem,mongo.yaml,mysql.yaml,redis.yaml,xxl-job.yaml,mybatis-plus.yaml,actuator.yaml,mybatis-plus.yaml
+#                ##        refreshable-dataids: pkcs8_rsa_private_key.pem,mongo.yaml,mysql.yaml,redis.yaml,xxl-job.yaml,mybatis-plus.yaml,actuator.yaml,mybatis-plus.yaml
+#
+#                # 用于多配置项 (比如读取该项目的主配置之后,再读取一个单独的配置)
+#                ext-config[0]:                                      # 数组形式
+#                    data-id: 'mooctest-report-service-public.yml'   # 配置名称
+#                    group: 'MOOCTEST-REPORT'                        # 分组名称
+#                    refresh: true                                   # 是否动态刷新
+
+#        prefix: ${spring.application.name}
+# ${prefix}-${spring.profile.active}.${file-extension}
+# prefix 默认为 spring.application.name 的值,也可以通过配置项 spring.cloud.nacos.config.prefix来配置。
+# file-exetension 为配置内容的数据格式,可以通过配置项 spring.cloud.nacos.config.file-extension 来配置。目前只支持 properties 和 yaml 类型。
+#  profiles:
+#    active: dev

BIN
target/classes/cn/iselab/mooctest/site/Application.class


BIN
target/classes/cn/iselab/mooctest/site/configuration/DefaultView.class


BIN
target/classes/cn/iselab/mooctest/site/configuration/OSSConfiguration.class


BIN
target/classes/cn/iselab/mooctest/site/dao/ReportTaskDao.class


BIN
target/classes/cn/iselab/mooctest/site/domainObject/ReportTask.class


BIN
target/classes/cn/iselab/mooctest/site/domainObject/ReportTaskStatus.class


BIN
target/classes/cn/iselab/mooctest/site/domainObject/ReportType.class


BIN
target/classes/cn/iselab/mooctest/site/domainObject/UploadType.class


BIN
target/classes/cn/iselab/mooctest/site/exception/BaseException.class


BIN
target/classes/cn/iselab/mooctest/site/exception/ReportTaskNotExistException.class


BIN
target/classes/cn/iselab/mooctest/site/factory/ReportTaskFactory.class


BIN
target/classes/cn/iselab/mooctest/site/model/ReportTaskPO.class


BIN
target/classes/cn/iselab/mooctest/site/repository/IReportTaskRepo.class


BIN
target/classes/cn/iselab/mooctest/site/repository/ReportTaskRepo.class


BIN
target/classes/cn/iselab/mooctest/site/service/AutoReportProductService.class


BIN
target/classes/cn/iselab/mooctest/site/service/UploadService.class


BIN
target/classes/cn/iselab/mooctest/site/service/impl/AutoReportProductServiceImpl$1.class


BIN
target/classes/cn/iselab/mooctest/site/service/impl/AutoReportProductServiceImpl$2.class


BIN
target/classes/cn/iselab/mooctest/site/service/impl/AutoReportProductServiceImpl.class


BIN
target/classes/cn/iselab/mooctest/site/service/impl/OSSUploadServiceImpl.class


BIN
target/classes/cn/iselab/mooctest/site/util/Converter$CopierIdentity.class


BIN
target/classes/cn/iselab/mooctest/site/util/Converter$PrimitiveConverter.class


BIN
target/classes/cn/iselab/mooctest/site/util/Converter.class


BIN
target/classes/cn/iselab/mooctest/site/web/ctrl/HandleReportController.class


BIN
target/classes/cn/iselab/mooctest/site/web/ctrl/UploadController.class


BIN
target/classes/cn/iselab/mooctest/site/web/data/AppAutoTestData/AppAutoTestAppScore.class


BIN
target/classes/cn/iselab/mooctest/site/web/data/AppAutoTestData/AppAutoTestDeviceStatus.class


BIN
target/classes/cn/iselab/mooctest/site/web/data/AppAutoTestData/AppAutoTestExtraInfo.class


BIN
target/classes/cn/iselab/mooctest/site/web/data/AppAutoTestData/AppAutoTestReportAction.class


BIN
target/classes/cn/iselab/mooctest/site/web/data/AppAutoTestData/AppAutoTestReportAppBaseInfo.class


BIN
target/classes/cn/iselab/mooctest/site/web/data/AppAutoTestData/AppAutoTestReportBug.class


BIN
target/classes/cn/iselab/mooctest/site/web/data/AppAutoTestData/AppAutoTestReportBugCluster.class


BIN
target/classes/cn/iselab/mooctest/site/web/data/AppAutoTestData/AppAutoTestReportBugDeviceInfo.class


BIN
target/classes/cn/iselab/mooctest/site/web/data/AppAutoTestData/AppAutoTestReportBugDistribution.class


BIN
target/classes/cn/iselab/mooctest/site/web/data/AppAutoTestData/AppAutoTestReportBugInfo.class


BIN
target/classes/cn/iselab/mooctest/site/web/data/AppAutoTestData/AppAutoTestReportBugListInfoForTable.class


BIN
target/classes/cn/iselab/mooctest/site/web/data/AppAutoTestData/AppAutoTestReportDeviceInfo.class


BIN
target/classes/cn/iselab/mooctest/site/web/data/AppAutoTestData/AppAutoTestReportDeviceInfoLogCat.class


BIN
target/classes/cn/iselab/mooctest/site/web/data/AppAutoTestData/AppAutoTestReportDeviceListInfoForTable.class


BIN
target/classes/cn/iselab/mooctest/site/web/data/AppAutoTestData/AppAutoTestReportLabel.class


BIN
target/classes/cn/iselab/mooctest/site/web/data/AppAutoTestData/AppAutoTestReportPie.class


BIN
target/classes/cn/iselab/mooctest/site/web/data/AppAutoTestData/AppAutoTestReportTableBug.class


BIN
target/classes/cn/iselab/mooctest/site/web/data/AppAutoTestData/AppAutoTestReportType.class


BIN
target/classes/cn/iselab/mooctest/site/web/data/AppAutoTestData/AppAutoTestReportVO.class


BIN
target/classes/cn/iselab/mooctest/site/web/data/ReportVO/AppAutoTestReportVO.class


BIN
target/classes/cn/iselab/mooctest/site/web/data/ReportVO/ReportDataVO.class


BIN
target/classes/cn/iselab/mooctest/site/web/data/ReportVO/StaticScanReportDataVO.class


BIN
target/classes/cn/iselab/mooctest/site/web/data/ReportVO/WebData.class


BIN
target/classes/cn/iselab/mooctest/site/web/data/StaticScanData/StaticScanData.class


BIN
target/classes/cn/iselab/mooctest/site/web/data/StaticScanData/StaticScanExample.class


BIN
target/classes/cn/iselab/mooctest/site/web/data/StaticScanData/StaticScanSolution.class


BIN
target/classes/cn/iselab/mooctest/site/web/data/StaticScanData/StaticScanVulReference.class


BIN
target/classes/cn/iselab/mooctest/site/web/data/WebScanData/WebDataBrowserStat.class


BIN
target/classes/cn/iselab/mooctest/site/web/data/WebScanData/WebDataBugDetail.class


BIN
target/classes/cn/iselab/mooctest/site/web/data/WebScanData/WebDataCategoryStat.class


BIN
target/classes/cn/iselab/mooctest/site/web/data/WebScanData/WebDataEnvironment.class


BIN
target/classes/cn/iselab/mooctest/site/web/data/WebScanData/WebDataPlatformStat.class


BIN
target/classes/cn/iselab/mooctest/site/web/data/WebScanData/WebDataProjectInfoVO.class


BIN
target/classes/cn/iselab/mooctest/site/web/data/WebScanData/WebDataRiskLevelStat.class


BIN
target/classes/cn/iselab/mooctest/site/web/data/WebScanData/WebDataVulStatistic.class


BIN
target/classes/cn/iselab/mooctest/site/web/data/WebScanData/WebDataVulnerability.class


BIN
target/classes/cn/iselab/mooctest/site/web/data/enums/VulVerifyStatus.class


BIN
target/classes/cn/iselab/mooctest/site/web/data/functionalTestData/Bug.class


BIN
target/classes/cn/iselab/mooctest/site/web/data/functionalTestData/DeviceBugListItem.class


BIN
target/classes/cn/iselab/mooctest/site/web/data/functionalTestData/DeviceDetailItem.class


BIN
target/classes/cn/iselab/mooctest/site/web/data/functionalTestData/DeviceDistributionData.class


BIN
target/classes/cn/iselab/mooctest/site/web/data/functionalTestData/DeviceUCListItem.class


BIN
target/classes/cn/iselab/mooctest/site/web/data/functionalTestData/FunctionalTestVO.class


BIN
target/classes/cn/iselab/mooctest/site/web/data/functionalTestData/GeneralResult.class


BIN
target/classes/cn/iselab/mooctest/site/web/data/functionalTestData/ScreenShot.class


BIN
target/classes/cn/iselab/mooctest/site/web/data/functionalTestData/TypePassResult.class


BIN
target/classes/cn/iselab/mooctest/site/web/data/functionalTestData/UCItemCaseInfo.class


BIN
target/classes/cn/iselab/mooctest/site/web/data/functionalTestData/UCPassResult.class


BIN
target/classes/cn/iselab/mooctest/site/web/data/functionalTestData/UCResultDeviceItem.class


BIN
target/classes/cn/iselab/mooctest/site/web/data/functionalTestData/UCResultItem.class


BIN
target/classes/cn/iselab/mooctest/site/web/data/reportData/ActiveIssueDetailVO.class


BIN
target/classes/cn/iselab/mooctest/site/web/data/reportData/AppBasicInfoVO.class


BIN
target/classes/cn/iselab/mooctest/site/web/data/reportData/DeviceDetailVO.class


BIN
target/classes/cn/iselab/mooctest/site/web/data/reportData/IssueDistributionAttributeVO.class


BIN
target/classes/cn/iselab/mooctest/site/web/data/reportData/IssueDistributionVO.class


BIN
target/classes/cn/iselab/mooctest/site/web/data/reportData/IssuePhoneVO.class


BIN
target/classes/cn/iselab/mooctest/site/web/data/reportData/NeedOptimizedProblemVO.class


BIN
target/classes/cn/iselab/mooctest/site/web/data/reportData/PerformanceDetailAttributeVO.class


BIN
target/classes/cn/iselab/mooctest/site/web/data/reportData/PerformanceDetailItemVO.class


BIN
target/classes/cn/iselab/mooctest/site/web/data/reportData/PerformanceSummaryAttributeVO.class


BIN
target/classes/cn/iselab/mooctest/site/web/data/reportData/PerformanceSummaryItemVO.class


BIN
target/classes/cn/iselab/mooctest/site/web/data/reportData/PieDataVO.class


BIN
target/classes/cn/iselab/mooctest/site/web/data/reportData/TestResultVO.class


BIN
target/classes/cn/iselab/mooctest/site/web/data/vulData/ProjectInfoVO.class


BIN
target/classes/cn/iselab/mooctest/site/web/data/vulData/StatVO.class


BIN
target/classes/cn/iselab/mooctest/site/web/data/vulData/Vul2TaskVo.class


BIN
target/classes/cn/iselab/mooctest/site/web/data/vulData/VulCheckVo.class


Some files were not shown because too many files changed in this diff