@devtron-labs/devtron-fe-common-lib 1.2.3-beta-2 → 1.2.3-beta-3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{@code-editor-BoiJOahc.js → @code-editor-BtJfwdMs.js} +5230 -5235
- package/dist/{@common-rjsf-CSlAKJfL.js → @common-rjsf-Bk3LX7Z6.js} +2 -2
- package/dist/{@framer-motion-DFECMTRh.js → @framer-motion-DHY98qq3.js} +1 -1
- package/dist/{@react-dates-MalCS5BJ.js → @react-dates-WNnwjI5S.js} +1 -1
- package/dist/{@react-select-B8JuvbeY.js → @react-select-BbR996pa.js} +50 -50
- package/dist/{@vendor-CPMO6uwj.js → @vendor-RU8AW1bK.js} +93 -94
- package/dist/Common/CodeEditor/CodeEditor.reducer.d.ts +1 -2
- package/dist/Common/CodeEditor/types.d.ts +1 -2
- package/dist/Common/Common.service.d.ts +2 -1
- package/dist/Common/Constants.d.ts +0 -2
- package/dist/Common/Helper.d.ts +2 -2
- package/dist/Common/Markdown/MarkDown.d.ts +1 -1
- package/dist/Common/RJSF/index.d.ts +1 -1
- package/dist/Common/Types.d.ts +50 -41
- package/dist/Pages/Applications/DevtronApps/Details/AppConfigurations/DeploymentTemplate/types.d.ts +3 -21
- package/dist/Pages/Applications/DevtronApps/Details/AppConfigurations/OverrideStrategyTippyContent.d.ts +1 -2
- package/dist/Pages/Applications/DevtronApps/Details/AppConfigurations/types.d.ts +0 -7
- package/dist/Pages/Applications/DevtronApps/Details/AppConfigurations/utils.d.ts +1 -1
- package/dist/Pages/Applications/DevtronApps/Details/CDPipeline/types.d.ts +1 -2
- package/dist/Pages/index.d.ts +0 -1
- package/dist/Shared/Components/CollapsibleList/CollapsibleList.types.d.ts +0 -6
- package/dist/Shared/Components/FeatureDescription/FeatureDescriptionModal.d.ts +1 -1
- package/dist/Shared/Components/FeatureDescription/FeatureTitleWithInfo.d.ts +1 -1
- package/dist/Shared/Components/FeatureDescription/types.d.ts +34 -6
- package/dist/Shared/Components/index.d.ts +0 -1
- package/dist/Shared/Helpers.d.ts +7 -8
- package/dist/Shared/Hooks/useForm/useForm.d.ts +0 -4
- package/dist/Shared/Services/app.types.d.ts +2 -5
- package/dist/Shared/constants.d.ts +7 -0
- package/dist/Shared/types.d.ts +17 -5
- package/dist/assets/ic-file-code.21a1f748.svg +1 -0
- package/dist/assets/ic-stamp.8689f42d.svg +1 -0
- package/dist/index.d.ts +0 -2
- package/dist/index.js +399 -397
- package/package.json +1 -1
- package/dist/Pages/App/AppConfiguration/DeploymentTemplate/GUIView/index.d.ts +0 -2
- package/dist/Pages/App/AppConfiguration/DeploymentTemplate/GUIView/types.d.ts +0 -2
- package/dist/Pages/App/AppConfiguration/DeploymentTemplate/GUIView/utils.d.ts +0 -6
- package/dist/Pages/App/AppConfiguration/DeploymentTemplate/index.d.ts +0 -1
- package/dist/Pages/App/AppConfiguration/index.d.ts +0 -1
- package/dist/Pages/App/index.d.ts +0 -1
- package/dist/Shared/Components/EnterpriseTag/EnterpriseTag.component.d.ts +0 -2
- package/dist/Shared/Components/EnterpriseTag/index.d.ts +0 -1
- package/dist/assets/ic-file-code.80000c9b.svg +0 -1
- package/dist/assets/ic-medal.4a7e5cbc.svg +0 -1
- package/dist/assets/ic-stamp.526499d2.svg +0 -1
- /package/dist/assets/{ic-arrow-square-out.1be837ac.svg → ic-arrow-square-out.3d1a0d41.svg} +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { MarkDownProps } from './Types';
|
|
2
|
-
declare const MarkDown: ({ setExpandableIcon, markdown
|
|
2
|
+
declare const MarkDown: ({ setExpandableIcon, markdown, className, breaks, disableEscapedText, ...props }: MarkDownProps) => JSX.Element;
|
|
3
3
|
export default MarkDown;
|
package/dist/Common/Types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React, ReactNode, CSSProperties, ReactElement, MutableRefObject } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { TippyProps } from '@tippyjs/react';
|
|
3
3
|
import { UserGroupDTO } from '../Pages/GlobalConfigurations';
|
|
4
4
|
import { ImageComment, ReleaseTag } from './ImageTags.Types';
|
|
5
5
|
import { MandatoryPluginBaseStateType, RegistryType, RuntimeParamsListItemType, Severity } from '../Shared';
|
|
@@ -65,7 +65,7 @@ export interface CheckboxProps {
|
|
|
65
65
|
id?: string;
|
|
66
66
|
dataTestId?: string;
|
|
67
67
|
}
|
|
68
|
-
export interface TippyCustomizedProps {
|
|
68
|
+
export interface TippyCustomizedProps extends Pick<TippyProps, 'appendTo'> {
|
|
69
69
|
theme: TippyTheme;
|
|
70
70
|
visible?: boolean;
|
|
71
71
|
heading?: ReactNode | string;
|
|
@@ -73,7 +73,7 @@ export interface TippyCustomizedProps {
|
|
|
73
73
|
noHeadingBorder?: boolean;
|
|
74
74
|
infoTextHeading?: string;
|
|
75
75
|
hideHeading?: boolean;
|
|
76
|
-
placement?:
|
|
76
|
+
placement?: TippyProps['placement'];
|
|
77
77
|
className?: string;
|
|
78
78
|
Icon?: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
|
|
79
79
|
iconPath?: string;
|
|
@@ -273,21 +273,6 @@ export declare enum ManualApprovalType {
|
|
|
273
273
|
any = "ANY",
|
|
274
274
|
notConfigured = "NOT_CONFIGURED"
|
|
275
275
|
}
|
|
276
|
-
export interface UserGroupApproverType {
|
|
277
|
-
email: string;
|
|
278
|
-
hasAccess: boolean;
|
|
279
|
-
}
|
|
280
|
-
export interface ImageApprovalPolicyUserGroupDataType {
|
|
281
|
-
dataStore: Record<string, UserGroupApproverType>;
|
|
282
|
-
requiredCount: number;
|
|
283
|
-
emails: string[];
|
|
284
|
-
}
|
|
285
|
-
export interface ImageApprovalPolicyType {
|
|
286
|
-
isPolicyConfigured: boolean;
|
|
287
|
-
specificUsersData: ImageApprovalPolicyUserGroupDataType;
|
|
288
|
-
userGroupData: Record<string, ImageApprovalPolicyUserGroupDataType>;
|
|
289
|
-
validGroups: string[];
|
|
290
|
-
}
|
|
291
276
|
export type ImageApprovalUsersInfoDTO = Record<string, Pick<UserGroupDTO, 'identifier' | 'name'>[]>;
|
|
292
277
|
export interface UserApprovalConfigType {
|
|
293
278
|
type: ManualApprovalType;
|
|
@@ -300,13 +285,6 @@ export interface UserApprovalConfigType {
|
|
|
300
285
|
requiredCount: number;
|
|
301
286
|
})[];
|
|
302
287
|
}
|
|
303
|
-
export type UserApprovalConfigPayloadType = ({
|
|
304
|
-
type: ManualApprovalType.any;
|
|
305
|
-
} & Pick<UserApprovalConfigType, 'requiredCount'>) | ({
|
|
306
|
-
type: ManualApprovalType.specific;
|
|
307
|
-
} & Pick<UserApprovalConfigType, 'userGroups' | 'specificUsers'>) | {
|
|
308
|
-
type: ManualApprovalType.notConfigured;
|
|
309
|
-
};
|
|
310
288
|
interface ApprovalUserDataType {
|
|
311
289
|
dataId: number;
|
|
312
290
|
userActionTime: string;
|
|
@@ -316,12 +294,44 @@ interface ApprovalUserDataType {
|
|
|
316
294
|
userResponse: number;
|
|
317
295
|
userGroups?: Pick<UserGroupDTO, 'identifier' | 'name'>[];
|
|
318
296
|
}
|
|
297
|
+
export interface UserApprovalInfo {
|
|
298
|
+
requiredCount: number;
|
|
299
|
+
currentCount: number;
|
|
300
|
+
approverList: {
|
|
301
|
+
hasApproved: boolean;
|
|
302
|
+
canApprove: boolean;
|
|
303
|
+
identifier: string;
|
|
304
|
+
}[];
|
|
305
|
+
}
|
|
306
|
+
export declare enum ApprovalConfigDataKindType {
|
|
307
|
+
configMap = "CM",
|
|
308
|
+
configSecret = "CS",
|
|
309
|
+
deploymentTemplate = "DEPLOYMENT_TEMPLATE"
|
|
310
|
+
}
|
|
311
|
+
export interface ApprovalConfigDataType extends Pick<UserApprovalInfo, 'currentCount' | 'requiredCount'> {
|
|
312
|
+
kind: ApprovalConfigDataKindType | null;
|
|
313
|
+
anyUserApprovedInfo: UserApprovalInfo;
|
|
314
|
+
specificUsersApprovedInfo: UserApprovalInfo;
|
|
315
|
+
userGroupsApprovedInfo: Pick<UserApprovalInfo, 'currentCount' | 'requiredCount'> & {
|
|
316
|
+
userGroups: (UserApprovalInfo & {
|
|
317
|
+
groupIdentifier: UserGroupDTO['identifier'];
|
|
318
|
+
groupName: UserGroupDTO['name'];
|
|
319
|
+
})[];
|
|
320
|
+
};
|
|
321
|
+
}
|
|
322
|
+
export declare enum ApprovalRuntimeStateType {
|
|
323
|
+
init = 0,
|
|
324
|
+
requested = 1,
|
|
325
|
+
approved = 2,
|
|
326
|
+
consumed = 3
|
|
327
|
+
}
|
|
319
328
|
export interface UserApprovalMetadataType {
|
|
320
329
|
approvalRequestId: number;
|
|
321
|
-
approvalRuntimeState:
|
|
322
|
-
approvedUsersData: ApprovalUserDataType[];
|
|
330
|
+
approvalRuntimeState: ApprovalRuntimeStateType;
|
|
323
331
|
requestedUserData: ApprovalUserDataType;
|
|
324
|
-
|
|
332
|
+
hasCurrentUserApproved: boolean;
|
|
333
|
+
canCurrentUserApprove: boolean;
|
|
334
|
+
approvalConfigData: ApprovalConfigDataType;
|
|
325
335
|
}
|
|
326
336
|
export declare enum FilterStates {
|
|
327
337
|
ALLOWED = 0,
|
|
@@ -378,7 +388,6 @@ export interface CDMaterialListModalServiceUtilProps {
|
|
|
378
388
|
artifactId?: number;
|
|
379
389
|
artifactStatus?: string;
|
|
380
390
|
disableDefaultSelection?: boolean;
|
|
381
|
-
userApprovalConfig?: UserApprovalConfigType;
|
|
382
391
|
}
|
|
383
392
|
export interface CDMaterialType {
|
|
384
393
|
index: number;
|
|
@@ -514,8 +523,7 @@ export interface CommonNodeAttr extends Pick<MandatoryPluginBaseStateType, 'isTr
|
|
|
514
523
|
primaryBranchAfterRegex?: string;
|
|
515
524
|
storageConfigured?: boolean;
|
|
516
525
|
deploymentAppDeleteRequest?: boolean;
|
|
517
|
-
|
|
518
|
-
userApprovalConfig?: UserApprovalConfigType;
|
|
526
|
+
approvalConfigData: ApprovalConfigDataType;
|
|
519
527
|
requestedUserId?: number;
|
|
520
528
|
showPluginWarning: boolean;
|
|
521
529
|
helmPackageName?: string;
|
|
@@ -572,14 +580,17 @@ export interface FilterConditionsListType {
|
|
|
572
580
|
description: string;
|
|
573
581
|
conditions: FilterConditionsInfo[];
|
|
574
582
|
}
|
|
583
|
+
export interface DeploymentApprovalInfoType {
|
|
584
|
+
eligibleApprovers: {
|
|
585
|
+
specificUsers: Pick<UserApprovalInfo, 'approverList'>;
|
|
586
|
+
anyUsers: Pick<UserApprovalInfo, 'approverList'>;
|
|
587
|
+
userGroups: (Pick<ApprovalConfigDataType['userGroupsApprovedInfo']['userGroups'][number], 'groupIdentifier' | 'groupName'> & Pick<UserApprovalInfo, 'approverList'>)[];
|
|
588
|
+
};
|
|
589
|
+
approvalConfigData: ApprovalConfigDataType;
|
|
590
|
+
}
|
|
575
591
|
export interface CDMaterialsApprovalInfo {
|
|
576
|
-
approvalUsers: string[];
|
|
577
|
-
userApprovalConfig: UserApprovalConfigType;
|
|
578
592
|
canApproverDeploy: boolean;
|
|
579
|
-
|
|
580
|
-
* Only available incase of approvals do'nt use in cd materials or any other flow since approvalUsers are not present there
|
|
581
|
-
*/
|
|
582
|
-
imageApprovalPolicyDetails: ImageApprovalPolicyType;
|
|
593
|
+
deploymentApprovalInfo: DeploymentApprovalInfoType;
|
|
583
594
|
}
|
|
584
595
|
export interface CDMaterialsMetaInfo {
|
|
585
596
|
tagsEditable: boolean;
|
|
@@ -658,7 +669,6 @@ export interface AppEnvironment {
|
|
|
658
669
|
appStatus?: string;
|
|
659
670
|
deploymentAppDeleteRequest?: boolean;
|
|
660
671
|
isVirtualEnvironment?: boolean;
|
|
661
|
-
isProtected?: boolean;
|
|
662
672
|
pipelineId?: number;
|
|
663
673
|
latestCdWorkflowRunnerId?: number;
|
|
664
674
|
commits?: string[];
|
|
@@ -709,7 +719,6 @@ export interface CdPipeline {
|
|
|
709
719
|
parentPipelineType?: string;
|
|
710
720
|
deploymentAppDeleteRequest?: boolean;
|
|
711
721
|
deploymentAppCreated?: boolean;
|
|
712
|
-
userApprovalConfig?: UserApprovalConfigType;
|
|
713
722
|
isVirtualEnvironment?: boolean;
|
|
714
723
|
deploymentAppType: DeploymentAppTypes;
|
|
715
724
|
helmPackageName?: string;
|
|
@@ -718,6 +727,7 @@ export interface CdPipeline {
|
|
|
718
727
|
isProdEnv?: boolean;
|
|
719
728
|
isGitOpsRepoNotConfigured?: boolean;
|
|
720
729
|
isDeploymentBlocked?: boolean;
|
|
730
|
+
approvalConfigData: ApprovalConfigDataType;
|
|
721
731
|
}
|
|
722
732
|
export interface ExternalCiConfig {
|
|
723
733
|
id: number;
|
|
@@ -819,12 +829,11 @@ export interface Point {
|
|
|
819
829
|
export interface EdgeNodeType {
|
|
820
830
|
height: number;
|
|
821
831
|
width: number;
|
|
822
|
-
userApprovalConfig?: UserApprovalConfigType;
|
|
823
832
|
type?: any;
|
|
824
833
|
id?: number | string;
|
|
825
834
|
}
|
|
826
835
|
export interface EdgeEndNodeType extends EdgeNodeType {
|
|
827
|
-
|
|
836
|
+
approvalConfigData: ApprovalConfigDataType;
|
|
828
837
|
}
|
|
829
838
|
/**
|
|
830
839
|
* Search params for sorting configuration
|
package/dist/Pages/Applications/DevtronApps/Details/AppConfigurations/DeploymentTemplate/types.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { DraftMetadataDTO, TemplateListType } from '../../../../../../Shared/Services';
|
|
2
|
-
import { ServerErrors } from '../../../../../../Common/ServerError';
|
|
3
2
|
import { OverrideMergeStrategyType } from '../types';
|
|
4
3
|
export type DeploymentChartOptionkind = 'base' | 'env' | 'chartVersion' | 'deployment';
|
|
5
4
|
export interface DeploymentChartVersionType {
|
|
@@ -109,15 +108,15 @@ interface BaseDeploymentTemplateConfigState {
|
|
|
109
108
|
environmentConfig?: never;
|
|
110
109
|
mergeStrategy?: never;
|
|
111
110
|
}
|
|
112
|
-
|
|
111
|
+
interface EnvironmentOverrideDeploymentTemplateConfigState {
|
|
113
112
|
chartConfig?: never;
|
|
114
113
|
isOverridden: boolean;
|
|
115
114
|
environmentConfig: EnvironmentConfigType;
|
|
116
115
|
mergeStrategy: OverrideMergeStrategyType;
|
|
117
|
-
}
|
|
116
|
+
}
|
|
118
117
|
export interface DeploymentTemplateConfigCommonState extends SelectedChartDetailsType {
|
|
119
118
|
/**
|
|
120
|
-
* The first ever state of the deployment template
|
|
119
|
+
* The first ever state of the deployment template
|
|
121
120
|
*/
|
|
122
121
|
originalTemplate: Record<string, string>;
|
|
123
122
|
isAppMetricsEnabled: boolean;
|
|
@@ -127,23 +126,6 @@ export interface DeploymentTemplateConfigCommonState extends SelectedChartDetail
|
|
|
127
126
|
latestDraft?: DraftMetadataDTO;
|
|
128
127
|
editorTemplate: string;
|
|
129
128
|
editorTemplateWithoutLockedKeys: string;
|
|
130
|
-
/**
|
|
131
|
-
* This final template to be applied on the deployment in string format
|
|
132
|
-
* In current editor, this may be null initially
|
|
133
|
-
*/
|
|
134
|
-
mergedTemplate: string | null;
|
|
135
|
-
/**
|
|
136
|
-
* This final template to be applied on the deployment without locked keys in string format
|
|
137
|
-
* In current editor, this may be null initially
|
|
138
|
-
*/
|
|
139
|
-
mergedTemplateWithoutLockedKeys: string | null;
|
|
140
|
-
/**
|
|
141
|
-
* This final template to be applied on the deployment in object format
|
|
142
|
-
* In current editor, this may be null initially
|
|
143
|
-
*/
|
|
144
|
-
mergedTemplateObject: Record<string, string> | null;
|
|
145
|
-
isLoadingMergedTemplate: boolean;
|
|
146
|
-
mergedTemplateError: ServerErrors | null;
|
|
147
129
|
}
|
|
148
130
|
export type DeploymentTemplateConfigState = DeploymentTemplateConfigCommonState & (BaseDeploymentTemplateConfigState | EnvironmentOverrideDeploymentTemplateConfigState);
|
|
149
131
|
type DTApplicationMetricsReadOnlyProps = {
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
declare const OverrideStrategyTippyContent: ({ children }: OverrideStrategyTippyContentProps) => JSX.Element;
|
|
1
|
+
declare const OverrideStrategyTippyContent: () => JSX.Element;
|
|
3
2
|
export default OverrideStrategyTippyContent;
|
|
@@ -20,15 +20,8 @@ export interface ConfigToolbarPopupMenuConfigType {
|
|
|
20
20
|
disabled?: boolean;
|
|
21
21
|
icon?: ReactNode | null;
|
|
22
22
|
variant?: 'default' | 'negative';
|
|
23
|
-
tooltipText?: string;
|
|
24
23
|
}
|
|
25
24
|
export declare enum ConfigToolbarPopupNodeType {
|
|
26
25
|
DISCARD_DRAFT = "discardDraft",
|
|
27
26
|
EDIT_HISTORY = "editHistory"
|
|
28
27
|
}
|
|
29
|
-
export interface OverrideStrategyTippyContentProps {
|
|
30
|
-
/**
|
|
31
|
-
* Would be rendered as li conveying the information about the merge strategy
|
|
32
|
-
*/
|
|
33
|
-
children?: ReactNode;
|
|
34
|
-
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { DeploymentStageType } from '../../../../../Shared/constants';
|
|
2
|
-
export declare const getDeploymentStageTitle: (stage: DeploymentStageType) => "
|
|
2
|
+
export declare const getDeploymentStageTitle: (stage: DeploymentStageType) => "deployment" | "pre-deployment" | "post-deployment" | "-";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BuildStageType, FormType } from '../../../../../Common/CIPipeline.Types';
|
|
2
|
-
import { DeploymentAppTypes
|
|
2
|
+
import { DeploymentAppTypes } from '../../../../../Common/Types';
|
|
3
3
|
import { DeploymentStrategy } from '../../../../../Shared/Components';
|
|
4
4
|
import { EnvListMinDTO } from '../../../../../Shared/types';
|
|
5
5
|
interface ConfigSecretType {
|
|
@@ -53,7 +53,6 @@ export interface CDFormType {
|
|
|
53
53
|
secrets: ConfigSecretType[];
|
|
54
54
|
};
|
|
55
55
|
requiredApprovals: string;
|
|
56
|
-
userApprovalConfig?: UserApprovalConfigType;
|
|
57
56
|
isClusterCdActive: boolean;
|
|
58
57
|
deploymentAppCreated: boolean;
|
|
59
58
|
clusterId: string;
|
package/dist/Pages/index.d.ts
CHANGED
|
@@ -54,12 +54,6 @@ export type CollapsibleListItem<TabType extends TabOptions = 'navLink'> = Condit
|
|
|
54
54
|
*/
|
|
55
55
|
tooltipProps?: TippyProps;
|
|
56
56
|
};
|
|
57
|
-
/**
|
|
58
|
-
* If `true`, clears query parameters during navigation.
|
|
59
|
-
*
|
|
60
|
-
* @default false
|
|
61
|
-
*/
|
|
62
|
-
clearQueryParamsOnNavigation?: boolean;
|
|
63
57
|
};
|
|
64
58
|
export interface CollapsibleListConfig<TabType extends TabOptions = 'navLink'> {
|
|
65
59
|
/**
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { FeatureDescriptionModalProps } from './types';
|
|
2
|
-
export declare const FeatureDescriptionModal: ({ title, renderDescriptionContent, closeModalText, docLink, closeModal, imageVariant, SVGImage, imageStyles, }: FeatureDescriptionModalProps) => JSX.Element;
|
|
2
|
+
export declare const FeatureDescriptionModal: ({ title, renderDescriptionContent, closeModalText, docLink, closeModal, imageVariant, SVGImage, imageStyles, tabsConfig, }: FeatureDescriptionModalProps) => JSX.Element;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { DescriptorProps } from './types';
|
|
2
|
-
declare const FeatureTitleWithInfo: ({ additionalContainerClasses, breadCrumbs, children, iconClassName, title, renderDescriptionContent, closeModalText, docLink, SVGImage, showInfoIconTippy, docLinkText, dataTestId, additionalContent, showInfoIcon, }: DescriptorProps) => JSX.Element;
|
|
2
|
+
declare const FeatureTitleWithInfo: ({ additionalContainerClasses, breadCrumbs, children, iconClassName, title, renderDescriptionContent, closeModalText, docLink, SVGImage, showInfoIconTippy, docLinkText, dataTestId, additionalContent, showInfoIcon, tabsConfig, }: DescriptorProps) => JSX.Element;
|
|
3
3
|
export default FeatureTitleWithInfo;
|
|
@@ -1,17 +1,44 @@
|
|
|
1
1
|
import { default as React, ReactNode } from 'react';
|
|
2
2
|
import { ImageType } from '../../../Common';
|
|
3
3
|
import { Breadcrumb } from '../../../Common/BreadCrumb/Types';
|
|
4
|
-
|
|
5
|
-
title: string;
|
|
4
|
+
interface BaseFeatureDescriptionModalProps {
|
|
6
5
|
renderDescriptionContent?: () => ReactNode;
|
|
7
|
-
closeModalText?: string;
|
|
8
6
|
docLink?: string;
|
|
9
|
-
closeModal?: () => void;
|
|
10
7
|
imageVariant?: ImageType;
|
|
11
8
|
SVGImage?: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
|
|
12
9
|
imageStyles?: React.CSSProperties;
|
|
13
10
|
}
|
|
14
|
-
|
|
11
|
+
type FeatureDescriptionModalWithTabsConfig = {
|
|
12
|
+
/**
|
|
13
|
+
* If provided, tabs are shown and have higher precedence over normal modal
|
|
14
|
+
*/
|
|
15
|
+
tabsConfig: ({
|
|
16
|
+
/**
|
|
17
|
+
* Unique id of the tab
|
|
18
|
+
*/
|
|
19
|
+
id: string;
|
|
20
|
+
/**
|
|
21
|
+
* Title for the tab
|
|
22
|
+
*/
|
|
23
|
+
title: string;
|
|
24
|
+
} & BaseFeatureDescriptionModalProps)[];
|
|
25
|
+
} & {
|
|
26
|
+
renderDescriptionContent?: never;
|
|
27
|
+
docLink?: never;
|
|
28
|
+
imageVariant?: never;
|
|
29
|
+
SVGImage?: never;
|
|
30
|
+
imageStyles?: never;
|
|
31
|
+
};
|
|
32
|
+
export type FeatureDescriptionModalProps = {
|
|
33
|
+
title: string;
|
|
34
|
+
closeModalText?: string;
|
|
35
|
+
closeModal?: () => void;
|
|
36
|
+
} & ((BaseFeatureDescriptionModalProps & {
|
|
37
|
+
tabsConfig?: never;
|
|
38
|
+
}) | FeatureDescriptionModalWithTabsConfig);
|
|
39
|
+
export type DescriptorProps = ((Omit<FeatureDescriptionModalProps, 'tabsConfig'> & {
|
|
40
|
+
tabsConfig?: never;
|
|
41
|
+
}) | (Pick<FeatureDescriptionModalProps, 'title' | 'closeModalText' | 'closeModal'> & FeatureDescriptionModalWithTabsConfig)) & {
|
|
15
42
|
breadCrumbs?: Breadcrumb[];
|
|
16
43
|
additionalContainerClasses?: string;
|
|
17
44
|
iconClassName?: string;
|
|
@@ -26,4 +53,5 @@ export interface DescriptorProps extends FeatureDescriptionModalProps {
|
|
|
26
53
|
* @default false
|
|
27
54
|
*/
|
|
28
55
|
showInfoIcon?: boolean;
|
|
29
|
-
}
|
|
56
|
+
};
|
|
57
|
+
export {};
|
package/dist/Shared/Helpers.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
2
|
import { Pair } from 'yaml';
|
|
3
|
-
import { StrictRJSFSchema } from '@rjsf/utils';
|
|
4
3
|
import { MaterialHistoryType } from '@Shared/Services/app.types';
|
|
5
|
-
import { MaterialInfo, SortingOrder, UserApprovalConfigType } from '../Common';
|
|
4
|
+
import { MaterialInfo, SortingOrder, UserApprovalConfigType, ApprovalConfigDataType, UserApprovalInfo } from '../Common';
|
|
6
5
|
import { GitTriggers, IntersectionChangeHandler, IntersectionOptions, PreventOutsideFocusProps, WebhookEventNameType } from './types';
|
|
7
6
|
import { AggregatedNodes, DeploymentStatusDetailsBreakdownDataType, DeploymentStatusDetailsType, PodMetadatum } from './Components';
|
|
8
7
|
interface HighlightSearchTextProps {
|
|
@@ -41,12 +40,13 @@ export declare const decode: (data: any, isEncoded?: boolean) => {};
|
|
|
41
40
|
export declare const isTimeStringAvailable: (time: string) => boolean;
|
|
42
41
|
export declare const getTimeDifference: (startTime: string, endTime: string) => string;
|
|
43
42
|
export declare const getFileNameFromHeaders: (headers: Headers) => string;
|
|
44
|
-
export declare const
|
|
43
|
+
export declare const sanitizeUserApprovalList: (approverList: UserApprovalInfo["approverList"]) => UserApprovalInfo["approverList"];
|
|
44
|
+
export declare const sanitizeApprovalConfigData: (approvalConfigData: ApprovalConfigDataType | null) => ApprovalConfigDataType;
|
|
45
45
|
/**
|
|
46
46
|
* Manual approval is considered configured only if the type is not notConfigured
|
|
47
47
|
*/
|
|
48
48
|
export declare const getIsManualApprovalConfigured: (userApprovalConfig?: Pick<UserApprovalConfigType, "type">) => boolean;
|
|
49
|
-
export declare const
|
|
49
|
+
export declare const getIsApprovalPolicyConfigured: (approvalConfigData: ApprovalConfigDataType) => boolean;
|
|
50
50
|
/**
|
|
51
51
|
* @description - Function to open a new tab with the given url
|
|
52
52
|
* @param url - url to be opened in new tab
|
|
@@ -67,11 +67,10 @@ export declare const getDefaultValueFromType: (value: unknown) => {};
|
|
|
67
67
|
*/
|
|
68
68
|
export declare const groupArrayByObjectKey: <T extends Record<string, any>, K extends keyof T>(array: T[], key: K) => Record<string, T[]>;
|
|
69
69
|
/**
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
* @
|
|
70
|
+
* @description - Function to get the lower case object
|
|
71
|
+
* @param input - The input object
|
|
72
|
+
* @returns Record<string, any>
|
|
73
73
|
*/
|
|
74
|
-
export declare const getNullValueFromType: (type: StrictRJSFSchema["type"]) => any;
|
|
75
74
|
export declare const getLowerCaseObject: (input: any) => Record<string, any>;
|
|
76
75
|
/**
|
|
77
76
|
* @description - Function to get the webhook date
|
|
@@ -61,10 +61,6 @@ export declare const useForm: <T extends Record<keyof T, any> = {}>(options?: {
|
|
|
61
61
|
keepTouched?: boolean;
|
|
62
62
|
/** A boolean indicating whether to retain the current error state of the form fields. */
|
|
63
63
|
keepErrors?: boolean;
|
|
64
|
-
/** A boolean indicating whether the form should check for dirty state upon reset. */
|
|
65
|
-
triggerDirty?: boolean;
|
|
66
|
-
/** A boolean indicating whether the initial values of the form should be retained after reset. If false, provided formData will become initial data. */
|
|
67
|
-
keepInitialValues?: boolean;
|
|
68
64
|
}) => void;
|
|
69
65
|
/** An object representing additional form state. */
|
|
70
66
|
formState: {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ReleaseTag } from '../../Common';
|
|
1
|
+
import { ReleaseTag, UserApprovalMetadataType } from '../../Common';
|
|
3
2
|
interface WebhookDataType {
|
|
4
3
|
id: number;
|
|
5
4
|
eventActionType: string;
|
|
@@ -133,6 +132,7 @@ export interface DraftMetadataDTO {
|
|
|
133
132
|
commentsCount: number;
|
|
134
133
|
dataEncrypted: boolean;
|
|
135
134
|
isAppAdmin: boolean;
|
|
135
|
+
userApprovalMetadata: UserApprovalMetadataType;
|
|
136
136
|
}
|
|
137
137
|
export declare enum CMSecretExternalType {
|
|
138
138
|
Internal = "",
|
|
@@ -148,11 +148,9 @@ export declare enum CMSecretExternalType {
|
|
|
148
148
|
}
|
|
149
149
|
export interface ConfigDatum {
|
|
150
150
|
name: string;
|
|
151
|
-
mergeStrategy: OverrideMergeStrategyType;
|
|
152
151
|
type: string;
|
|
153
152
|
external: boolean;
|
|
154
153
|
data: Record<string, any>;
|
|
155
|
-
patchData: Record<string, any>;
|
|
156
154
|
defaultData: Record<string, any>;
|
|
157
155
|
global: boolean;
|
|
158
156
|
externalType: CMSecretExternalType;
|
|
@@ -175,7 +173,6 @@ export interface ConfigMapSecretDataType {
|
|
|
175
173
|
id: number;
|
|
176
174
|
appId: number;
|
|
177
175
|
configData: ConfigMapSecretDataConfigDatumDTO[];
|
|
178
|
-
isDeletable: boolean;
|
|
179
176
|
}
|
|
180
177
|
export declare enum ConfigResourceType {
|
|
181
178
|
ConfigMap = "ConfigMap",
|
|
@@ -417,4 +417,11 @@ export declare const ALL_RESOURCE_KIND_FILTER = "all";
|
|
|
417
417
|
export declare const OPEN_NEW_TICKET = "https://enterprise.devtron.ai/portal/en/newticket";
|
|
418
418
|
export declare const VIEW_ALL_TICKETS = "https://enterprise.devtron.ai/portal/en/myarea";
|
|
419
419
|
export declare const RAISE_ISSUE = "https://github.com/devtron-labs/devtron/issues/new/choose";
|
|
420
|
+
export declare const TARGET_IDS: {
|
|
421
|
+
WORKFLOW_EDITOR_CONTAINER: string;
|
|
422
|
+
};
|
|
423
|
+
/**
|
|
424
|
+
* Env ID to get the data for base configuration
|
|
425
|
+
*/
|
|
426
|
+
export declare const BASE_CONFIGURATION_ENV_ID = -1;
|
|
420
427
|
export declare const DEVTRON_BASE_MAIN_ID = "devtron-base-main-identifier";
|
package/dist/Shared/types.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Dayjs } from 'dayjs';
|
|
2
|
-
import {
|
|
2
|
+
import { ApprovalConfigDataType } from '../Common/Types';
|
|
3
|
+
import { OptionType, CommonNodeAttr, ResponseType, VulnerabilityType, DeploymentAppTypes, ServerErrors, SortingParams } from '../Common';
|
|
3
4
|
import { KeyValueListType } from './Components';
|
|
4
|
-
import { EnvironmentTypeEnum, PatchOperationType } from './constants';
|
|
5
|
+
import { BASE_CONFIGURATION_ENV_ID, EnvironmentTypeEnum, PatchOperationType } from './constants';
|
|
5
6
|
export declare enum EnvType {
|
|
6
7
|
CHART = "helm_charts",
|
|
7
8
|
APPLICATION = "apps"
|
|
@@ -186,7 +187,7 @@ export interface AppDetails {
|
|
|
186
187
|
clusterName?: string;
|
|
187
188
|
dockerRegistryId?: string;
|
|
188
189
|
deploymentAppDeleteRequest?: boolean;
|
|
189
|
-
|
|
190
|
+
approvalConfigData?: ApprovalConfigDataType;
|
|
190
191
|
isVirtualEnvironment?: boolean;
|
|
191
192
|
imageTag?: string;
|
|
192
193
|
helmPackageName?: string;
|
|
@@ -246,7 +247,7 @@ export interface WorkflowType {
|
|
|
246
247
|
showTippy?: boolean;
|
|
247
248
|
appId?: number;
|
|
248
249
|
isSelected?: boolean;
|
|
249
|
-
approvalConfiguredIdsMap?: Record<number,
|
|
250
|
+
approvalConfiguredIdsMap?: Record<number, ApprovalConfigDataType>;
|
|
250
251
|
imageReleaseTags: string[];
|
|
251
252
|
appReleaseTags?: string[];
|
|
252
253
|
tagsEditable?: boolean;
|
|
@@ -403,7 +404,8 @@ export interface SeverityCount {
|
|
|
403
404
|
export declare enum PolicyKindType {
|
|
404
405
|
lockConfiguration = "lock-configuration",
|
|
405
406
|
imagePromotion = "image-promotion",
|
|
406
|
-
plugins = "plugin"
|
|
407
|
+
plugins = "plugin",
|
|
408
|
+
approval = "approval"
|
|
407
409
|
}
|
|
408
410
|
export interface LastExecutionResultType {
|
|
409
411
|
lastExecution: string;
|
|
@@ -735,6 +737,16 @@ export interface DynamicTabType extends CommonTabArgsType {
|
|
|
735
737
|
*/
|
|
736
738
|
lastActiveTabId: string | null;
|
|
737
739
|
}
|
|
740
|
+
export interface ResourceApprovalPolicyConfigDTO {
|
|
741
|
+
appId: number;
|
|
742
|
+
envId: number;
|
|
743
|
+
approvalConfigurations: ApprovalConfigDataType[];
|
|
744
|
+
}
|
|
745
|
+
export interface ResourceApprovalPolicyConfigType extends Omit<ResourceApprovalPolicyConfigDTO, 'state' | 'approvalConfigurations'> {
|
|
746
|
+
isApprovalApplicable: boolean;
|
|
747
|
+
approvalConfigurationMap: Record<ApprovalConfigDataType['kind'], ApprovalConfigDataType>;
|
|
748
|
+
}
|
|
749
|
+
export type ResourceIdToResourceApprovalPolicyConfigMapType = Record<ResourceApprovalPolicyConfigType['envId'] | typeof BASE_CONFIGURATION_ENV_ID, Pick<ResourceApprovalPolicyConfigType, 'isApprovalApplicable' | 'approvalConfigurationMap'>>;
|
|
738
750
|
export interface PreventOutsideFocusProps {
|
|
739
751
|
identifier: string;
|
|
740
752
|
preventFocus: boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path stroke="#06C" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M4.667 14H13.5a.5.5 0 0 0 .5-.5v-8M10.5 2h-6a.5.5 0 0 0-.5.5v2.75M10.5 2 14 5.5M10.5 2v3.5H14M3.307 7.81 2 9.565l1.306 1.755m2.721-3.51 1.306 1.755-1.306 1.755"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path stroke="#664BEE" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M2.667 14.667h10.666"/><rect width="10.6667" height="3.33333" x="2.66675" y="8.66675" stroke="#664BEE" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" rx="1"/><path stroke="#664BEE" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M5.889 3.777a2 2 0 0 1 1.95-2.444h.322a2 2 0 0 1 1.95 2.443L9 8.666H7z"/></svg>
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { OverrideMergeStrategyType } from './Pages/Applications';
|
|
2
1
|
export interface customEnv {
|
|
3
2
|
SENTRY_ENV?: string;
|
|
4
3
|
SENTRY_ERROR_ENABLED?: boolean;
|
|
@@ -79,7 +78,6 @@ export interface customEnv {
|
|
|
79
78
|
FEATURE_PROMO_EMBEDDED_MODAL_TITLE?: string;
|
|
80
79
|
FEATURE_PROMO_EMBEDDED_IFRAME_URL?: string;
|
|
81
80
|
FEATURE_BULK_RESTART_WORKLOADS_FROM_RB: string;
|
|
82
|
-
FEATURE_DEFAULT_MERGE_STRATEGY?: OverrideMergeStrategyType;
|
|
83
81
|
FEATURE_DEFAULT_LANDING_RB_ENABLE?: boolean;
|
|
84
82
|
}
|
|
85
83
|
declare global {
|