diff --git a/packages/web/src/utility/metadataLoaders.ts b/packages/web/src/utility/metadataLoaders.ts
index 1fa2fbf8..11a3658f 100644
--- a/packages/web/src/utility/metadataLoaders.ts
+++ b/packages/web/src/utility/metadataLoaders.ts
@@ -78,11 +78,11 @@ const databaseListLoader = ({ conid }) => ({
},
});
-const databaseKeysLoader = ({ conid, database, root }) => ({
- url: 'database-connections/load-keys',
- params: { conid, database, root },
- reloadTrigger: `database-keys-changed-${conid}-${database}`,
-});
+// const databaseKeysLoader = ({ conid, database, root }) => ({
+// url: 'database-connections/load-keys',
+// params: { conid, database, root },
+// reloadTrigger: `database-keys-changed-${conid}-${database}`,
+// });
const serverVersionLoader = ({ conid }) => ({
url: 'server-connections/version',
@@ -436,9 +436,9 @@ export function useAuthTypes(args) {
return useCore(authTypesLoader, args);
}
-export function getDatabaseKeys(args) {
- return getCore(databaseKeysLoader, args);
-}
-export function useDatabaseKeys(args) {
- return useCore(databaseKeysLoader, args);
-}
+// export function getDatabaseKeys(args) {
+// return getCore(databaseKeysLoader, args);
+// }
+// export function useDatabaseKeys(args) {
+// return useCore(databaseKeysLoader, args);
+// }
diff --git a/packages/web/src/widgets/DbKeysSubTree.svelte b/packages/web/src/widgets/DbKeysSubTree.svelte
index 68e7399b..6976231d 100644
--- a/packages/web/src/widgets/DbKeysSubTree.svelte
+++ b/packages/web/src/widgets/DbKeysSubTree.svelte
@@ -1,5 +1,7 @@
-{#each ($items || []).slice(0, maxShowCount) as item}
-
-{/each}
+{#await apiCall('database-connections/load-keys', { conid, database, root, reloadToken })}
+
+{:then items}
+ {#each (items || []).slice(0, maxShowCount) as item}
+
+ {/each}
-{#if ($items || []).length > maxShowCount}
- {
- maxShowCount += SHOW_INCREMENT;
- }}
- />
-{/if}
+ {#if (items || []).length > maxShowCount}
+ {
+ maxShowCount += SHOW_INCREMENT;
+ }}
+ />
+ {/if}
+{/await}
diff --git a/packages/web/src/widgets/DbKeysTree.svelte b/packages/web/src/widgets/DbKeysTree.svelte
index 207bc305..ac6a14fd 100644
--- a/packages/web/src/widgets/DbKeysTree.svelte
+++ b/packages/web/src/widgets/DbKeysTree.svelte
@@ -14,8 +14,11 @@
export let database;
let filter;
+ let reloadToken = 0;
- function handleRefreshDatabase() {}
+ function handleRefreshDatabase() {
+ reloadToken += 1;
+ }
@@ -29,5 +32,5 @@
-
+
diff --git a/packages/web/src/widgets/DbKeysTreeNode.svelte b/packages/web/src/widgets/DbKeysTreeNode.svelte
index ba168f6c..598c7325 100644
--- a/packages/web/src/widgets/DbKeysTreeNode.svelte
+++ b/packages/web/src/widgets/DbKeysTreeNode.svelte
@@ -21,6 +21,7 @@
export let indentLevel = 0;
let isExpanded;
+ let reloadToken = 0;
// $: console.log(item.text, indentLevel);
function createMenu() {
@@ -41,6 +42,12 @@
});
},
},
+ item.type == 'dir' && {
+ label: 'Reload',
+ onClick: () => {
+ reloadToken += 1;
+ },
+ },
];
}
@@ -83,5 +90,5 @@
-->
{#if isExpanded}
-
+
{/if}