mirror of
https://github.com/steedos/steedos-platform
synced 2024-11-22 17:06:42 +00:00
fix bug:查询设计器不显示 #2753
This commit is contained in:
parent
d2d61e2373
commit
ffa3c914c3
@ -39,6 +39,7 @@ module.exports = {
|
||||
name: packageName,
|
||||
isPackage: false
|
||||
},
|
||||
initBuilderRouter: false,
|
||||
QUERY_RESULTS_CLEANUP_ENABLED: process.env.STEEDOS_QUERY_RESULTS_CLEANUP_ENABLED ? validator.toBoolean(process.env.STEEDOS_QUERY_RESULTS_CLEANUP_ENABLED || 'true', true) : true,
|
||||
QUERY_RESULTS_CLEANUP_COUNT: process.env.STEEDOS_QUERY_RESULTS_CLEANUP_COUNT || 100,
|
||||
QUERY_RESULTS_CLEANUP_MAX_AGE: process.env.STEEDOS_QUERY_RESULTS_CLEANUP_MAX_AGE || 7
|
||||
@ -314,23 +315,31 @@ module.exports = {
|
||||
*/
|
||||
events: {
|
||||
'steedos-server.started': async function (ctx) {
|
||||
const router = express.Router();
|
||||
let publicPath = require.resolve("@steedos/service-charts/package.json");
|
||||
publicPath = publicPath.replace("package.json", 'webapp');
|
||||
let routerPath = "";
|
||||
if (__meteor_runtime_config__.ROOT_URL_PATH_PREFIX) {
|
||||
routerPath = __meteor_runtime_config__.ROOT_URL_PATH_PREFIX;
|
||||
}
|
||||
const cacheTime = 86400000 * 1; // one day
|
||||
router.use(`${routerPath}/builder`, express.static(publicPath, { maxAge: cacheTime }));
|
||||
WebApp.rawConnectHandlers.use(router);
|
||||
}
|
||||
},
|
||||
this.initBuilderRouter();
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Methods
|
||||
*/
|
||||
methods: {
|
||||
initBuilderRouter: {
|
||||
handler() {
|
||||
if (this.settings.initBuilderRouter) {
|
||||
return;
|
||||
}
|
||||
const router = express.Router();
|
||||
let publicPath = require.resolve("@steedos/service-charts/package.json");
|
||||
publicPath = publicPath.replace("package.json", 'webapp');
|
||||
let routerPath = "";
|
||||
if (__meteor_runtime_config__.ROOT_URL_PATH_PREFIX) {
|
||||
routerPath = __meteor_runtime_config__.ROOT_URL_PATH_PREFIX;
|
||||
}
|
||||
const cacheTime = 86400000 * 1; // one day
|
||||
router.use(`${routerPath}/builder`, express.static(publicPath, { maxAge: cacheTime }));
|
||||
WebApp.rawConnectHandlers.use(router);
|
||||
}
|
||||
},
|
||||
getDataSourceType: {
|
||||
handler(driver) {
|
||||
switch (driver) {
|
||||
@ -873,6 +882,7 @@ module.exports = {
|
||||
* Service started lifecycle event handler
|
||||
*/
|
||||
async started() {
|
||||
this.initBuilderRouter();
|
||||
this.cacherMaps = [];
|
||||
this.querySCheduleMaps = [];
|
||||
if (this.settings.QUERY_RESULTS_CLEANUP_ENABLED) {
|
||||
|
Loading…
Reference in New Issue
Block a user