@devtron-labs/devtron-fe-common-lib 0.5.1-beta-2 → 0.5.2-beta-1
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/Common/Helper.d.ts +1 -0
- package/dist/Common/Toggle/Toggle.d.ts +2 -1
- package/dist/Shared/Components/CICDHistory/DeploymentHistoryConfigDiff/DeploymentHistoryConfigDiff.d.ts +2 -0
- package/dist/Shared/Components/CICDHistory/DeploymentHistoryConfigDiff/DeploymentHistoryConfigDiffCompare.d.ts +2 -0
- package/dist/Shared/Components/CICDHistory/{DeploymentHistoryDiff → DeploymentHistoryConfigDiff}/DeploymentHistoryDiffView.d.ts +1 -1
- package/dist/Shared/Components/CICDHistory/DeploymentHistoryConfigDiff/helpers.d.ts +6 -0
- package/dist/Shared/Components/CICDHistory/DeploymentHistoryConfigDiff/index.d.ts +2 -0
- package/dist/Shared/Components/CICDHistory/DeploymentHistoryConfigDiff/types.d.ts +36 -0
- package/dist/Shared/Components/CICDHistory/DeploymentHistoryConfigDiff/utils.d.ts +22 -0
- package/dist/Shared/Components/CICDHistory/TriggerOutput.d.ts +1 -1
- package/dist/Shared/Components/CICDHistory/index.d.ts +1 -1
- package/dist/Shared/Components/CICDHistory/types.d.ts +3 -4
- package/dist/Shared/Components/Collapse/Collapse.d.ts +6 -1
- package/dist/Shared/Components/CollapsibleList/CollapsibleList.types.d.ts +4 -0
- package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiff.component.d.ts +1 -1
- package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiff.constants.d.ts +6 -0
- package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiff.types.d.ts +29 -10
- package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiff.utils.d.ts +3 -2
- package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiffAccordion.d.ts +1 -1
- package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiffMain.d.ts +1 -1
- package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiffNavigation.d.ts +1 -1
- package/dist/Shared/Components/DeploymentConfigDiff/index.d.ts +1 -0
- package/dist/Shared/Components/SelectPicker/type.d.ts +6 -1
- package/dist/Shared/Helpers.d.ts +13 -0
- package/dist/Shared/Services/app.service.d.ts +4 -1
- package/dist/Shared/Services/app.types.d.ts +31 -7
- package/dist/assets/index.css +1 -1
- package/dist/{cssMode-BqR6v0o8.js → cssMode-C1J_MgKp.js} +1 -1
- package/dist/{freemarker2-DYWfv8gN.js → freemarker2-DT_J_FKd.js} +1 -1
- package/dist/{handlebars-6KNd_Je9.js → handlebars-wAgu6jG3.js} +1 -1
- package/dist/{html-CqjYZdxh.js → html-CKH2Ofr8.js} +1 -1
- package/dist/{htmlMode-DRyo9_8x.js → htmlMode-DR1Hd1NY.js} +1 -1
- package/dist/{index-8Yo61zsh.js → index-fxrsvINy.js} +30374 -30080
- package/dist/index.js +268 -261
- package/dist/{javascript-CtcTdTtt.js → javascript-DEZfPpDG.js} +1 -1
- package/dist/{jsonMode-Cdfccbgv.js → jsonMode-BPP14l3S.js} +1 -1
- package/dist/{liquid-DN3O5mMC.js → liquid-DzKGpZ_1.js} +1 -1
- package/dist/{mdx-DBs7Pljs.js → mdx-CXwgAbOa.js} +1 -1
- package/dist/{python-BzN8Ala5.js → python-PA7Qs7tp.js} +1 -1
- package/dist/{razor-C7L_MpUQ.js → razor-BKiT4imG.js} +1 -1
- package/dist/{tsMode-CMVpC480.js → tsMode-DMeqzHkT.js} +1 -1
- package/dist/{typescript-DLQwIb2p.js → typescript-C6q-lYiG.js} +1 -1
- package/dist/{xml-XzjtqiNv.js → xml-D75Y4liE.js} +1 -1
- package/dist/{yaml-Cn5iucCx.js → yaml--CruCt9K.js} +1 -1
- package/package.json +1 -1
- package/dist/Shared/Components/CICDHistory/DeploymentHistoryDiff/DeploymentHistoryConfigList.component.d.ts +0 -3
- package/dist/Shared/Components/CICDHistory/DeploymentHistoryDiff/DeploymentHistoryDetailedView.d.ts +0 -3
- package/dist/Shared/Components/CICDHistory/DeploymentHistoryDiff/DeploymentHistoryHeader.d.ts +0 -3
- package/dist/Shared/Components/CICDHistory/DeploymentHistoryDiff/DeploymentHistorySidebar.d.ts +0 -3
- package/dist/Shared/Components/CICDHistory/DeploymentHistoryDiff/index.d.ts +0 -3
- package/dist/Shared/Components/CICDHistory/DeploymentHistoryDiff/types.d.ts +0 -35
package/dist/Common/Helper.d.ts
CHANGED
|
@@ -120,4 +120,5 @@ export declare const DropdownIndicator: (props: any) => JSX.Element;
|
|
|
120
120
|
export declare function mapByKey<T = Map<any, any>>(arr: any[], id: string): T;
|
|
121
121
|
export declare function asyncWrap(promise: any): any[];
|
|
122
122
|
export declare const prefixZeroIfSingleDigit: (value?: number) => string | number;
|
|
123
|
+
export declare const throttle: <T extends (...args: unknown[]) => unknown>(func: T, delay?: number) => ((...args: Parameters<T>) => void);
|
|
123
124
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const Toggle: ({ selected, onSelect, color, rootClassName, disabled, dataTestId, Icon, iconClass, ...props }: {
|
|
1
|
+
declare const Toggle: ({ selected, onSelect, color, rootClassName, disabled, dataTestId, Icon, iconClass, throttleOnChange, ...props }: {
|
|
2
2
|
[x: string]: any;
|
|
3
3
|
selected?: boolean;
|
|
4
4
|
onSelect?: any;
|
|
@@ -8,5 +8,6 @@ declare const Toggle: ({ selected, onSelect, color, rootClassName, disabled, dat
|
|
|
8
8
|
dataTestId?: string;
|
|
9
9
|
Icon?: any;
|
|
10
10
|
iconClass?: string;
|
|
11
|
+
throttleOnChange?: boolean;
|
|
11
12
|
}) => JSX.Element;
|
|
12
13
|
export default Toggle;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { DeploymentHistoryConfigDiffProps } from './types';
|
|
2
|
+
export declare const DeploymentHistoryConfigDiff: ({ appName, envName, pipelineId, wfrId, triggerHistory, setFullScreenView, runSource, resourceId, renderRunSource, }: DeploymentHistoryConfigDiffProps) => JSX.Element;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { DeploymentHistoryDiffDetailedProps } from './types';
|
|
2
|
+
export declare const DeploymentHistoryConfigDiffCompare: ({ envName, setFullScreenView, pipelineDeployments, wfrId, previousWfrId, convertVariables, setConvertVariables, runSource, renderRunSource, resourceId, isCompareDeploymentConfigNotAvailable, ...props }: DeploymentHistoryDiffDetailedProps) => JSX.Element;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { DeploymentTemplateHistoryType } from '../types';
|
|
2
|
-
declare const DeploymentHistoryDiffView: ({ currentConfiguration, baseTemplateConfiguration, previousConfigAvailable, isUnpublished, isDeleteDraft, rootClassName,
|
|
2
|
+
declare const DeploymentHistoryDiffView: ({ currentConfiguration, baseTemplateConfiguration, previousConfigAvailable, isUnpublished, isDeleteDraft, rootClassName, sortingConfig, codeEditorKey, }: DeploymentTemplateHistoryType) => JSX.Element;
|
|
3
3
|
export default DeploymentHistoryDiffView;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { DeploymentConfigDiffProps } from '@Shared/Components/DeploymentConfigDiff';
|
|
2
|
+
import { History } from '../types';
|
|
3
|
+
import { DeploymentHistoryConfigDiffProps } from './types';
|
|
4
|
+
export declare const renderDeploymentHistoryConfig: (config: DeploymentConfigDiffProps["configList"], heading: string, pathname: string, hideDiffState: boolean) => JSX.Element;
|
|
5
|
+
export declare const renderPipelineDeploymentStatusIcon: (status: string) => JSX.Element;
|
|
6
|
+
export declare const renderPipelineDeploymentOptionDescription: ({ stage, triggeredBy, triggeredByEmail, artifact, renderRunSource, resourceId, runSource, }: Pick<History, "triggeredBy" | "triggeredByEmail" | "artifact" | "stage"> & Pick<DeploymentHistoryConfigDiffProps, "renderRunSource" | "resourceId" | "runSource">) => JSX.Element;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Dispatch, SetStateAction } from 'react';
|
|
2
|
+
import { DeploymentConfigDiffProps } from '@Shared/Components/DeploymentConfigDiff';
|
|
3
|
+
import { EnvResourceType } from '../../../Services';
|
|
4
|
+
import { History, HistoryLogsProps, RunSourceType } from '../types';
|
|
5
|
+
export interface DeploymentHistoryConfigDiffProps extends Required<Pick<HistoryLogsProps, 'renderRunSource' | 'resourceId'>> {
|
|
6
|
+
appName: string;
|
|
7
|
+
envName: string;
|
|
8
|
+
pipelineId: number;
|
|
9
|
+
wfrId: number;
|
|
10
|
+
runSource: RunSourceType;
|
|
11
|
+
triggerHistory: Map<number, History>;
|
|
12
|
+
setFullScreenView: (fullscreen: boolean) => void;
|
|
13
|
+
}
|
|
14
|
+
export type DeploymentHistoryDiffDetailedProps = Pick<DeploymentConfigDiffProps, 'collapsibleNavList' | 'configList' | 'errorConfig' | 'isLoading' | 'navList' | 'hideDiffState'> & Required<Pick<DeploymentHistoryConfigDiffProps, 'setFullScreenView' | 'wfrId' | 'envName' | 'renderRunSource' | 'resourceId' | 'runSource'>> & {
|
|
15
|
+
pipelineDeployments: History[];
|
|
16
|
+
previousWfrId: number;
|
|
17
|
+
convertVariables: boolean;
|
|
18
|
+
setConvertVariables: Dispatch<SetStateAction<boolean>>;
|
|
19
|
+
isCompareDeploymentConfigNotAvailable?: boolean;
|
|
20
|
+
};
|
|
21
|
+
export interface DeploymentHistoryConfigDiffQueryParams {
|
|
22
|
+
compareWfrId: number;
|
|
23
|
+
}
|
|
24
|
+
export interface DeploymentHistoryConfigDiffRouteParams {
|
|
25
|
+
resourceType: EnvResourceType;
|
|
26
|
+
resourceName: string;
|
|
27
|
+
}
|
|
28
|
+
export interface DeploymentHistoryParamsType {
|
|
29
|
+
appId: string;
|
|
30
|
+
pipelineId?: string;
|
|
31
|
+
historyComponent?: string;
|
|
32
|
+
baseConfigurationId?: string;
|
|
33
|
+
historyComponentName?: string;
|
|
34
|
+
envId?: string;
|
|
35
|
+
triggerId?: string;
|
|
36
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { SelectPickerOptionType } from '@Shared/Components/SelectPicker';
|
|
2
|
+
import { History } from '../types';
|
|
3
|
+
import { DeploymentHistoryConfigDiffProps } from './types';
|
|
4
|
+
export declare const getPipelineDeployments: (triggerHistory: DeploymentHistoryConfigDiffProps["triggerHistory"]) => History[];
|
|
5
|
+
export declare const getPipelineDeploymentsWfrIds: ({ pipelineDeployments, wfrId, }: {
|
|
6
|
+
pipelineDeployments: History[];
|
|
7
|
+
} & Pick<DeploymentHistoryConfigDiffProps, "wfrId">) => {
|
|
8
|
+
currentWfrId: number;
|
|
9
|
+
previousWfrId: number;
|
|
10
|
+
};
|
|
11
|
+
export declare const getPipelineDeploymentsOptions: ({ pipelineDeployments, wfrId, renderRunSource, resourceId, runSource, }: Required<Pick<DeploymentHistoryConfigDiffProps, "renderRunSource" | "runSource" | "resourceId">> & {
|
|
12
|
+
pipelineDeployments: History[];
|
|
13
|
+
wfrId: number;
|
|
14
|
+
}) => {
|
|
15
|
+
currentDeployment: string;
|
|
16
|
+
pipelineDeploymentsOptions: SelectPickerOptionType<number>[];
|
|
17
|
+
};
|
|
18
|
+
export declare const parseDeploymentHistoryDiffSearchParams: (compareWfrId: number) => (searchParams: URLSearchParams) => {
|
|
19
|
+
compareWfrId: number;
|
|
20
|
+
};
|
|
21
|
+
export declare const isDeploymentHistoryConfigDiffNotFoundError: <T extends unknown>(res: PromiseSettledResult<T>) => boolean;
|
|
22
|
+
export declare const getDeploymentHistoryConfigDiffError: <T extends unknown>(res: PromiseSettledResult<T>) => any;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { TriggerDetailsType, TriggerOutputProps } from './types';
|
|
3
3
|
export declare const TriggerDetails: React.MemoExoticComponent<({ status, startedOn, finishedOn, triggeredBy, triggeredByEmail, ciMaterials, gitTriggers, message, podStatus, type, stage, artifact, environmentName, isJobView, workerPodName, triggerMetadata, renderDeploymentHistoryTriggerMetaText, renderTargetConfigInfo, }: TriggerDetailsType) => JSX.Element>;
|
|
4
|
-
declare const TriggerOutput: ({ fullScreenView, triggerHistory, setTriggerHistory, setFullScreenView,
|
|
4
|
+
declare const TriggerOutput: ({ fullScreenView, triggerHistory, setTriggerHistory, setFullScreenView, deploymentAppType, isBlobStorageConfigured, appReleaseTags, tagsEditable, hideImageTaggingHardDelete, fetchIdData, setFetchTriggerIdData, selectedEnvironmentName, deploymentHistoryResult, renderRunSource, renderCIListHeader, renderDeploymentApprovalInfo, processVirtualEnvironmentDeploymentData, renderVirtualHistoryArtifacts, renderDeploymentHistoryTriggerMetaText, resourceId, scrollToTop, scrollToBottom, renderTargetConfigInfo, appName, }: TriggerOutputProps) => JSX.Element;
|
|
5
5
|
export default TriggerOutput;
|
|
@@ -11,6 +11,6 @@ export * from './History.components';
|
|
|
11
11
|
export * from './utils';
|
|
12
12
|
export * from './TriggerOutput';
|
|
13
13
|
export { default as LogsRenderer } from './LogsRenderer';
|
|
14
|
-
export * from './
|
|
14
|
+
export * from './DeploymentHistoryConfigDiff';
|
|
15
15
|
export * from './CiPipelineSourceConfig';
|
|
16
16
|
export * from './StatusFilterButtonComponent';
|
|
@@ -322,14 +322,13 @@ export interface TriggerOutputProps extends RenderRunSourceType, Pick<TriggerDet
|
|
|
322
322
|
fullScreenView: boolean;
|
|
323
323
|
triggerHistory: Map<number, History>;
|
|
324
324
|
setFullScreenView: React.Dispatch<React.SetStateAction<boolean>>;
|
|
325
|
-
deploymentHistoryList: DeploymentTemplateList[];
|
|
326
|
-
setDeploymentHistoryList: React.Dispatch<React.SetStateAction<DeploymentTemplateList[]>>;
|
|
327
325
|
deploymentAppType: DeploymentAppTypes;
|
|
328
326
|
isBlobStorageConfigured: boolean;
|
|
329
327
|
appReleaseTags: string[];
|
|
330
328
|
tagsEditable: boolean;
|
|
331
329
|
hideImageTaggingHardDelete: boolean;
|
|
332
330
|
fetchIdData: FetchIdDataStatus;
|
|
331
|
+
appName: string;
|
|
333
332
|
selectedEnvironmentName?: string;
|
|
334
333
|
renderCIListHeader?: (renderCIListHeaderProps: RenderCIListHeaderProps) => JSX.Element;
|
|
335
334
|
renderDeploymentApprovalInfo?: (userApprovalMetadata: UserApprovalMetadataType) => JSX.Element;
|
|
@@ -343,7 +342,7 @@ export interface TriggerOutputProps extends RenderRunSourceType, Pick<TriggerDet
|
|
|
343
342
|
scrollToTop: ReturnType<typeof useScrollable>[1];
|
|
344
343
|
scrollToBottom: ReturnType<typeof useScrollable>[2];
|
|
345
344
|
}
|
|
346
|
-
export interface HistoryLogsProps extends Pick<TriggerOutputProps, 'scrollToTop' | 'scrollToBottom' | 'setFullScreenView' | '
|
|
345
|
+
export interface HistoryLogsProps extends Pick<TriggerOutputProps, 'scrollToTop' | 'scrollToBottom' | 'setFullScreenView' | 'deploymentAppType' | 'isBlobStorageConfigured' | 'appReleaseTags' | 'tagsEditable' | 'hideImageTaggingHardDelete' | 'selectedEnvironmentName' | 'processVirtualEnvironmentDeploymentData' | 'renderDeploymentApprovalInfo' | 'renderCIListHeader' | 'renderVirtualHistoryArtifacts' | 'fullScreenView' | 'appName' | 'triggerHistory'> {
|
|
347
346
|
triggerDetails: History;
|
|
348
347
|
loading: boolean;
|
|
349
348
|
userApprovalMetadata: UserApprovalMetadataType;
|
|
@@ -393,7 +392,7 @@ export interface DeploymentTemplateHistoryType {
|
|
|
393
392
|
isUnpublished?: boolean;
|
|
394
393
|
isDeleteDraft?: boolean;
|
|
395
394
|
rootClassName?: string;
|
|
396
|
-
|
|
395
|
+
codeEditorKey?: React.Key;
|
|
397
396
|
sortingConfig?: {
|
|
398
397
|
sortBy: string;
|
|
399
398
|
sortOrder: SortingOrder;
|
|
@@ -1,2 +1,7 @@
|
|
|
1
1
|
import { CollapseProps } from './types';
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Collapse component for smoothly expanding or collapsing its content.
|
|
4
|
+
* Dynamically calculates the content height and applies smooth transitions.
|
|
5
|
+
* It also supports a callback when the transition ends.
|
|
6
|
+
*/
|
|
7
|
+
export declare const Collapse: ({ expand, onTransitionEnd, children }: CollapseProps) => JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { DeploymentConfigDiffProps } from './DeploymentConfigDiff.types';
|
|
2
|
-
export declare const DeploymentConfigDiff: ({ isLoading, configList, collapsibleNavList, navList, goBackURL, navHeading, navHelpText, tabConfig, errorConfig, ...resProps }: DeploymentConfigDiffProps) => JSX.Element;
|
|
2
|
+
export declare const DeploymentConfigDiff: ({ isLoading, configList, collapsibleNavList, navList, goBackURL, navHeading, navHelpText, isNavHelpTextShowingError, tabConfig, errorConfig, showDetailedDiffState, hideDiffState, renderedInDrawer, ...resProps }: DeploymentConfigDiffProps) => JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { FunctionComponent, SVGProps } from 'react';
|
|
2
|
+
import { DeploymentConfigDiffState } from './DeploymentConfigDiff.types';
|
|
3
|
+
export declare const diffStateTextMap: Record<DeploymentConfigDiffState, string>;
|
|
4
|
+
export declare const diffStateIconMap: Record<DeploymentConfigDiffState, FunctionComponent<SVGProps<SVGSVGElement>>>;
|
|
5
|
+
export declare const diffStateTooltipTextMap: Record<DeploymentConfigDiffState, string>;
|
|
6
|
+
export declare const diffStateTextColorMap: Record<DeploymentConfigDiffState, `c${string}`>;
|
|
@@ -5,6 +5,12 @@ import { DeploymentHistoryDetail } from '../CICDHistory';
|
|
|
5
5
|
import { CollapsibleListConfig, CollapsibleListItem } from '../CollapsibleList';
|
|
6
6
|
import { SelectPickerProps } from '../SelectPicker';
|
|
7
7
|
import { CollapseProps } from '../Collapse';
|
|
8
|
+
export declare enum DeploymentConfigDiffState {
|
|
9
|
+
NO_DIFF = "noDiff",
|
|
10
|
+
HAS_DIFF = "hasDiff",
|
|
11
|
+
ADDED = "added",
|
|
12
|
+
DELETED = "deleted"
|
|
13
|
+
}
|
|
8
14
|
export interface DeploymentConfigType {
|
|
9
15
|
list: DeploymentHistoryDetail;
|
|
10
16
|
heading: React.ReactNode;
|
|
@@ -12,10 +18,13 @@ export interface DeploymentConfigType {
|
|
|
12
18
|
export interface DeploymentConfigListItem {
|
|
13
19
|
id: string;
|
|
14
20
|
title: string;
|
|
21
|
+
name?: string;
|
|
22
|
+
pathType: EnvResourceType;
|
|
15
23
|
primaryConfig: DeploymentConfigType;
|
|
16
24
|
secondaryConfig: DeploymentConfigType;
|
|
17
|
-
|
|
18
|
-
|
|
25
|
+
diffState: DeploymentConfigDiffState;
|
|
26
|
+
singleView?: boolean;
|
|
27
|
+
groupHeader?: string;
|
|
19
28
|
}
|
|
20
29
|
export type DeploymentConfigDiffSelectPickerProps = {
|
|
21
30
|
type: 'string';
|
|
@@ -30,7 +39,7 @@ export type DeploymentConfigDiffSelectPickerProps = {
|
|
|
30
39
|
};
|
|
31
40
|
export interface DeploymentConfigDiffNavigationItem extends Pick<CollapsibleListItem, 'href' | 'title' | 'onClick'> {
|
|
32
41
|
Icon?: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
|
|
33
|
-
|
|
42
|
+
diffState: DeploymentConfigListItem['diffState'];
|
|
34
43
|
}
|
|
35
44
|
export interface DeploymentConfigDiffNavigationCollapsibleItem extends Pick<CollapsibleListConfig, 'id' | 'header' | 'noItemsText'> {
|
|
36
45
|
items: DeploymentConfigDiffNavigationItem[];
|
|
@@ -40,14 +49,19 @@ export interface DeploymentConfigDiffProps {
|
|
|
40
49
|
errorConfig?: {
|
|
41
50
|
error: boolean;
|
|
42
51
|
code: number;
|
|
52
|
+
message?: string;
|
|
53
|
+
redirectURL?: string;
|
|
43
54
|
reload: () => void;
|
|
44
55
|
};
|
|
45
56
|
configList: DeploymentConfigListItem[];
|
|
57
|
+
showDetailedDiffState?: boolean;
|
|
58
|
+
hideDiffState?: boolean;
|
|
46
59
|
headerText?: string;
|
|
47
60
|
scrollIntoViewId?: string;
|
|
48
61
|
selectorsConfig: {
|
|
49
62
|
primaryConfig: DeploymentConfigDiffSelectPickerProps[];
|
|
50
63
|
secondaryConfig: DeploymentConfigDiffSelectPickerProps[];
|
|
64
|
+
hideDivider?: boolean;
|
|
51
65
|
};
|
|
52
66
|
sortingConfig?: {
|
|
53
67
|
sortBy: string;
|
|
@@ -59,34 +73,39 @@ export interface DeploymentConfigDiffProps {
|
|
|
59
73
|
goBackURL?: string;
|
|
60
74
|
navHeading: string;
|
|
61
75
|
navHelpText?: string;
|
|
76
|
+
isNavHelpTextShowingError?: boolean;
|
|
62
77
|
tabConfig?: {
|
|
63
78
|
tabs: string[];
|
|
64
79
|
activeTab: string;
|
|
65
80
|
onClick: (tab: string) => void;
|
|
66
81
|
};
|
|
82
|
+
scopeVariablesConfig?: {
|
|
83
|
+
convertVariables: boolean;
|
|
84
|
+
onConvertVariablesClick: () => void;
|
|
85
|
+
};
|
|
86
|
+
renderedInDrawer?: boolean;
|
|
67
87
|
}
|
|
68
|
-
export interface DeploymentConfigDiffNavigationProps extends Pick<DeploymentConfigDiffProps, 'isLoading' | 'navList' | 'collapsibleNavList' | 'goBackURL' | 'navHeading' | 'navHelpText' | 'tabConfig' | 'errorConfig'> {
|
|
88
|
+
export interface DeploymentConfigDiffNavigationProps extends Pick<DeploymentConfigDiffProps, 'isLoading' | 'navList' | 'collapsibleNavList' | 'goBackURL' | 'navHeading' | 'navHelpText' | 'tabConfig' | 'errorConfig' | 'isNavHelpTextShowingError' | 'showDetailedDiffState' | 'hideDiffState'> {
|
|
69
89
|
}
|
|
70
|
-
export interface DeploymentConfigDiffMainProps extends Pick<DeploymentConfigDiffProps, 'isLoading' | 'errorConfig' | 'headerText' | 'configList' | 'scrollIntoViewId' | 'selectorsConfig' | 'sortingConfig'> {
|
|
90
|
+
export interface DeploymentConfigDiffMainProps extends Pick<DeploymentConfigDiffProps, 'isLoading' | 'errorConfig' | 'headerText' | 'configList' | 'scrollIntoViewId' | 'selectorsConfig' | 'sortingConfig' | 'scopeVariablesConfig' | 'showDetailedDiffState' | 'hideDiffState'> {
|
|
71
91
|
}
|
|
72
|
-
export
|
|
92
|
+
export type DeploymentConfigDiffAccordionProps = Pick<CollapseProps, 'onTransitionEnd'> & Pick<DeploymentConfigDiffProps, 'showDetailedDiffState' | 'hideDiffState'> & {
|
|
73
93
|
id: string;
|
|
74
94
|
title: string;
|
|
75
95
|
children: React.ReactNode;
|
|
76
|
-
|
|
96
|
+
diffState: DeploymentConfigDiffState;
|
|
77
97
|
isExpanded?: boolean;
|
|
78
98
|
onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
79
|
-
}
|
|
99
|
+
};
|
|
80
100
|
export type DiffHeadingDataType<DeploymentTemplate> = DeploymentTemplate extends true ? DeploymentTemplateDTO : ConfigMapSecretDataConfigDatumDTO;
|
|
81
101
|
export type AppEnvDeploymentConfigListParams<IsManifestView> = (IsManifestView extends true ? {
|
|
82
102
|
currentList: ManifestTemplateDTO;
|
|
83
103
|
compareList: ManifestTemplateDTO;
|
|
84
|
-
sortOrder?: never;
|
|
85
104
|
} : {
|
|
86
105
|
currentList: AppEnvDeploymentConfigDTO;
|
|
87
106
|
compareList: AppEnvDeploymentConfigDTO;
|
|
88
|
-
sortOrder?: SortingOrder;
|
|
89
107
|
}) & {
|
|
90
108
|
getNavItemHref: (resourceType: EnvResourceType, resourceName: string) => string;
|
|
91
109
|
isManifestView?: IsManifestView;
|
|
110
|
+
convertVariables?: boolean;
|
|
92
111
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { DeploymentConfigDiffProps, AppEnvDeploymentConfigListParams } from '..';
|
|
2
|
-
import { ConfigMapSecretDataConfigDatumDTO, TemplateListDTO } from '../../Services/app.types';
|
|
2
|
+
import { ConfigMapSecretDataConfigDatumDTO, DeploymentTemplateDTO, TemplateListDTO } from '../../Services/app.types';
|
|
3
|
+
export declare const getDeploymentTemplateData: (data: DeploymentTemplateDTO) => any;
|
|
3
4
|
/**
|
|
4
5
|
* Retrieves the draft data from the given configuration data object.
|
|
5
6
|
*
|
|
@@ -27,7 +28,7 @@ export declare const mergeConfigDataArraysByName: (primaryArray: ConfigMapSecret
|
|
|
27
28
|
*
|
|
28
29
|
* @returns An object containing the combined deployment configuration list, a collapsible navigation list, and a navigation list.
|
|
29
30
|
*/
|
|
30
|
-
export declare const getAppEnvDeploymentConfigList: <ManifestView extends boolean = false>({ currentList, compareList, getNavItemHref, isManifestView,
|
|
31
|
+
export declare const getAppEnvDeploymentConfigList: <ManifestView extends boolean = false>({ currentList, compareList, getNavItemHref, isManifestView, convertVariables, }: AppEnvDeploymentConfigListParams<ManifestView>) => {
|
|
31
32
|
configList: DeploymentConfigDiffProps["configList"];
|
|
32
33
|
navList: DeploymentConfigDiffProps["navList"];
|
|
33
34
|
collapsibleNavList: DeploymentConfigDiffProps["collapsibleNavList"];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { DeploymentConfigDiffAccordionProps } from './DeploymentConfigDiff.types';
|
|
2
|
-
export declare const DeploymentConfigDiffAccordion:
|
|
2
|
+
export declare const DeploymentConfigDiffAccordion: ({ diffState, showDetailedDiffState, hideDiffState, children, title, id, isExpanded, onClick, onTransitionEnd, }: DeploymentConfigDiffAccordionProps) => JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { DeploymentConfigDiffMainProps } from './DeploymentConfigDiff.types';
|
|
2
|
-
export declare const DeploymentConfigDiffMain: ({ isLoading, errorConfig, headerText, configList, selectorsConfig, sortingConfig, scrollIntoViewId, }: DeploymentConfigDiffMainProps) => JSX.Element;
|
|
2
|
+
export declare const DeploymentConfigDiffMain: ({ isLoading, errorConfig, headerText, configList, selectorsConfig, sortingConfig, scrollIntoViewId, scopeVariablesConfig, showDetailedDiffState, hideDiffState, }: DeploymentConfigDiffMainProps) => JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { DeploymentConfigDiffNavigationProps } from './DeploymentConfigDiff.types';
|
|
2
|
-
export declare const DeploymentConfigDiffNavigation: ({ isLoading, collapsibleNavList, navList, goBackURL, navHeading, navHelpText, tabConfig, errorConfig, }: DeploymentConfigDiffNavigationProps) => JSX.Element;
|
|
2
|
+
export declare const DeploymentConfigDiffNavigation: ({ isLoading, collapsibleNavList, navList, goBackURL, navHeading, navHelpText, isNavHelpTextShowingError, tabConfig, errorConfig, showDetailedDiffState, hideDiffState, }: DeploymentConfigDiffNavigationProps) => JSX.Element;
|
|
@@ -4,11 +4,12 @@ import { ComponentSizeType } from '../../constants';
|
|
|
4
4
|
import { MutableRefObject, ReactElement, ReactNode } from 'react';
|
|
5
5
|
import { GroupBase, GroupHeadingProps, Props as ReactSelectProps, SelectInstance } from 'react-select';
|
|
6
6
|
import { CreatableProps } from 'react-select/creatable';
|
|
7
|
+
import { TooltipProps } from '@Common/Tooltip/types';
|
|
7
8
|
export interface SelectPickerOptionType<OptionValue = string | number> extends OptionType<OptionValue, ReactNode> {
|
|
8
9
|
/**
|
|
9
10
|
* Description to be displayed for the option
|
|
10
11
|
*/
|
|
11
|
-
description?:
|
|
12
|
+
description?: ReactNode;
|
|
12
13
|
/**
|
|
13
14
|
* Icon at the start of the option
|
|
14
15
|
*/
|
|
@@ -17,6 +18,10 @@ export interface SelectPickerOptionType<OptionValue = string | number> extends O
|
|
|
17
18
|
* Icon at the end of the option
|
|
18
19
|
*/
|
|
19
20
|
endIcon?: ReactElement;
|
|
21
|
+
/**
|
|
22
|
+
* Props passed to show the tippy on option
|
|
23
|
+
*/
|
|
24
|
+
tooltipProps?: Omit<TooltipProps, 'alwaysShowTippyOnHover' | 'showOnTruncate' | 'shortcutKeyCombo'> | (Omit<TooltipProps, 'alwaysShowTippyOnHover' | 'showOnTruncate' | 'content'> & Required<Pick<TooltipProps, 'shortcutKeyCombo'>>);
|
|
20
25
|
}
|
|
21
26
|
type SelectProps<OptionValue, IsMulti extends boolean> = ReactSelectProps<SelectPickerOptionType<OptionValue>, IsMulti, GroupBase<SelectPickerOptionType<OptionValue>>>;
|
|
22
27
|
declare module 'react-select/base' {
|
package/dist/Shared/Helpers.d.ts
CHANGED
|
@@ -50,4 +50,17 @@ export declare const getIsManualApprovalSpecific: (userApprovalConfig?: Pick<Use
|
|
|
50
50
|
*/
|
|
51
51
|
export declare const getHandleOpenURL: (url: string) => () => void;
|
|
52
52
|
export declare const getDefaultValueFromType: (value: unknown) => {};
|
|
53
|
+
/**
|
|
54
|
+
* Groups an array of objects by a specified key.
|
|
55
|
+
*
|
|
56
|
+
* This function takes an array of objects and a key, and groups the objects in the array
|
|
57
|
+
* based on the value of the specified key. If an object does not have the specified key,
|
|
58
|
+
* it will be grouped under the `'UNGROUPED'` key.
|
|
59
|
+
*
|
|
60
|
+
* @param array - The array of objects to be grouped.
|
|
61
|
+
* @param key - The key of the object used to group the array.
|
|
62
|
+
* @returns An object where the keys are the unique values of the specified key in the array,
|
|
63
|
+
* and the values are arrays of objects that share the same key value.
|
|
64
|
+
*/
|
|
65
|
+
export declare const groupArrayByObjectKey: <T extends Record<string, any>, K extends keyof T>(array: T[], key: K) => Record<string, T[]>;
|
|
53
66
|
export {};
|
|
@@ -5,4 +5,7 @@ export declare const getCITriggerInfo: (params: GetCITriggerInfoParamsType) => P
|
|
|
5
5
|
* The only difference between this and getCITriggerInfo is it doesn't have env and trigger related meta info
|
|
6
6
|
*/
|
|
7
7
|
export declare const getArtifactInfo: (params: Pick<GetCITriggerInfoParamsType, "ciArtifactId">) => Promise<CIMaterialInfoType>;
|
|
8
|
-
export declare const getAppEnvDeploymentConfig: (params
|
|
8
|
+
export declare const getAppEnvDeploymentConfig: ({ params, signal, }: {
|
|
9
|
+
params: AppEnvDeploymentConfigPayloadType;
|
|
10
|
+
signal?: AbortSignal;
|
|
11
|
+
}) => Promise<ResponseType<AppEnvDeploymentConfigDTO>>;
|
|
@@ -125,6 +125,7 @@ export interface DraftMetadataDTO {
|
|
|
125
125
|
draftId: number;
|
|
126
126
|
draftVersionId: number;
|
|
127
127
|
draftState: DraftState;
|
|
128
|
+
draftResolvedValue: string;
|
|
128
129
|
approvers: string[];
|
|
129
130
|
canApprove: boolean;
|
|
130
131
|
commentsCount: number;
|
|
@@ -174,26 +175,40 @@ export interface ConfigMapSecretDataType {
|
|
|
174
175
|
export declare enum ConfigResourceType {
|
|
175
176
|
ConfigMap = "ConfigMap",
|
|
176
177
|
Secret = "Secret",
|
|
177
|
-
DeploymentTemplate = "Deployment Template"
|
|
178
|
+
DeploymentTemplate = "Deployment Template",
|
|
179
|
+
PipelineStrategy = "Pipeline Strategy"
|
|
178
180
|
}
|
|
179
181
|
export interface DeploymentTemplateDTO {
|
|
180
182
|
resourceType: ConfigResourceType.DeploymentTemplate;
|
|
181
|
-
data:
|
|
182
|
-
[key: string]: any;
|
|
183
|
-
};
|
|
183
|
+
data: Record<string, any>;
|
|
184
184
|
deploymentDraftData: ConfigMapSecretDataType | null;
|
|
185
|
+
variableSnapshot: {
|
|
186
|
+
'Deployment Template': Record<string, string>;
|
|
187
|
+
};
|
|
188
|
+
templateVersion: string;
|
|
189
|
+
isAppMetricsEnabled?: true;
|
|
190
|
+
resolvedValue: Record<string, any>;
|
|
185
191
|
}
|
|
186
192
|
export interface ConfigMapSecretDataDTO {
|
|
187
193
|
resourceType: Extract<ConfigResourceType, ConfigResourceType.ConfigMap | ConfigResourceType.Secret>;
|
|
188
194
|
data: ConfigMapSecretDataType;
|
|
195
|
+
variableSnapshot: Record<string, Record<string, string>>;
|
|
196
|
+
resolvedValue: string;
|
|
197
|
+
}
|
|
198
|
+
export interface PipelineConfigDataDTO {
|
|
199
|
+
resourceType: ConfigResourceType.PipelineStrategy;
|
|
200
|
+
data: Record<string, any>;
|
|
201
|
+
pipelineTriggerType: string;
|
|
202
|
+
Strategy: string;
|
|
189
203
|
}
|
|
190
204
|
export interface AppEnvDeploymentConfigDTO {
|
|
191
205
|
deploymentTemplate: DeploymentTemplateDTO | null;
|
|
192
206
|
configMapData: ConfigMapSecretDataDTO | null;
|
|
193
207
|
secretsData: ConfigMapSecretDataDTO | null;
|
|
208
|
+
pipelineConfigData?: PipelineConfigDataDTO;
|
|
194
209
|
isAppAdmin: boolean;
|
|
195
210
|
}
|
|
196
|
-
export
|
|
211
|
+
export type AppEnvDeploymentConfigPayloadType = {
|
|
197
212
|
appName: string;
|
|
198
213
|
envName: string;
|
|
199
214
|
configType: AppEnvDeploymentConfigType;
|
|
@@ -202,7 +217,14 @@ export interface AppEnvDeploymentConfigPayloadType {
|
|
|
202
217
|
resourceType?: ConfigResourceType;
|
|
203
218
|
resourceId?: number;
|
|
204
219
|
resourceName?: string;
|
|
205
|
-
|
|
220
|
+
configArea?: 'AppConfiguration';
|
|
221
|
+
} | {
|
|
222
|
+
appName: string;
|
|
223
|
+
envName: string;
|
|
224
|
+
pipelineId: number;
|
|
225
|
+
configArea: 'CdRollback' | 'DeploymentHistory';
|
|
226
|
+
wfrId: number;
|
|
227
|
+
};
|
|
206
228
|
export declare enum TemplateListType {
|
|
207
229
|
DefaultVersions = 1,
|
|
208
230
|
PublishedOnEnvironments = 2,
|
|
@@ -220,11 +242,13 @@ export interface TemplateListDTO {
|
|
|
220
242
|
finishedOn?: string;
|
|
221
243
|
status?: string;
|
|
222
244
|
pipelineId?: number;
|
|
245
|
+
wfrId?: number;
|
|
223
246
|
}
|
|
224
247
|
export declare enum EnvResourceType {
|
|
225
248
|
ConfigMap = "configmap",
|
|
226
249
|
Secret = "secrets",
|
|
227
250
|
DeploymentTemplate = "deployment-template",
|
|
228
|
-
Manifest = "manifest"
|
|
251
|
+
Manifest = "manifest",
|
|
252
|
+
PipelineStrategy = "pipeline-strategy"
|
|
229
253
|
}
|
|
230
254
|
export {};
|