Skip to content

Commit 96fb7f5

Browse files
committed
fix: hide security scan toggle based on isManifestScanning
1 parent 9ef8b01 commit 96fb7f5

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

src/components/v2/values/chartValuesDiff/ChartValuesView.tsx

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ const ChartValuesView = ({
160160
presetValueId: string
161161
envId: string
162162
}>()
163-
const { serverMode } = useMainContext()
163+
const { serverMode, isManifestScanningEnabled } = useMainContext()
164164
const { handleDownload } = useDownload()
165165
const chartValuesAbortRef = useRef<AbortController>(new AbortController())
166166
const [chartValuesList, setChartValuesList] = useState<ChartValuesType[]>(chartValuesListFromParent || [])
@@ -1809,12 +1809,15 @@ const ChartValuesView = ({
18091809
/>
18101810
)}
18111811
</div>
1812-
{!isExternalApp && (isDeployChartView || isUpdateAppView) && ToggleSecurityScan && (
1813-
<ToggleSecurityScan
1814-
isManifestScanEnabled={commonState.isManifestScanEnabled}
1815-
handleToggleSecurityScan={handleToggleSecurityScan}
1816-
/>
1817-
)}
1812+
{!isExternalApp &&
1813+
isManifestScanningEnabled &&
1814+
(isDeployChartView || isUpdateAppView) &&
1815+
ToggleSecurityScan && (
1816+
<ToggleSecurityScan
1817+
isManifestScanEnabled={commonState.isManifestScanEnabled}
1818+
handleToggleSecurityScan={handleToggleSecurityScan}
1819+
/>
1820+
)}
18181821
{!isDeployChartView &&
18191822
chartValueId !== '0' &&
18201823
!(

0 commit comments

Comments
 (0)