From 83ce927d16d14651ef51b97925ff4576873acb3b Mon Sep 17 00:00:00 2001 From: 疯狂的狮子li <15040126243@163.com> Date: 星期三, 20 十月 2021 15:25:14 +0800 Subject: [PATCH] add 前端增加 任务调度中心页面 与环境及nginx配置 --- docker/nginx/nginx.conf | 12 ++++++++++++ ruoyi-ui/src/views/monitor/xxljob/index.vue | 15 +++++++++++++++ ruoyi-ui/.env.production | 3 +++ ruoyi-ui/.env.staging | 3 +++ ruoyi-ui/.env.development | 3 +++ 5 files changed, 36 insertions(+), 0 deletions(-) diff --git a/docker/nginx/nginx.conf b/docker/nginx/nginx.conf index a511f35..93a633e 100644 --- a/docker/nginx/nginx.conf +++ b/docker/nginx/nginx.conf @@ -31,6 +31,10 @@ 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 @@ 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 a1a508d..3b003aa 100644 --- a/ruoyi-ui/.env.development +++ b/ruoyi-ui/.env.development @@ -10,5 +10,8 @@ # 鐩戞帶鍦板潃 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 b6eec53..2d0bb61 100644 --- a/ruoyi-ui/.env.production +++ b/ruoyi-ui/.env.production @@ -7,5 +7,8 @@ # 鐩戞帶鍦板潃 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 e74ce6c..49ce55c 100644 --- a/ruoyi-ui/.env.staging +++ b/ruoyi-ui/.env.staging @@ -9,5 +9,8 @@ # 鐩戞帶鍦板潃 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 0000000..7167b48 --- /dev/null +++ b/ruoyi-ui/src/views/monitor/xxljob/index.vue @@ -0,0 +1,15 @@ +<template> + <i-frame :src="url" /> +</template> +<script> +import iFrame from "@/components/iFrame/index"; +export default { + name: "XxlJob", + components: { iFrame }, + data() { + return { + url: process.env.VUE_APP_XXL_JOB_ADMIN + }; + }, +}; +</script> -- Gitblit v1.9.3