fix(editor): Handling errors when opening settings and executions (#3877)

This commit is contained in:
Milorad FIlipović 2022-08-12 15:29:25 +02:00 committed by GitHub
parent f782bcd52d
commit 762b422488
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 30 additions and 24 deletions

View file

@ -100,14 +100,16 @@
</n8n-tooltip> </n8n-tooltip>
<el-dropdown trigger="click" @command="handleRetryClick"> <el-dropdown trigger="click" @command="handleRetryClick">
<n8n-icon-button <span class="retry-button">
v-if="scope.row.stoppedAt !== undefined && !scope.row.finished && scope.row.retryOf === undefined && scope.row.retrySuccessId === undefined && !scope.row.waitTill" <n8n-icon-button
:type="scope.row.stoppedAt === null ? 'warning': 'danger'" v-if="scope.row.stoppedAt !== undefined && !scope.row.finished && scope.row.retryOf === undefined && scope.row.retrySuccessId === undefined && !scope.row.waitTill"
class="ml-3xs" :type="scope.row.stoppedAt === null ? 'warning': 'danger'"
size="mini" class="ml-3xs"
:title="$locale.baseText('executionsList.retryExecution')" size="mini"
icon="redo" :title="$locale.baseText('executionsList.retryExecution')"
/> icon="redo"
/>
</span>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item :command="{command: 'currentlySaved', row: scope.row}"> <el-dropdown-item :command="{command: 'currentlySaved', row: scope.row}">
{{ $locale.baseText('executionsList.retryWithCurrentlySavedWorkflow') }} {{ $locale.baseText('executionsList.retryWithCurrentlySavedWorkflow') }}

View file

@ -2232,27 +2232,31 @@ export default mixins(
__removeConnectionByConnectionInfo (info: OnConnectionBindInfo, removeVisualConnection = false) { __removeConnectionByConnectionInfo (info: OnConnectionBindInfo, removeVisualConnection = false) {
// @ts-ignore // @ts-ignore
const sourceInfo = info.sourceEndpoint.getParameters(); const sourceInfo = info.sourceEndpoint.getParameters();
const sourceNode = this.$store.getters.getNodeById(sourceInfo.nodeId);
// @ts-ignore // @ts-ignore
const targetInfo = info.targetEndpoint.getParameters(); const targetInfo = info.targetEndpoint.getParameters();
const targetNode = this.$store.getters.getNodeById(targetInfo.nodeId);
const connectionInfo = [ if (sourceNode && targetNode) {
{ const connectionInfo = [
node: this.$store.getters.getNodeById(sourceInfo.nodeId).name, {
type: sourceInfo.type, node: sourceNode.name,
index: sourceInfo.index, type: sourceInfo.type,
}, index: sourceInfo.index,
{ },
node: this.$store.getters.getNodeById(targetInfo.nodeId).name, {
type: targetInfo.type, node: targetNode.name,
index: targetInfo.index, type: targetInfo.type,
}, index: targetInfo.index,
] as [IConnection, IConnection]; },
] as [IConnection, IConnection];
if (removeVisualConnection) { if (removeVisualConnection) {
this.__deleteJSPlumbConnection(info.connection); this.__deleteJSPlumbConnection(info.connection);
}
this.$store.commit('removeConnection', { connection: connectionInfo });
} }
this.$store.commit('removeConnection', { connection: connectionInfo });
}, },
async duplicateNode (nodeName: string) { async duplicateNode (nodeName: string) {
if (this.editAllowedCheck() === false) { if (this.editAllowedCheck() === false) {