fix bug:查询设计器不显示 #2753

This commit is contained in:
baozhoutao 2022-02-07 11:11:37 +08:00
parent ffa3c914c3
commit 9f55069aa4

View File

@ -328,6 +328,8 @@ module.exports = {
if (this.settings.initBuilderRouter) {
return;
}
this.settings.initBuilderRouter = true;
try {
const router = express.Router();
let publicPath = require.resolve("@steedos/service-charts/package.json");
publicPath = publicPath.replace("package.json", 'webapp');
@ -338,6 +340,10 @@ module.exports = {
const cacheTime = 86400000 * 1; // one day
router.use(`${routerPath}/builder`, express.static(publicPath, { maxAge: cacheTime }));
WebApp.rawConnectHandlers.use(router);
} catch (error) {
console.error(error)
this.settings.initBuilderRouter = false;
}
}
},
getDataSourceType: {