mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-05-01 13:13:58 +00:00
create table from database ctx menu
This commit is contained in:
@@ -17,6 +17,27 @@
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const handleNewTable = () => {
|
||||||
|
const tooltip = `${getConnectionLabel(connection)}\n${name}`;
|
||||||
|
openNewTab(
|
||||||
|
{
|
||||||
|
title: 'Table #',
|
||||||
|
tooltip,
|
||||||
|
icon: 'img table-structure',
|
||||||
|
tabComponent: 'TableStructureTab',
|
||||||
|
props: {
|
||||||
|
conid: connection._id,
|
||||||
|
database: name,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
editor: {
|
||||||
|
columns: [],
|
||||||
|
},
|
||||||
|
}
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
const handleImport = () => {
|
const handleImport = () => {
|
||||||
showModal(ImportExportModal, {
|
showModal(ImportExportModal, {
|
||||||
initialValues: {
|
initialValues: {
|
||||||
@@ -83,6 +104,8 @@
|
|||||||
|
|
||||||
return [
|
return [
|
||||||
{ onClick: handleNewQuery, text: 'New query', isNewQuery: true },
|
{ onClick: handleNewQuery, text: 'New query', isNewQuery: true },
|
||||||
|
{ onClick: handleNewTable, text: 'New table' },
|
||||||
|
{ divider: true },
|
||||||
{ onClick: handleImport, text: 'Import' },
|
{ onClick: handleImport, text: 'Import' },
|
||||||
{ onClick: handleExport, text: 'Export' },
|
{ onClick: handleExport, text: 'Export' },
|
||||||
{ onClick: handleSqlGenerator, text: 'SQL Generator' },
|
{ onClick: handleSqlGenerator, text: 'SQL Generator' },
|
||||||
|
|||||||
Reference in New Issue
Block a user