Browse Source

修改测试类型,区分测试环境和线上环境的nginx配置

guo00guo 4 years ago
parent
commit
ebe5b3cb1e

+ 16 - 8
src/constants/enum/service-type.js

@@ -1,11 +1,19 @@
 let ServiceType = {
-  0: "接口测试", //接口测试
-  1: "安全漏洞扫描",    //安全漏洞扫描
-  2: "风险评估服务",   //风险评估服务
-  3: "源代码安全审计服务",   //源代码安全审计服务
-  4: "功能测试服务",   //功能测试服务
-  5: "性能测试",   //性能测试
-  6: "功能和易用性测试",   //功能和易用性测试
+  0: "接口测试",
+  1: "兼容性测试",
+  2: "可靠性测试",
+  3: "稳定性测试",
+  4: "功能测试",
+  5: "性能测试",
+  6: "安全测试",
+  7: "易用性测试",
+  8: "应用故障诊断",
+  9: "应用漏洞扫描",
+  10: "代码安全审计",
+  11: "风险评估",
+  12: "等保测评",
+  13: "评估评价",
+  14: "定制测试",
 }
 
-export default ServiceType
+export default ServiceType

+ 2 - 2
src/js/generalService.js

@@ -21,7 +21,7 @@ export const getUserIdentity = () => {
 
 //获取所有测评能力
 export const getAllAbilities = () => {
-  return ['接口测试', '安全漏洞扫描', '风险评估服务', '源代码安全审计服务', '功能测试服务', '性能测试', '功能和易用性测试']
+  return ['接口测试', '兼容性测试', '可靠性测试', '稳定性测试', '功能测试', '性能测试', '安全测试','易用性测试', '应用故障诊断', '应用漏洞扫描', '代码安全审计', '风险评估', '等保测评', '评估评价', '定制测试']
   //return Http.get(Apis.GENERAL.GET_ALL_ABILITIES)
 }
 
@@ -33,7 +33,7 @@ export const getAllAgencyResourceTypes = () => {
 
 //获取所有服务类型
 export const getAllServiceTypes = () => {
-  const data = ['接口测试', '安全漏洞扫描', '风险评估服务', '源代码安全审计服务', '功能测试服务', '性能测试', '功能和易用性测试']
+  const data = ['接口测试', '兼容性测试', '可靠性测试', '稳定性测试', '功能测试', '性能测试', '安全测试','易用性测试', '应用故障诊断', '应用漏洞扫描', '代码安全审计', '风险评估', '等保测评', '评估评价', '定制测试']
   return new Promise((resolve) => {
     resolve(data)
   })

+ 3 - 3
src/js/index.js

@@ -525,7 +525,7 @@ export const defaultValue = {
 //
 // //获取所有测评能力
 // export const getAllAbilities = () => {
-//   return ['接口测试', '安全漏洞扫描', '风险评估服务', '源代码安全审计服务', '功能测试服务', '性能测试', '功能和易用性测试']
+//   return ['接口测试', '兼容性测试', '可靠性测试', '稳定性测试', '功能测试', '性能测试', '安全测试','易用性测试', '应用故障诊断', '应用漏洞扫描', '代码安全审计', '风险评估', '等保测评', '评估评价', '定制测试']
 //   //return Http.get(Apis.GENERAL.GET_ALL_ABILITIES)
 // }
 //
@@ -537,7 +537,7 @@ export const defaultValue = {
 //
 // //获取所有服务类型
 // export const getAllServiceTypes = () => {
-//   const data = ['接口测试', '安全漏洞扫描', '风险评估服务', '源代码安全审计服务', '功能测试服务', '性能测试', '功能和易用性测试']
+//   const data = ['接口测试', '兼容性测试', '可靠性测试', '稳定性测试', '功能测试', '性能测试', '安全测试','易用性测试', '应用故障诊断', '应用漏洞扫描', '代码安全审计', '风险评估', '等保测评', '评估评价', '定制测试']
 //   return new Promise((resolve) => {
 //     resolve(data)
 //   })
@@ -721,7 +721,7 @@ export const defaultValue = {
 //     createTime: '',
 //     //机构
 //     evaluationAgencyName: '慕测科技',
-//     evaluationAgencyAbilityList: ['接口测试', '安全漏洞扫描', '风险评估服务', '源代码安全审计服务', '功能测试服务', '性能测试', '功能和易用性测试'],
+//     evaluationAgencyAbilityList: ['接口测试', '兼容性测试', '可靠性测试', '稳定性测试', '功能测试', '性能测试', '安全测试','易用性测试', '应用故障诊断', '应用漏洞扫描', '代码安全审计', '风险评估', '等保测评', '评估评价', '定制测试'],
 //     evaluationAgencyResourceList: [
 //       {
 //         id: 0,

+ 1 - 1
src/js/userService.js

@@ -193,7 +193,7 @@ export const getCurrentAuthenInfo = () => {
     createTime: '',
     //机构
     evaluationAgencyName: '慕测科技',
-    evaluationAgencyAbilityList: ['接口测试', '安全漏洞扫描', '风险评估服务', '源代码安全审计服务', '功能测试服务', '性能测试', '功能和易用性测试'],
+    evaluationAgencyAbilityList: ['接口测试', '兼容性测试', '可靠性测试', '稳定性测试', '功能测试', '性能测试', '安全测试','易用性测试', '应用故障诊断', '应用漏洞扫描', '代码安全审计', '风险评估', '等保测评', '评估评价', '定制测试'],
     evaluationAgencyResourceList: [
       {
         id: 0,

+ 11 - 0
tool4deploy-test/Dockerfile

@@ -0,0 +1,11 @@
+FROM nginx
+
+RUN rm -rf /usr/share/nginx/html/*
+
+COPY ./crowd-web /usr/share/nginx/html/
+
+RUN chmod -R 777 /usr/share/nginx/html
+
+EXPOSE 80
+
+CMD ["nginx", "-g", "daemon off;"]

+ 28 - 0
tool4deploy-test/conf.d/nginx.conf

@@ -0,0 +1,28 @@
+server {
+        listen       8083;
+        server_name  crowd.mooctest.net;
+        root /usr/share/nginx/html;
+        #charset koi8-r;
+        client_max_body_size 100m;
+        #access_log  logs/host.access.log  main;
+
+        location / {
+            root /usr/share/nginx/html;
+        }
+
+        location /api {
+            proxy_set_header Host                          $host;
+            proxy_set_header X-Real-IP                  $remote_addr;
+            proxy_set_header X-Forwarded-For      $proxy_add_x_forwarded_for;
+            proxy_pass http://backend:8080;
+        }
+
+        #error_page  404              /404.html;
+
+        # redirect server error pages to the static page /50x.html
+        #
+        error_page   500 502 503 504  /50x.html;
+        location = /50x.html {
+            root   html;
+        }
+ }

+ 0 - 0
tool4deploy-test/crowd-web/.gitkeep


+ 0 - 0
tool4deploy-test/crowd-web/README.MD


+ 2 - 2
tool4deploy/conf.d/nginx.conf

@@ -1,6 +1,6 @@
 server {
-        listen       8083;
-        server_name  crowd.mooctest.net;
+        listen       80;
+        server_name  www.callfortest.com;
         root /usr/share/nginx/html;
         #charset koi8-r;
         client_max_body_size 100m;