Skip to content

Commit d684f9c

Browse files
authored
Merge pull request #1514 from devtron-labs/configmaps-key-value-truncate
fix: ConfigMap Truncates for Long Integers
2 parents 6172db0 + ecc310f commit d684f9c

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/components/CIPipelineN/CustomImageTags.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,6 @@ function CustomImageTags({
270270
</div>
271271
<div className="" style={{ width: '32px', height: '20px' }}>
272272
<Toggle
273-
disabled={window._env_.FORCE_SECURITY_SCANNING && formData.enableCustomTag}
274273
selected={formData.enableCustomTag}
275274
onSelect={handleCustomTagToggle}
276275
dataTestId="create-build-pipeline-custom-tag-enabled-toggle"

src/components/ConfigMapSecret/ConfigMapSecret.components.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -679,7 +679,10 @@ export function ProtectedConfigMapSecretDetails({
679679

680680
export const convertToValidValue = (k: any): string => {
681681
if (k !== false && k !== true && k !== '' && !isNaN(Number(k))) {
682-
return Number(k).toString()
682+
//Note: all long integers & floating values in "double quotes" with spaces will be handled in this check
683+
// eg val: "123678765678756764\n" or val: "1234.67856756787676\n" or "1276767634.67856\n" to trim down \n
684+
const replacePattern = /\s/g
685+
return k.toString().replace(replacePattern, '')
683686
}
684687
return k.toString()
685688
}

0 commit comments

Comments
 (0)