Showing
13 changed files
with
30 additions
and
84 deletions
@@ -9,14 +9,12 @@ import org.springframework.stereotype.Component; | @@ -9,14 +9,12 @@ import org.springframework.stereotype.Component; | ||
9 | @Data | 9 | @Data |
10 | public class SystemConfig { | 10 | public class SystemConfig { |
11 | 11 | ||
12 | - // AJ服务地址 | ||
13 | - private String serverAddr; | ||
14 | 12 | ||
15 | // 监控网关地址 | 13 | // 监控网关地址 |
16 | private String monitorGateWay; | 14 | private String monitorGateWay; |
17 | 15 | ||
18 | @Override | 16 | @Override |
19 | public String toString() { | 17 | public String toString() { |
20 | - return "配置信息: {" + "服务地址 = '" + serverAddr + '\'' + ", 监控网关地址 = '" + monitorGateWay + '\'' + '}'; | 18 | + return "配置信息: {" + "monitorGateWay【监控网关地址】 => '" + monitorGateWay + '\'' + '}'; |
21 | } | 19 | } |
22 | } | 20 | } |
@@ -5,6 +5,7 @@ import com.anji.plus.gaea.bean.KeyValue; | @@ -5,6 +5,7 @@ import com.anji.plus.gaea.bean.KeyValue; | ||
5 | import com.anji.plus.gaea.bean.ResponseBean; | 5 | import com.anji.plus.gaea.bean.ResponseBean; |
6 | import com.anji.plus.gaea.curd.controller.GaeaBaseController; | 6 | import com.anji.plus.gaea.curd.controller.GaeaBaseController; |
7 | import com.anji.plus.gaea.curd.service.GaeaBaseService; | 7 | import com.anji.plus.gaea.curd.service.GaeaBaseService; |
8 | +import com.anjiplus.template.gaea.business.config.SystemConfig; | ||
8 | import com.anjiplus.template.gaea.business.modules.dict.controller.dto.GaeaDictDTO; | 9 | import com.anjiplus.template.gaea.business.modules.dict.controller.dto.GaeaDictDTO; |
9 | import com.anjiplus.template.gaea.business.modules.dict.controller.param.GaeaDictParam; | 10 | import com.anjiplus.template.gaea.business.modules.dict.controller.param.GaeaDictParam; |
10 | import com.anjiplus.template.gaea.business.modules.dict.dao.entity.GaeaDict; | 11 | import com.anjiplus.template.gaea.business.modules.dict.dao.entity.GaeaDict; |
@@ -34,6 +35,9 @@ public class GaeaDictController extends GaeaBaseController<GaeaDictParam, GaeaDi | @@ -34,6 +35,9 @@ public class GaeaDictController extends GaeaBaseController<GaeaDictParam, GaeaDi | ||
34 | @Autowired | 35 | @Autowired |
35 | private GaeaDictItemService gaeaDictItemService; | 36 | private GaeaDictItemService gaeaDictItemService; |
36 | 37 | ||
38 | + @Autowired | ||
39 | + private SystemConfig systemConfig; | ||
40 | + | ||
37 | @Override | 41 | @Override |
38 | public GaeaBaseService<GaeaDictParam, GaeaDict> getService() { | 42 | public GaeaBaseService<GaeaDictParam, GaeaDict> getService() { |
39 | return gaeaDictService; | 43 | return gaeaDictService; |
@@ -111,6 +115,11 @@ public class GaeaDictController extends GaeaBaseController<GaeaDictParam, GaeaDi | @@ -111,6 +115,11 @@ public class GaeaDictController extends GaeaBaseController<GaeaDictParam, GaeaDi | ||
111 | String language = locale.getLanguage(); | 115 | String language = locale.getLanguage(); |
112 | 116 | ||
113 | Map<String, List<KeyValue>> all = gaeaDictService.all(language); | 117 | Map<String, List<KeyValue>> all = gaeaDictService.all(language); |
114 | - return responseSuccessWithData(all); | 118 | + |
119 | + Map<String,Object> data = new HashMap<>(); | ||
120 | + data.put("gaeaDict",all); | ||
121 | + data.put("config",systemConfig); | ||
122 | + ResponseBean responseBean = responseSuccessWithData(data); | ||
123 | + return responseBean; | ||
115 | } | 124 | } |
116 | } | 125 | } |
1 | server: | 1 | server: |
2 | - port: 9095 | 2 | + port: 8089 |
3 | servlet: | 3 | servlet: |
4 | encoding: | 4 | encoding: |
5 | charset: UTF-8 | 5 | charset: UTF-8 |
@@ -8,7 +8,7 @@ server: | @@ -8,7 +8,7 @@ server: | ||
8 | 8 | ||
9 | spring: | 9 | spring: |
10 | profiles: | 10 | profiles: |
11 | - active: dev | 11 | + active: dev43 |
12 | application: | 12 | application: |
13 | name: aj-report | 13 | name: aj-report |
14 | servlet: | 14 | servlet: |
@@ -19,9 +19,9 @@ spring: | @@ -19,9 +19,9 @@ spring: | ||
19 | messages: | 19 | messages: |
20 | basename: i18n/messages | 20 | basename: i18n/messages |
21 | datasource: | 21 | datasource: |
22 | - url: jdbc:mysql://10.108.26.197:3306/aj_report?characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useSSL=false | ||
23 | - username: root | ||
24 | - password: appuser@anji | 22 | + url: jdbc:mysql://89.12.88.137:3306/aj_report?characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useSSL=false |
23 | + username: zhjk | ||
24 | + password: zhjk@2022 | ||
25 | #数据源连接池配置 | 25 | #数据源连接池配置 |
26 | druid: | 26 | druid: |
27 | initial-size: 10 # 初始化时建立物理连接的个数。初始化发生在显示调用init方法,或者第一次getConnection时 | 27 | initial-size: 10 # 初始化时建立物理连接的个数。初始化发生在显示调用init方法,或者第一次getConnection时 |
@@ -72,7 +72,7 @@ customer: | @@ -72,7 +72,7 @@ customer: | ||
72 | excelSuffix: .xlsx|.xls|.csv | 72 | excelSuffix: .xlsx|.xls|.csv |
73 | #上传对应下载的下载链接路径 http://serverip:9095/file/download | 73 | #上传对应下载的下载链接路径 http://serverip:9095/file/download |
74 | #downloadPath: http://10.108.26.197:9095/file/download | 74 | #downloadPath: http://10.108.26.197:9095/file/download |
75 | - downloadPath: http://127.0.0.1:9095/file/download | 75 | + downloadPath: http://89.12.88.128:8089/file/download |
76 | 76 | ||
77 | # 跳过token验证和权限验证的url清单 | 77 | # 跳过token验证和权限验证的url清单 |
78 | skip-authenticate-urls: /gaeaDict/all, /login, /static, /file/download/, /index.html, /favicon.ico, /reportShare/detailByCode,/getConfig | 78 | skip-authenticate-urls: /gaeaDict/all, /login, /static, /file/download/, /index.html, /favicon.ico, /reportShare/detailByCode,/getConfig |
report-ui/config/dev.env.gz.js
deleted
100644 → 0
1 | -'use strict' | ||
2 | -const merge = require('webpack-merge') | ||
3 | -const prodEnv = require('./prod.env') | ||
4 | - | ||
5 | -module.exports = merge(prodEnv, { | ||
6 | - NODE_ENV: '"gz"', | ||
7 | - BASE_API: '"http://89.12.88.128:9095"', | ||
8 | - MONITOR_GATEWAY: '"http://89.12.88.128:8080"' | ||
9 | - // BASE_API: '"http://192.168.1.50:9095"', | ||
10 | - // MONITOR_GATEWAY: '"http://192.168.1.50:8080"' | ||
11 | - | ||
12 | -}) |
@@ -4,16 +4,6 @@ const prodEnv = require('./prod.env') | @@ -4,16 +4,6 @@ const prodEnv = require('./prod.env') | ||
4 | 4 | ||
5 | module.exports = merge(prodEnv, { | 5 | module.exports = merge(prodEnv, { |
6 | NODE_ENV: '"development"', | 6 | NODE_ENV: '"development"', |
7 | - BASE_API: '"https://69.12.93.116:8089"', | ||
8 | - MONITOR_GATEWAY: '"https://69.12.93.116:8080"' | ||
9 | - // BASE_API: '"http://127.0.0.1:8089"', | ||
10 | - // MONITOR_GATEWAY: '"http://127.0.0.1:8080"' | ||
11 | - | ||
12 | - /*BASE_API: '"http://192.168.0.75:9095"', | ||
13 | - MONITOR_GATEWAY: '"http://192.168.0.75:8080"'*/ | ||
14 | - /* BASE_API: '"https://192.168.0.248:8089"', | ||
15 | - MONITOR_GATEWAY: '"https://192.168.0.248:8080"'*/ | ||
16 | - /*BASE_API: '"http://192.168.1.52:8089"', | ||
17 | - MONITOR_GATEWAY: '"http://192.168.1.52:8080"'*/ | ||
18 | - | 7 | + BASE_API: '"http://192.168.0.75:8089"', |
8 | + MONITOR_GATEWAY: '"http://192.168.0.75:8080"' | ||
19 | }) | 9 | }) |
report-ui/config/dev.env1.51.js
deleted
100644 → 0
1 | -'use strict' | ||
2 | -const merge = require('webpack-merge') | ||
3 | -const prodEnv = require('./prod.env') | ||
4 | - | ||
5 | -module.exports = merge(prodEnv, { | ||
6 | - NODE_ENV: '"dev151"', | ||
7 | - BASE_API: '"http://192.168.0.75:9095"', | ||
8 | - MONITOR_GATEWAY: '"http://192.168.0.75:8080"' | ||
9 | - // BASE_API: '"http://192.168.1.50:9095"', | ||
10 | - // MONITOR_GATEWAY: '"http://192.168.1.50:8080"' | ||
11 | - | ||
12 | -}) |
report-ui/config/dev50.env.js
deleted
100644 → 0
report-ui/config/test.env.js
deleted
100644 → 0
@@ -8,10 +8,6 @@ | @@ -8,10 +8,6 @@ | ||
8 | "start": "npm run dev", | 8 | "start": "npm run dev", |
9 | "build": "cross-env NODE_ENV=production node build/build.js", | 9 | "build": "cross-env NODE_ENV=production node build/build.js", |
10 | "build:dev": "cross-env NODE_ENV=development node build/build.js", | 10 | "build:dev": "cross-env NODE_ENV=development node build/build.js", |
11 | - "build:dev50": "cross-env NODE_ENV=dev50 node build/build.js", | ||
12 | - "build:dev151": "cross-env NODE_ENV=dev151 node build/build.js", | ||
13 | - "build:devgz": "cross-env NODE_ENV=gz node build/build.js", | ||
14 | - "build:test": "cross-env NODE_ENV=testing node build/build.js", | ||
15 | "build:prod": "cross-env NODE_ENV=production node build/build.js" | 11 | "build:prod": "cross-env NODE_ENV=production node build/build.js" |
16 | }, | 12 | }, |
17 | "dependencies": { | 13 | "dependencies": { |
@@ -70,8 +70,14 @@ export function initDictToLocalstorage(callback) { | @@ -70,8 +70,14 @@ export function initDictToLocalstorage(callback) { | ||
70 | return | 70 | return |
71 | } | 71 | } |
72 | 72 | ||
73 | + let data = res.data; | ||
74 | + let gaeaDict = data.gaeaDict; | ||
75 | + let config = data.config; | ||
76 | + | ||
73 | // 保存数据字典到localStorage | 77 | // 保存数据字典到localStorage |
74 | - setStorageItem('gaeaDict', res.data) | 78 | + setStorageItem('gaeaDict', gaeaDict); |
79 | + setStorageItem('config', config); | ||
80 | + | ||
75 | if (callback != null) { | 81 | if (callback != null) { |
76 | callback() | 82 | callback() |
77 | } | 83 | } |
1 | import request from '@/utils/request1' | 1 | import request from '@/utils/request1' |
2 | import { getShareToken, getToken } from "@/utils/auth"; | 2 | import { getShareToken, getToken } from "@/utils/auth"; |
3 | import axios from 'axios'; | 3 | import axios from 'axios'; |
4 | -//自监控平台接口数据联调 // Start LSQ 2022/1/13 10:52 TODO | ||
5 | -// export function getData(data) { | ||
6 | -// return request({ | ||
7 | -// url: 'reportDashboard/getData', | ||
8 | -// method: 'post', | ||
9 | -// headers: { 'Share-Token': getShareToken(), 'Authorization': getToken() }, | ||
10 | -// data, | ||
11 | -// }) | ||
12 | -// } | ||
13 | -//性能趋势图路径 | 4 | +import {getStorageItem} from "@/utils/storage"; |
14 | 5 | ||
15 | export function getTrendBaseUrl() { | 6 | export function getTrendBaseUrl() { |
16 | - let baseUrl=process.env.MONITOR_GATEWAY; | ||
17 | - // baseUrl='http://localhost:8088'; | 7 | + let baseUrl = process.env.NODE_ENV == 'development' ? process.env.MONITOR_GATEWAY : getStorageItem('config').monitorGateWay; |
18 | return baseUrl; | 8 | return baseUrl; |
19 | } | 9 | } |
20 | //获取告警策略列表数据 | 10 | //获取告警策略列表数据 |
@@ -4,7 +4,7 @@ import store from '../store' | @@ -4,7 +4,7 @@ import store from '../store' | ||
4 | import { getToken } from '@/utils/auth' | 4 | import { getToken } from '@/utils/auth' |
5 | // 创建axios实例 | 5 | // 创建axios实例 |
6 | const service = axios.create({ | 6 | const service = axios.create({ |
7 | - baseURL: process.env.BASE_API, // api 的 base_url | 7 | + baseURL: process.env.NODE_ENV == 'development' ? process.env.BASE_API : '/',// api 的 base_url |
8 | timeout: 120000 // 请求超时时间 | 8 | timeout: 120000 // 请求超时时间 |
9 | }) | 9 | }) |
10 | 10 |
-
Please register or login to post a comment