Skip to content

Commit 541efe2

Browse files
authored
Merge pull request #1606 from devtron-labs/image-digets-uat
fix: content added for global only & pipeline
2 parents 3248a8e + 7c6b9b8 commit 541efe2

File tree

5 files changed

+15
-7
lines changed

5 files changed

+15
-7
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"private": true,
55
"homepage": "/dashboard",
66
"dependencies": {
7-
"@devtron-labs/devtron-fe-common-lib": "0.0.58",
7+
"@devtron-labs/devtron-fe-common-lib": "0.0.58-beta-24",
88
"@rjsf/core": "^5.13.3",
99
"@rjsf/utils": "^5.13.3",
1010
"@rjsf/validator-ajv8": "^5.13.3",

src/components/cdPipeline/PullImageDigestToggle.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import React from 'react'
33
import Tippy from '@tippyjs/react'
44
import { ReactComponent as DockerWithImage } from '../../assets/icons/ic-docker-with-image.svg'
55
import { PullImageDigestToggleType } from './types'
6-
import { DIGEST_DISABLE_TOGGLE_MESSAGE_FOR_PIPELINE, DIGEST_DISABLE_TOGGLE_MESSAGE_GLOBAL } from '../../config'
6+
import { DIGEST_DISABLE_TOGGLE_MESSAGE_FOR_PIPELINE, DIGEST_DISABLE_TOGGLE_MESSAGE_GLOBAL_ONLY } from '../../config'
77

88
function PullImageDigestToggle({ formData, setFormData }: PullImageDigestToggleType): JSX.Element {
99
const handleImageDigestToggle = (): void => {
@@ -14,10 +14,10 @@ function PullImageDigestToggle({ formData, setFormData }: PullImageDigestToggleT
1414

1515
const getContentText = () => {
1616
let text = ''
17-
if (formData.isDigestEnforcedForEnv) {
18-
text = DIGEST_DISABLE_TOGGLE_MESSAGE_GLOBAL
19-
} else if (formData.isDigestEnforcedForPipeline) {
17+
if (formData.isDigestEnforcedForPipeline && formData.isDigestEnforcedForEnv) {
2018
text = DIGEST_DISABLE_TOGGLE_MESSAGE_FOR_PIPELINE
19+
} else if (formData.isDigestEnforcedForEnv) {
20+
text = DIGEST_DISABLE_TOGGLE_MESSAGE_GLOBAL_ONLY
2121
}
2222
return text
2323
}

src/components/deploymentConfig/DeploymentTemplateView/DeploymentTemplateGUIView.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,11 @@ export default function DeploymentTemplateGUIView({ fetchingValues, value, readO
238238
<CustomInput
239239
data-testid="httprequests-routes-path-textbox"
240240
name={BASIC_FIELDS.PATH}
241-
data-index={index}
241+
inputProps={
242+
{
243+
'data-index': index,
244+
} as React.InputHTMLAttributes<HTMLInputElement>
245+
}
242246
value={path}
243247
rootClassName="w-100 br-4 en-2 bw-1 pl-10 pr-10 pt-5 pb-5"
244248
onChange={handleInputChange}

src/config/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -812,6 +812,6 @@ export const CVE_ID_NOT_FOUND = "CVE ID not found"
812812
export const CONFIGURE_LINK_NO_NAME = "Please provide name for the tool you want to link"
813813
export const NO_HOST_URL = "Please enter host url"
814814
export const WEBHOOK_NO_API_TOKEN_ERROR = "API Token is required to execute webhook"
815-
export const DIGEST_DISABLE_TOGGLE_MESSAGE_GLOBAL= "Pull image digest policy is enforced in Global Configurations. Go to Global Configurations to change."
815+
export const DIGEST_DISABLE_TOGGLE_MESSAGE_GLOBAL_ONLY= "Enforced from Global Configurations. Go to Global Configurations to change."
816816
export const DIGEST_DISABLE_TOGGLE_MESSAGE_FOR_PIPELINE= "Enforced from Global Configurations. To change, first disable it in Global Configurations, then come back here."
817817

src/css/base.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2846,6 +2846,10 @@ textarea,
28462846
width: 250px;
28472847
}
28482848

2849+
.w-250-imp {
2850+
width: 250px !important;
2851+
}
2852+
28492853
.w-280 {
28502854
width: 280px;
28512855
}

0 commit comments

Comments
 (0)