File tree 2 files changed +8
-1
lines changed
components/graph/node-modal
2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import React from "react";
2
2
import { useTranslation } from "react-i18next" ;
3
3
4
4
import type ProcessUtils from "../../../common/ProcessUtils" ;
5
+ import { useUserSettings } from "../../../common/userSettings" ;
5
6
import type { NodeType , NodeValidationError , UIParameter } from "../../../types" ;
6
7
import { DescriptionField } from "./DescriptionField" ;
7
8
import { DisableField } from "./DisableField" ;
@@ -34,6 +35,10 @@ export function EnricherProcessor({
34
35
showValidation ?: boolean ;
35
36
} ) : JSX . Element {
36
37
const { t } = useTranslation ( ) ;
38
+ const [ settings ] = useUserSettings ( ) ;
39
+ const showMockFieldOnEnrichers = settings [ "node.showMockFieldOnEnrichers" ] ;
40
+
41
+ const showMockField = showMockFieldOnEnrichers && node . type === "Enricher" && node . service . id !== "decision-table" ;
37
42
38
43
return (
39
44
< >
@@ -89,7 +94,7 @@ export function EnricherProcessor({
89
94
setProperty = { setProperty }
90
95
errors = { errors }
91
96
/>
92
- { node . type === "Enricher" && node . service . id !== "decision-table" ? (
97
+ { showMockField ? (
93
98
< MockedOutputField
94
99
isEditMode = { isEditMode }
95
100
editedNode = { node }
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ type SettingsNames =
13
13
| "node.showInputsAndOutputs"
14
14
| "node.showFragmentCreator"
15
15
| "node.autoApply"
16
+ | "node.showMockFieldOnEnrichers"
16
17
| "cloud.showIntegrationsCreators"
17
18
| "debug.nodesAsJson"
18
19
| "debug.forceDisableModals"
@@ -30,6 +31,7 @@ const getDefaultUserSettings = (): UserSettings => ({
30
31
"node.showInputsAndOutputs" : getInitialUserFlag ( "node.showInputsAndOutputs" ) ,
31
32
"node.showFragmentCreator" : getInitialUserFlag ( "node.showFragmentCreator" ) ,
32
33
"node.autoApply" : getInitialUserFlag ( "node.autoApply" ) ,
34
+ "node.showMockFieldOnEnrichers" : getInitialUserFlag ( "node.showMockFieldOnEnrichers" ) ,
33
35
"cloud.showIntegrationsCreators" : getInitialUserFlag ( "cloud.showIntegrationsCreators" ) ,
34
36
"debug.nodesAsJson" : getInitialUserFlag ( "debug.nodesAsJson" ) ,
35
37
"debug.forceDisableModals" : getInitialUserFlag ( "debug.forceDisableModals" ) ,
You can’t perform that action at this time.
0 commit comments