fix(editor): Fix rundata type errors (no-changelog) (#9443)

This commit is contained in:
Csaba Tuncsik
2024-05-21 13:19:56 +02:00
committed by GitHub
parent 277511a9b5
commit cd751e7cc8
13 changed files with 95 additions and 55 deletions

View File

@@ -1,5 +1,6 @@
<template>
<RunData
v-if="node"
ref="runData"
:node="node"
:run-index="runIndex"
@@ -50,7 +51,7 @@
$locale.baseText('ndv.output.waitingToRun')
}}</n8n-text>
<n8n-text v-if="!workflowRunning" data-test-id="ndv-output-run-node-hint">
<template v-if="isSubNodeType.value">
<template v-if="isSubNodeType">
{{ $locale.baseText('ndv.output.runNodeHintSubNode') }}
</template>
<template v-else>
@@ -120,7 +121,7 @@ type RunDataRef = InstanceType<typeof RunData>;
const OUTPUT_TYPE = {
REGULAR: 'regular',
LOGS: 'logs',
};
} as const;
export default defineComponent({
name: 'OutputPanel',
@@ -192,7 +193,7 @@ export default defineComponent({
return null;
},
isTriggerNode(): boolean {
return this.nodeTypesStore.isTriggerNode(this.node.type);
return this.nodeTypesStore.isTriggerNode(this.node?.type ?? '');
},
hasAiMetadata(): boolean {
if (this.node) {
@@ -213,7 +214,7 @@ export default defineComponent({
return !!(this.nodeType && this.nodeType.group.includes('schedule'));
},
isNodeRunning(): boolean {
return this.node && this.workflowsStore.isNodeExecuting(this.node.name);
return !!this.node && this.workflowsStore.isNodeExecuting(this.node.name);
},
workflowRunning(): boolean {
return this.uiStore.isActionActive('workflowRunning');
@@ -301,7 +302,7 @@ export default defineComponent({
this.$telemetry.track('User clicked ndv link', {
workflow_id: this.workflowsStore.workflowId,
push_ref: this.pushRef,
node_type: this.node.type,
node_type: this.node?.type,
pane: 'output',
type: 'insert-test-data',
});
@@ -316,7 +317,7 @@ export default defineComponent({
openSettings() {
this.$emit('openSettings');
this.$telemetry.track('User clicked ndv link', {
node_type: this.node.type,
node_type: this.node?.type,
workflow_id: this.workflowsStore.workflowId,
push_ref: this.pushRef,
pane: 'output',
@@ -326,7 +327,7 @@ export default defineComponent({
onRunIndexChange(run: number) {
this.$emit('runChange', run);
},
onUpdateOutputMode(outputMode: (typeof OUTPUT_TYPE)[string]) {
onUpdateOutputMode(outputMode: (typeof OUTPUT_TYPE)[keyof typeof OUTPUT_TYPE]) {
if (outputMode === OUTPUT_TYPE.LOGS) {
ndvEventBus.emit('setPositionByName', 'minLeft');
} else {