runAsPortal - connections from env variables, cannot be changed

This commit is contained in:
Jan Prochazka
2020-05-17 08:43:42 +02:00
parent 044d8dc538
commit 0bf44b9a9d
8 changed files with 68 additions and 8 deletions

View File

@@ -40,6 +40,12 @@ const connectionInfoLoader = ({ conid }) => ({
reloadTrigger: 'connection-list-changed',
});
const configLoader = () => ({
url: 'config/get',
params: {},
reloadTrigger: 'config-changed',
});
// const sqlObjectListLoader = ({ conid, database }) => ({
// url: 'metadata/list-objects',
// params: { conid, database },
@@ -204,3 +210,10 @@ export function getConnectionList() {
export function useConnectionList() {
return useCore(connectionListLoader, {});
}
export function getConfig() {
return getCore(configLoader, {}) || {};
}
export function useConfig() {
return useCore(configLoader, {}) || {};
}