mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-29 15:43:59 +00:00
@@ -467,14 +467,12 @@ await dbgateApi.executeQuery(${JSON.stringify(
|
|||||||
|
|
||||||
{ divider: true },
|
{ divider: true },
|
||||||
isSqlOrDoc &&
|
isSqlOrDoc &&
|
||||||
isProApp() &&
|
|
||||||
!connection.isReadOnly &&
|
!connection.isReadOnly &&
|
||||||
hasPermission(`dbops/import`) && {
|
hasPermission(`dbops/import`) && {
|
||||||
onClick: handleImport,
|
onClick: handleImport,
|
||||||
text: _t('database.import', { defaultMessage: 'Import' }),
|
text: _t('database.import', { defaultMessage: 'Import' }),
|
||||||
},
|
},
|
||||||
isSqlOrDoc &&
|
isSqlOrDoc &&
|
||||||
isProApp() &&
|
|
||||||
hasPermission(`dbops/export`) && {
|
hasPermission(`dbops/export`) && {
|
||||||
onClick: handleExport,
|
onClick: handleExport,
|
||||||
text: _t('database.export', { defaultMessage: 'Export' }),
|
text: _t('database.export', { defaultMessage: 'Export' }),
|
||||||
|
|||||||
@@ -703,7 +703,7 @@ registerCommand({
|
|||||||
name: __t('command.database.export', { defaultMessage: 'Export database' }),
|
name: __t('command.database.export', { defaultMessage: 'Export database' }),
|
||||||
toolbar: true,
|
toolbar: true,
|
||||||
icon: 'icon export',
|
icon: 'icon export',
|
||||||
testEnabled: () => getCurrentDatabase() != null && hasPermission(`dbops/export`) && isProApp(),
|
testEnabled: () => getCurrentDatabase() != null && hasPermission(`dbops/export`),
|
||||||
onClick: () => {
|
onClick: () => {
|
||||||
openImportExportTab({
|
openImportExportTab({
|
||||||
targetStorageType: getDefaultFileFormat(getExtensions()).storageType,
|
targetStorageType: getDefaultFileFormat(getExtensions()).storageType,
|
||||||
|
|||||||
@@ -95,7 +95,6 @@
|
|||||||
title: _t('common.exportDatabase', { defaultMessage: 'Export database' }),
|
title: _t('common.exportDatabase', { defaultMessage: 'Export database' }),
|
||||||
description: _t('newObject.exportDescription', { defaultMessage: 'Export to file like CSV, JSON, Excel, or other DB' }),
|
description: _t('newObject.exportDescription', { defaultMessage: 'Export to file like CSV, JSON, Excel, or other DB' }),
|
||||||
command: 'database.export',
|
command: 'database.export',
|
||||||
isProFeature: true,
|
|
||||||
testid: 'NewObjectModal_databaseExport',
|
testid: 'NewObjectModal_databaseExport',
|
||||||
disabledMessage: _t('newObject.exportDisabled', { defaultMessage: 'Export is not available for current database' }),
|
disabledMessage: _t('newObject.exportDisabled', { defaultMessage: 'Export is not available for current database' }),
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import { isProApp } from './proTools';
|
|||||||
export function createQuickExportMenuItems(handler: (fmt: QuickExportDefinition) => Function, advancedExportMenuItem) {
|
export function createQuickExportMenuItems(handler: (fmt: QuickExportDefinition) => Function, advancedExportMenuItem) {
|
||||||
const extensions = getExtensions();
|
const extensions = getExtensions();
|
||||||
return [
|
return [
|
||||||
isProApp() && {
|
{
|
||||||
text: _t('export.exportAdvanced', { defaultMessage : 'Export advanced...'}),
|
text: _t('export.exportAdvanced', { defaultMessage : 'Export advanced...'}),
|
||||||
...advancedExportMenuItem,
|
...advancedExportMenuItem,
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user