mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-21 16:26:00 +00:00
public cloud widget
This commit is contained in:
@@ -166,6 +166,12 @@ const authTypesLoader = ({ engine }) => ({
|
||||
errorValue: null,
|
||||
});
|
||||
|
||||
const publicCloudFilesLoader = () => ({
|
||||
url: 'cloud/public-files',
|
||||
params: {},
|
||||
reloadTrigger: { key: `public-cloud-changed` },
|
||||
});
|
||||
|
||||
async function getCore(loader, args) {
|
||||
const { url, params, reloadTrigger, transform, onLoaded, errorValue } = loader(args);
|
||||
const key = stableStringify({ url, ...params });
|
||||
@@ -456,3 +462,10 @@ export function getSchemaList(args) {
|
||||
export function useSchemaList(args) {
|
||||
return useCore(schemaListLoader, args);
|
||||
}
|
||||
|
||||
export function getPublicCloudFiles(args) {
|
||||
return getCore(publicCloudFilesLoader, args);
|
||||
}
|
||||
export function usePublicCloudFiles(args = {}) {
|
||||
return useCore(publicCloudFilesLoader, args);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user