@devtron-labs/devtron-fe-common-lib 1.3.8 → 1.3.9
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-C4_UnFyD.js → @code-editor--JGVkfVq.js} +4254 -4197
- package/dist/{@common-rjsf-CoeriySe.js → @common-rjsf-BJZae-C6.js} +1 -1
- package/dist/Common/Common.service.d.ts +2 -1
- package/dist/Common/Types.d.ts +49 -40
- package/dist/Pages/Applications/DevtronApps/Details/CDPipeline/types.d.ts +1 -2
- 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/Helpers.d.ts +4 -3
- package/dist/Shared/Services/app.types.d.ts +8 -1
- package/dist/Shared/constants.d.ts +7 -0
- package/dist/Shared/types.d.ts +17 -5
- package/dist/assets/{ic-arrow-square-out.1be837ac.svg → ic-arrow-square-out.3d1a0d41.svg} +1 -1
- package/dist/assets/ic-check-circle-dots.6229180e.svg +4 -0
- package/dist/assets/{ic-edit-file.a782640f.svg → ic-edit-file.aea811d8.svg} +3 -3
- package/dist/index.js +671 -665
- package/package.json +2 -2
- package/dist/assets/ic-stamp.526499d2.svg +0 -7
@@ -2,7 +2,7 @@ import { j as n, J as A } from "./@vendor-RA_nL1Ml.js";
|
|
2
2
|
import E, { forwardRef as $ } from "react";
|
3
3
|
import L, { getDefaultRegistry as k } from "@rjsf/core";
|
4
4
|
import D from "@rjsf/validator-ajv8";
|
5
|
-
import { T as y, c as H, a as U, i as J, d as w } from "./@code-editor
|
5
|
+
import { T as y, c as H, a as U, i as J, d as w } from "./@code-editor--JGVkfVq.js";
|
6
6
|
import M, { components as O } from "react-select";
|
7
7
|
import { getUiOptions as B, getTemplate as I, getSubmitButtonOptions as W, ADDITIONAL_PROPERTY_FLAG as P, errorId as V, englishStringTranslator as q, TranslatableString as K, titleId as Y, canExpand as z, deepEquals as G } from "@rjsf/utils";
|
8
8
|
import { ReactComponent as Q } from "./assets/ic-chevron-down.fc70d7a7.svg";
|
@@ -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, GlobalVariableOptionType } from './Types';
|
3
|
+
import { TeamList, ResponseType, DeploymentNodeType, CDMaterialServiceEnum, CDMaterialServiceQueryParams, CDMaterialResponseType, CDMaterialFilterQuery, EnvironmentListHelmResponse, UserApprovalMetadataType, GlobalVariableOptionType } from './Types';
|
4
4
|
import { ApiResourceType } from '../Pages';
|
5
5
|
export declare const getTeamListMin: () => Promise<TeamList>;
|
6
6
|
interface UserRole extends ResponseType {
|
@@ -16,6 +16,7 @@ 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;
|
19
20
|
export declare const parseRuntimeParams: (response: RuntimeParamsAPIResponseType) => RuntimePluginVariables[];
|
20
21
|
export declare const processCDMaterialServiceResponse: (cdMaterialsResult: any, stage: DeploymentNodeType, offset: number, filter: CDMaterialFilterQuery, disableDefaultSelection?: boolean) => CDMaterialResponseType;
|
21
22
|
export declare const genericCDMaterialsService: (serviceType: CDMaterialServiceEnum, cdMaterialID: number, stage: DeploymentNodeType, signal: AbortSignal, queryParams?: CDMaterialServiceQueryParams) => Promise<CDMaterialResponseType>;
|
package/dist/Common/Types.d.ts
CHANGED
@@ -1,6 +1,5 @@
|
|
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';
|
4
3
|
import { UserGroupDTO } from '../Pages/GlobalConfigurations';
|
5
4
|
import { ImageComment, ReleaseTag } from './ImageTags.Types';
|
6
5
|
import { MandatoryPluginBaseStateType, RegistryType, RuntimePluginVariables, Severity, PolicyBlockInfo } from '../Shared';
|
@@ -74,7 +73,7 @@ export interface TippyCustomizedProps extends Pick<TippyProps, 'appendTo'> {
|
|
74
73
|
noHeadingBorder?: boolean;
|
75
74
|
infoTextHeading?: string;
|
76
75
|
hideHeading?: boolean;
|
77
|
-
placement?:
|
76
|
+
placement?: TippyProps['placement'];
|
78
77
|
className?: string;
|
79
78
|
Icon?: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
|
80
79
|
iconPath?: string;
|
@@ -296,21 +295,6 @@ export declare enum ManualApprovalType {
|
|
296
295
|
any = "ANY",
|
297
296
|
notConfigured = "NOT_CONFIGURED"
|
298
297
|
}
|
299
|
-
export interface UserGroupApproverType {
|
300
|
-
email: string;
|
301
|
-
hasAccess: boolean;
|
302
|
-
}
|
303
|
-
export interface ImageApprovalPolicyUserGroupDataType {
|
304
|
-
dataStore: Record<string, UserGroupApproverType>;
|
305
|
-
requiredCount: number;
|
306
|
-
emails: string[];
|
307
|
-
}
|
308
|
-
export interface ImageApprovalPolicyType {
|
309
|
-
isPolicyConfigured: boolean;
|
310
|
-
specificUsersData: ImageApprovalPolicyUserGroupDataType;
|
311
|
-
userGroupData: Record<string, ImageApprovalPolicyUserGroupDataType>;
|
312
|
-
validGroups: string[];
|
313
|
-
}
|
314
298
|
export type ImageApprovalUsersInfoDTO = Record<string, Pick<UserGroupDTO, 'identifier' | 'name'>[]>;
|
315
299
|
export interface UserApprovalConfigType {
|
316
300
|
type: ManualApprovalType;
|
@@ -323,13 +307,6 @@ export interface UserApprovalConfigType {
|
|
323
307
|
requiredCount: number;
|
324
308
|
})[];
|
325
309
|
}
|
326
|
-
export type UserApprovalConfigPayloadType = ({
|
327
|
-
type: ManualApprovalType.any;
|
328
|
-
} & Pick<UserApprovalConfigType, 'requiredCount'>) | ({
|
329
|
-
type: ManualApprovalType.specific;
|
330
|
-
} & Pick<UserApprovalConfigType, 'userGroups' | 'specificUsers'>) | {
|
331
|
-
type: ManualApprovalType.notConfigured;
|
332
|
-
};
|
333
310
|
interface ApprovalUserDataType {
|
334
311
|
dataId: number;
|
335
312
|
userActionTime: string;
|
@@ -339,12 +316,45 @@ interface ApprovalUserDataType {
|
|
339
316
|
userResponse: number;
|
340
317
|
userGroups?: Pick<UserGroupDTO, 'identifier' | 'name'>[];
|
341
318
|
}
|
319
|
+
export interface UserApprovalInfo {
|
320
|
+
requiredCount: number;
|
321
|
+
currentCount: number;
|
322
|
+
approverList: {
|
323
|
+
hasApproved: boolean;
|
324
|
+
canApprove: boolean;
|
325
|
+
identifier: string;
|
326
|
+
}[];
|
327
|
+
}
|
328
|
+
export declare enum ApprovalConfigDataKindType {
|
329
|
+
configMap = "configuration/config-map",
|
330
|
+
configSecret = "configuration/config-secret",
|
331
|
+
deploymentTemplate = "configuration/deployment-template",
|
332
|
+
deploymentTrigger = "approval/deployment"
|
333
|
+
}
|
334
|
+
export interface ApprovalConfigDataType extends Pick<UserApprovalInfo, 'currentCount' | 'requiredCount'> {
|
335
|
+
kind: ApprovalConfigDataKindType | null;
|
336
|
+
anyUserApprovedInfo: UserApprovalInfo;
|
337
|
+
specificUsersApprovedInfo: UserApprovalInfo;
|
338
|
+
userGroupsApprovedInfo: Pick<UserApprovalInfo, 'currentCount' | 'requiredCount'> & {
|
339
|
+
userGroups: (UserApprovalInfo & {
|
340
|
+
groupIdentifier: UserGroupDTO['identifier'];
|
341
|
+
groupName: UserGroupDTO['name'];
|
342
|
+
})[];
|
343
|
+
};
|
344
|
+
}
|
345
|
+
export declare enum ApprovalRuntimeStateType {
|
346
|
+
init = 0,
|
347
|
+
requested = 1,
|
348
|
+
approved = 2,
|
349
|
+
consumed = 3
|
350
|
+
}
|
342
351
|
export interface UserApprovalMetadataType {
|
343
352
|
approvalRequestId: number;
|
344
|
-
approvalRuntimeState:
|
345
|
-
approvedUsersData: ApprovalUserDataType[];
|
353
|
+
approvalRuntimeState: ApprovalRuntimeStateType;
|
346
354
|
requestedUserData: ApprovalUserDataType;
|
347
|
-
|
355
|
+
hasCurrentUserApproved: boolean;
|
356
|
+
canCurrentUserApprove: boolean;
|
357
|
+
approvalConfigData: ApprovalConfigDataType;
|
348
358
|
}
|
349
359
|
export declare enum FilterStates {
|
350
360
|
ALLOWED = 0,
|
@@ -401,7 +411,6 @@ export interface CDMaterialListModalServiceUtilProps {
|
|
401
411
|
artifactId?: number;
|
402
412
|
artifactStatus?: string;
|
403
413
|
disableDefaultSelection?: boolean;
|
404
|
-
userApprovalConfig?: UserApprovalConfigType;
|
405
414
|
}
|
406
415
|
export interface CDMaterialType {
|
407
416
|
index: number;
|
@@ -550,8 +559,7 @@ export interface CommonNodeAttr extends Pick<MandatoryPluginBaseStateType, 'isTr
|
|
550
559
|
primaryBranchAfterRegex?: string;
|
551
560
|
storageConfigured?: boolean;
|
552
561
|
deploymentAppDeleteRequest?: boolean;
|
553
|
-
|
554
|
-
userApprovalConfig?: UserApprovalConfigType;
|
562
|
+
approvalConfigData: ApprovalConfigDataType;
|
555
563
|
requestedUserId?: number;
|
556
564
|
showPluginWarning: boolean;
|
557
565
|
helmPackageName?: string;
|
@@ -609,14 +617,17 @@ export interface FilterConditionsListType {
|
|
609
617
|
description: string;
|
610
618
|
conditions: FilterConditionsInfo[];
|
611
619
|
}
|
620
|
+
export interface DeploymentApprovalInfoType {
|
621
|
+
eligibleApprovers: {
|
622
|
+
specificUsers: Pick<UserApprovalInfo, 'approverList'>;
|
623
|
+
anyUsers: Pick<UserApprovalInfo, 'approverList'>;
|
624
|
+
userGroups: (Pick<ApprovalConfigDataType['userGroupsApprovedInfo']['userGroups'][number], 'groupIdentifier' | 'groupName'> & Pick<UserApprovalInfo, 'approverList'>)[];
|
625
|
+
};
|
626
|
+
approvalConfigData: ApprovalConfigDataType;
|
627
|
+
}
|
612
628
|
export interface CDMaterialsApprovalInfo {
|
613
|
-
approvalUsers: string[];
|
614
|
-
userApprovalConfig: UserApprovalConfigType;
|
615
629
|
canApproverDeploy: boolean;
|
616
|
-
|
617
|
-
* Only available incase of approvals do'nt use in cd materials or any other flow since approvalUsers are not present there
|
618
|
-
*/
|
619
|
-
imageApprovalPolicyDetails: ImageApprovalPolicyType;
|
630
|
+
deploymentApprovalInfo: DeploymentApprovalInfoType;
|
620
631
|
}
|
621
632
|
export interface CDMaterialsMetaInfo {
|
622
633
|
tagsEditable: boolean;
|
@@ -696,7 +707,6 @@ export interface AppEnvironment {
|
|
696
707
|
appStatus?: string;
|
697
708
|
deploymentAppDeleteRequest?: boolean;
|
698
709
|
isVirtualEnvironment?: boolean;
|
699
|
-
isProtected?: boolean;
|
700
710
|
pipelineId?: number;
|
701
711
|
latestCdWorkflowRunnerId?: number;
|
702
712
|
commits?: string[];
|
@@ -747,7 +757,6 @@ export interface CdPipeline extends Partial<Pick<CommonNodeAttr, 'triggerBlocked
|
|
747
757
|
parentPipelineType?: string;
|
748
758
|
deploymentAppDeleteRequest?: boolean;
|
749
759
|
deploymentAppCreated?: boolean;
|
750
|
-
userApprovalConfig?: UserApprovalConfigType;
|
751
760
|
isVirtualEnvironment?: boolean;
|
752
761
|
deploymentAppType: DeploymentAppTypes;
|
753
762
|
helmPackageName?: string;
|
@@ -756,6 +765,7 @@ export interface CdPipeline extends Partial<Pick<CommonNodeAttr, 'triggerBlocked
|
|
756
765
|
isProdEnv?: boolean;
|
757
766
|
isGitOpsRepoNotConfigured?: boolean;
|
758
767
|
isDeploymentBlocked?: boolean;
|
768
|
+
approvalConfigData: ApprovalConfigDataType;
|
759
769
|
isTriggerBlocked?: boolean;
|
760
770
|
}
|
761
771
|
export interface ExternalCiConfig {
|
@@ -858,12 +868,11 @@ export interface Point {
|
|
858
868
|
export interface EdgeNodeType {
|
859
869
|
height: number;
|
860
870
|
width: number;
|
861
|
-
userApprovalConfig?: UserApprovalConfigType;
|
862
871
|
type?: any;
|
863
872
|
id?: number | string;
|
864
873
|
}
|
865
874
|
export interface EdgeEndNodeType extends EdgeNodeType {
|
866
|
-
|
875
|
+
approvalConfigData: ApprovalConfigDataType;
|
867
876
|
}
|
868
877
|
/**
|
869
878
|
* Search params for sorting configuration
|
@@ -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;
|
@@ -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
@@ -3,7 +3,7 @@ import { Pair } from 'yaml';
|
|
3
3
|
import { StrictRJSFSchema } from '@rjsf/utils';
|
4
4
|
import { MaterialHistoryType } from '@Shared/Services/app.types';
|
5
5
|
import { PromptProps } from 'react-router-dom';
|
6
|
-
import { MaterialInfo, SortingOrder, UserApprovalConfigType } from '../Common';
|
6
|
+
import { MaterialInfo, SortingOrder, UserApprovalConfigType, ApprovalConfigDataType, UserApprovalInfo } from '../Common';
|
7
7
|
import { GitTriggers, IntersectionChangeHandler, IntersectionOptions, PreventOutsideFocusProps, WebhookEventNameType } from './types';
|
8
8
|
import { AggregatedNodes, DeploymentStatusDetailsBreakdownDataType, DeploymentStatusDetailsType, PodMetadatum } from './Components';
|
9
9
|
interface HighlightSearchTextProps {
|
@@ -42,12 +42,13 @@ export declare const decode: (data: any, isEncoded?: boolean) => {};
|
|
42
42
|
export declare const isTimeStringAvailable: (time: string) => boolean;
|
43
43
|
export declare const getTimeDifference: (startTime: string, endTime: string) => string;
|
44
44
|
export declare const getFileNameFromHeaders: (headers: Headers) => string;
|
45
|
-
export declare const
|
45
|
+
export declare const sanitizeUserApprovalList: (approverList: UserApprovalInfo["approverList"]) => UserApprovalInfo["approverList"];
|
46
|
+
export declare const sanitizeApprovalConfigData: (approvalConfigData: ApprovalConfigDataType | null) => ApprovalConfigDataType;
|
46
47
|
/**
|
47
48
|
* Manual approval is considered configured only if the type is not notConfigured
|
48
49
|
*/
|
49
50
|
export declare const getIsManualApprovalConfigured: (userApprovalConfig?: Pick<UserApprovalConfigType, "type">) => boolean;
|
50
|
-
export declare const
|
51
|
+
export declare const getIsApprovalPolicyConfigured: (approvalConfigData: ApprovalConfigDataType) => boolean;
|
51
52
|
/**
|
52
53
|
* @description - Function to open a new tab with the given url
|
53
54
|
* @param url - url to be opened in new tab
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { OverrideMergeStrategyType } from '../../Pages/Applications';
|
2
|
-
import { ReleaseTag } from '../../Common';
|
2
|
+
import { ReleaseTag, UserApprovalMetadataType } from '../../Common';
|
3
3
|
interface WebhookDataType {
|
4
4
|
id: number;
|
5
5
|
eventActionType: string;
|
@@ -133,6 +133,13 @@ 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;
|
136
143
|
}
|
137
144
|
export declare enum CMSecretExternalType {
|
138
145
|
Internal = "",
|
@@ -417,6 +417,13 @@ 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";
|
421
428
|
export declare const SKIP_LABEL_KEY_VALIDATION_PREFIX = "devtron.ai/";
|
422
429
|
export declare const UNSAVED_CHANGES_PROMPT_MESSAGE = "You have unsaved changes. Are you sure you want to leave?";
|
package/dist/Shared/types.d.ts
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
import { Dayjs } from 'dayjs';
|
2
|
-
import {
|
3
|
-
import {
|
2
|
+
import { ApprovalConfigDataType } from '../Common/Types';
|
3
|
+
import { OptionType, CommonNodeAttr, ResponseType, VulnerabilityType, DeploymentAppTypes, ServerErrors, SortingParams, TriggerBlockType, ValueConstraintType, VariableType, RefVariableType, PluginType } from '../Common';
|
4
|
+
import { BASE_CONFIGURATION_ENV_ID, EnvironmentTypeEnum, PatchOperationType } from './constants';
|
4
5
|
export declare enum EnvType {
|
5
6
|
CHART = "helm_charts",
|
6
7
|
APPLICATION = "apps"
|
@@ -185,7 +186,7 @@ export interface AppDetails {
|
|
185
186
|
clusterName?: string;
|
186
187
|
dockerRegistryId?: string;
|
187
188
|
deploymentAppDeleteRequest?: boolean;
|
188
|
-
|
189
|
+
isApprovalPolicyApplicable?: boolean;
|
189
190
|
isVirtualEnvironment?: boolean;
|
190
191
|
imageTag?: string;
|
191
192
|
helmPackageName?: string;
|
@@ -245,7 +246,7 @@ export interface WorkflowType {
|
|
245
246
|
showTippy?: boolean;
|
246
247
|
appId?: number;
|
247
248
|
isSelected?: boolean;
|
248
|
-
approvalConfiguredIdsMap?: Record<number,
|
249
|
+
approvalConfiguredIdsMap?: Record<number, ApprovalConfigDataType>;
|
249
250
|
imageReleaseTags: string[];
|
250
251
|
appReleaseTags?: string[];
|
251
252
|
tagsEditable?: boolean;
|
@@ -418,7 +419,8 @@ export interface SeverityCount {
|
|
418
419
|
export declare enum PolicyKindType {
|
419
420
|
lockConfiguration = "lock-configuration",
|
420
421
|
imagePromotion = "image-promotion",
|
421
|
-
plugins = "plugin"
|
422
|
+
plugins = "plugin",
|
423
|
+
approval = "approval"
|
422
424
|
}
|
423
425
|
export interface LastExecutionResultType {
|
424
426
|
lastExecution: string;
|
@@ -748,6 +750,16 @@ export interface DynamicTabType extends CommonTabArgsType {
|
|
748
750
|
*/
|
749
751
|
lastActiveTabId: string | null;
|
750
752
|
}
|
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'>>;
|
751
763
|
export interface PreventOutsideFocusProps {
|
752
764
|
identifier: string;
|
753
765
|
preventFocus: boolean;
|
@@ -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="#fff" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
19
19
|
</svg>
|
@@ -0,0 +1,4 @@
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
|
2
|
+
<circle cx="7.99998" cy="7.99967" r="6.66667" stroke="#664BEE" stroke-width="1.5" stroke-linecap="round" stroke-dasharray="2 4"/>
|
3
|
+
<path d="M10.6667 6L7.11115 9.5554L5.33337 7.77778" stroke="#664BEE" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
4
|
+
</svg>
|
@@ -15,6 +15,6 @@
|
|
15
15
|
-->
|
16
16
|
|
17
17
|
<svg width="20.5" height="20" viewBox="0 0 20.5 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
18
|
-
<path d="M12.7507 3H3.75C3.55109 3 3.36032 3.07902 3.21967 3.21967C3.07902 3.36032 3 3.55109 3 3.75V20.25C3 20.4489 3.07902 20.6397 3.21967 20.7803C3.36032 20.921 3.55109 21 3.75 21H8.50037M12.7507 3L18.0007 8.25M12.7507 3V8.25H18.0007M18.0007 8.25V11.25" stroke="#3B444C" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
19
|
-
<path d="M15.7818 15.4289L18.5711 18.2182M13.7894 23H11.3985C11.2928 23 11.1914 22.958 11.1167 22.8833C11.042 22.8086 11 22.7072 11 22.6015V20.3757C11 20.3234 11.0103 20.2715 11.0303 20.2232C11.0504 20.1749 11.0797 20.1309 11.1167 20.0939L17.0939 14.1167C17.1687 14.042 17.27 14 17.3757 14C17.4814 14 17.5827 14.042 17.6575 14.1167L19.8833 16.3425C19.958 16.4173 20 16.5186 20 16.6243C20 16.73 19.958 16.8313 19.8833 16.9061L13.7894 23Z" stroke="#3B444C" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
20
|
-
</svg>
|
18
|
+
<path d="M12.7507 3H3.75C3.55109 3 3.36032 3.07902 3.21967 3.21967C3.07902 3.36032 3 3.55109 3 3.75V20.25C3 20.4489 3.07902 20.6397 3.21967 20.7803C3.36032 20.921 3.55109 21 3.75 21H8.50037M12.7507 3L18.0007 8.25M12.7507 3V8.25H18.0007M18.0007 8.25V11.25" stroke="#3B444C" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" vector-effect="non-scaling-stroke" />
|
19
|
+
<path d="M15.7818 15.4289L18.5711 18.2182M13.7894 23H11.3985C11.2928 23 11.1914 22.958 11.1167 22.8833C11.042 22.8086 11 22.7072 11 22.6015V20.3757C11 20.3234 11.0103 20.2715 11.0303 20.2232C11.0504 20.1749 11.0797 20.1309 11.1167 20.0939L17.0939 14.1167C17.1687 14.042 17.27 14 17.3757 14C17.4814 14 17.5827 14.042 17.6575 14.1167L19.8833 16.3425C19.958 16.4173 20 16.5186 20 16.6243C20 16.73 19.958 16.8313 19.8833 16.9061L13.7894 23Z" stroke="#3B444C" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" vector-effect="non-scaling-stroke" />
|
20
|
+
</svg>
|