mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-05-03 10:33:58 +00:00
removed open wizard from shell function
This commit is contained in:
@@ -192,7 +192,7 @@ export function normalizeExportColumnMap(colmap) {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default async function createImpExpScript(extensions, values, addEditorInfo = true, forceScript = false) {
|
export default async function createImpExpScript(extensions, values, forceScript = false) {
|
||||||
const config = getCurrentConfig();
|
const config = getCurrentConfig();
|
||||||
const script =
|
const script =
|
||||||
config.allowShellScripting || forceScript
|
config.allowShellScripting || forceScript
|
||||||
@@ -233,10 +233,6 @@ export default async function createImpExpScript(extensions, values, addEditorIn
|
|||||||
script.copyStream(sourceVar, targetVar, colmapVar);
|
script.copyStream(sourceVar, targetVar, colmapVar);
|
||||||
script.endLine();
|
script.endLine();
|
||||||
}
|
}
|
||||||
if (addEditorInfo) {
|
|
||||||
script.comment('@ImportExportConfigurator');
|
|
||||||
script.comment(JSON.stringify(values));
|
|
||||||
}
|
|
||||||
return script.getScript(values.schedule);
|
return script.getScript(values.schedule);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -23,15 +23,6 @@
|
|||||||
onClick: () => getCurrentEditor().copyNodeScript(),
|
onClick: () => getCurrentEditor().copyNodeScript(),
|
||||||
});
|
});
|
||||||
|
|
||||||
registerCommand({
|
|
||||||
id: 'shell.openWizard',
|
|
||||||
category: 'Shell',
|
|
||||||
name: 'Open wizard',
|
|
||||||
// testEnabled: () => getCurrentEditor()?.openWizardEnabled(),
|
|
||||||
onClick: () => getCurrentEditor().openWizard(),
|
|
||||||
});
|
|
||||||
|
|
||||||
const configRegex = /\s*\/\/\s*@ImportExportConfigurator\s*\n\s*\/\/\s*(\{[^\n]+\})\n/;
|
|
||||||
const requireRegex = /\s*(\/\/\s*@require\s+[^\n]+)\n/g;
|
const requireRegex = /\s*(\/\/\s*@require\s+[^\n]+)\n/g;
|
||||||
const initRegex = /([^\n]+\/\/\s*@init)/g;
|
const initRegex = /([^\n]+\/\/\s*@init)/g;
|
||||||
</script>
|
</script>
|
||||||
@@ -58,7 +49,6 @@
|
|||||||
import { showSnackbarError } from '../utility/snackbar';
|
import { showSnackbarError } from '../utility/snackbar';
|
||||||
import useEffect from '../utility/useEffect';
|
import useEffect from '../utility/useEffect';
|
||||||
import useTimerLabel from '../utility/useTimerLabel';
|
import useTimerLabel from '../utility/useTimerLabel';
|
||||||
import { openImportExportTab } from '../utility/importExportTools';
|
|
||||||
|
|
||||||
export let tabid;
|
export let tabid;
|
||||||
|
|
||||||
@@ -148,20 +138,6 @@
|
|||||||
copyTextToClipboard(resp);
|
copyTextToClipboard(resp);
|
||||||
}
|
}
|
||||||
|
|
||||||
// export function openWizardEnabled() {
|
|
||||||
// return ($editorValue || '').match(configRegex);
|
|
||||||
// }
|
|
||||||
|
|
||||||
export function openWizard() {
|
|
||||||
const jsonTextMatch = ($editorValue || '').match(configRegex);
|
|
||||||
if (jsonTextMatch) {
|
|
||||||
openImportExportTab(JSON.parse(jsonTextMatch[1]));
|
|
||||||
// showModal(ImportExportModal, { initialValues: JSON.parse(jsonTextMatch[1]) });
|
|
||||||
} else {
|
|
||||||
showSnackbarError('No wizard info found');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function getActiveScript() {
|
function getActiveScript() {
|
||||||
const selectedText = domEditor.getEditor().getSelectedText();
|
const selectedText = domEditor.getEditor().getSelectedText();
|
||||||
const editorText = $editorValue;
|
const editorText = $editorValue;
|
||||||
@@ -208,7 +184,6 @@
|
|||||||
return [
|
return [
|
||||||
{ command: 'shell.execute' },
|
{ command: 'shell.execute' },
|
||||||
{ command: 'shell.kill' },
|
{ command: 'shell.kill' },
|
||||||
{ command: 'shell.openWizard' },
|
|
||||||
{ divider: true },
|
{ divider: true },
|
||||||
{ command: 'shell.toggleComment' },
|
{ command: 'shell.toggleComment' },
|
||||||
{ divider: true },
|
{ divider: true },
|
||||||
|
|||||||
Reference in New Issue
Block a user