Skip to content

Commit f20c646

Browse files
committed
Merge branch 'develop' of github.com:devtron-labs/devtron-fe-common-lib into feat/approval-policy
2 parents 6bacf89 + e11df26 commit f20c646

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+674
-225
lines changed

.eslintignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ src/Common/Common.service.ts
1616
src/Common/CustomInput/CustomInput.tsx
1717
src/Common/CustomTagSelector/PropagateTagInfo.tsx
1818
src/Common/CustomTagSelector/TagDetails.tsx
19-
src/Common/CustomTagSelector/TagLabelSelect.tsx
2019
src/Common/CustomTagSelector/TagLabelValueSelector.tsx
21-
src/Common/CustomTagSelector/TagSelector.utils.ts
2220
src/Common/CustomTagSelector/ValidationRules.ts
2321
src/Common/DebouncedSearch/DebouncedSearch.tsx
2422
src/Common/DebouncedSearch/Utils.ts

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@devtron-labs/devtron-fe-common-lib",
3-
"version": "1.3.0-beta-4",
3+
"version": "1.3.5",
44
"description": "Supporting common component library",
55
"type": "module",
66
"main": "dist/index.js",

src/Assets/Sounds/DeployAudio.mp3

37.6 KB
Binary file not shown.

src/Common/CIPipeline.Types.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,11 @@ export interface DockerConfigOverrideType {
259259
ciBuildConfig: CIBuildConfigType
260260
}
261261

262+
export enum WORKFLOW_CACHE_CONFIG_ENUM {
263+
INHERIT = 'INHERIT',
264+
OVERRIDE = 'OVERRIDE',
265+
}
266+
262267
export interface FormType {
263268
name: string
264269
args: { key: string; value: string }[]
@@ -291,6 +296,11 @@ export interface FormType {
291296
isDockerConfigOverridden?: boolean
292297
dockerConfigOverride?: DockerConfigOverrideType
293298
isOffendingMandatoryPlugin?: boolean
299+
workflowCacheConfig?: {
300+
type: WORKFLOW_CACHE_CONFIG_ENUM
301+
value: boolean
302+
globalValue: boolean
303+
}
294304
}
295305

296306
export interface ErrorObj {

src/Common/Common.service.ts

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import { MutableRefObject } from 'react'
1818
import moment from 'moment'
1919
import { sanitizeApprovalConfigData, sanitizeUserApprovalList } from '@Shared/Helpers'
20-
import { RuntimeParamsAPIResponseType, RuntimePluginVariables } from '@Shared/types'
20+
import { PolicyBlockInfo, RuntimeParamsAPIResponseType, RuntimePluginVariables } from '@Shared/types'
2121
import { get, post } from './Api'
2222
import { GitProviderType, ROUTES } from './Constants'
2323
import { getUrlWithSearchParams, showError, sortCallback } from './Helper'
@@ -96,6 +96,21 @@ export const sanitizeUserApprovalMetadata = (userApprovalMetadata: UserApprovalM
9696
approvalConfigData: sanitizeApprovalConfigData(userApprovalMetadata?.approvalConfigData),
9797
})
9898

99+
const sanitizeDeploymentBlockedState = (deploymentBlockedState: PolicyBlockInfo) => {
100+
if (!deploymentBlockedState) {
101+
return {
102+
isBlocked: false,
103+
blockedBy: null,
104+
reason: '',
105+
}
106+
}
107+
return {
108+
isBlocked: deploymentBlockedState.isBlocked || false,
109+
blockedBy: deploymentBlockedState.blockedBy || null,
110+
reason: deploymentBlockedState.reason || '',
111+
}
112+
}
113+
99114
const cdMaterialListModal = ({
100115
artifacts,
101116
offset,
@@ -188,6 +203,7 @@ const cdMaterialListModal = ({
188203
deploymentWindowArtifactMetadata: material.deploymentWindowArtifactMetadata ?? null,
189204
configuredInReleases: material.configuredInReleases ?? [],
190205
appWorkflowId: material.appWorkflowId ?? null,
206+
deploymentBlockedState: sanitizeDeploymentBlockedState(material.deploymentBlockedState)
191207
}
192208
})
193209
return materials

src/Common/Constants.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,12 @@ export const DOCUMENTATION = {
3333
}
3434

3535
export const PATTERNS = {
36+
STRING: /^[a-zA-Z0-9_]+$/,
3637
DECIMAL_NUMBERS: /^-?\d*\.?\d*$/,
3738
NATURAL_NUMBERS: /^\d*\.?\d*$/,
3839
KUBERNETES_KEY_PREFIX: /^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$/,
3940
KUBERNETES_KEY_NAME: /^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$/,
40-
START_END_ALPHANUMERIC: /^([Az09].*[A-Za-z0-9])$|[A-Za-z0-9]$/,
41+
START_END_ALPHANUMERIC: /^(([A-Za-z0-9].*[A-Za-z0-9])|[A-Za-z0-9])$/,
4142
ALPHANUMERIC_WITH_SPECIAL_CHAR: /^[A-Za-z0-9._-]+$/, // allow alphanumeric,(.) ,(-),(_)
4243
ESCAPED_CHARACTERS: /[.*+?^${}()|[\]\\]/g,
4344
NUMBERS_WITH_SCOPE_VARIABLES: /^(\d+(\.\d+)?|@{{[a-zA-Z0-9-]+}})$/,

src/Common/CustomTagSelector/PropagateTagInfo.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export default function PropagateTagInfo({ isCreateApp }: { isCreateApp: boolean
3939
<TippyCustomized
4040
theme={TippyTheme.white}
4141
className="w-300"
42-
placement="top"
42+
placement="left"
4343
Icon={InjectTag}
4444
heading="Propagate tags to K8s resources"
4545
infoText=""

src/Common/CustomTagSelector/TagLabelSelect.tsx

Lines changed: 0 additions & 73 deletions
This file was deleted.

src/Common/CustomTagSelector/TagSelector.utils.ts

Lines changed: 0 additions & 86 deletions
This file was deleted.

0 commit comments

Comments
 (0)