@devtron-labs/devtron-fe-common-lib 1.3.0-beta-4 → 1.3.0-beta-5
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-DNwiBMPM.js → @code-editor-BbaZ-tfd.js} +4613 -4540
- package/dist/{@common-rjsf-BFncpuNt.js → @common-rjsf-B1Nl2J_Q.js} +1 -1
- package/dist/{@monaco-editor-CVagbUeH.js → @monaco-editor-DukJFc0i.js} +27951 -28153
- package/dist/Common/Common.service.d.ts +1 -2
- package/dist/Common/Constants.d.ts +1 -1
- package/dist/Common/CustomTagSelector/Types.d.ts +12 -14
- package/dist/Common/CustomTagSelector/index.d.ts +1 -1
- package/dist/Common/CustomTagSelector/tags.utils.d.ts +13 -0
- package/dist/Common/Helper.d.ts +3 -2
- package/dist/Common/Types.d.ts +60 -53
- package/dist/Pages/Applications/DevtronApps/Details/CDPipeline/types.d.ts +2 -1
- package/dist/Shared/Components/DynamicDataTable/types.d.ts +2 -0
- 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 +6 -34
- package/dist/Shared/Components/TagsKeyValueTable/TagsContainer.d.ts +3 -0
- package/dist/Shared/Components/TagsKeyValueTable/constants.d.ts +4 -0
- package/dist/Shared/Components/TagsKeyValueTable/index.d.ts +4 -0
- package/dist/Shared/Components/TagsKeyValueTable/types.d.ts +12 -0
- package/dist/Shared/Components/TagsKeyValueTable/utils.d.ts +3 -0
- package/dist/Shared/Components/index.d.ts +1 -0
- package/dist/Shared/Helpers.d.ts +3 -4
- package/dist/Shared/Services/app.types.d.ts +1 -8
- package/dist/Shared/constants.d.ts +0 -7
- package/dist/Shared/types.d.ts +23 -17
- package/dist/assets/{ic-arrow-square-out.3d1a0d41.svg → ic-arrow-square-out.1be837ac.svg} +1 -1
- package/dist/assets/{ic-edit-file.aea811d8.svg → ic-edit-file.a782640f.svg} +3 -3
- package/dist/assets/ic-stamp.526499d2.svg +7 -0
- package/dist/index.js +565 -564
- package/package.json +3 -3
- package/dist/Common/CustomTagSelector/TagLabelSelect.d.ts +0 -2
- package/dist/Common/CustomTagSelector/TagSelector.utils.d.ts +0 -12
- package/dist/assets/ic-check-circle-dots.6229180e.svg +0 -4
@@ -1,6 +1,6 @@
|
|
1
1
|
import { MutableRefObject } from 'react';
|
2
2
|
import { RuntimeParamsAPIResponseType, RuntimePluginVariables } from '../Shared/types';
|
3
|
-
import { TeamList, ResponseType, DeploymentNodeType, CDMaterialServiceEnum, CDMaterialServiceQueryParams, CDMaterialResponseType, CDMaterialFilterQuery, EnvironmentListHelmResponse,
|
3
|
+
import { TeamList, ResponseType, DeploymentNodeType, CDMaterialServiceEnum, CDMaterialServiceQueryParams, CDMaterialResponseType, CDMaterialFilterQuery, EnvironmentListHelmResponse, GlobalVariableOptionType } from './Types';
|
4
4
|
import { ApiResourceType } from '../Pages';
|
5
5
|
export declare const getTeamListMin: () => Promise<TeamList>;
|
6
6
|
interface UserRole extends ResponseType {
|
@@ -16,7 +16,6 @@ export declare const SourceTypeMap: {
|
|
16
16
|
};
|
17
17
|
export declare function getUserRole(appName?: string): Promise<UserRole>;
|
18
18
|
export declare function setImageTags(request: any, pipelineId: number, artifactId: number): Promise<ResponseType<any>>;
|
19
|
-
export declare const sanitizeUserApprovalMetadata: (userApprovalMetadata: UserApprovalMetadataType) => UserApprovalMetadataType;
|
20
19
|
export declare const parseRuntimeParams: (response: RuntimeParamsAPIResponseType) => RuntimePluginVariables[];
|
21
20
|
export declare const processCDMaterialServiceResponse: (cdMaterialsResult: any, stage: DeploymentNodeType, offset: number, filter: CDMaterialFilterQuery, disableDefaultSelection?: boolean) => CDMaterialResponseType;
|
22
21
|
export declare const genericCDMaterialsService: (serviceType: CDMaterialServiceEnum, cdMaterialID: number, stage: DeploymentNodeType, signal: AbortSignal, queryParams?: CDMaterialServiceQueryParams) => Promise<CDMaterialResponseType>;
|
@@ -5,6 +5,16 @@ export interface SuggestedTagOptionType extends OptionType {
|
|
5
5
|
description: string;
|
6
6
|
propagate: boolean;
|
7
7
|
}
|
8
|
+
export declare enum DeploymentPolicy {
|
9
|
+
ALLOW = "allow",
|
10
|
+
BLOCK = "block",
|
11
|
+
BLOCK_PROD = "block-prod",
|
12
|
+
BLOCK_NON_PROD = "block-non-prod"
|
13
|
+
}
|
14
|
+
export interface VariableValueConstraintTypes {
|
15
|
+
choices?: string[];
|
16
|
+
blockCustomValue?: boolean;
|
17
|
+
}
|
8
18
|
export interface TagType {
|
9
19
|
id?: number;
|
10
20
|
key: string;
|
@@ -16,20 +26,8 @@ export interface TagType {
|
|
16
26
|
isInvalidValue?: boolean;
|
17
27
|
isSuggested?: boolean;
|
18
28
|
isPropagateDisabled?: boolean;
|
19
|
-
|
20
|
-
|
21
|
-
isValid: boolean;
|
22
|
-
messages: string[];
|
23
|
-
}
|
24
|
-
export interface TagLabelSelectType {
|
25
|
-
isCreateApp?: boolean;
|
26
|
-
labelTags: TagType[];
|
27
|
-
setLabelTags: (tagList: TagType[]) => void;
|
28
|
-
tabIndex?: number;
|
29
|
-
selectedProjectId?: number;
|
30
|
-
suggestedTagsOptions?: SuggestedTagOptionType[];
|
31
|
-
reloadProjectTags?: boolean;
|
32
|
-
hidePropagateTag?: boolean;
|
29
|
+
deploymentPolicy?: DeploymentPolicy;
|
30
|
+
valueConstraint?: VariableValueConstraintTypes;
|
33
31
|
}
|
34
32
|
export interface TagDetailType {
|
35
33
|
index: number;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
export { default as PropagateTagInfo } from './PropagateTagInfo';
|
2
2
|
export * from './TagDetails';
|
3
|
-
export * from './TagLabelSelect';
|
4
3
|
export * from './TagLabelValueSelector';
|
5
4
|
export * from './ResizableTagTextArea';
|
6
5
|
export * from './Types';
|
6
|
+
export { validateTagKeyValue, validateTagValue } from './tags.utils';
|
@@ -0,0 +1,13 @@
|
|
1
|
+
/**
|
2
|
+
*
|
3
|
+
* @param value tag key value to validate
|
4
|
+
* @returns isValid: boolean, errorMessages: string[]
|
5
|
+
*/
|
6
|
+
export declare const validateTagKeyValue: (value: string) => {
|
7
|
+
isValid: boolean;
|
8
|
+
errorMessages: string[];
|
9
|
+
};
|
10
|
+
export declare const validateTagValue: (value: string, key: string) => {
|
11
|
+
isValid: boolean;
|
12
|
+
errorMessages: string[];
|
13
|
+
};
|
package/dist/Common/Helper.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { default as React, SyntheticEvent } from 'react';
|
2
2
|
import { JSONPathOptions } from 'jsonpath-plus';
|
3
|
-
import { AsyncOptions, UseSearchString } from './Types';
|
3
|
+
import { AsyncOptions, DeploymentNodeType, UseSearchString } from './Types';
|
4
4
|
import { scrollableInterface } from '../Shared';
|
5
5
|
import * as Sentry from '@sentry/browser';
|
6
6
|
export declare function showError(serverError: any, showToastOnUnknownError?: boolean, hideAccessError?: boolean): void;
|
@@ -10,7 +10,7 @@ interface ConditionalWrapper<T> {
|
|
10
10
|
children: T;
|
11
11
|
}
|
12
12
|
export declare const ConditionalWrap: React.FC<ConditionalWrapper<any>>;
|
13
|
-
export declare function sortCallback(key: string, a: any, b: any, isCaseSensitive?: boolean):
|
13
|
+
export declare function sortCallback(key: string, a: any, b: any, isCaseSensitive?: boolean): 0 | 1 | -1;
|
14
14
|
export declare const stopPropagation: (event: any) => void;
|
15
15
|
export declare const preventDefault: (event: SyntheticEvent) => void;
|
16
16
|
export declare function useThrottledEffect(callback: any, delay: any, deps?: any[]): void;
|
@@ -135,5 +135,6 @@ export declare const getSanitizedIframe: (iframeString: string) => string;
|
|
135
135
|
* This method adds default attributes to iframe - title, loading ="lazy", width="100%", height="100%"
|
136
136
|
*/
|
137
137
|
export declare const getIframeWithDefaultAttributes: (iframeString: string, defaultName?: string) => string;
|
138
|
+
export declare const getStageTitle: (stageType: DeploymentNodeType) => string;
|
138
139
|
export declare const getGoLangFormattedDateWithTimezone: (dateFormat: string) => string;
|
139
140
|
export {};
|
package/dist/Common/Types.d.ts
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
import { default as React, ReactNode, CSSProperties, ReactElement, MutableRefObject } from 'react';
|
2
2
|
import { TippyProps } from '@tippyjs/react';
|
3
|
+
import { Placement } from 'tippy.js';
|
3
4
|
import { UserGroupDTO } from '../Pages/GlobalConfigurations';
|
4
5
|
import { ImageComment, ReleaseTag } from './ImageTags.Types';
|
5
|
-
import { MandatoryPluginBaseStateType, RegistryType, RuntimePluginVariables, Severity } from '../Shared';
|
6
|
+
import { MandatoryPluginBaseStateType, RegistryType, RuntimePluginVariables, Severity, PolicyBlockInfo } from '../Shared';
|
6
7
|
import { ACTION_STATE, DEPLOYMENT_WINDOW_TYPE, DockerConfigOverrideType, RefVariableType, SortingOrder, TaskErrorObj, VariableTypeFormat } from '.';
|
7
8
|
/**
|
8
9
|
* Generic response type object with support for overriding the result type
|
@@ -73,7 +74,7 @@ export interface TippyCustomizedProps extends Pick<TippyProps, 'appendTo'> {
|
|
73
74
|
noHeadingBorder?: boolean;
|
74
75
|
infoTextHeading?: string;
|
75
76
|
hideHeading?: boolean;
|
76
|
-
placement?:
|
77
|
+
placement?: Placement;
|
77
78
|
className?: string;
|
78
79
|
Icon?: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
|
79
80
|
iconPath?: string;
|
@@ -274,6 +275,21 @@ export declare enum ManualApprovalType {
|
|
274
275
|
any = "ANY",
|
275
276
|
notConfigured = "NOT_CONFIGURED"
|
276
277
|
}
|
278
|
+
export interface UserGroupApproverType {
|
279
|
+
email: string;
|
280
|
+
hasAccess: boolean;
|
281
|
+
}
|
282
|
+
export interface ImageApprovalPolicyUserGroupDataType {
|
283
|
+
dataStore: Record<string, UserGroupApproverType>;
|
284
|
+
requiredCount: number;
|
285
|
+
emails: string[];
|
286
|
+
}
|
287
|
+
export interface ImageApprovalPolicyType {
|
288
|
+
isPolicyConfigured: boolean;
|
289
|
+
specificUsersData: ImageApprovalPolicyUserGroupDataType;
|
290
|
+
userGroupData: Record<string, ImageApprovalPolicyUserGroupDataType>;
|
291
|
+
validGroups: string[];
|
292
|
+
}
|
277
293
|
export type ImageApprovalUsersInfoDTO = Record<string, Pick<UserGroupDTO, 'identifier' | 'name'>[]>;
|
278
294
|
export interface UserApprovalConfigType {
|
279
295
|
type: ManualApprovalType;
|
@@ -286,6 +302,13 @@ export interface UserApprovalConfigType {
|
|
286
302
|
requiredCount: number;
|
287
303
|
})[];
|
288
304
|
}
|
305
|
+
export type UserApprovalConfigPayloadType = ({
|
306
|
+
type: ManualApprovalType.any;
|
307
|
+
} & Pick<UserApprovalConfigType, 'requiredCount'>) | ({
|
308
|
+
type: ManualApprovalType.specific;
|
309
|
+
} & Pick<UserApprovalConfigType, 'userGroups' | 'specificUsers'>) | {
|
310
|
+
type: ManualApprovalType.notConfigured;
|
311
|
+
};
|
289
312
|
interface ApprovalUserDataType {
|
290
313
|
dataId: number;
|
291
314
|
userActionTime: string;
|
@@ -295,45 +318,12 @@ interface ApprovalUserDataType {
|
|
295
318
|
userResponse: number;
|
296
319
|
userGroups?: Pick<UserGroupDTO, 'identifier' | 'name'>[];
|
297
320
|
}
|
298
|
-
export interface UserApprovalInfo {
|
299
|
-
requiredCount: number;
|
300
|
-
currentCount: number;
|
301
|
-
approverList: {
|
302
|
-
hasApproved: boolean;
|
303
|
-
canApprove: boolean;
|
304
|
-
identifier: string;
|
305
|
-
}[];
|
306
|
-
}
|
307
|
-
export declare enum ApprovalConfigDataKindType {
|
308
|
-
configMap = "configuration/config-map",
|
309
|
-
configSecret = "configuration/config-secret",
|
310
|
-
deploymentTemplate = "configuration/deployment-template",
|
311
|
-
deploymentTrigger = "approval/deployment"
|
312
|
-
}
|
313
|
-
export interface ApprovalConfigDataType extends Pick<UserApprovalInfo, 'currentCount' | 'requiredCount'> {
|
314
|
-
kind: ApprovalConfigDataKindType | null;
|
315
|
-
anyUserApprovedInfo: UserApprovalInfo;
|
316
|
-
specificUsersApprovedInfo: UserApprovalInfo;
|
317
|
-
userGroupsApprovedInfo: Pick<UserApprovalInfo, 'currentCount' | 'requiredCount'> & {
|
318
|
-
userGroups: (UserApprovalInfo & {
|
319
|
-
groupIdentifier: UserGroupDTO['identifier'];
|
320
|
-
groupName: UserGroupDTO['name'];
|
321
|
-
})[];
|
322
|
-
};
|
323
|
-
}
|
324
|
-
export declare enum ApprovalRuntimeStateType {
|
325
|
-
init = 0,
|
326
|
-
requested = 1,
|
327
|
-
approved = 2,
|
328
|
-
consumed = 3
|
329
|
-
}
|
330
321
|
export interface UserApprovalMetadataType {
|
331
322
|
approvalRequestId: number;
|
332
|
-
approvalRuntimeState:
|
323
|
+
approvalRuntimeState: number;
|
324
|
+
approvedUsersData: ApprovalUserDataType[];
|
333
325
|
requestedUserData: ApprovalUserDataType;
|
334
|
-
|
335
|
-
canCurrentUserApprove: boolean;
|
336
|
-
approvalConfigData: ApprovalConfigDataType;
|
326
|
+
approvalConfig?: UserApprovalConfigType;
|
337
327
|
}
|
338
328
|
export declare enum FilterStates {
|
339
329
|
ALLOWED = 0,
|
@@ -390,6 +380,7 @@ export interface CDMaterialListModalServiceUtilProps {
|
|
390
380
|
artifactId?: number;
|
391
381
|
artifactStatus?: string;
|
392
382
|
disableDefaultSelection?: boolean;
|
383
|
+
userApprovalConfig?: UserApprovalConfigType;
|
393
384
|
}
|
394
385
|
export interface CDMaterialType {
|
395
386
|
index: number;
|
@@ -442,6 +433,10 @@ export interface CDMaterialType {
|
|
442
433
|
* Would currently only be received in case of release
|
443
434
|
*/
|
444
435
|
appWorkflowId: number;
|
436
|
+
/**
|
437
|
+
* Denotes trigger blocking due to mandatory tags, (might be used for plugins and other features in future)
|
438
|
+
*/
|
439
|
+
deploymentBlockedState?: PolicyBlockInfo;
|
445
440
|
}
|
446
441
|
export declare enum CDMaterialServiceEnum {
|
447
442
|
ROLLBACK = "rollback",
|
@@ -478,6 +473,15 @@ export interface DownstreamNodesEnvironmentsType {
|
|
478
473
|
environmentId: number;
|
479
474
|
environmentName: string;
|
480
475
|
}
|
476
|
+
export declare enum TriggerBlockType {
|
477
|
+
MANDATORY_TAG = "mandatory-tags",
|
478
|
+
MANDATORY_PLUGIN = "mandatory-plugins",
|
479
|
+
SECURITY_SCAN = "security-scan"
|
480
|
+
}
|
481
|
+
export interface TriggerBlockedInfo {
|
482
|
+
blockedBy: TriggerBlockType;
|
483
|
+
blockedReason?: string;
|
484
|
+
}
|
481
485
|
export interface CommonNodeAttr extends Pick<MandatoryPluginBaseStateType, 'isTriggerBlocked' | 'pluginBlockState'> {
|
482
486
|
connectingCiPipelineId?: number;
|
483
487
|
parents: string | number[] | string[];
|
@@ -525,7 +529,8 @@ export interface CommonNodeAttr extends Pick<MandatoryPluginBaseStateType, 'isTr
|
|
525
529
|
primaryBranchAfterRegex?: string;
|
526
530
|
storageConfigured?: boolean;
|
527
531
|
deploymentAppDeleteRequest?: boolean;
|
528
|
-
|
532
|
+
approvalUsers?: string[];
|
533
|
+
userApprovalConfig?: UserApprovalConfigType;
|
529
534
|
requestedUserId?: number;
|
530
535
|
showPluginWarning: boolean;
|
531
536
|
helmPackageName?: string;
|
@@ -539,6 +544,7 @@ export interface CommonNodeAttr extends Pick<MandatoryPluginBaseStateType, 'isTr
|
|
539
544
|
downstreamEnvironments?: DownstreamNodesEnvironmentsType[];
|
540
545
|
cipipelineId?: number;
|
541
546
|
isDeploymentBlocked?: boolean;
|
547
|
+
triggerBlockedInfo?: TriggerBlockedInfo;
|
542
548
|
}
|
543
549
|
export declare enum DeploymentAppTypes {
|
544
550
|
HELM = "helm",
|
@@ -582,17 +588,14 @@ export interface FilterConditionsListType {
|
|
582
588
|
description: string;
|
583
589
|
conditions: FilterConditionsInfo[];
|
584
590
|
}
|
585
|
-
export interface DeploymentApprovalInfoType {
|
586
|
-
eligibleApprovers: {
|
587
|
-
specificUsers: Pick<UserApprovalInfo, 'approverList'>;
|
588
|
-
anyUsers: Pick<UserApprovalInfo, 'approverList'>;
|
589
|
-
userGroups: (Pick<ApprovalConfigDataType['userGroupsApprovedInfo']['userGroups'][number], 'groupIdentifier' | 'groupName'> & Pick<UserApprovalInfo, 'approverList'>)[];
|
590
|
-
};
|
591
|
-
approvalConfigData: ApprovalConfigDataType;
|
592
|
-
}
|
593
591
|
export interface CDMaterialsApprovalInfo {
|
592
|
+
approvalUsers: string[];
|
593
|
+
userApprovalConfig: UserApprovalConfigType;
|
594
594
|
canApproverDeploy: boolean;
|
595
|
-
|
595
|
+
/**
|
596
|
+
* Only available incase of approvals do'nt use in cd materials or any other flow since approvalUsers are not present there
|
597
|
+
*/
|
598
|
+
imageApprovalPolicyDetails: ImageApprovalPolicyType;
|
596
599
|
}
|
597
600
|
export interface CDMaterialsMetaInfo {
|
598
601
|
tagsEditable: boolean;
|
@@ -604,6 +607,7 @@ export interface CDMaterialsMetaInfo {
|
|
604
607
|
* This is the ID of user that has request the material
|
605
608
|
*/
|
606
609
|
requestedUserId: number;
|
610
|
+
deploymentBlockedState?: PolicyBlockInfo;
|
607
611
|
runtimeParams: RuntimePluginVariables[];
|
608
612
|
}
|
609
613
|
export interface ImagePromotionMaterialInfo {
|
@@ -671,6 +675,7 @@ export interface AppEnvironment {
|
|
671
675
|
appStatus?: string;
|
672
676
|
deploymentAppDeleteRequest?: boolean;
|
673
677
|
isVirtualEnvironment?: boolean;
|
678
|
+
isProtected?: boolean;
|
674
679
|
pipelineId?: number;
|
675
680
|
latestCdWorkflowRunnerId?: number;
|
676
681
|
commits?: string[];
|
@@ -681,7 +686,7 @@ export interface Strategy {
|
|
681
686
|
config: any;
|
682
687
|
default?: boolean;
|
683
688
|
}
|
684
|
-
export interface CDStage {
|
689
|
+
export interface CDStage extends Partial<Pick<CommonNodeAttr, 'triggerBlockedInfo'>> {
|
685
690
|
status: string;
|
686
691
|
name: string;
|
687
692
|
triggerType: 'AUTOMATIC' | 'MANUAL';
|
@@ -691,14 +696,14 @@ export interface CDStageConfigMapSecretNames {
|
|
691
696
|
configMaps: any[];
|
692
697
|
secrets: any[];
|
693
698
|
}
|
694
|
-
export interface PrePostDeployStageType extends MandatoryPluginBaseStateType {
|
699
|
+
export interface PrePostDeployStageType extends MandatoryPluginBaseStateType, Partial<Pick<CommonNodeAttr, 'triggerBlockedInfo'>> {
|
695
700
|
isValid: boolean;
|
696
701
|
steps: TaskErrorObj[];
|
697
702
|
triggerType: string;
|
698
703
|
name: string;
|
699
704
|
status: string;
|
700
705
|
}
|
701
|
-
export interface CdPipeline {
|
706
|
+
export interface CdPipeline extends Partial<Pick<CommonNodeAttr, 'triggerBlockedInfo'>> {
|
702
707
|
id: number;
|
703
708
|
environmentId: number;
|
704
709
|
environmentName?: string;
|
@@ -721,6 +726,7 @@ export interface CdPipeline {
|
|
721
726
|
parentPipelineType?: string;
|
722
727
|
deploymentAppDeleteRequest?: boolean;
|
723
728
|
deploymentAppCreated?: boolean;
|
729
|
+
userApprovalConfig?: UserApprovalConfigType;
|
724
730
|
isVirtualEnvironment?: boolean;
|
725
731
|
deploymentAppType: DeploymentAppTypes;
|
726
732
|
helmPackageName?: string;
|
@@ -729,7 +735,7 @@ export interface CdPipeline {
|
|
729
735
|
isProdEnv?: boolean;
|
730
736
|
isGitOpsRepoNotConfigured?: boolean;
|
731
737
|
isDeploymentBlocked?: boolean;
|
732
|
-
|
738
|
+
isTriggerBlocked?: boolean;
|
733
739
|
}
|
734
740
|
export interface ExternalCiConfig {
|
735
741
|
id: number;
|
@@ -831,11 +837,12 @@ export interface Point {
|
|
831
837
|
export interface EdgeNodeType {
|
832
838
|
height: number;
|
833
839
|
width: number;
|
840
|
+
userApprovalConfig?: UserApprovalConfigType;
|
834
841
|
type?: any;
|
835
842
|
id?: number | string;
|
836
843
|
}
|
837
844
|
export interface EdgeEndNodeType extends EdgeNodeType {
|
838
|
-
|
845
|
+
userApprovalConfig?: UserApprovalConfigType;
|
839
846
|
}
|
840
847
|
/**
|
841
848
|
* Search params for sorting configuration
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { BuildStageType, FormType } from '../../../../../Common/CIPipeline.Types';
|
2
|
-
import { DeploymentAppTypes } from '../../../../../Common/Types';
|
2
|
+
import { DeploymentAppTypes, UserApprovalConfigType } from '../../../../../Common/Types';
|
3
3
|
import { DeploymentStrategy } from '../../../../../Shared/Components';
|
4
4
|
import { EnvListMinDTO } from '../../../../../Shared/types';
|
5
5
|
interface ConfigSecretType {
|
@@ -53,6 +53,7 @@ export interface CDFormType {
|
|
53
53
|
secrets: ConfigSecretType[];
|
54
54
|
};
|
55
55
|
requiredApprovals: string;
|
56
|
+
userApprovalConfig?: UserApprovalConfigType;
|
56
57
|
isClusterCdActive: boolean;
|
57
58
|
deploymentAppCreated: boolean;
|
58
59
|
clusterId: string;
|
@@ -20,6 +20,8 @@ export type DynamicDataTableHeaderType<K extends string> = {
|
|
20
20
|
isSortable?: boolean;
|
21
21
|
/** An optional boolean to control the visibility of the column. */
|
22
22
|
isHidden?: boolean;
|
23
|
+
/** An optional boolean to show the column */
|
24
|
+
renderAdditionalContent?: () => ReactNode;
|
23
25
|
};
|
24
26
|
export declare enum DynamicDataTableRowDataType {
|
25
27
|
TEXT = "text",
|
@@ -1,2 +1,2 @@
|
|
1
1
|
import { FeatureDescriptionModalProps } from './types';
|
2
|
-
export declare const FeatureDescriptionModal: ({ title, renderDescriptionContent, closeModalText, docLink, closeModal, imageVariant, SVGImage, imageStyles,
|
2
|
+
export declare const FeatureDescriptionModal: ({ title, renderDescriptionContent, closeModalText, docLink, closeModal, imageVariant, SVGImage, imageStyles, }: 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,
|
2
|
+
declare const FeatureTitleWithInfo: ({ additionalContainerClasses, breadCrumbs, children, iconClassName, title, renderDescriptionContent, closeModalText, docLink, SVGImage, showInfoIconTippy, docLinkText, dataTestId, additionalContent, showInfoIcon, }: DescriptorProps) => JSX.Element;
|
3
3
|
export default FeatureTitleWithInfo;
|
@@ -1,44 +1,17 @@
|
|
1
1
|
import { default as React, ReactNode } from 'react';
|
2
2
|
import { ImageType } from '../../../Common';
|
3
3
|
import { Breadcrumb } from '../../../Common/BreadCrumb/Types';
|
4
|
-
interface
|
4
|
+
export interface FeatureDescriptionModalProps {
|
5
|
+
title: string;
|
5
6
|
renderDescriptionContent?: () => ReactNode;
|
7
|
+
closeModalText?: string;
|
6
8
|
docLink?: string;
|
9
|
+
closeModal?: () => void;
|
7
10
|
imageVariant?: ImageType;
|
8
11
|
SVGImage?: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
|
9
12
|
imageStyles?: React.CSSProperties;
|
10
13
|
}
|
11
|
-
|
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)) & {
|
14
|
+
export interface DescriptorProps extends FeatureDescriptionModalProps {
|
42
15
|
breadCrumbs?: Breadcrumb[];
|
43
16
|
additionalContainerClasses?: string;
|
44
17
|
iconClassName?: string;
|
@@ -53,5 +26,4 @@ export type DescriptorProps = ((Omit<FeatureDescriptionModalProps, 'tabsConfig'>
|
|
53
26
|
* @default false
|
54
27
|
*/
|
55
28
|
showInfoIcon?: boolean;
|
56
|
-
}
|
57
|
-
export {};
|
29
|
+
}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { DynamicDataTableCellErrorType, DynamicDataTableProps, DynamicDataTableRowType } from '../DynamicDataTable';
|
2
|
+
export type TagsTableColumnsType = 'tagKey' | 'tagValue';
|
3
|
+
export interface TagsContainerProps extends Partial<Pick<DynamicDataTableProps<TagsTableColumnsType>, 'onRowEdit'>> {
|
4
|
+
appType: string;
|
5
|
+
isCreateApp?: boolean;
|
6
|
+
rows: DynamicDataTableRowType<TagsTableColumnsType>[];
|
7
|
+
setRows: (updatedRows: DynamicDataTableRowType<TagsTableColumnsType>[]) => void;
|
8
|
+
hidePropagateTags?: boolean;
|
9
|
+
getEmptyRow?: (keyChoices?: string[]) => DynamicDataTableRowType<TagsTableColumnsType>;
|
10
|
+
tagsError: DynamicDataTableCellErrorType<TagsTableColumnsType>;
|
11
|
+
setTagErrors: (updatedTagsError: DynamicDataTableCellErrorType<TagsTableColumnsType>) => void;
|
12
|
+
}
|
package/dist/Shared/Helpers.d.ts
CHANGED
@@ -2,7 +2,7 @@ import { ReactElement } from 'react';
|
|
2
2
|
import { Pair } from 'yaml';
|
3
3
|
import { StrictRJSFSchema } from '@rjsf/utils';
|
4
4
|
import { MaterialHistoryType } from '@Shared/Services/app.types';
|
5
|
-
import { MaterialInfo, SortingOrder, UserApprovalConfigType
|
5
|
+
import { MaterialInfo, SortingOrder, UserApprovalConfigType } from '../Common';
|
6
6
|
import { GitTriggers, IntersectionChangeHandler, IntersectionOptions, PreventOutsideFocusProps, WebhookEventNameType } from './types';
|
7
7
|
import { AggregatedNodes, DeploymentStatusDetailsBreakdownDataType, DeploymentStatusDetailsType, PodMetadatum } from './Components';
|
8
8
|
interface HighlightSearchTextProps {
|
@@ -41,13 +41,12 @@ export declare const decode: (data: any, isEncoded?: boolean) => {};
|
|
41
41
|
export declare const isTimeStringAvailable: (time: string) => boolean;
|
42
42
|
export declare const getTimeDifference: (startTime: string, endTime: string) => string;
|
43
43
|
export declare const getFileNameFromHeaders: (headers: Headers) => string;
|
44
|
-
export declare const
|
45
|
-
export declare const sanitizeApprovalConfigData: (approvalConfigData: ApprovalConfigDataType | null) => ApprovalConfigDataType;
|
44
|
+
export declare const sanitizeUserApprovalConfig: (userApprovalConfig: UserApprovalConfigType) => UserApprovalConfigType;
|
46
45
|
/**
|
47
46
|
* Manual approval is considered configured only if the type is not notConfigured
|
48
47
|
*/
|
49
48
|
export declare const getIsManualApprovalConfigured: (userApprovalConfig?: Pick<UserApprovalConfigType, "type">) => boolean;
|
50
|
-
export declare const
|
49
|
+
export declare const getIsManualApprovalSpecific: (userApprovalConfig?: Pick<UserApprovalConfigType, "type">) => boolean;
|
51
50
|
/**
|
52
51
|
* @description - Function to open a new tab with the given url
|
53
52
|
* @param url - url to be opened in new tab
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { OverrideMergeStrategyType } from '../../Pages/Applications';
|
2
|
-
import { ReleaseTag
|
2
|
+
import { ReleaseTag } from '../../Common';
|
3
3
|
interface WebhookDataType {
|
4
4
|
id: number;
|
5
5
|
eventActionType: string;
|
@@ -133,13 +133,6 @@ export interface DraftMetadataDTO {
|
|
133
133
|
commentsCount: number;
|
134
134
|
dataEncrypted: boolean;
|
135
135
|
isAppAdmin: boolean;
|
136
|
-
userApprovalMetadata: UserApprovalMetadataType;
|
137
|
-
/**
|
138
|
-
* User id of the user who has requested the data
|
139
|
-
*
|
140
|
-
* This would be the id of the user whose token is sent in the cookie
|
141
|
-
*/
|
142
|
-
requestedUserId: number;
|
143
136
|
}
|
144
137
|
export declare enum CMSecretExternalType {
|
145
138
|
Internal = "",
|
@@ -417,11 +417,4 @@ 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;
|
427
420
|
export declare const DEVTRON_BASE_MAIN_ID = "devtron-base-main-identifier";
|
package/dist/Shared/types.d.ts
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
import { Dayjs } from 'dayjs';
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
import { BASE_CONFIGURATION_ENV_ID, EnvironmentTypeEnum, PatchOperationType } from './constants';
|
2
|
+
import { OptionType, CommonNodeAttr, ResponseType, UserApprovalConfigType, VulnerabilityType, DeploymentAppTypes, ServerErrors, SortingParams, TriggerBlockType, ValueConstraintType, VariableType, RefVariableType, PluginType } from '../Common';
|
3
|
+
import { EnvironmentTypeEnum, PatchOperationType } from './constants';
|
5
4
|
export declare enum EnvType {
|
6
5
|
CHART = "helm_charts",
|
7
6
|
APPLICATION = "apps"
|
@@ -186,7 +185,7 @@ export interface AppDetails {
|
|
186
185
|
clusterName?: string;
|
187
186
|
dockerRegistryId?: string;
|
188
187
|
deploymentAppDeleteRequest?: boolean;
|
189
|
-
|
188
|
+
userApprovalConfig?: string;
|
190
189
|
isVirtualEnvironment?: boolean;
|
191
190
|
imageTag?: string;
|
192
191
|
helmPackageName?: string;
|
@@ -246,7 +245,7 @@ export interface WorkflowType {
|
|
246
245
|
showTippy?: boolean;
|
247
246
|
appId?: number;
|
248
247
|
isSelected?: boolean;
|
249
|
-
approvalConfiguredIdsMap?: Record<number,
|
248
|
+
approvalConfiguredIdsMap?: Record<number, UserApprovalConfigType>;
|
250
249
|
imageReleaseTags: string[];
|
251
250
|
appReleaseTags?: string[];
|
252
251
|
tagsEditable?: boolean;
|
@@ -419,8 +418,7 @@ export interface SeverityCount {
|
|
419
418
|
export declare enum PolicyKindType {
|
420
419
|
lockConfiguration = "lock-configuration",
|
421
420
|
imagePromotion = "image-promotion",
|
422
|
-
plugins = "plugin"
|
423
|
-
approval = "approval"
|
421
|
+
plugins = "plugin"
|
424
422
|
}
|
425
423
|
export interface LastExecutionResultType {
|
426
424
|
lastExecution: string;
|
@@ -750,20 +748,28 @@ export interface DynamicTabType extends CommonTabArgsType {
|
|
750
748
|
*/
|
751
749
|
lastActiveTabId: string | null;
|
752
750
|
}
|
753
|
-
export interface ResourceApprovalPolicyConfigDTO {
|
754
|
-
appId: number;
|
755
|
-
envId: number;
|
756
|
-
approvalConfigurations: ApprovalConfigDataType[];
|
757
|
-
}
|
758
|
-
export interface ResourceApprovalPolicyConfigType extends Omit<ResourceApprovalPolicyConfigDTO, 'state' | 'approvalConfigurations'> {
|
759
|
-
isApprovalApplicable: boolean;
|
760
|
-
approvalConfigurationMap: Record<ApprovalConfigDataType['kind'], ApprovalConfigDataType>;
|
761
|
-
}
|
762
|
-
export type ResourceIdToResourceApprovalPolicyConfigMapType = Record<ResourceApprovalPolicyConfigType['envId'] | typeof BASE_CONFIGURATION_ENV_ID, Pick<ResourceApprovalPolicyConfigType, 'isApprovalApplicable' | 'approvalConfigurationMap'>>;
|
763
751
|
export interface PreventOutsideFocusProps {
|
764
752
|
identifier: string;
|
765
753
|
preventFocus: boolean;
|
766
754
|
}
|
755
|
+
export interface PolicyBlockInfo {
|
756
|
+
isBlocked: boolean;
|
757
|
+
blockedBy: TriggerBlockType;
|
758
|
+
reason: string;
|
759
|
+
}
|
760
|
+
export interface PipelineStageBlockInfo {
|
761
|
+
node: PolicyBlockInfo;
|
762
|
+
pre: PolicyBlockInfo;
|
763
|
+
post: PolicyBlockInfo;
|
764
|
+
}
|
765
|
+
export interface PolicyConsequencesDTO {
|
766
|
+
cd: PipelineStageBlockInfo;
|
767
|
+
ci: PipelineStageBlockInfo;
|
768
|
+
}
|
769
|
+
export interface GetPolicyConsequencesProps {
|
770
|
+
appId: number;
|
771
|
+
envId: number;
|
772
|
+
}
|
767
773
|
export interface UploadFileDTO {
|
768
774
|
id: number;
|
769
775
|
name: string;
|
@@ -15,5 +15,5 @@
|
|
15
15
|
-->
|
16
16
|
|
17
17
|
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
18
|
-
<path d="M13.5 6.25L13.4995 2.5005L9.75 2.5M8.99821 7.00179L13.4982 2.50179M11.5 9V13C11.5 13.1326 11.4473 13.2598 11.3536 13.3536C11.2598 13.4473 11.1326 13.5 11 13.5H3C2.86739 13.5 2.74021 13.4473 2.64645 13.3536C2.55268 13.2598 2.5 13.1326 2.5 13V5C2.5 4.86739 2.55268 4.74021 2.64645 4.64645C2.74021 4.55268 2.86739 4.5 3 4.5H7" stroke="
|
18
|
+
<path d="M13.5 6.25L13.4995 2.5005L9.75 2.5M8.99821 7.00179L13.4982 2.50179M11.5 9V13C11.5 13.1326 11.4473 13.2598 11.3536 13.3536C11.2598 13.4473 11.1326 13.5 11 13.5H3C2.86739 13.5 2.74021 13.4473 2.64645 13.3536C2.55268 13.2598 2.5 13.1326 2.5 13V5C2.5 4.86739 2.55268 4.74021 2.64645 4.64645C2.74021 4.55268 2.86739 4.5 3 4.5H7" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
19
19
|
</svg>
|