From 83ce927d16d14651ef51b97925ff4576873acb3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90li?= <15040126243@163.com> Date: Wed, 20 Oct 2021 15:25:14 +0800 Subject: [PATCH] =?UTF-8?q?add=20=E5=89=8D=E7=AB=AF=E5=A2=9E=E5=8A=A0=20?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E8=B0=83=E5=BA=A6=E4=B8=AD=E5=BF=83=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=20=E4=B8=8E=E7=8E=AF=E5=A2=83=E5=8F=8Anginx=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker/nginx/nginx.conf | 12 ++++++++++++ ruoyi-ui/.env.development | 3 +++ ruoyi-ui/.env.production | 3 +++ ruoyi-ui/.env.staging | 3 +++ ruoyi-ui/src/views/monitor/xxljob/index.vue | 15 +++++++++++++++ 5 files changed, 36 insertions(+) create mode 100644 ruoyi-ui/src/views/monitor/xxljob/index.vue diff --git a/docker/nginx/nginx.conf b/docker/nginx/nginx.conf index a511f351b..93a633e14 100644 --- a/docker/nginx/nginx.conf +++ b/docker/nginx/nginx.conf @@ -31,6 +31,10 @@ http { server 172.30.0.90:9090; } + upstream xxl-job-admin { + server 172.30.0.92:9100; + } + server { listen 80; server_name localhost; @@ -70,6 +74,14 @@ http { proxy_pass http://monitor-admin/admin/; } + location /xxl-job-admin/ { + proxy_set_header Host $http_host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header REMOTE-HOST $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_pass http://xxl-job-admin/xxl-job-admin/; + } + error_page 500 502 503 504 /50x.html; location = /50x.html { root html; diff --git a/ruoyi-ui/.env.development b/ruoyi-ui/.env.development index a1a508de4..3b003aa38 100644 --- a/ruoyi-ui/.env.development +++ b/ruoyi-ui/.env.development @@ -10,5 +10,8 @@ VUE_APP_BASE_API = '/dev-api' # 监控地址 VUE_APP_MONITRO_ADMIN = 'http://localhost:9090/admin/login' +# xxl-job 控制台地址 +VUE_APP_XXL_JOB_ADMIN = 'http://localhost:9100/xxl-job-admin' + # 路由懒加载 VUE_CLI_BABEL_TRANSPILE_MODULES = true diff --git a/ruoyi-ui/.env.production b/ruoyi-ui/.env.production index b6eec53c6..2d0bb6184 100644 --- a/ruoyi-ui/.env.production +++ b/ruoyi-ui/.env.production @@ -7,5 +7,8 @@ ENV = 'production' # 监控地址 VUE_APP_MONITRO_ADMIN = '/admin/login' +# 监控地址 +VUE_APP_XXL_JOB_ADMIN = '/xxl-job-admin' + # 若依管理系统/生产环境 VUE_APP_BASE_API = '/prod-api' diff --git a/ruoyi-ui/.env.staging b/ruoyi-ui/.env.staging index e74ce6ce2..49ce55c95 100644 --- a/ruoyi-ui/.env.staging +++ b/ruoyi-ui/.env.staging @@ -9,5 +9,8 @@ ENV = 'staging' # 监控地址 VUE_APP_MONITRO_ADMIN = '/admin/login' +# 监控地址 +VUE_APP_XXL_JOB_ADMIN = '/xxl-job-admin' + # 若依管理系统/测试环境 VUE_APP_BASE_API = '/stage-api' diff --git a/ruoyi-ui/src/views/monitor/xxljob/index.vue b/ruoyi-ui/src/views/monitor/xxljob/index.vue new file mode 100644 index 000000000..7167b48b3 --- /dev/null +++ b/ruoyi-ui/src/views/monitor/xxljob/index.vue @@ -0,0 +1,15 @@ + +