@devtron-labs/devtron-fe-common-lib 0.4.5-beta-2 → 0.4.5-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/Common/Constants.d.ts +0 -1
- package/dist/Common/Helper.d.ts +1 -0
- package/dist/Common/Toggle/Toggle.d.ts +2 -1
- package/dist/Shared/Components/CICDHistory/AppStatusDetailsChart.d.ts +1 -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 +35 -0
- package/dist/Shared/Components/CICDHistory/DeploymentHistoryConfigDiff/utils.d.ts +20 -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 -9
- package/dist/Shared/Components/CollapsibleList/CollapsibleList.component.d.ts +2 -2
- package/dist/Shared/Components/CollapsibleList/CollapsibleList.types.d.ts +14 -35
- 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 +27 -14
- package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiff.utils.d.ts +3 -2
- package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiffAccordion.d.ts +9 -2
- 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 +30 -7
- package/dist/Shared/types.d.ts +0 -1
- package/dist/assets/index.css +1 -1
- package/dist/{cssMode-CN95TYgQ.js → cssMode-5KKtvfPh.js} +1 -1
- package/dist/{freemarker2-nwy_s7EE.js → freemarker2-pM6g6Z46.js} +1 -1
- package/dist/{handlebars-CEORad5f.js → handlebars-1De8A9hC.js} +1 -1
- package/dist/{html-B0nP9O3c.js → html-Dok06VLR.js} +1 -1
- package/dist/{htmlMode-UFBQJhIw.js → htmlMode-wrr-ZDze.js} +1 -1
- package/dist/{index-2RgTtICn.js → index-CnovQ7IN.js} +29830 -29626
- package/dist/index.js +397 -391
- package/dist/{javascript-s7PH_J0J.js → javascript-dxn6pP0n.js} +1 -1
- package/dist/{jsonMode-CL6nID09.js → jsonMode-2o1aOJom.js} +1 -1
- package/dist/{liquid-j1IJOlsV.js → liquid-DgDQrvVP.js} +1 -1
- package/dist/{mdx-DbfBJ4HS.js → mdx-Bdqp4vZv.js} +1 -1
- package/dist/{python-DyIVyx9V.js → python-DzXkNqQq.js} +1 -1
- package/dist/{razor-aNELmX2P.js → razor-DnqYBVof.js} +1 -1
- package/dist/{tsMode-DGr8Lgtn.js → tsMode-DNkuQLZH.js} +1 -1
- package/dist/{typescript-CcnAENzc.js → typescript-DzLpc8pe.js} +1 -1
- package/dist/{xml-CPZRAf_-.js → xml-BnHfGnnn.js} +1 -1
- package/dist/{yaml-Ch_KNpHT.js → yaml-3RunJgux.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;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { AppStatusDetailsChartType } from './types';
|
|
2
|
-
declare const AppStatusDetailsChart: ({ filterRemoveHealth, showFooter
|
|
2
|
+
declare const AppStatusDetailsChart: ({ filterRemoveHealth, showFooter }: AppStatusDetailsChartType) => JSX.Element;
|
|
3
3
|
export default AppStatusDetailsChart;
|
|
@@ -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, ...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, sortBy, sortOrder, }: 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) => 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,35 @@
|
|
|
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'> & Required<Pick<DeploymentHistoryConfigDiffProps, 'setFullScreenView' | 'wfrId' | 'envName' | 'renderRunSource' | 'resourceId' | 'runSource'>> & {
|
|
15
|
+
pipelineDeployments: History[];
|
|
16
|
+
previousWfrId: number;
|
|
17
|
+
convertVariables: boolean;
|
|
18
|
+
setConvertVariables: Dispatch<SetStateAction<boolean>>;
|
|
19
|
+
};
|
|
20
|
+
export interface DeploymentHistoryConfigDiffQueryParams {
|
|
21
|
+
compareWfrId: number;
|
|
22
|
+
}
|
|
23
|
+
export interface DeploymentHistoryConfigDiffRouteParams {
|
|
24
|
+
resourceType: EnvResourceType;
|
|
25
|
+
resourceName: string;
|
|
26
|
+
}
|
|
27
|
+
export interface DeploymentHistoryParamsType {
|
|
28
|
+
appId: string;
|
|
29
|
+
pipelineId?: string;
|
|
30
|
+
historyComponent?: string;
|
|
31
|
+
baseConfigurationId?: string;
|
|
32
|
+
historyComponentName?: string;
|
|
33
|
+
envId?: string;
|
|
34
|
+
triggerId?: string;
|
|
35
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
+
};
|
|
@@ -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
|
+
sortBy?: string;
|
|
397
396
|
sortOrder?: SortingOrder;
|
|
398
397
|
}
|
|
399
398
|
export interface DeploymentHistoryDetailRes extends ResponseType {
|
|
@@ -417,8 +416,6 @@ export interface DeploymentHistorySidebarType {
|
|
|
417
416
|
export interface AppStatusDetailsChartType {
|
|
418
417
|
filterRemoveHealth?: boolean;
|
|
419
418
|
showFooter: boolean;
|
|
420
|
-
showConfigDriftInfo?: boolean;
|
|
421
|
-
onClose?: () => void;
|
|
422
419
|
}
|
|
423
420
|
export interface StatusFilterButtonType {
|
|
424
421
|
nodes: Array<Node>;
|
|
@@ -432,9 +429,6 @@ export declare enum NodeStatus {
|
|
|
432
429
|
Suspended = "suspended",
|
|
433
430
|
Unknown = "unknown"
|
|
434
431
|
}
|
|
435
|
-
export declare enum NodeFilters {
|
|
436
|
-
Drifted = "drifted"
|
|
437
|
-
}
|
|
438
432
|
type NodesMap = {
|
|
439
433
|
[key in NodeType]?: Map<string, any>;
|
|
440
434
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { CollapsibleListProps
|
|
2
|
-
export declare const CollapsibleList:
|
|
1
|
+
import { CollapsibleListProps } from './CollapsibleList.types';
|
|
2
|
+
export declare const CollapsibleList: ({ config, onCollapseBtnClick }: CollapsibleListProps) => JSX.Element;
|
|
@@ -1,30 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { TippyProps } from '@tippyjs/react';
|
|
3
|
-
interface
|
|
4
|
-
/**
|
|
5
|
-
* Is tab active ( for button tab )
|
|
6
|
-
*/
|
|
7
|
-
isActive: boolean;
|
|
8
|
-
/**
|
|
9
|
-
* The callback function to handle click events on the button.
|
|
10
|
-
*/
|
|
11
|
-
onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
12
|
-
href?: never;
|
|
13
|
-
}
|
|
14
|
-
interface NavLinkTab {
|
|
15
|
-
/**
|
|
16
|
-
* The URL of the nav link.
|
|
17
|
-
*/
|
|
18
|
-
href: string;
|
|
19
|
-
/**
|
|
20
|
-
* The callback function to handle click events on the nav link.
|
|
21
|
-
*/
|
|
22
|
-
onClick?: (e: React.MouseEvent<HTMLAnchorElement>) => void;
|
|
23
|
-
isActive?: never;
|
|
24
|
-
}
|
|
25
|
-
export type TabOptions = 'button' | 'navLink';
|
|
26
|
-
type ConditionalTabType<TabType extends TabOptions> = TabType extends 'button' ? ButtonTab : NavLinkTab;
|
|
27
|
-
export type CollapsibleListItem<TabType extends TabOptions> = ConditionalTabType<TabType> & {
|
|
3
|
+
export interface CollapsibleListItem {
|
|
28
4
|
/**
|
|
29
5
|
* The title of the list item.
|
|
30
6
|
*/
|
|
@@ -50,8 +26,16 @@ export type CollapsibleListItem<TabType extends TabOptions> = ConditionalTabType
|
|
|
50
26
|
*/
|
|
51
27
|
tooltipProps?: TippyProps;
|
|
52
28
|
};
|
|
53
|
-
|
|
54
|
-
|
|
29
|
+
/**
|
|
30
|
+
* The URL of the nav link.
|
|
31
|
+
*/
|
|
32
|
+
href?: string;
|
|
33
|
+
/**
|
|
34
|
+
* The callback function to handle click events on the nav link.
|
|
35
|
+
*/
|
|
36
|
+
onClick?: (e: React.MouseEvent<HTMLAnchorElement>) => void;
|
|
37
|
+
}
|
|
38
|
+
export interface CollapsibleListConfig {
|
|
55
39
|
/**
|
|
56
40
|
* The unique identifier for the collapsible list.
|
|
57
41
|
*/
|
|
@@ -89,21 +73,17 @@ export interface CollapsibleListConfig<TabType extends 'button' | 'navLink'> {
|
|
|
89
73
|
/**
|
|
90
74
|
* An array of items to be displayed in the collapsible list.
|
|
91
75
|
*/
|
|
92
|
-
items: CollapsibleListItem
|
|
76
|
+
items: CollapsibleListItem[];
|
|
93
77
|
/**
|
|
94
78
|
* Boolean indicating whether the list is expanded or not.
|
|
95
79
|
*/
|
|
96
80
|
isExpanded?: boolean;
|
|
97
81
|
}
|
|
98
|
-
export interface CollapsibleListProps
|
|
82
|
+
export interface CollapsibleListProps {
|
|
99
83
|
/**
|
|
100
84
|
* An array of collapsible list configurations.
|
|
101
85
|
*/
|
|
102
|
-
config: CollapsibleListConfig
|
|
103
|
-
/**
|
|
104
|
-
* Type of tab list: button or navLink
|
|
105
|
-
*/
|
|
106
|
-
tabType: TabType;
|
|
86
|
+
config: CollapsibleListConfig[];
|
|
107
87
|
/**
|
|
108
88
|
* Function to handle the collapse button click event.
|
|
109
89
|
*
|
|
@@ -113,4 +93,3 @@ export interface CollapsibleListProps<TabType extends TabOptions> {
|
|
|
113
93
|
*/
|
|
114
94
|
onCollapseBtnClick?: (id: string, e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
115
95
|
}
|
|
116
|
-
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { DeploymentConfigDiffProps } from './DeploymentConfigDiff.types';
|
|
2
|
-
export declare const DeploymentConfigDiff: ({ isLoading, configList, collapsibleNavList, navList, goBackURL, navHeading, navHelpText, tabConfig, ...resProps }: DeploymentConfigDiffProps) => JSX.Element;
|
|
2
|
+
export declare const DeploymentConfigDiff: ({ isLoading, configList, collapsibleNavList, navList, goBackURL, navHeading, navHelpText, tabConfig, showDetailedDiffState, 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}`>;
|
|
@@ -4,6 +4,12 @@ import { DeploymentHistoryDetail } from '../CICDHistory';
|
|
|
4
4
|
import { CollapsibleListConfig, CollapsibleListItem } from '../CollapsibleList';
|
|
5
5
|
import { SelectPickerProps } from '../SelectPicker';
|
|
6
6
|
import { CollapseProps } from '../Collapse';
|
|
7
|
+
export declare enum DeploymentConfigDiffState {
|
|
8
|
+
NO_DIFF = "noDiff",
|
|
9
|
+
HAS_DIFF = "hasDiff",
|
|
10
|
+
ADDED = "added",
|
|
11
|
+
DELETED = "deleted"
|
|
12
|
+
}
|
|
7
13
|
export interface DeploymentConfigType {
|
|
8
14
|
list: DeploymentHistoryDetail;
|
|
9
15
|
heading: React.ReactNode;
|
|
@@ -11,10 +17,13 @@ export interface DeploymentConfigType {
|
|
|
11
17
|
export interface DeploymentConfigListItem {
|
|
12
18
|
id: string;
|
|
13
19
|
title: string;
|
|
20
|
+
name?: string;
|
|
21
|
+
pathType: EnvResourceType;
|
|
14
22
|
primaryConfig: DeploymentConfigType;
|
|
15
23
|
secondaryConfig: DeploymentConfigType;
|
|
16
|
-
|
|
17
|
-
|
|
24
|
+
diffState: DeploymentConfigDiffState;
|
|
25
|
+
singleView?: boolean;
|
|
26
|
+
groupHeader?: string;
|
|
18
27
|
}
|
|
19
28
|
export type DeploymentConfigDiffSelectPickerProps = {
|
|
20
29
|
type: 'string';
|
|
@@ -27,12 +36,10 @@ export type DeploymentConfigDiffSelectPickerProps = {
|
|
|
27
36
|
text?: never;
|
|
28
37
|
selectPickerProps: SelectPickerProps;
|
|
29
38
|
};
|
|
30
|
-
export interface DeploymentConfigDiffNavigationItem extends Pick<CollapsibleListItem
|
|
31
|
-
|
|
32
|
-
href: string;
|
|
33
|
-
onClick: (e: React.MouseEvent<HTMLAnchorElement>) => void;
|
|
39
|
+
export interface DeploymentConfigDiffNavigationItem extends Pick<CollapsibleListItem, 'href' | 'title' | 'onClick'> {
|
|
40
|
+
diffState: DeploymentConfigListItem['diffState'];
|
|
34
41
|
}
|
|
35
|
-
export interface DeploymentConfigDiffNavigationCollapsibleItem extends Pick<CollapsibleListConfig
|
|
42
|
+
export interface DeploymentConfigDiffNavigationCollapsibleItem extends Pick<CollapsibleListConfig, 'id' | 'header' | 'noItemsText'> {
|
|
36
43
|
items: DeploymentConfigDiffNavigationItem[];
|
|
37
44
|
}
|
|
38
45
|
export interface DeploymentConfigDiffProps {
|
|
@@ -43,11 +50,13 @@ export interface DeploymentConfigDiffProps {
|
|
|
43
50
|
reload: () => void;
|
|
44
51
|
};
|
|
45
52
|
configList: DeploymentConfigListItem[];
|
|
53
|
+
showDetailedDiffState?: boolean;
|
|
46
54
|
headerText?: string;
|
|
47
55
|
scrollIntoViewId?: string;
|
|
48
56
|
selectorsConfig: {
|
|
49
57
|
primaryConfig: DeploymentConfigDiffSelectPickerProps[];
|
|
50
58
|
secondaryConfig: DeploymentConfigDiffSelectPickerProps[];
|
|
59
|
+
hideDivider?: boolean;
|
|
51
60
|
};
|
|
52
61
|
sortingConfig?: {
|
|
53
62
|
sortBy: string;
|
|
@@ -64,29 +73,33 @@ export interface DeploymentConfigDiffProps {
|
|
|
64
73
|
activeTab: string;
|
|
65
74
|
onClick: (tab: string) => void;
|
|
66
75
|
};
|
|
76
|
+
scopeVariablesConfig?: {
|
|
77
|
+
convertVariables: boolean;
|
|
78
|
+
onConvertVariablesClick: () => void;
|
|
79
|
+
};
|
|
80
|
+
renderedInDrawer?: boolean;
|
|
67
81
|
}
|
|
68
|
-
export interface DeploymentConfigDiffNavigationProps extends Pick<DeploymentConfigDiffProps, 'isLoading' | 'navList' | 'collapsibleNavList' | 'goBackURL' | 'navHeading' | 'navHelpText' | 'tabConfig'> {
|
|
82
|
+
export interface DeploymentConfigDiffNavigationProps extends Pick<DeploymentConfigDiffProps, 'isLoading' | 'navList' | 'collapsibleNavList' | 'goBackURL' | 'navHeading' | 'navHelpText' | 'tabConfig' | 'showDetailedDiffState'> {
|
|
69
83
|
}
|
|
70
|
-
export interface DeploymentConfigDiffMainProps extends Pick<DeploymentConfigDiffProps, 'isLoading' | 'errorConfig' | 'headerText' | 'configList' | 'scrollIntoViewId' | 'selectorsConfig' | 'sortingConfig'> {
|
|
84
|
+
export interface DeploymentConfigDiffMainProps extends Pick<DeploymentConfigDiffProps, 'isLoading' | 'errorConfig' | 'headerText' | 'configList' | 'scrollIntoViewId' | 'selectorsConfig' | 'sortingConfig' | 'scopeVariablesConfig' | 'showDetailedDiffState'> {
|
|
71
85
|
}
|
|
72
|
-
export
|
|
86
|
+
export type DeploymentConfigDiffAccordionProps = Pick<CollapseProps, 'onTransitionEnd'> & Pick<DeploymentConfigDiffProps, 'showDetailedDiffState'> & {
|
|
73
87
|
id: string;
|
|
74
88
|
title: string;
|
|
75
89
|
children: React.ReactNode;
|
|
76
|
-
|
|
90
|
+
diffState: DeploymentConfigDiffState;
|
|
77
91
|
isExpanded?: boolean;
|
|
78
92
|
onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
79
|
-
}
|
|
93
|
+
};
|
|
80
94
|
export type DiffHeadingDataType<DeploymentTemplate> = DeploymentTemplate extends true ? DeploymentTemplateDTO : ConfigMapSecretDataConfigDatumDTO;
|
|
81
95
|
export type AppEnvDeploymentConfigListParams<IsManifestView> = (IsManifestView extends true ? {
|
|
82
96
|
currentList: ManifestTemplateDTO;
|
|
83
97
|
compareList: ManifestTemplateDTO;
|
|
84
|
-
sortOrder?: never;
|
|
85
98
|
} : {
|
|
86
99
|
currentList: AppEnvDeploymentConfigDTO;
|
|
87
100
|
compareList: AppEnvDeploymentConfigDTO;
|
|
88
|
-
sortOrder?: SortingOrder;
|
|
89
101
|
}) & {
|
|
90
102
|
getNavItemHref: (resourceType: EnvResourceType, resourceName: string) => string;
|
|
91
103
|
isManifestView?: IsManifestView;
|
|
104
|
+
convertVariables?: boolean;
|
|
92
105
|
};
|
|
@@ -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,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const DeploymentConfigDiffAccordion: import('react').ForwardRefExoticComponent<
|
|
1
|
+
import { DeploymentConfigDiffState } from './DeploymentConfigDiff.types';
|
|
2
|
+
export declare const DeploymentConfigDiffAccordion: import('react').ForwardRefExoticComponent<Pick<import('../Collapse').CollapseProps, "onTransitionEnd"> & Pick<import('./DeploymentConfigDiff.types').DeploymentConfigDiffProps, "showDetailedDiffState"> & {
|
|
3
|
+
id: string;
|
|
4
|
+
title: string;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
diffState: DeploymentConfigDiffState;
|
|
7
|
+
isExpanded?: boolean;
|
|
8
|
+
onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
9
|
+
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -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, }: 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, }: DeploymentConfigDiffNavigationProps) => JSX.Element;
|
|
2
|
+
export declare const DeploymentConfigDiffNavigation: ({ isLoading, collapsibleNavList, navList, goBackURL, navHeading, navHelpText, tabConfig, showDetailedDiffState, }: 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>>;
|
|
@@ -114,6 +114,7 @@ export interface DraftMetadataDTO {
|
|
|
114
114
|
draftId: number;
|
|
115
115
|
draftVersionId: number;
|
|
116
116
|
draftState: number;
|
|
117
|
+
draftResolvedValue: string;
|
|
117
118
|
approvers: string[];
|
|
118
119
|
canApprove: boolean;
|
|
119
120
|
commentsCount: number;
|
|
@@ -150,26 +151,40 @@ export interface ConfigMapSecretDataType {
|
|
|
150
151
|
export declare enum ConfigResourceType {
|
|
151
152
|
ConfigMap = "ConfigMap",
|
|
152
153
|
Secret = "Secret",
|
|
153
|
-
DeploymentTemplate = "Deployment Template"
|
|
154
|
+
DeploymentTemplate = "Deployment Template",
|
|
155
|
+
PipelineStrategy = "Pipeline Strategy"
|
|
154
156
|
}
|
|
155
157
|
export interface DeploymentTemplateDTO {
|
|
156
158
|
resourceType: ConfigResourceType.DeploymentTemplate;
|
|
157
|
-
data:
|
|
158
|
-
[key: string]: any;
|
|
159
|
-
};
|
|
159
|
+
data: Record<string, any>;
|
|
160
160
|
deploymentDraftData: ConfigMapSecretDataType | null;
|
|
161
|
+
variableSnapshot: {
|
|
162
|
+
'Deployment Template': Record<string, string>;
|
|
163
|
+
};
|
|
164
|
+
templateVersion: string;
|
|
165
|
+
isAppMetricsEnabled?: true;
|
|
166
|
+
resolvedValue: Record<string, any>;
|
|
161
167
|
}
|
|
162
168
|
export interface ConfigMapSecretDataDTO {
|
|
163
169
|
resourceType: Extract<ConfigResourceType, ConfigResourceType.ConfigMap | ConfigResourceType.Secret>;
|
|
164
170
|
data: ConfigMapSecretDataType;
|
|
171
|
+
variableSnapshot: Record<string, Record<string, string>>;
|
|
172
|
+
resolvedValue: string;
|
|
173
|
+
}
|
|
174
|
+
export interface PipelineConfigDataDTO {
|
|
175
|
+
resourceType: ConfigResourceType.PipelineStrategy;
|
|
176
|
+
data: Record<string, any>;
|
|
177
|
+
pipelineTriggerType: string;
|
|
178
|
+
Strategy: string;
|
|
165
179
|
}
|
|
166
180
|
export interface AppEnvDeploymentConfigDTO {
|
|
167
181
|
deploymentTemplate: DeploymentTemplateDTO | null;
|
|
168
182
|
configMapData: ConfigMapSecretDataDTO | null;
|
|
169
183
|
secretsData: ConfigMapSecretDataDTO | null;
|
|
184
|
+
pipelineConfigData?: PipelineConfigDataDTO;
|
|
170
185
|
isAppAdmin: boolean;
|
|
171
186
|
}
|
|
172
|
-
export
|
|
187
|
+
export type AppEnvDeploymentConfigPayloadType = {
|
|
173
188
|
appName: string;
|
|
174
189
|
envName: string;
|
|
175
190
|
configType: AppEnvDeploymentConfigType;
|
|
@@ -178,7 +193,14 @@ export interface AppEnvDeploymentConfigPayloadType {
|
|
|
178
193
|
resourceType?: ConfigResourceType;
|
|
179
194
|
resourceId?: number;
|
|
180
195
|
resourceName?: string;
|
|
181
|
-
|
|
196
|
+
configArea?: 'AppConfiguration';
|
|
197
|
+
} | {
|
|
198
|
+
appName: string;
|
|
199
|
+
envName: string;
|
|
200
|
+
pipelineId: number;
|
|
201
|
+
configArea: 'CdRollback' | 'DeploymentHistory';
|
|
202
|
+
wfrId: number;
|
|
203
|
+
};
|
|
182
204
|
export declare enum TemplateListType {
|
|
183
205
|
DefaultVersions = 1,
|
|
184
206
|
PublishedOnEnvironments = 2,
|
|
@@ -212,6 +234,7 @@ export declare enum EnvResourceType {
|
|
|
212
234
|
ConfigMap = "configmap",
|
|
213
235
|
Secret = "secrets",
|
|
214
236
|
DeploymentTemplate = "deployment-template",
|
|
215
|
-
Manifest = "manifest"
|
|
237
|
+
Manifest = "manifest",
|
|
238
|
+
PipelineStrategy = "pipeline-strategy"
|
|
216
239
|
}
|
|
217
240
|
export {};
|