🧹 clean up editor based on #1418 (#2010)

* clean up editor based on #1418

* remove unused ref

* address comment on guard style
This commit is contained in:
Mutasem Aldmour
2021-07-23 17:50:47 +02:00
committed by GitHub
parent 5602929210
commit a9550202df
19 changed files with 8 additions and 54 deletions

View File

@@ -149,7 +149,6 @@ import {
INodeConnections,
INodeIssues,
INodeTypeDescription,
NodeInputConnections,
NodeHelpers,
Workflow,
IRun,
@@ -157,7 +156,6 @@ import {
import {
IConnectionsUi,
IExecutionResponse,
IExecutionsStopData,
IN8nUISettings,
IWorkflowDb,
IWorkflowData,
@@ -910,7 +908,7 @@ export default mixins(
try {
this.stopExecutionInProgress = true;
const stopData: IExecutionsStopData = await this.restApi().stopCurrentExecution(executionId);
await this.restApi().stopCurrentExecution(executionId);
this.$showMessage({
title: 'Execution stopped',
message: `The execution with the id "${executionId}" got stopped!`,
@@ -950,9 +948,8 @@ export default mixins(
},
async stopWaitingForWebhook () {
let result;
try {
result = await this.restApi().removeTestWebhook(this.$store.getters.workflowId);
await this.restApi().removeTestWebhook(this.$store.getters.workflowId);
} catch (error) {
this.$showError(error, 'Problem deleting the test-webhook', 'There was a problem deleting webhook:');
return;
@@ -2037,7 +2034,6 @@ export default mixins(
const nodeSourceConnections = [];
if (currentConnections[sourceNode][type][sourceIndex]) {
for (connectionIndex = 0; connectionIndex < currentConnections[sourceNode][type][sourceIndex].length; connectionIndex++) {
const nodeConnection: NodeInputConnections = [];
connectionData = currentConnections[sourceNode][type][sourceIndex][connectionIndex];
if (!createNodeNames.includes(connectionData.node)) {
// Node does not get created so skip input connection
@@ -2235,7 +2231,7 @@ export default mixins(
async mounted () {
this.$root.$on('importWorkflowData', async (data: IDataObject) => {
const resData = await this.importWorkflowData(data.data as IWorkflowDataUpdate);
await this.importWorkflowData(data.data as IWorkflowDataUpdate);
});
this.$root.$on('newWorkflow', this.newWorkflow);
@@ -2243,7 +2239,7 @@ export default mixins(
this.$root.$on('importWorkflowUrl', async (data: IDataObject) => {
const workflowData = await this.getWorkflowDataFromUrl(data.url as string);
if (workflowData !== undefined) {
const resData = await this.importWorkflowData(workflowData);
await this.importWorkflowData(workflowData);
}
});