@devtron-labs/devtron-fe-common-lib 1.16.0-pre-3 → 1.16.0-pre-5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  import { j as n, at as b, av as k, au as W } from "./@vendor-DbxoIktR.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, S as Y, i as z, a as w, d as A, e as G } from "./@code-editor-VS3CYIf_.js";
4
+ import { T as F, j as N, c as v, b as S, S as Y, i as z, a as w, d as A, e as G } from "./@code-editor-BM7Pz0Tl.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 $, getTemplate as B, getSubmitButtonOptions as Z, ADDITIONAL_PROPERTY_FLAG as L, errorId as ee, englishStringTranslator as te, TranslatableString as ne, titleId as re, canExpand as ae, deepEquals as se } from "@rjsf/utils";
@@ -550,10 +550,10 @@ export interface CommonNodeAttr extends Pick<MandatoryPluginBaseStateType, 'isTr
550
550
  }
551
551
  export declare enum DeploymentAppTypes {
552
552
  HELM = "helm",
553
- GITOPS = "argo_cd",
553
+ ARGO = "argo_cd",
554
554
  MANIFEST_DOWNLOAD = "manifest_download",
555
555
  MANIFEST_PUSH = "manifest_push",
556
- FLUX = "flux"
556
+ FLUX = "flux_cd"
557
557
  }
558
558
  export interface VulnerabilityType {
559
559
  name: string;
@@ -1,4 +1,4 @@
1
1
  import { AppDetails, DeploymentStatusDetailsBreakdownDataType } from '../../types';
2
2
  import { GetAppDetailsParamsType, GetDeploymentStatusWithTimelineParamsType } from './types';
3
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>;
4
+ export declare const getDeploymentStatusWithTimeline: ({ abortControllerRef, appId, envId, showTimeline, virtualEnvironmentConfig, isHelmApp, deploymentAppType, }: GetDeploymentStatusWithTimelineParamsType) => Promise<DeploymentStatusDetailsBreakdownDataType>;
@@ -1,5 +1,5 @@
1
1
  import { FunctionComponent, PropsWithChildren, ReactNode } from 'react';
2
- import { APIOptions } from '../../../Common/Types';
2
+ import { APIOptions, DeploymentAppTypes } from '../../../Common/Types';
3
3
  import { AppDetails, ConfigDriftModalProps, DeploymentStatusDetailsBreakdownDataType, DeploymentStatusDetailsType, IntelligenceConfig } from '../../types';
4
4
  export declare enum AppStatusModalTabType {
5
5
  APP_STATUS = "appStatus",
@@ -65,6 +65,7 @@ export type GetDeploymentStatusWithTimelineParamsType = Pick<APIOptions, 'abortC
65
65
  wfrId: AppDetails['resourceTree']['wfrId'];
66
66
  };
67
67
  isHelmApp?: boolean;
68
+ deploymentAppType: DeploymentAppTypes;
68
69
  };
69
70
  export interface AppStatusModalTabListProps extends Pick<AppStatusModalProps, 'appDetails' | 'type'> {
70
71
  handleSelectTab: (updatedTab: AppStatusModalTabType) => void;
@@ -1,3 +1,3 @@
1
1
  import { DeploymentStatusDetailBreakdownType } from './types';
2
- declare const DeploymentStatusDetailBreakdown: ({ deploymentStatusDetailsBreakdownData, isVirtualEnvironment, appDetails, rootClassName, }: DeploymentStatusDetailBreakdownType) => JSX.Element;
2
+ declare const DeploymentStatusDetailBreakdown: ({ deploymentStatusDetailsBreakdownData, isVirtualEnvironment, appDetails, rootClassName, deploymentAppType, }: DeploymentStatusDetailBreakdownType) => JSX.Element;
3
3
  export default DeploymentStatusDetailBreakdown;
@@ -402,6 +402,7 @@ export interface DeploymentStatusDetailBreakdownType {
402
402
  */
403
403
  appDetails: AppDetails | null;
404
404
  rootClassName?: string;
405
+ deploymentAppType: DeploymentAppTypes;
405
406
  }
406
407
  export interface DeploymentStatusDetailRowType extends Pick<DeploymentStatusDetailBreakdownType, 'appDetails'> {
407
408
  type: DeploymentStatusTimelineType;
@@ -6,5 +6,6 @@ export declare const WFR_STATUS_DTO_TO_DEPLOYMENT_STATUS_MAP: Readonly<Record<Wo
6
6
  export declare const PROGRESSING_DEPLOYMENT_STATUS: Readonly<(typeof DEPLOYMENT_STATUS)[keyof typeof DEPLOYMENT_STATUS][]>;
7
7
  export declare const SUCCESSFUL_DEPLOYMENT_STATUS: typeof PROGRESSING_DEPLOYMENT_STATUS;
8
8
  export declare const FAILED_DEPLOYMENT_STATUS: typeof PROGRESSING_DEPLOYMENT_STATUS;
9
- export declare const PHYSICAL_ENV_DEPLOYMENT_TIMELINE_ORDER: Readonly<DeploymentStatusTimelineType[]>;
9
+ export declare const PHYSICAL_ENV_DEPLOYMENT_TIMELINE_ORDER_ARGO: Readonly<DeploymentStatusTimelineType[]>;
10
+ export declare const PHYSICAL_ENV_DEPLOYMENT_TIMELINE_ORDER_FLUX: Readonly<DeploymentStatusTimelineType[]>;
10
11
  export declare const DEPLOYMENT_PHASES: Readonly<DeploymentPhaseType[]>;
@@ -1,20 +1,25 @@
1
+ import { DeploymentAppTypes } from '../../../Common/Types';
1
2
  import { DeploymentStatusDetailsBreakdownDataType, DeploymentStatusDetailsType } from '../../types';
2
3
  /**
3
4
  * @description
4
5
  * This function processes the deployment status details data and returns a breakdown of the deployment status.
5
6
  * Cases it handles:
6
7
  * 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
+ * 2. In case of argo_cd:
8
9
  * - There are five timelines in chronological order:
9
10
  * - Deployment Initiated
10
11
  * - Git commit
11
12
  * - ArgoCD Sync
12
13
  * - Kubectl Apply
13
14
  * - App Health
15
+ * In case of flux_cd
16
+ * - Deployment Initiated
17
+ * - Git commit
18
+ * - App Health
14
19
  * - 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
20
  * - 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
21
  * - If element is not found, we will parse on basis of factors like:
17
22
  * - If this timeline is not inprogress and deploymentStatus is progressing, we will set the current timeline to waiting.
18
23
  * - In similar fashion based on the deploymentStatus we will set the icon and display text for the timeline.
19
24
  */
20
- export declare const processDeploymentStatusDetailsData: (data?: DeploymentStatusDetailsType) => DeploymentStatusDetailsBreakdownDataType;
25
+ export declare const processDeploymentStatusDetailsData: (deploymentAppType: DeploymentAppTypes, data?: DeploymentStatusDetailsType) => DeploymentStatusDetailsBreakdownDataType;
@@ -1,3 +1,4 @@
1
- export declare const FALLBACK_SENTINEL_HEIGHT = "1px";
1
+ export declare const SENTINEL_HEIGHT_BUFFER = 2;
2
+ export declare const FALLBACK_SENTINEL_HEIGHT = "2px";
2
3
  export declare const OBSERVER_THRESHOLD = 1;
3
- export declare const OBSERVER_ROOT_MARGIN = "0px";
4
+ export declare const OBSERVER_ROOT_MARGIN = "1px";
@@ -1044,6 +1044,7 @@ export interface DeploymentStatusDetailsType {
1044
1044
  timelines: DeploymentStatusDetailsTimelineType[];
1045
1045
  wfrStatus?: WorkflowRunnerStatusDTO;
1046
1046
  isDeploymentWithoutApproval: boolean;
1047
+ deploymentAppType: DeploymentAppTypes;
1047
1048
  }
1048
1049
  export type DeploymentStatusTimelineType = TIMELINE_STATUS.DEPLOYMENT_INITIATED | TIMELINE_STATUS.GIT_COMMIT | TIMELINE_STATUS.ARGOCD_SYNC | TIMELINE_STATUS.KUBECTL_APPLY | TIMELINE_STATUS.APP_HEALTH | TIMELINE_STATUS.HELM_PACKAGE_GENERATED | TIMELINE_STATUS.HELM_MANIFEST_PUSHED_TO_HELM_REPO;
1049
1050
  export type DeploymentStatusBreakdownItemIconType = 'success' | 'failed' | 'unknown' | 'inprogress' | 'unreachable' | 'loading' | 'disconnect' | 'timed_out' | '';
@@ -1088,6 +1089,7 @@ export interface DeploymentStatusDetailsBreakdownDataType {
1088
1089
  deploymentErrorMessage: string;
1089
1090
  nextTimelineToProcess: DeploymentStatusTimelineType;
1090
1091
  } | null;
1092
+ deploymentAppType: DeploymentAppTypes;
1091
1093
  }
1092
1094
  export interface IntelligenceConfig {
1093
1095
  clusterId: number;
package/dist/index.d.ts CHANGED
@@ -149,9 +149,14 @@ export interface customEnv {
149
149
  */
150
150
  FEATURE_MANAGE_TRAFFIC_ENABLE?: boolean;
151
151
  FEATURE_INFRA_PROVISION_INFO_BLOCK_HIDE?: boolean;
152
+ /**
153
+ * If true, will add flux option to deployment types in devtron apps and devtron charts
154
+ * @default false
155
+ */
156
+ FEATURE_FLUX_DEPLOYMENTS_ENABLE?: boolean;
157
+ FEATURE_LINK_EXTERNAL_FLUX_ENABLE?: boolean;
152
158
  /**
153
159
  * If true, online/offline connectivity banner is enabled
154
- *
155
160
  * @default true
156
161
  */
157
162
  FEATURE_INTERNET_CONNECTIVITY_ENABLE?: boolean;