From a5cc7624adf393a5a358e02aabd1f8b5ae5219b9 Mon Sep 17 00:00:00 2001 From: Jan Prochazka Date: Sun, 17 May 2020 20:51:16 +0200 Subject: [PATCH] running as portal --- packages/api/.env | 1 + packages/api/src/controllers/config.js | 2 + packages/web/src/tabs/InfoPageTab.js | 8 +++- packages/web/src/widgets/DatabaseWidget.js | 10 ++++- packages/web/src/widgets/Toolbar.js | 49 +++++++++++++++------- 5 files changed, 53 insertions(+), 17 deletions(-) diff --git a/packages/api/.env b/packages/api/.env index 0f4a7a58..8d6ae537 100644 --- a/packages/api/.env +++ b/packages/api/.env @@ -10,5 +10,6 @@ TOOLBAR=home ICON_home=fas fa-home TITLE_home=Home PAGE_home=home.html +STARTUP_PAGES=home PAGES_DIRECTORY=/home/jena/jenasoft/dbgate-web/pages diff --git a/packages/api/src/controllers/config.js b/packages/api/src/controllers/config.js index a4dcb23c..c4ddb3a1 100644 --- a/packages/api/src/controllers/config.js +++ b/packages/api/src/controllers/config.js @@ -10,9 +10,11 @@ module.exports = { page: process.env[`PAGE_${name}`], })) : null; + const startupPages = process.env.STARTUP_PAGES ? process.env.STARTUP_PAGES.split(',') : []; return { runAsPortal: !!process.env.CONNECTIONS, toolbar, + startupPages, }; }, }; diff --git a/packages/web/src/tabs/InfoPageTab.js b/packages/web/src/tabs/InfoPageTab.js index 740d04c1..daa581a4 100644 --- a/packages/web/src/tabs/InfoPageTab.js +++ b/packages/web/src/tabs/InfoPageTab.js @@ -1,6 +1,12 @@ import React from 'react'; +import styled from 'styled-components'; import resolveApi from '../utility/resolveApi'; +const Frame = styled.iframe` + flex: 1; + border: 0px solid gray; +`; + export default function InfoPageTab({ page }) { - return