diff --git a/frontend/src/lib/stores/hosttree.js b/frontend/src/lib/stores/hosttree.js index 5806cab..082902f 100644 --- a/frontend/src/lib/stores/hosttree.js +++ b/frontend/src/lib/stores/hosttree.js @@ -283,8 +283,18 @@ async function refresh() { await database.open(); } }; + + database.executeShellScript = async function(script) { + const result = await ExecuteShellScript(hostKey, dbKey, '', script); + return result; + }; } + host.executeShellScript = async function(script) { + const result = await ExecuteShellScript(hostKey, '', '', script); + return result; + }; + host.newDatabase = async function() { const name = await dialogs.enterText('Create a database', 'Enter the database name. Note: databases in MongoDB do not exist until they have a collection and an item. Your new database will not persist on the server; fill it to have it created.', ''); if (name) { diff --git a/frontend/src/organisms/connection/collection/index.svelte b/frontend/src/organisms/connection/collection/index.svelte index db6165f..5b0f282 100644 --- a/frontend/src/organisms/connection/collection/index.svelte +++ b/frontend/src/organisms/connection/collection/index.svelte @@ -9,7 +9,7 @@ import Indexes from './indexes.svelte'; import Insert from './insert.svelte'; import Remove from './remove.svelte'; - import Shell from './shell.svelte'; + import Shell from '../shell.svelte'; import Stats from './stats.svelte'; import Update from './update.svelte'; diff --git a/frontend/src/organisms/connection/database/index.svelte b/frontend/src/organisms/connection/database/index.svelte index 982ba12..39cf905 100644 --- a/frontend/src/organisms/connection/database/index.svelte +++ b/frontend/src/organisms/connection/database/index.svelte @@ -2,6 +2,8 @@ import BlankState from '$components/blankstate.svelte'; import TabBar from '$components/tabbar.svelte'; import { EventsOn } from '$wails/runtime/runtime'; + + import Shell from '../shell.svelte'; import Stats from './stats.svelte'; export let database; @@ -25,9 +27,15 @@