Skip to content

Commit fc313ac

Browse files
fe feature flag added
1 parent f9d5a36 commit fc313ac

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

designer/client/src/components/graph/node-modal/enricherProcessor.tsx

+6-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import React from "react";
22
import { useTranslation } from "react-i18next";
33

44
import type ProcessUtils from "../../../common/ProcessUtils";
5+
import { useUserSettings } from "../../../common/userSettings";
56
import type { NodeType, NodeValidationError, UIParameter } from "../../../types";
67
import { DescriptionField } from "./DescriptionField";
78
import { DisableField } from "./DisableField";
@@ -34,6 +35,10 @@ export function EnricherProcessor({
3435
showValidation?: boolean;
3536
}): JSX.Element {
3637
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";
3742

3843
return (
3944
<>
@@ -89,7 +94,7 @@ export function EnricherProcessor({
8994
setProperty={setProperty}
9095
errors={errors}
9196
/>
92-
{node.type === "Enricher" && node.service.id !== "decision-table" ? (
97+
{showMockField ? (
9398
<MockedOutputField
9499
isEditMode={isEditMode}
95100
editedNode={node}

designer/client/src/reducers/userSettings.ts

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ type SettingsNames =
1313
| "node.showInputsAndOutputs"
1414
| "node.showFragmentCreator"
1515
| "node.autoApply"
16+
| "node.showMockFieldOnEnrichers"
1617
| "cloud.showIntegrationsCreators"
1718
| "debug.nodesAsJson"
1819
| "debug.forceDisableModals"
@@ -30,6 +31,7 @@ const getDefaultUserSettings = (): UserSettings => ({
3031
"node.showInputsAndOutputs": getInitialUserFlag("node.showInputsAndOutputs"),
3132
"node.showFragmentCreator": getInitialUserFlag("node.showFragmentCreator"),
3233
"node.autoApply": getInitialUserFlag("node.autoApply"),
34+
"node.showMockFieldOnEnrichers": getInitialUserFlag("node.showMockFieldOnEnrichers"),
3335
"cloud.showIntegrationsCreators": getInitialUserFlag("cloud.showIntegrationsCreators"),
3436
"debug.nodesAsJson": getInitialUserFlag("debug.nodesAsJson"),
3537
"debug.forceDisableModals": getInitialUserFlag("debug.forceDisableModals"),

0 commit comments

Comments
 (0)