@devtron-labs/devtron-fe-common-lib 1.13.0-pre-5 → 1.13.0-pre-6

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.
Files changed (38) hide show
  1. package/dist/{@code-editor-Cnnz8WKW.js → @code-editor-DDIbDgoG.js} +8728 -8338
  2. package/dist/{@common-rjsf-BGYrN0PH.js → @common-rjsf-AMVnhZkY.js} +1 -1
  3. package/dist/Common/Helper.d.ts +1 -0
  4. package/dist/Shared/Components/AppStatusModal/AppStatusBody.d.ts +1 -1
  5. package/dist/Shared/Components/AppStatusModal/AppStatusModal.component.d.ts +1 -1
  6. package/dist/Shared/Components/AppStatusModal/AppStatusModalTabList.d.ts +3 -0
  7. package/dist/Shared/Components/AppStatusModal/index.d.ts +1 -0
  8. package/dist/Shared/Components/AppStatusModal/service.d.ts +4 -3
  9. package/dist/Shared/Components/AppStatusModal/types.d.ts +52 -6
  10. package/dist/Shared/Components/AppStatusModal/utils.d.ts +5 -2
  11. package/dist/Shared/Components/CICDHistory/DeploymentStatusBreakdown.d.ts +1 -1
  12. package/dist/Shared/Components/CICDHistory/DeploymentStatusDetailRow.d.ts +1 -1
  13. package/dist/Shared/Components/CICDHistory/LogStageAccordion.d.ts +1 -1
  14. package/dist/Shared/Components/CICDHistory/service.d.ts +3 -0
  15. package/dist/Shared/Components/CICDHistory/types.d.ts +11 -71
  16. package/dist/Shared/Components/CICDHistory/utils.d.ts +3 -2
  17. package/dist/Shared/Components/DeploymentStatusBreakdown/constants.d.ts +10 -0
  18. package/dist/Shared/Components/DeploymentStatusBreakdown/index.d.ts +3 -0
  19. package/dist/Shared/Components/DeploymentStatusBreakdown/types.d.ts +22 -0
  20. package/dist/Shared/Components/DeploymentStatusBreakdown/utils.d.ts +20 -0
  21. package/dist/Shared/Components/TabGroup/TabGroup.helpers.d.ts +1 -1
  22. package/dist/Shared/Components/TabGroup/TabGroup.types.d.ts +33 -7
  23. package/dist/Shared/Components/TargetPlatforms/TargetPlatformListTooltip.d.ts +1 -1
  24. package/dist/Shared/Components/TargetPlatforms/types.d.ts +1 -2
  25. package/dist/Shared/Components/index.d.ts +1 -0
  26. package/dist/Shared/Helpers.d.ts +2 -2
  27. package/dist/Shared/constants.d.ts +2 -22
  28. package/dist/Shared/types.d.ts +100 -2
  29. package/dist/assets/@code-editor.css +1 -1
  30. package/dist/assets/ic-celebration.77350694.svg +238 -0
  31. package/dist/assets/{ic-disconnect.26bad827.svg → ic-disconnect.2ad261fc.svg} +1 -1
  32. package/dist/assets/ic-man-on-rocket.7f67e914.svg +94 -0
  33. package/dist/index.js +886 -871
  34. package/package.json +1 -1
  35. package/dist/Shared/Components/CICDHistory/ErrorInfoStatusBar.d.ts +0 -2
  36. package/dist/assets/ic-check-grey.f556e371.svg +0 -21
  37. package/dist/assets/ic-disconnected.551d6161.svg +0 -29
  38. package/dist/assets/ic-timeout-red.5eda1010.svg +0 -21
@@ -1,7 +1,7 @@
1
1
  import { j as n, au as y, aw as k, av as W } from "./@vendor-D9q4wrnL.js";
2
2
  import V, { forwardRef as J, useMemo as P } from "react";
3
3
  import K, { getDefaultRegistry as q } from "@rjsf/core";
4
- import { T as F, j as N, c as v, b as S, a as Y, i as z, d as w, e as E, S as G } from "./@code-editor-Cnnz8WKW.js";
4
+ import { T as F, j as N, c as v, b as S, a as Y, i as z, d as w, e as E, S as G } from "./@code-editor-DDIbDgoG.js";
5
5
  import Q, { components as D } from "react-select";
6
6
  import { ReactComponent as X } from "./assets/ic-chevron-down.fc70d7a7.svg";
7
7
  import { getUiOptions as B, getTemplate as $, getSubmitButtonOptions as Z, ADDITIONAL_PROPERTY_FLAG as L, errorId as ee, englishStringTranslator as te, TranslatableString as ne, titleId as re, canExpand as se, deepEquals as ae } from "@rjsf/utils";
@@ -147,4 +147,5 @@ export declare const getGoLangFormattedDateWithTimezone: (dateFormat: string) =>
147
147
  export declare const getHashedValue: (value: string) => Promise<string | null>;
148
148
  export declare const getTTLInHumanReadableFormat: (ttl: number) => string;
149
149
  export declare const getAIAnalyticsEvents: (context: string, appType?: AppType) => string;
150
+ export declare const findRight: <T>(arr: T[], predicate: (item: T) => boolean) => T | null;
150
151
  export {};
@@ -1,2 +1,2 @@
1
1
  import { AppStatusBodyProps } from './types';
2
- export declare const AppStatusBody: ({ appDetails, type, handleShowConfigDriftModal, debugWithAIButton: ExplainWithAIButton, }: AppStatusBodyProps) => JSX.Element;
2
+ export declare const AppStatusBody: ({ appDetails, type, handleShowConfigDriftModal, deploymentStatusDetailsBreakdownData, selectedTab, debugWithAIButton: ExplainWithAIButton, }: AppStatusBodyProps) => JSX.Element;
@@ -1,3 +1,3 @@
1
1
  import { AppStatusModalProps } from './types';
2
- declare const AppStatusModal: ({ titleSegments, handleClose, type, appDetails: appDetailsProp, isConfigDriftEnabled, configDriftModal: ConfigDriftModal, appId, envId, debugWithAIButton, }: AppStatusModalProps) => JSX.Element;
2
+ declare const AppStatusModal: ({ titleSegments, handleClose, type, appDetails: appDetailsProp, processVirtualEnvironmentDeploymentData, updateDeploymentStatusDetailsBreakdownData, isConfigDriftEnabled, configDriftModal: ConfigDriftModal, appId, envId, initialTab, debugWithAIButton, }: AppStatusModalProps) => JSX.Element;
3
3
  export default AppStatusModal;
@@ -0,0 +1,3 @@
1
+ import { AppStatusModalTabListProps } from './types';
2
+ declare const AppStatusModalTabList: ({ handleSelectTab, appDetails, type, selectedTab, deploymentStatusDetailsBreakdownData, }: AppStatusModalTabListProps) => JSX.Element;
3
+ export default AppStatusModalTabList;
@@ -1,2 +1,3 @@
1
1
  export { default as AppStatusContent } from './AppStatusContent';
2
2
  export { default as AppStatusModal } from './AppStatusModal.component';
3
+ export { AppStatusModalTabType } from './types';
@@ -1,3 +1,4 @@
1
- import { APIOptions } from '../../../Common/Types';
2
- import { AppDetails } from '../../types';
3
- export declare const getAppDetails: (appId: number, envId: number, abortControllerRef: APIOptions["abortControllerRef"]) => Promise<AppDetails>;
1
+ import { AppDetails, DeploymentStatusDetailsBreakdownDataType } from '../../types';
2
+ import { GetAppDetailsParamsType, GetDeploymentStatusWithTimelineParamsType } from './types';
3
+ export declare const getAppDetails: ({ appId, envId, abortControllerRef, }: GetAppDetailsParamsType) => Promise<AppDetails>;
4
+ export declare const getDeploymentStatusWithTimeline: ({ abortControllerRef, appId, envId, showTimeline, virtualEnvironmentConfig, isHelmApp, }: GetDeploymentStatusWithTimelineParamsType) => Promise<DeploymentStatusDetailsBreakdownDataType>;
@@ -1,14 +1,16 @@
1
- import { FunctionComponent } from 'react';
2
- import { AppDetails, ConfigDriftModalProps, IntelligenceConfig } from '../../types';
1
+ import { FunctionComponent, PropsWithChildren, ReactNode } from 'react';
2
+ import { APIOptions } from '../../../Common/Types';
3
+ import { AppDetails, ConfigDriftModalProps, DeploymentStatusDetailsBreakdownDataType, DeploymentStatusDetailsType, IntelligenceConfig } from '../../types';
4
+ export declare enum AppStatusModalTabType {
5
+ APP_STATUS = "appStatus",
6
+ DEPLOYMENT_STATUS = "deploymentStatus"
7
+ }
3
8
  export type AppStatusModalProps = {
4
9
  titleSegments: string[];
5
10
  handleClose: () => void;
6
- /**
7
- * If given would not poll for app details and resource tree, Polling for gitops timeline would still be done
8
- */
9
- appDetails?: AppDetails;
10
11
  isConfigDriftEnabled: boolean;
11
12
  configDriftModal: FunctionComponent<ConfigDriftModalProps>;
13
+ processVirtualEnvironmentDeploymentData: (data?: DeploymentStatusDetailsType) => DeploymentStatusDetailsBreakdownDataType;
12
14
  debugWithAIButton: FunctionComponent<{
13
15
  intelligenceConfig: IntelligenceConfig;
14
16
  }>;
@@ -16,13 +18,21 @@ export type AppStatusModalProps = {
16
18
  type: 'release';
17
19
  appId: number;
18
20
  envId: number;
21
+ appDetails?: never;
22
+ initialTab?: never;
23
+ updateDeploymentStatusDetailsBreakdownData?: never;
19
24
  } | {
20
25
  type: 'devtron-app' | 'other-apps' | 'stack-manager';
26
+ appDetails: AppDetails;
27
+ initialTab: AppStatusModalTabType;
28
+ updateDeploymentStatusDetailsBreakdownData: (data: DeploymentStatusDetailsBreakdownDataType) => void;
21
29
  appId?: never;
22
30
  envId?: never;
23
31
  });
24
32
  export interface AppStatusBodyProps extends Required<Pick<AppStatusModalProps, 'appDetails' | 'type' | 'debugWithAIButton'>> {
25
33
  handleShowConfigDriftModal: () => void;
34
+ selectedTab: AppStatusModalTabType;
35
+ deploymentStatusDetailsBreakdownData: DeploymentStatusDetailsBreakdownDataType;
26
36
  }
27
37
  export interface AppStatusContentProps extends Required<Pick<AppStatusBodyProps, 'appDetails'>>, Partial<Pick<AppStatusBodyProps, 'handleShowConfigDriftModal'>> {
28
38
  /**
@@ -36,3 +46,39 @@ export interface AppStatusContentProps extends Required<Pick<AppStatusBodyProps,
36
46
  }
37
47
  export interface GetFilteredFlattenedNodesFromAppDetailsParamsType extends Pick<AppStatusContentProps, 'appDetails' | 'filterHealthyNodes'> {
38
48
  }
49
+ /**
50
+ * Params for getAppDetails which is called in case of release [i.e, devtron apps]
51
+ */
52
+ export interface GetAppDetailsParamsType extends Pick<APIOptions, 'abortControllerRef'> {
53
+ appId: number;
54
+ envId: number;
55
+ }
56
+ export type GetDeploymentStatusWithTimelineParamsType = Pick<APIOptions, 'abortControllerRef'> & {
57
+ /**
58
+ * Incase of helm apps this is installed app id
59
+ */
60
+ appId: number;
61
+ envId: number;
62
+ showTimeline: boolean;
63
+ virtualEnvironmentConfig?: {
64
+ processVirtualEnvironmentDeploymentData: AppStatusModalProps['processVirtualEnvironmentDeploymentData'];
65
+ wfrId: AppDetails['resourceTree']['wfrId'];
66
+ };
67
+ isHelmApp?: boolean;
68
+ };
69
+ export interface AppStatusModalTabListProps extends Pick<AppStatusModalProps, 'appDetails' | 'type'> {
70
+ handleSelectTab: (updatedTab: AppStatusModalTabType) => void;
71
+ selectedTab: AppStatusModalTabType;
72
+ deploymentStatusDetailsBreakdownData: DeploymentStatusDetailsBreakdownDataType;
73
+ }
74
+ export interface StatusHeadingContainerProps extends PropsWithChildren<Pick<AppStatusBodyProps, 'type'>> {
75
+ appId: number;
76
+ envId?: number;
77
+ actionItem?: ReactNode;
78
+ }
79
+ export interface InfoCardItemProps {
80
+ heading: string;
81
+ value: ReactNode;
82
+ isLast?: boolean;
83
+ alignCenter?: boolean;
84
+ }
@@ -1,5 +1,8 @@
1
- import { AppDetails, Node } from '../../types';
2
- import { GetFilteredFlattenedNodesFromAppDetailsParamsType as GetFlattenedNodesFromAppDetailsParamsType } from './types';
1
+ import { GenericEmptyStateType } from '../../../Common/Types';
2
+ import { AppDetails, DeploymentStatusDetailsBreakdownDataType, Node } from '../../types';
3
+ import { AppStatusModalProps, GetFilteredFlattenedNodesFromAppDetailsParamsType as GetFlattenedNodesFromAppDetailsParamsType } from './types';
3
4
  export declare const getAppStatusMessageFromAppDetails: (appDetails: AppDetails) => string;
4
5
  export declare const getFlattenedNodesFromAppDetails: ({ appDetails, filterHealthyNodes, }: GetFlattenedNodesFromAppDetailsParamsType) => Node[];
5
6
  export declare const getResourceKey: (nodeDetails: Node) => string;
7
+ export declare const getShowDeploymentStatusModal: ({ type, appDetails, }: Pick<AppStatusModalProps, "type" | "appDetails">) => boolean;
8
+ export declare const getEmptyViewImageFromHelmDeploymentStatus: (status: DeploymentStatusDetailsBreakdownDataType["deploymentStatus"]) => GenericEmptyStateType["image"];
@@ -1,3 +1,3 @@
1
1
  import { DeploymentStatusDetailBreakdownType } from './types';
2
- declare const DeploymentStatusDetailBreakdown: ({ deploymentStatusDetailsBreakdownData, isVirtualEnvironment, }: DeploymentStatusDetailBreakdownType) => JSX.Element;
2
+ declare const DeploymentStatusDetailBreakdown: ({ deploymentStatusDetailsBreakdownData, isVirtualEnvironment, appDetails, rootClassName, }: DeploymentStatusDetailBreakdownType) => JSX.Element;
3
3
  export default DeploymentStatusDetailBreakdown;
@@ -1,2 +1,2 @@
1
1
  import { DeploymentStatusDetailRowType } from './types';
2
- export declare const DeploymentStatusDetailRow: ({ type, hideVerticalConnector, deploymentDetailedData, }: DeploymentStatusDetailRowType) => JSX.Element;
2
+ export declare const DeploymentStatusDetailRow: ({ type, hideVerticalConnector, deploymentDetailedData, appDetails, }: DeploymentStatusDetailRowType) => JSX.Element;
@@ -1,3 +1,3 @@
1
1
  import { LogStageAccordionProps } from './types';
2
- declare const LogStageAccordion: ({ stage, isOpen, logs, endTime, startTime, status, handleStageClose, handleStageOpen, stageIndex, isLoading, fullScreenView, searchIndex, targetPlatforms, }: LogStageAccordionProps) => JSX.Element;
2
+ declare const LogStageAccordion: ({ stage, isOpen, logs, endTime, startTime, status, handleStageClose, handleStageOpen, stageIndex, isLoading, fullScreenView, searchIndex, targetPlatforms, logsRendererRef, }: LogStageAccordionProps) => JSX.Element;
3
3
  export default LogStageAccordion;
@@ -10,6 +10,9 @@ export declare function getTriggerDetails({ appId, envId, pipelineId, triggerId,
10
10
  export declare const getTagDetails: (params: any) => Promise<ResponseType<any>>;
11
11
  export declare const cancelCiTrigger: (params: any, isForceAbort: any) => Promise<ResponseType<any>>;
12
12
  export declare const cancelPrePostCdTrigger: (pipelineId: any, workflowRunner: any, isForceAbort: boolean) => Promise<ResponseType<any>>;
13
+ /**
14
+ * @deprecated
15
+ */
13
16
  export declare function getDeploymentStatusDetail(appId: string, envId: string, showTimeline: boolean, triggerId?: string, isHelmApps?: boolean, installedAppVersionHistoryId?: number): Promise<DeploymentStatusDetailsResponse>;
14
17
  export declare function getManualSync(params: {
15
18
  appId: string;
@@ -1,8 +1,8 @@
1
- import { CSSProperties, ReactElement, ReactNode } from 'react';
1
+ import { CSSProperties, MutableRefObject, ReactElement, ReactNode } from 'react';
2
2
  import { SupportedKeyboardKeysType } from '@Common/Hooks/UseRegisterShortcut/types';
3
3
  import { DeploymentAppTypes, FilterConditionsListType, ImageComment, OptionType, PaginationProps, PromotionApprovalMetadataType, ReleaseTag, ResponseType, UserApprovalMetadataType, useScrollable } from '../../../Common';
4
4
  import { DeploymentStageType } from '../../constants';
5
- import { AggregationKeys, GitTriggers, Node, NodeType, ResourceKindType, ResourceVersionType, TargetPlatformsDTO } from '../../types';
5
+ import { AggregationKeys, AppDetails, DeploymentStatusDetailsBreakdownDataType, DeploymentStatusDetailsType, DeploymentStatusTimelineType, GitTriggers, Node, NodeType, ResourceKindType, ResourceVersionType, TargetPlatformsDTO } from '../../types';
6
6
  import { TargetPlatformBadgeListProps } from '../TargetPlatforms';
7
7
  export declare enum HistoryComponentType {
8
8
  CI = "CI",
@@ -296,66 +296,7 @@ export type FinishedType = {
296
296
  status?: never;
297
297
  finishedOn?: never;
298
298
  });
299
- export interface SyncStageResourceDetail {
300
- id: number;
301
- cdWorkflowRunnerId: number;
302
- resourceGroup: string;
303
- resourceKind: string;
304
- resourceName: string;
305
- resourcePhase: string;
306
- resourceStatus: string;
307
- statusMessage: string;
308
- }
309
- export interface DeploymentStatusDetailsTimelineType {
310
- id: number;
311
- cdWorkflowRunnerId: number;
312
- status: string;
313
- statusDetail: string;
314
- statusTime: string;
315
- resourceDetails?: SyncStageResourceDetail[];
316
- }
317
- export interface DeploymentStatusDetailsType extends Pick<History, 'isDeploymentWithoutApproval'> {
318
- deploymentFinishedOn: string;
319
- deploymentStartedOn: string;
320
- triggeredBy: string;
321
- statusFetchCount: number;
322
- statusLastFetchedAt: string;
323
- timelines: DeploymentStatusDetailsTimelineType[];
324
- wfrStatus?: string;
325
- }
326
- export interface DeploymentStatusDetailsResponse extends ResponseType {
327
- result?: DeploymentStatusDetailsType;
328
- }
329
- interface DeploymentStatusDetailRow {
330
- icon: string;
331
- displayText: ReactNode;
332
- displaySubText: string;
333
- time: string;
334
- resourceDetails?: any;
335
- isCollapsed?: boolean;
336
- kubeList?: {
337
- icon: any;
338
- message: string;
339
- }[];
340
- timelineStatus?: string;
341
- }
342
- export interface DeploymentStatusDetailsBreakdownDataType {
343
- deploymentStatus: string;
344
- deploymentStatusText: string;
345
- deploymentTriggerTime: string;
346
- deploymentEndTime: string;
347
- deploymentError: string;
348
- triggeredBy: string;
349
- nonDeploymentError: string;
350
- deploymentStatusBreakdown: {
351
- DEPLOYMENT_INITIATED: DeploymentStatusDetailRow;
352
- GIT_COMMIT?: DeploymentStatusDetailRow;
353
- ARGOCD_SYNC?: DeploymentStatusDetailRow;
354
- KUBECTL_APPLY?: DeploymentStatusDetailRow;
355
- APP_HEALTH?: DeploymentStatusDetailRow;
356
- HELM_PACKAGE_GENERATED?: DeploymentStatusDetailRow;
357
- };
358
- }
299
+ export type DeploymentStatusDetailsResponse = ResponseType<DeploymentStatusDetailsType>;
359
300
  export interface DeploymentDetailStepsType extends Pick<History, 'isDeploymentWithoutApproval'> {
360
301
  deploymentStatus?: string;
361
302
  deploymentAppType?: DeploymentAppTypes;
@@ -456,19 +397,17 @@ export interface LogsRendererType extends Pick<HistoryLogsProps, 'fullScreenView
456
397
  export interface DeploymentStatusDetailBreakdownType {
457
398
  deploymentStatusDetailsBreakdownData: DeploymentStatusDetailsBreakdownDataType;
458
399
  isVirtualEnvironment?: boolean;
400
+ /**
401
+ * Won't be available if coming directly to deployment history from url
402
+ */
403
+ appDetails: AppDetails | null;
404
+ rootClassName?: string;
459
405
  }
460
- export interface DeploymentStatusDetailRowType {
461
- type: string;
406
+ export interface DeploymentStatusDetailRowType extends Pick<DeploymentStatusDetailBreakdownType, 'appDetails'> {
407
+ type: DeploymentStatusTimelineType;
462
408
  hideVerticalConnector?: boolean;
463
409
  deploymentDetailedData: DeploymentStatusDetailsBreakdownDataType;
464
410
  }
465
- export interface ErrorInfoStatusBarType {
466
- nonDeploymentError: string;
467
- type: string;
468
- errorMessage: string;
469
- hideVerticalConnector?: boolean;
470
- hideErrorIcon?: boolean;
471
- }
472
411
  export interface DeploymentConfigurationsRes extends ResponseType {
473
412
  result?: DeploymentTemplateList[];
474
413
  }
@@ -746,6 +685,7 @@ export interface LogStageAccordionProps extends StageDetailType, Pick<LogsRender
746
685
  */
747
686
  isLoading: boolean;
748
687
  searchIndex: string;
688
+ logsRendererRef: MutableRefObject<HTMLDivElement>;
749
689
  }
750
690
  export interface CreateMarkupReturnType {
751
691
  __html: string;
@@ -1,12 +1,11 @@
1
1
  import { ReactElement } from 'react';
2
2
  import { DeploymentAppTypes } from '../../../Common/Types';
3
- import { Node } from '../../types';
3
+ import { DeploymentStatusBreakdownItemType, Node } from '../../types';
4
4
  import { TabGroupProps } from '../TabGroup';
5
5
  import { DeploymentHistoryResultObject, ExecutionInfoType, History, NodeFilters, NodeStatus, StageStatusType, TriggerHistoryFilterCriteriaProps, TriggerHistoryFilterCriteriaType, WorkflowExecutionStagesMapDTO, WorkflowStageStatusType } from './types';
6
6
  export declare const getTriggerHistoryFilterCriteria: ({ appId, envId, releaseId, showCurrentReleaseDeployments, }: TriggerHistoryFilterCriteriaProps) => TriggerHistoryFilterCriteriaType;
7
7
  export declare const getParsedTriggerHistory: (result: any) => DeploymentHistoryResultObject;
8
8
  export declare const buildHoverHtmlForWebhook: (eventName: any, condition: any, selectors: any) => JSX.Element;
9
- export declare const renderIcon: (iconState: string) => JSX.Element;
10
9
  export declare const getStageStatusIcon: (status: StageStatusType) => JSX.Element;
11
10
  export declare const getLogSearchIndex: ({ stageIndex, lineNumberInsideStage, }: Record<"stageIndex" | "lineNumberInsideStage", number>) => string;
12
11
  export declare const sanitizeWorkflowExecutionStages: (workflowExecutionStages: WorkflowExecutionStagesMapDTO["workflowExecutionStages"]) => ExecutionInfoType | null;
@@ -38,4 +37,6 @@ export declare const getStatusFilters: ({ allNodeCount, missingNodeCount, failed
38
37
  };
39
38
  export declare const getAppStatusIcon: (status: NodeStatus | NodeFilters, hideMessage?: boolean) => JSX.Element;
40
39
  export declare const getTriggerStatusIcon: (status: string) => string;
40
+ export declare const renderDeploymentTimelineIcon: (iconState: DeploymentStatusBreakdownItemType["icon"]) => JSX.Element;
41
+ export declare const getDeploymentTimelineBGColorFromIcon: (icon: DeploymentStatusBreakdownItemType["icon"]) => string;
41
42
  export declare const getTriggerOutputTabs: (triggerDetails: History, deploymentAppType: DeploymentAppTypes) => TabGroupProps["tabs"];
@@ -0,0 +1,10 @@
1
+ import { DEPLOYMENT_STATUS } from '../../constants';
2
+ import { DeploymentPhaseType, DeploymentStatusTimelineType } from '../../types';
3
+ import { WorkflowRunnerStatusDTO } from './types';
4
+ export declare const DEPLOYMENT_STATUS_TEXT_MAP: Readonly<Record<(typeof DEPLOYMENT_STATUS)[keyof typeof DEPLOYMENT_STATUS], string>>;
5
+ export declare const WFR_STATUS_DTO_TO_DEPLOYMENT_STATUS_MAP: Readonly<Record<WorkflowRunnerStatusDTO, (typeof DEPLOYMENT_STATUS)[keyof typeof DEPLOYMENT_STATUS]>>;
6
+ export declare const PROGRESSING_DEPLOYMENT_STATUS: Readonly<(typeof DEPLOYMENT_STATUS)[keyof typeof DEPLOYMENT_STATUS][]>;
7
+ export declare const SUCCESSFUL_DEPLOYMENT_STATUS: typeof PROGRESSING_DEPLOYMENT_STATUS;
8
+ export declare const FAILED_DEPLOYMENT_STATUS: typeof PROGRESSING_DEPLOYMENT_STATUS;
9
+ export declare const PHYSICAL_ENV_DEPLOYMENT_TIMELINE_ORDER: Readonly<DeploymentStatusTimelineType[]>;
10
+ export declare const DEPLOYMENT_PHASES: Readonly<DeploymentPhaseType[]>;
@@ -0,0 +1,3 @@
1
+ export * from './constants';
2
+ export * from './types';
3
+ export * from './utils';
@@ -0,0 +1,22 @@
1
+ import { DEPLOYMENT_STATUS } from '../../constants';
2
+ import { DeploymentStatusBreakdownItemType, DeploymentStatusDetailsType, DeploymentStatusTimelineType } from '../../types';
3
+ export declare enum WorkflowRunnerStatusDTO {
4
+ PROGRESSING = "Progressing",
5
+ ABORTED = "Aborted",
6
+ FAILED = "Failed",
7
+ SUCCEEDED = "Succeeded",
8
+ TIMED_OUT = "TimedOut",
9
+ UNABLE_TO_FETCH = "UnableToFetch",
10
+ STARTING = "Starting",
11
+ QUEUED = "Queued",
12
+ INITIATING = "Initiating",
13
+ HEALTHY = "Healthy",
14
+ DEGRADED = "Degraded"
15
+ }
16
+ export interface ProcessUnableToFetchOrTimedOutStatusType {
17
+ timelineData: DeploymentStatusBreakdownItemType;
18
+ timelineStatusType: DeploymentStatusTimelineType;
19
+ deploymentStatus: typeof DEPLOYMENT_STATUS.UNABLE_TO_FETCH | typeof DEPLOYMENT_STATUS.TIMED_OUT;
20
+ statusLastFetchedAt: DeploymentStatusDetailsType['statusLastFetchedAt'] | null;
21
+ statusFetchCount: DeploymentStatusDetailsType['statusFetchCount'] | null;
22
+ }
@@ -0,0 +1,20 @@
1
+ import { DeploymentStatusDetailsBreakdownDataType, DeploymentStatusDetailsType } from '../../types';
2
+ /**
3
+ * @description
4
+ * This function processes the deployment status details data and returns a breakdown of the deployment status.
5
+ * Cases it handles:
6
+ * 1. If timelines are not present, say the case of helm deployment, we will parse the wfrStatus and put the status and basic deployment info [triggeredBy, deploymentStartedOn, deploymentFinishedOn] into the breakdown data and return it.
7
+ * 2. In case of gitops:
8
+ * - There are five timelines in chronological order:
9
+ * - Deployment Initiated
10
+ * - Git commit
11
+ * - ArgoCD Sync
12
+ * - Kubectl Apply
13
+ * - App Health
14
+ * - Basic flow is we traverse the timelines in order, if find the last status for that specific timeline from response by traversing the timelines in reverse order.
15
+ * - If element is found, we will parse the status and set the icon, display text, time, etc. for that timeline and set the next timeline to inprogress.
16
+ * - If element is not found, we will parse on basis of factors like:
17
+ * - If this timeline is not inprogress and deploymentStatus is progressing, we will set the current timeline to waiting.
18
+ * - In similar fashion based on the deploymentStatus we will set the icon and display text for the timeline.
19
+ */
20
+ export declare const processDeploymentStatusDetailsData: (data?: DeploymentStatusDetailsType) => DeploymentStatusDetailsBreakdownDataType;
@@ -1,5 +1,5 @@
1
1
  import { TabGroupProps, TabProps } from './TabGroup.types';
2
- export declare const getTabIcon: ({ icon, showError, showWarning, className, size, active, }: Pick<TabProps, "showError" | "showWarning" | "icon" | "active"> & Pick<TabGroupProps, "size"> & {
2
+ export declare const getTabIcon: ({ icon, showError, showWarning, className, size, active, iconElement, }: Pick<TabProps, "showError" | "showWarning" | "icon" | "active" | "iconElement"> & Pick<TabGroupProps, "size"> & {
3
3
  className: string;
4
4
  }) => JSX.Element;
5
5
  export declare const getTabBadge: (badge: TabProps["badge"], className: string) => JSX.Element;
@@ -65,6 +65,38 @@ type TabTooltipProps = {
65
65
  shouldWrapTooltip?: never;
66
66
  tooltipProps?: never;
67
67
  };
68
+ /**
69
+ * Represents the properties for defining an icon in a tab group.
70
+ * This type allows for three configurations:
71
+ *
72
+ * 1. **Icon as a functional component or string**:
73
+ * - Use the `icon` property to specify either a functional component that renders an SVG or a string representing the name of the icon.
74
+ * - The `iconElement` property must not be provided in this case.
75
+ *
76
+ * 2. **Icon as a JSX element**:
77
+ * - Use the `iconElement` property to specify a JSX element representing the icon.
78
+ * - The `icon` property must not be provided in this case.
79
+ *
80
+ * 3. **No icon**:
81
+ * - Neither `icon` nor `iconElement` is provided, resulting in no icon being displayed.
82
+ *
83
+ */
84
+ type TabGroupIconProp = {
85
+ /**
86
+ * A functional component rendering an SVG or a string representing the icon name. Mutually exclusive with `iconElement`.
87
+ */
88
+ icon: React.FunctionComponent<React.SVGProps<SVGSVGElement>> | IconName;
89
+ iconElement?: never;
90
+ } | {
91
+ icon?: never;
92
+ /**
93
+ * A JSX element representing the icon. Mutually exclusive with `icon`.
94
+ */
95
+ iconElement: JSX.Element;
96
+ } | {
97
+ icon?: never;
98
+ iconElement?: never;
99
+ };
68
100
  export type TabProps = {
69
101
  /**
70
102
  * Unique identifier for the tab.
@@ -79,12 +111,6 @@ export type TabProps = {
79
111
  * @note - If passed as a `string[]`, it will be rendered with a bullet in-between strings.
80
112
  */
81
113
  description?: string | string[];
82
- /**
83
- * Icon to be displayed in the tab.
84
- * This can either be a functional component that renders a SVG
85
- * or a string representing the name of the icon to be rendered by the Icon component.
86
- */
87
- icon?: React.FunctionComponent<React.SVGProps<SVGSVGElement>> | IconName;
88
114
  /**
89
115
  * Badge number to be displayed on the tab, typically for notifications.
90
116
  */
@@ -107,7 +133,7 @@ export type TabProps = {
107
133
  * Disables the tab, preventing interaction and indicating an inactive state.
108
134
  */
109
135
  disabled?: boolean;
110
- } & ConditionalTabType & TabTooltipProps;
136
+ } & ConditionalTabType & TabTooltipProps & TabGroupIconProp;
111
137
  export interface TabGroupProps {
112
138
  /**
113
139
  * Array of tabs to be rendered.
@@ -1,3 +1,3 @@
1
1
  import { TargetPlatformListTooltipProps } from './types';
2
- declare const TargetPlatformListTooltip: ({ targetPlatforms, children }: TargetPlatformListTooltipProps) => JSX.Element;
2
+ declare const TargetPlatformListTooltip: ({ targetPlatforms, children, appendTo }: TargetPlatformListTooltipProps) => JSX.Element;
3
3
  export default TargetPlatformListTooltip;
@@ -2,6 +2,5 @@ import { TooltipProps } from '@Common/Tooltip/types';
2
2
  import { TargetPlatformsDTO } from '../../types';
3
3
  export interface TargetPlatformBadgeListProps extends Required<Pick<TargetPlatformsDTO, 'targetPlatforms'>> {
4
4
  }
5
- export interface TargetPlatformListTooltipProps extends Pick<TargetPlatformsDTO, 'targetPlatforms'> {
6
- children: TooltipProps['children'];
5
+ export interface TargetPlatformListTooltipProps extends Pick<TargetPlatformsDTO, 'targetPlatforms'>, Pick<TooltipProps, 'children' | 'appendTo'> {
7
6
  }
@@ -24,6 +24,7 @@ export * from './CountrySelect';
24
24
  export * from './CustomInput';
25
25
  export * from './DatePicker';
26
26
  export * from './DeploymentConfigDiff';
27
+ export * from './DeploymentStatusBreakdown';
27
28
  export * from './DetectBottom';
28
29
  export * from './DiffViewer';
29
30
  export * from './DynamicDataTable';
@@ -4,7 +4,7 @@ import { StrictRJSFSchema } from '@rjsf/utils';
4
4
  import { Pair } from 'yaml';
5
5
  import { MaterialHistoryType } from '@Shared/Services/app.types';
6
6
  import { ApprovalConfigDataType, MaterialInfo, SortingOrder, UserApprovalConfigType, UserApprovalInfo } from '../Common';
7
- import { AggregatedNodes, DeploymentStatusDetailsBreakdownDataType, DeploymentStatusDetailsType, PodMetadatum } from './Components';
7
+ import { AggregatedNodes, PodMetadatum } from './Components';
8
8
  import { BorderConfigType, GetTimeDifferenceParamsType, GitTriggers, IntersectionChangeHandler, IntersectionOptions, PreventOutsideFocusProps, TargetPlatformItemDTO, TargetPlatformsDTO, WebhookEventNameType } from './types';
9
9
  interface HighlightSearchTextProps {
10
10
  /**
@@ -36,7 +36,6 @@ export declare const isNullOrUndefined: (value: unknown) => boolean;
36
36
  export declare const handleDisableSubmitOnEnter: (event: React.KeyboardEvent<HTMLFormElement>) => void;
37
37
  export declare const getKeyToBooleanMapFromArray: <T extends string | number>(arr?: T[]) => Record<T, boolean>;
38
38
  export declare const renderValidInputButtonTippy: (children: ReactElement) => JSX.Element;
39
- export declare const processDeploymentStatusDetailsData: (data?: DeploymentStatusDetailsType) => DeploymentStatusDetailsBreakdownDataType;
40
39
  export declare function aggregateNodes(nodes: any[], podMetadata: PodMetadatum[]): AggregatedNodes;
41
40
  export declare const decode: (data: any, isEncoded?: boolean) => {};
42
41
  export declare const isTimeStringAvailable: (time: string) => boolean;
@@ -101,4 +100,5 @@ export declare const deriveBorderRadiusAndBorderClassFromConfig: ({ borderConfig
101
100
  }) => string;
102
101
  export declare const getClassNameForStickyHeaderWithShadow: (isStuck: boolean, topClassName?: string) => string;
103
102
  export declare const clearCookieOnLogout: () => void;
103
+ export declare const getAppDetailsURL: (appId: number | string, envId?: number | string) => string;
104
104
  export {};
@@ -51,28 +51,6 @@ export declare enum EnvironmentTypeEnum {
51
51
  production = "Production",
52
52
  nonProduction = "Non-Production"
53
53
  }
54
- export declare enum TIMELINE_STATUS {
55
- DEPLOYMENT_INITIATED = "DEPLOYMENT_INITIATED",
56
- GIT_COMMIT = "GIT_COMMIT",
57
- GIT_COMMIT_FAILED = "GIT_COMMIT_FAILED",
58
- ARGOCD_SYNC = "ARGOCD_SYNC",
59
- ARGOCD_SYNC_FAILED = "ARGOCD_SYNC_FAILED",
60
- KUBECTL_APPLY = "KUBECTL_APPLY",
61
- KUBECTL_APPLY_STARTED = "KUBECTL_APPLY_STARTED",
62
- KUBECTL_APPLY_SYNCED = "KUBECTL_APPLY_SYNCED",
63
- HEALTHY = "HEALTHY",
64
- APP_HEALTH = "APP_HEALTH",
65
- DEPLOYMENT_FAILED = "FAILED",
66
- FETCH_TIMED_OUT = "TIMED_OUT",
67
- UNABLE_TO_FETCH_STATUS = "UNABLE_TO_FETCH_STATUS",
68
- DEGRADED = "DEGRADED",
69
- DEPLOYMENT_SUPERSEDED = "DEPLOYMENT_SUPERSEDED",
70
- ABORTED = "ABORTED",
71
- INPROGRESS = "INPROGRESS",
72
- HELM_PACKAGE_GENERATED = "HELM_PACKAGE_GENERATED",
73
- HELM_MANIFEST_PUSHED_TO_HELM_REPO = "HELM_MANIFEST_PUSHED_TO_HELM_REPO",
74
- HELM_MANIFEST_PUSHED_TO_HELM_REPO_FAILED = "HELM_MANIFEST_PUSHED_TO_HELM_REPO_FAILED"
75
- }
76
54
  /**
77
55
  * Constants for NO MATCHING result
78
56
  */
@@ -449,3 +427,5 @@ export declare const VARIANT_TO_BG_MAP: Record<InfoBlockProps['variant'], string
449
427
  export declare const VARIANT_TO_ICON_COLOR_MAP: Record<InfoBlockProps['variant'], IconBaseColorType>;
450
428
  export declare const VARIANT_TO_BORDER_MAP: Record<InfoBlockProps['variant'], string>;
451
429
  export declare const DEPLOYMENT_STAGE_TO_NODE_MAP: Readonly<Record<DeploymentStageType, DeploymentNodeType>>;
430
+ export declare const APP_DETAILS_FALLBACK_POLLING_INTERVAL = 30000;
431
+ export declare const PROGRESSING_DEPLOYMENT_STATUS_POLLING_INTERVAL = 10000;