mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-11 12:57:29 -08:00
* clean up editor based on #1418 * remove unused ref * address comment on guard style
This commit is contained in:
parent
5602929210
commit
a9550202df
Binary file not shown.
Before Width: | Height: | Size: 6.7 KiB |
|
@ -38,8 +38,6 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
|
||||
import { genericHelpers } from '@/components/mixins/genericHelpers';
|
||||
import { showMessage } from '@/components/mixins/showMessage';
|
||||
|
||||
|
|
|
@ -37,11 +37,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
|
||||
import Vue from 'vue';
|
||||
|
||||
import {
|
||||
IRunData,
|
||||
INodeTypeDescription,
|
||||
} from 'n8n-workflow';
|
||||
import {
|
||||
|
|
|
@ -28,8 +28,6 @@ export default mixins(genericHelpers).extend({
|
|||
return this.$store.getters.activeNode;
|
||||
},
|
||||
currentValue (): string {
|
||||
const parameterNameParts = this.keyName.split('.');
|
||||
|
||||
const getDescendantProp = (obj: object, path: string): string => {
|
||||
// @ts-ignore
|
||||
return path.split('.').reduce((acc, part) => acc && acc[part], obj);
|
||||
|
|
|
@ -6,8 +6,6 @@
|
|||
|
||||
<script lang="ts">
|
||||
|
||||
import Vue from 'vue';
|
||||
|
||||
import { genericHelpers } from '@/components/mixins/genericHelpers';
|
||||
|
||||
import mixins from 'vue-typed-mixins';
|
||||
|
|
|
@ -167,7 +167,6 @@ import {
|
|||
IExecutionDeleteFilter,
|
||||
IExecutionsListResponse,
|
||||
IExecutionShortResponse,
|
||||
IExecutionsStopData,
|
||||
IExecutionsSummary,
|
||||
IWorkflowShortResponse,
|
||||
} from '@/Interface';
|
||||
|
@ -632,7 +631,7 @@ export default mixins(
|
|||
// can show the user in the UI that it is in progress
|
||||
this.stoppingExecutions.push(activeExecutionId);
|
||||
|
||||
const stopData: IExecutionsStopData = await this.restApi().stopCurrentExecution(activeExecutionId);
|
||||
await this.restApi().stopCurrentExecution(activeExecutionId);
|
||||
|
||||
// Remove it from the list of currently stopping executions
|
||||
const index = this.stoppingExecutions.indexOf(activeExecutionId);
|
||||
|
|
|
@ -262,9 +262,7 @@ export default mixins(
|
|||
// Convert the expression string into a Quill Operations
|
||||
const editorOperations: DeltaOperation[] = [];
|
||||
currentValue.replace(/\{\{(.*?)\}\}/ig, '*%%#_@^$1*%%#_@').split('*%%#_@').forEach((value: string) => {
|
||||
if (!value) {
|
||||
|
||||
} else if (value.charAt(0) === '^') {
|
||||
if (value && value.charAt(0) === '^') {
|
||||
// Is variable
|
||||
let displayValue = `{{${value.slice(1)}}}` as string | number | boolean | null | undefined;
|
||||
if (this.resolvedValue) {
|
||||
|
|
|
@ -47,8 +47,6 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
|
||||
import {
|
||||
IUpdateInformation,
|
||||
} from '@/Interface';
|
||||
|
|
|
@ -148,7 +148,6 @@ import { MessageBoxInputData } from 'element-ui/types/message-box';
|
|||
|
||||
import {
|
||||
IExecutionResponse,
|
||||
IExecutionsStopData,
|
||||
IWorkflowDataUpdate,
|
||||
IMenuItem,
|
||||
} from '../Interface';
|
||||
|
@ -336,7 +335,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!`,
|
||||
|
@ -405,9 +404,8 @@ export default mixins(
|
|||
return;
|
||||
}
|
||||
|
||||
let result;
|
||||
try {
|
||||
result = await this.restApi().deleteWorkflow(this.currentWorkflow);
|
||||
await this.restApi().deleteWorkflow(this.currentWorkflow);
|
||||
} catch (error) {
|
||||
this.$showError(error, 'Problem deleting the workflow', 'There was a problem deleting the workflow:');
|
||||
return;
|
||||
|
|
|
@ -36,8 +36,6 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
|
||||
import {
|
||||
IUpdateInformation,
|
||||
} from '@/Interface';
|
||||
|
|
|
@ -49,7 +49,6 @@ import {
|
|||
ICredentialsResponse,
|
||||
INodeUi,
|
||||
INodeUpdatePropertiesInformation,
|
||||
IUpdateInformation,
|
||||
} from '@/Interface';
|
||||
import {
|
||||
ICredentialType,
|
||||
|
@ -212,8 +211,6 @@ export default mixins(
|
|||
return node.issues.credentials[credentialTypeName];
|
||||
},
|
||||
updateCredentials (credentialType: string): void {
|
||||
const credentials = this.credentials[credentialType];
|
||||
|
||||
const name = this.credentials[credentialType];
|
||||
const credentialData = this.credentialOptions[credentialType].find((optionData: ICredentialsResponse) => optionData.name === name);
|
||||
if (credentialData === undefined) {
|
||||
|
|
|
@ -79,8 +79,6 @@ export default mixins(
|
|||
},
|
||||
computed: {
|
||||
nodeType (): INodeTypeDescription | null {
|
||||
const activeNode = this.node;
|
||||
|
||||
if (this.node) {
|
||||
return this.$store.getters.nodeType(this.node.type);
|
||||
}
|
||||
|
|
|
@ -38,12 +38,9 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
|
||||
import {
|
||||
IWebhookDescription,
|
||||
NodeHelpers,
|
||||
Workflow,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
import { copyPaste } from '@/components/mixins/copyPaste';
|
||||
|
|
|
@ -115,13 +115,10 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import { get } from 'lodash';
|
||||
|
||||
import {
|
||||
INodeUi,
|
||||
IVariableItemSelected,
|
||||
IVariableSelectorOption,
|
||||
} from '@/Interface';
|
||||
import {
|
||||
NodeHelpers,
|
||||
|
|
|
@ -196,20 +196,16 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
//@ts-ignore
|
||||
import VueJsonPretty from 'vue-json-pretty';
|
||||
import {
|
||||
GenericValue,
|
||||
IBinaryData,
|
||||
IBinaryKeyData,
|
||||
IDataObject,
|
||||
INodeExecutionData,
|
||||
IRun,
|
||||
IRunData,
|
||||
IRunExecutionData,
|
||||
ITaskData,
|
||||
ITaskDataConnections,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
import {
|
||||
|
|
|
@ -18,10 +18,6 @@
|
|||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
|
||||
import {
|
||||
Workflow,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
export default Vue.extend({
|
||||
|
||||
name: 'TextEdit',
|
||||
|
|
|
@ -12,13 +12,10 @@
|
|||
|
||||
<script lang="ts">
|
||||
|
||||
import Vue from 'vue';
|
||||
|
||||
import {
|
||||
GenericValue,
|
||||
IContextObject,
|
||||
IDataObject,
|
||||
IRun,
|
||||
IRunData,
|
||||
IRunExecutionData,
|
||||
Workflow,
|
||||
|
|
|
@ -355,7 +355,6 @@ export default mixins(
|
|||
Vue.set(this, 'workflows', workflows);
|
||||
},
|
||||
async openDialog () {
|
||||
const workflowId = this.$route.params.name;
|
||||
if (this.$route.params.name === undefined) {
|
||||
this.$showMessage({
|
||||
title: 'No workflow active',
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue