mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 03:16:01 +00:00
isGeneratedScript TODO
This commit is contained in:
@@ -148,8 +148,8 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
start_meta: true,
|
start_meta: true,
|
||||||
async start({ script }) {
|
async start({ script, isGeneratedScript }) {
|
||||||
if (process.env.DISABLE_SHELL) {
|
if (!isGeneratedScript && process.env.DISABLE_SHELL) {
|
||||||
return { errorMessage: 'Shell is disabled' };
|
return { errorMessage: 'Shell is disabled' };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -108,7 +108,7 @@
|
|||||||
const script = await createImpExpScript($extensions, values);
|
const script = await createImpExpScript($extensions, values);
|
||||||
executeNumber += 1;
|
executeNumber += 1;
|
||||||
let runid = runnerId;
|
let runid = runnerId;
|
||||||
const resp = await apiCall('runners/start', { script });
|
const resp = await apiCall('runners/start', { script, isGeneratedScript: true });
|
||||||
runid = resp.runid;
|
runid = resp.runid;
|
||||||
runnerId = runid;
|
runnerId = runid;
|
||||||
|
|
||||||
|
|||||||
@@ -37,9 +37,9 @@
|
|||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { getContext } from 'svelte';
|
import { getContext } from 'svelte';
|
||||||
import ToolStripCommandButton from '../buttons/ToolStripCommandButton.svelte';
|
import ToolStripCommandButton from '../buttons/ToolStripCommandButton.svelte';
|
||||||
import ToolStripContainer from '../buttons/ToolStripContainer.svelte';
|
import ToolStripContainer from '../buttons/ToolStripContainer.svelte';
|
||||||
import ToolStripSaveButton from '../buttons/ToolStripSaveButton.svelte';
|
import ToolStripSaveButton from '../buttons/ToolStripSaveButton.svelte';
|
||||||
|
|
||||||
import invalidateCommands from '../commands/invalidateCommands';
|
import invalidateCommands from '../commands/invalidateCommands';
|
||||||
import registerCommand from '../commands/registerCommand';
|
import registerCommand from '../commands/registerCommand';
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ export async function exportQuickExportFile(dataName, reader, format, columnMap
|
|||||||
script.copyStream(sourceVar, targetVar, colmapVar);
|
script.copyStream(sourceVar, targetVar, colmapVar);
|
||||||
script.put();
|
script.put();
|
||||||
|
|
||||||
const resp = await apiCall('runners/start', { script: script.getScript() });
|
const resp = await apiCall('runners/start', { script: script.getScript(), isGeneratedScript: true });
|
||||||
const runid = resp.runid;
|
const runid = resp.runid;
|
||||||
let isCanceled = false;
|
let isCanceled = false;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user