fix(editor): Hide pin data in production executions (#4595)

*  Passing an execution mode to the preview iframe so UI can be adjusted based on it
*  Handling production execution mode to hide the pin data in node details view
This commit is contained in:
Milorad FIlipović
2022-11-14 13:28:26 +01:00
committed by GitHub
parent 96b5e4a329
commit edebad1a89
8 changed files with 50 additions and 6 deletions

View File

@@ -49,6 +49,7 @@
:instance="instance"
:isActive="!!activeNode && activeNode.name === nodeData.name"
:hideActions="pullConnActive"
:isProductionExecutionPreview="isProductionExecutionPreview"
>
<span
slot="custom-tooltip"
@@ -76,6 +77,7 @@
<node-details-view
:readOnly="isReadOnly"
:renaming="renamingActive"
:isProductionExecutionPreview="isProductionExecutionPreview"
@valueChanged="valueChanged"
@stopExecution="stopExecution"
/>
@@ -530,6 +532,7 @@ export default mixins(
isExecutionPreview: false,
showTriggerMissingTooltip: false,
workflowData: null as INewWorkflowData | null,
isProductionExecutionPreview: false,
};
},
beforeDestroy() {
@@ -3135,6 +3138,10 @@ export default mixins(
}
} else if (json && json.command === 'openExecution') {
try {
// If this NodeView is used in preview mode (in iframe) it will not have access to the main app store
// so everything it needs has to be sent using post messages and passed down to child components
this.isProductionExecutionPreview = json.executionMode !== 'manual';
await this.openExecution(json.executionId);
this.isExecutionPreview = true;
} catch (e) {