mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-26 20:16:00 +00:00
show import/export error
This commit is contained in:
@@ -100,15 +100,15 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
handle_copyStreamError(runid, { copyStreamError }) {
|
handle_copyStreamError(runid, { copyStreamError }) {
|
||||||
const { reject, exitOnStreamError } = this.requests[runid];
|
const { reject, exitOnStreamError } = this.requests[runid] || {};
|
||||||
if (exitOnStreamError) {
|
if (exitOnStreamError) {
|
||||||
reject(copyStreamError);
|
reject(copyStreamError);
|
||||||
delete this.requests[runid];
|
delete this.requests[runid];
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
handle_progress(runid, { progressName, status }) {
|
handle_progress(runid, { progressName, status, errorMessage }) {
|
||||||
socket.emit(`runner-progress-${runid}`, { progressName, status });
|
socket.emit(`runner-progress-${runid}`, { progressName, status, errorMessage });
|
||||||
},
|
},
|
||||||
|
|
||||||
rejectRequest(runid, error) {
|
rejectRequest(runid, error) {
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
const EnsureStreamHeaderStream = require('../utility/EnsureStreamHeaderStream');
|
const EnsureStreamHeaderStream = require('../utility/EnsureStreamHeaderStream');
|
||||||
const ColumnMapTransformStream = require('../utility/ColumnMapTransformStream');
|
const ColumnMapTransformStream = require('../utility/ColumnMapTransformStream');
|
||||||
const streamPipeline = require('../utility/streamPipeline');
|
const streamPipeline = require('../utility/streamPipeline');
|
||||||
|
const { getLogger, extractErrorLogData } = require('dbgate-tools');
|
||||||
|
const logger = getLogger('copyStream');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copies reader to writer. Used for import, export tables and transfer data between tables
|
* Copies reader to writer. Used for import, export tables and transfer data between tables
|
||||||
@@ -52,10 +54,12 @@ async function copyStream(input, output, options) {
|
|||||||
msgtype: 'progress',
|
msgtype: 'progress',
|
||||||
progressName,
|
progressName,
|
||||||
status: 'error',
|
status: 'error',
|
||||||
|
errorMessage: err.message,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
throw err;
|
logger.error(extractErrorLogData(err, { progressName }), 'Import/export job failed');
|
||||||
|
// throw err;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -76,6 +76,7 @@
|
|||||||
import { compositeDbNameIfNeeded } from 'dbgate-tools';
|
import { compositeDbNameIfNeeded } from 'dbgate-tools';
|
||||||
import createRef from '../utility/createRef';
|
import createRef from '../utility/createRef';
|
||||||
import DropDownButton from '../buttons/DropDownButton.svelte';
|
import DropDownButton from '../buttons/DropDownButton.svelte';
|
||||||
|
import ErrorMessageModal from '../modals/ErrorMessageModal.svelte';
|
||||||
|
|
||||||
// export let uploadedFile = undefined;
|
// export let uploadedFile = undefined;
|
||||||
// export let openedFile = undefined;
|
// export let openedFile = undefined;
|
||||||
@@ -307,6 +308,14 @@
|
|||||||
<FontIcon icon="icon loading" /> Running
|
<FontIcon icon="icon loading" /> Running
|
||||||
{:else if progressHolder[row]?.status == 'error'}
|
{:else if progressHolder[row]?.status == 'error'}
|
||||||
<FontIcon icon="img error" /> Error
|
<FontIcon icon="img error" /> Error
|
||||||
|
{#if progressHolder[row]?.errorMessage}
|
||||||
|
<FontIcon
|
||||||
|
icon="img info"
|
||||||
|
title={progressHolder[row]?.errorMessage}
|
||||||
|
on:click={() => showModal(ErrorMessageModal, { message: progressHolder[row]?.errorMessage })}
|
||||||
|
style="cursor: pointer"
|
||||||
|
/>
|
||||||
|
{/if}
|
||||||
{:else if progressHolder[row]?.status == 'done'}
|
{:else if progressHolder[row]?.status == 'done'}
|
||||||
<FontIcon icon="img ok" /> Done
|
<FontIcon icon="img ok" /> Done
|
||||||
{:else}
|
{:else}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
// $: console.log('MESSAGE ROWS', items);
|
// $: console.log('MESSAGE ROWS', items);
|
||||||
const values = writable({
|
const values = writable({
|
||||||
hideDebug: false,
|
hideDebug: true,
|
||||||
hideInfo: false,
|
hideInfo: false,
|
||||||
hideError: false,
|
hideError: false,
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user