mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-21 03:36:01 +00:00
runAsPortal - connections from env variables, cannot be changed
This commit is contained in:
@@ -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, {}) || {};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user