mirror of
https://github.com/dbgate/dbgate
synced 2024-11-07 20:26:23 +00:00
open database as json model
This commit is contained in:
parent
7522f87066
commit
94b1a25252
@ -120,6 +120,14 @@
|
||||
);
|
||||
};
|
||||
|
||||
const handleOpenJsonModel = async () => {
|
||||
const db = await getDatabaseInfo({
|
||||
conid: connection._id,
|
||||
database: name,
|
||||
});
|
||||
openJsonDocument(db, name);
|
||||
};
|
||||
|
||||
const driver = findEngineDriver(connection, getExtensions());
|
||||
|
||||
return [
|
||||
@ -130,6 +138,7 @@
|
||||
{ onClick: handleImport, text: 'Import' },
|
||||
{ onClick: handleExport, text: 'Export' },
|
||||
{ onClick: handleSqlGenerator, text: 'SQL Generator' },
|
||||
{ onClick: handleOpenJsonModel, text: 'Open model as JSON' },
|
||||
{ onClick: handleExportModel, text: 'Export DB model - experimental' },
|
||||
_.get($currentDatabase, 'connection._id') &&
|
||||
(_.get($currentDatabase, 'connection._id') != _.get(connection, '_id') ||
|
||||
@ -161,6 +170,8 @@
|
||||
import { showSnackbarSuccess } from '../utility/snackbar';
|
||||
import { findEngineDriver } from 'dbgate-tools';
|
||||
import InputTextModal from '../modals/InputTextModal.svelte';
|
||||
import { getDatabaseInfo } from '../utility/metadataLoaders';
|
||||
import { openJsonDocument } from '../tabs/JsonTab.svelte';
|
||||
export let data;
|
||||
|
||||
function createMenu() {
|
||||
|
Loading…
Reference in New Issue
Block a user