Skip to content

Commit 9d5641f

Browse files
Merge pull request #1584 from devtron-labs/fix/scoped-variables-flag
fix: scoped variables widget flag for cm-cs and base deployment
2 parents 19dba00 + 1e62ad4 commit 9d5641f

File tree

4 files changed

+25
-12
lines changed

4 files changed

+25
-12
lines changed

src/components/ConfigMapSecret/ConfigMap/ConfigMapList.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,16 +205,20 @@ export default function ConfigMapList({
205205
</div>
206206
</div>
207207
</div>
208+
208209
{DraftComments && showComments && selectedDraft && (
209210
<DraftComments
210211
draftId={selectedDraft.draftId}
211212
draftVersionId={selectedDraft.draftVersionId}
212213
toggleDraftComments={toggleDraftComments}
213214
/>
214215
)}
215-
<div className="variables-widget-position-cmcs">
216-
<FloatingVariablesSuggestions zIndex={100} appId={appId} envId={envId} clusterId={clusterId} />
217-
</div>
216+
217+
{window._env_.ENABLE_SCOPED_VARIABLES && (
218+
<div className="variables-widget-position-cmcs">
219+
<FloatingVariablesSuggestions zIndex={100} appId={appId} envId={envId} clusterId={clusterId} />
220+
</div>
221+
)}
218222
</div>
219223
)
220224
}

src/components/ConfigMapSecret/Secret/SecretList.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,12 @@ export default function SecretList({
196196
toggleDraftComments={toggleDraftComments}
197197
/>
198198
)}
199-
<div className="variables-widget-position-cmcs">
200-
<FloatingVariablesSuggestions zIndex={100} appId={appId} envId={envId} clusterId={clusterId} />
201-
</div>
199+
200+
{window._env_.ENABLE_SCOPED_VARIABLES && (
201+
<div className="variables-widget-position-cmcs">
202+
<FloatingVariablesSuggestions zIndex={100} appId={appId} envId={envId} clusterId={clusterId} />
203+
</div>
204+
)}
202205
</div>
203206
)
204207
}

src/components/EnvironmentOverride/DeploymentTemplateOverrideForm.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -623,9 +623,12 @@ export default function DeploymentTemplateOverrideForm({
623623
}`}
624624
onSubmit={handleSaveChanges}
625625
>
626-
<div className="variables-widget-position">
627-
<FloatingVariablesSuggestions zIndex={1004} appId={appId} envId={envId} clusterId={clusterId} />
628-
</div>
626+
{window._env_.ENABLE_SCOPED_VARIABLES && (
627+
<div className="variables-widget-position">
628+
<FloatingVariablesSuggestions zIndex={1004} appId={appId} envId={envId} clusterId={clusterId} />
629+
</div>
630+
)}
631+
629632
<DeploymentTemplateOptionsTab
630633
isEnvOverride={true}
631634
disableVersionSelect={readOnlyPublishedMode || !state.duplicate}

src/components/deploymentConfig/DeploymentConfig.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -880,9 +880,12 @@ export default function DeploymentConfig({
880880
}`}
881881
onSubmit={handleSaveChanges}
882882
>
883-
<div className="variables-widget-position">
884-
<FloatingVariablesSuggestions zIndex={100} appId={appId} />
885-
</div>
883+
{window._env_.ENABLE_SCOPED_VARIABLES && (
884+
<div className="variables-widget-position">
885+
<FloatingVariablesSuggestions zIndex={100} appId={appId} />
886+
</div>
887+
)}
888+
886889
<DeploymentTemplateOptionsTab
887890
codeEditorValue={readOnlyPublishedMode ? state.publishedState?.tempFormData : state.tempFormData}
888891
disableVersionSelect={readOnlyPublishedMode}

0 commit comments

Comments
 (0)