@devtron-labs/devtron-fe-common-lib 1.12.0-beta-3 → 1.12.0-beta-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.
Files changed (41) hide show
  1. package/dist/{@code-editor-Ck_CH0E8.js → @code-editor-Bgkd1h1Y.js} +9045 -8819
  2. package/dist/{@common-rjsf-D7qlH1s4.js → @common-rjsf-kqKDCxYD.js} +2 -2
  3. package/dist/{@framer-motion-BaOj5B1h.js → @framer-motion-B-tsB4kf.js} +1 -1
  4. package/dist/{@react-dates-CdRpENvm.js → @react-dates-DQl_saOu.js} +1 -1
  5. package/dist/{@react-select-BLSAqXV1.js → @react-select-Cq3Neli-.js} +1 -1
  6. package/dist/{@react-virtualized-sticky-tree-BLmFnJWD.js → @react-virtualized-sticky-tree-DzwGuB_x.js} +1 -1
  7. package/dist/{@vendor-SjXFleuT.js → @vendor-B47rbd8d.js} +17441 -17441
  8. package/dist/Common/Common.service.d.ts +2 -1
  9. package/dist/Common/Constants.d.ts +4 -1
  10. package/dist/Common/Drawer/index.d.ts +1 -0
  11. package/dist/Common/EmptyState/index.d.ts +2 -0
  12. package/dist/Common/Helper.d.ts +2 -0
  13. package/dist/Common/Toggle/Toggle.d.ts +4 -1
  14. package/dist/Common/Types.d.ts +15 -1
  15. package/dist/Common/index.d.ts +2 -3
  16. package/dist/Shared/Components/AppStatusModal/AppStatusBody.d.ts +2 -0
  17. package/dist/Shared/Components/AppStatusModal/AppStatusContent.d.ts +3 -0
  18. package/dist/Shared/Components/AppStatusModal/AppStatusModal.component.d.ts +3 -0
  19. package/dist/Shared/Components/AppStatusModal/constants.d.ts +4 -0
  20. package/dist/Shared/Components/AppStatusModal/index.d.ts +2 -0
  21. package/dist/Shared/Components/AppStatusModal/service.d.ts +3 -0
  22. package/dist/Shared/Components/AppStatusModal/types.d.ts +35 -0
  23. package/dist/Shared/Components/AppStatusModal/utils.d.ts +5 -0
  24. package/dist/Shared/Components/CICDHistory/constants.d.ts +1 -0
  25. package/dist/Shared/Components/CICDHistory/index.d.ts +0 -1
  26. package/dist/Shared/Components/CICDHistory/types.d.ts +0 -6
  27. package/dist/Shared/Components/Error/ErrorBar.d.ts +1 -1
  28. package/dist/Shared/Components/Error/types.d.ts +4 -0
  29. package/dist/Shared/Components/Error/utils.d.ts +1 -0
  30. package/dist/Shared/Components/Icon/Icon.d.ts +3 -0
  31. package/dist/Shared/Components/InfoIconTippy/InfoIconTippy.d.ts +1 -1
  32. package/dist/Shared/Components/index.d.ts +1 -0
  33. package/dist/Shared/types.d.ts +5 -0
  34. package/dist/assets/@code-editor.css +1 -1
  35. package/dist/assets/ic-expand-sm.a9a724f8.svg +3 -0
  36. package/dist/assets/ic-hand-pointing.aff70667.svg +4 -0
  37. package/dist/assets/ic-rocket-launch.1d407c66.svg +3 -0
  38. package/dist/index.js +827 -823
  39. package/package.json +1 -1
  40. package/dist/Shared/Components/CICDHistory/AppStatusDetailsChart.d.ts +0 -3
  41. package/dist/assets/ic-nav-rocket.433c9706.svg +0 -19
@@ -1,6 +1,6 @@
1
1
  import { MutableRefObject } from 'react';
2
2
  import { RuntimeParamsAPIResponseType, RuntimePluginVariables } from '../Shared/types';
3
- import { TeamList, ResponseType, DeploymentNodeType, CDMaterialServiceEnum, CDMaterialServiceQueryParams, CDMaterialResponseType, CDMaterialFilterQuery, EnvironmentListHelmResponse, UserApprovalMetadataType, GlobalVariableOptionType, UserRole } from './Types';
3
+ import { TeamList, ResponseType, DeploymentNodeType, CDMaterialServiceEnum, CDMaterialServiceQueryParams, CDMaterialResponseType, CDMaterialFilterQuery, EnvironmentListHelmResponse, UserApprovalMetadataType, GlobalVariableOptionType, UserRole, EnvAppsMetaDTO, GetAppsInfoForEnvProps } from './Types';
4
4
  import { ApiResourceType } from '../Pages';
5
5
  export declare const getTeamListMin: () => Promise<TeamList>;
6
6
  export declare const SourceTypeMap: {
@@ -35,3 +35,4 @@ export declare const getGlobalVariables: ({ appId, isCD, abortControllerRef, }:
35
35
  isCD?: boolean;
36
36
  abortControllerRef?: MutableRefObject<AbortController>;
37
37
  }) => Promise<GlobalVariableOptionType[]>;
38
+ export declare const getAppsInfoForEnv: ({ envId, appIds }: GetAppsInfoForEnvProps) => Promise<EnvAppsMetaDTO>;
@@ -13,6 +13,7 @@ export declare const DOCUMENTATION: {
13
13
  GLOBAL_CONFIG_BUILD_INFRA: string;
14
14
  ENTERPRISE_LICENSE: string;
15
15
  KUBE_CONFIG: string;
16
+ TENANT_INSTALLATION: string;
16
17
  };
17
18
  export declare const PATTERNS: {
18
19
  STRING: RegExp;
@@ -64,7 +65,6 @@ export declare const URLS: {
64
65
  readonly COMPARE_CLUSTERS: "/compare-clusters";
65
66
  readonly APP_CONFIG: "edit";
66
67
  readonly GLOBAL_CONFIG: "/global-config";
67
- readonly CONFIG_DRIFT: "config-drift";
68
68
  readonly GLOBAL_CONFIG_TEMPLATES_DEVTRON_APP: "/global-config/templates/devtron-apps";
69
69
  readonly GLOBAL_CONFIG_TEMPLATES_DEVTRON_APP_CREATE: "/global-config/templates/devtron-apps/create";
70
70
  readonly GLOBAL_CONFIG_TEMPLATES_DEVTRON_APP_DETAIL: "/global-config/templates/devtron-apps/detail/:appId";
@@ -111,6 +111,7 @@ export declare const ROUTES: {
111
111
  readonly ATTRIBUTES_CREATE: "attributes/create";
112
112
  readonly ATTRIBUTES_UPDATE: "attributes/update";
113
113
  readonly APP_LIST_MIN: "app/min";
114
+ readonly APP_DETAIL: "app/detail";
114
115
  readonly CLUSTER_LIST_MIN: "cluster/autocomplete";
115
116
  readonly CLUSTER_LIST_RAW: "k8s/capacity/cluster/list/raw";
116
117
  readonly PLUGIN_GLOBAL_LIST_DETAIL_V2: "plugin/global/list/detail/v2";
@@ -133,6 +134,8 @@ export declare const ROUTES: {
133
134
  readonly ENVIRONMENT_DATA: "global/environment-variables";
134
135
  readonly DASHBOARD_EVENT: "dashboard-event";
135
136
  readonly LICENSE_DATA: "license/data";
137
+ readonly ENV: "env";
138
+ readonly APP_METADATA: "app-metadata";
136
139
  };
137
140
  export declare enum KEY_VALUE {
138
141
  KEY = "key",
@@ -0,0 +1 @@
1
+ export * from './Drawer';
@@ -0,0 +1,2 @@
1
+ export { default as GenericEmptyState } from './GenericEmptyState';
2
+ export { default as GenericFilterEmptyState } from './GenericFilterEmptyState';
@@ -95,8 +95,10 @@ export declare const flatMapOfJSONPaths: (paths: string[], json: object, resultT
95
95
  export declare const applyCompareDiffOnUneditedDocument: (uneditedDocument: object, editedDocument: object) => any;
96
96
  /**
97
97
  * Returns a debounced variant of the function
98
+ * @deprecated - It should use useRef instead, pls use useDebounce
98
99
  */
99
100
  export declare const debounce: (func: any, timeout?: number) => (this: any, ...args: any[]) => void;
101
+ export declare const useDebounce: <Callback extends (...args: any[]) => void>(cb: Callback, delay: number) => (...args: Parameters<Callback>) => void;
100
102
  /**
101
103
  * Returns a capitalized string with first letter in uppercase and rest in lowercase
102
104
  */
@@ -1,4 +1,5 @@
1
- declare const Toggle: ({ selected, onSelect, color, rootClassName, disabled, dataTestId, Icon, iconClass, throttleOnChange, shouldToggleValueOnLabelClick, isLoading, ...props }: {
1
+ import { CHECKBOX_VALUE } from '../Types';
2
+ declare const Toggle: ({ selected, onSelect, color, rootClassName, disabled, dataTestId, Icon, iconClass, throttleOnChange, shouldToggleValueOnLabelClick, isLoading, value, isControlled, ...props }: {
2
3
  [x: string]: any;
3
4
  selected?: boolean;
4
5
  onSelect?: any;
@@ -11,5 +12,7 @@ declare const Toggle: ({ selected, onSelect, color, rootClassName, disabled, dat
11
12
  throttleOnChange?: boolean;
12
13
  shouldToggleValueOnLabelClick?: boolean;
13
14
  isLoading?: boolean;
15
+ value?: CHECKBOX_VALUE;
16
+ isControlled?: boolean;
14
17
  }) => JSX.Element;
15
18
  export default Toggle;
@@ -2,7 +2,7 @@ import { default as React, ReactNode, CSSProperties, ReactElement, MutableRefObj
2
2
  import { TippyProps } from '@tippyjs/react';
3
3
  import { UserGroupDTO } from '../Pages/GlobalConfigurations';
4
4
  import { ImageComment, ReleaseTag } from './ImageTags.Types';
5
- import { MandatoryPluginBaseStateType, RegistryType, RuntimePluginVariables, Severity, PolicyBlockInfo, TargetPlatformItemDTO, ButtonProps, ComponentLayoutType } from '../Shared';
5
+ import { MandatoryPluginBaseStateType, RegistryType, RuntimePluginVariables, Severity, PolicyBlockInfo, TargetPlatformItemDTO, ButtonProps, ComponentLayoutType, StatusType } from '../Shared';
6
6
  import { ACTION_STATE, DEPLOYMENT_WINDOW_TYPE, DockerConfigOverrideType, RefVariableType, SortingOrder, TaskErrorObj, VariableTypeFormat } from '.';
7
7
  /**
8
8
  * Generic response type object with support for overriding the result type
@@ -110,6 +110,7 @@ export interface InfoIconTippyProps extends Pick<TippyCustomizedProps, 'heading'
110
110
  dataTestid?: string;
111
111
  children?: TippyCustomizedProps['children'];
112
112
  iconClassName?: string;
113
+ buttonPadding?: string;
113
114
  }
114
115
  export interface GenericEmptyStateType {
115
116
  title: ReactNode;
@@ -949,4 +950,17 @@ export declare enum ActionTypes {
949
950
  EDIT = "edit",
950
951
  APPROVER = "approver"
951
952
  }
953
+ export interface GetAppsInfoForEnvProps {
954
+ envId: number;
955
+ appIds?: number[];
956
+ }
957
+ export interface AppMeta {
958
+ appId: number;
959
+ appStatus: StatusType;
960
+ appName: string;
961
+ }
962
+ export interface EnvAppsMetaDTO {
963
+ appCount: number;
964
+ apps: AppMeta[];
965
+ }
952
966
  export {};
@@ -16,9 +16,8 @@ export { default as DevtronCopyright } from './DevtronCopyright';
16
16
  export * from './DevtronProgressing';
17
17
  export * from './Dialogs';
18
18
  export * from './DraggableWrapper';
19
- export * from './Drawer/Drawer';
20
- export { default as GenericEmptyState } from './EmptyState/GenericEmptyState';
21
- export { default as GenericFilterEmptyState } from './EmptyState/GenericFilterEmptyState';
19
+ export * from './Drawer';
20
+ export * from './EmptyState';
22
21
  export { default as ErrorScreenManager } from './ErrorScreenManager';
23
22
  export { default as ErrorScreenNotAuthorized } from './ErrorScreenNotAuthorized';
24
23
  export * from './GenericDescription';
@@ -0,0 +1,2 @@
1
+ import { AppStatusBodyProps } from './types';
2
+ export declare const AppStatusBody: ({ appDetails, type, handleShowConfigDriftModal }: AppStatusBodyProps) => JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { AppStatusContentProps } from './types';
2
+ declare const AppStatusContent: ({ appDetails, handleShowConfigDriftModal, filterHealthyNodes, isCardLayout, }: AppStatusContentProps) => JSX.Element;
3
+ export default AppStatusContent;
@@ -0,0 +1,3 @@
1
+ import { AppStatusModalProps } from './types';
2
+ declare const AppStatusModal: ({ titleSegments, handleClose, type, appDetails: appDetailsProp, isConfigDriftEnabled, configDriftModal: ConfigDriftModal, appId, envId, }: AppStatusModalProps) => JSX.Element;
3
+ export default AppStatusModal;
@@ -0,0 +1,4 @@
1
+ export declare const APP_STATUS_CUSTOM_MESSAGES: {
2
+ HIBERNATED: string;
3
+ 'PARTIALLY HIBERNATED': string;
4
+ };
@@ -0,0 +1,2 @@
1
+ export { default as AppStatusContent } from './AppStatusContent';
2
+ export { default as AppStatusModal } from './AppStatusModal.component';
@@ -0,0 +1,3 @@
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>;
@@ -0,0 +1,35 @@
1
+ import { FunctionComponent } from 'react';
2
+ import { AppDetails, ConfigDriftModalProps } from '../../types';
3
+ export type AppStatusModalProps = {
4
+ titleSegments: string[];
5
+ 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
+ isConfigDriftEnabled: boolean;
11
+ configDriftModal: FunctionComponent<ConfigDriftModalProps>;
12
+ } & ({
13
+ type: 'release';
14
+ appId: number;
15
+ envId: number;
16
+ } | {
17
+ type: 'devtron-app' | 'other-apps' | 'stack-manager';
18
+ appId?: never;
19
+ envId?: never;
20
+ });
21
+ export interface AppStatusBodyProps extends Required<Pick<AppStatusModalProps, 'appDetails' | 'type'>> {
22
+ handleShowConfigDriftModal: () => void;
23
+ }
24
+ export interface AppStatusContentProps extends Required<Pick<AppStatusBodyProps, 'appDetails'>>, Partial<Pick<AppStatusBodyProps, 'handleShowConfigDriftModal'>> {
25
+ /**
26
+ * @default false
27
+ */
28
+ filterHealthyNodes?: boolean;
29
+ /**
30
+ * @default true
31
+ */
32
+ isCardLayout?: boolean;
33
+ }
34
+ export interface GetFilteredFlattenedNodesFromAppDetailsParamsType extends Pick<AppStatusContentProps, 'appDetails' | 'filterHealthyNodes'> {
35
+ }
@@ -0,0 +1,5 @@
1
+ import { AppDetails, Node } from '../../types';
2
+ import { GetFilteredFlattenedNodesFromAppDetailsParamsType as GetFlattenedNodesFromAppDetailsParamsType } from './types';
3
+ export declare const getAppStatusMessageFromAppDetails: (appDetails: AppDetails) => string;
4
+ export declare const getFlattenedNodesFromAppDetails: ({ appDetails, filterHealthyNodes, }: GetFlattenedNodesFromAppDetailsParamsType) => Node[];
5
+ export declare const getResourceKey: (nodeDetails: Node) => string;
@@ -84,3 +84,4 @@ export declare const PROGRESSING_STATUS: {
84
84
  readonly [x: string]: "progressing" | "starting" | "initiating" | "queued" | "running";
85
85
  };
86
86
  export declare const FAILED_WORKFLOW_STAGE_STATUS_MAP: Record<Extract<WorkflowStageStatusType, WorkflowStageStatusType.ABORTED | WorkflowStageStatusType.FAILED | WorkflowStageStatusType.TIMEOUT>, true>;
87
+ export declare const APP_HEALTH_DROP_DOWN_LIST: string[];
@@ -1,4 +1,3 @@
1
- export { default as AppStatusDetailsChart } from './AppStatusDetailsChart';
2
1
  export { default as Artifacts } from './Artifacts';
3
2
  export { default as CDEmptyState } from './CDEmptyState';
4
3
  export * from './CiPipelineSourceConfig';
@@ -507,12 +507,6 @@ export interface DeploymentHistorySidebarType {
507
507
  deploymentHistoryList: DeploymentTemplateList[];
508
508
  setDeploymentHistoryList: React.Dispatch<React.SetStateAction<DeploymentTemplateList[]>>;
509
509
  }
510
- export interface AppStatusDetailsChartType {
511
- filterRemoveHealth?: boolean;
512
- showFooter: boolean;
513
- showConfigDriftInfo?: boolean;
514
- onClose?: () => void;
515
- }
516
510
  export interface StatusFilterButtonType {
517
511
  nodes: Array<Node>;
518
512
  selectedTab: string;
@@ -1,3 +1,3 @@
1
1
  import { ErrorBarType } from './types';
2
- declare const ErrorBar: ({ appDetails }: ErrorBarType) => JSX.Element;
2
+ declare const ErrorBar: ({ appDetails, useParentMargin }: ErrorBarType) => JSX.Element;
3
3
  export default ErrorBar;
@@ -1,6 +1,10 @@
1
1
  import { AppDetails } from '../../types';
2
2
  export interface ErrorBarType {
3
3
  appDetails: AppDetails;
4
+ /**
5
+ * @default true
6
+ */
7
+ useParentMargin?: boolean;
4
8
  }
5
9
  export declare enum AppDetailsErrorType {
6
10
  ERRIMAGEPULL = "errimagepull",
@@ -1,2 +1,3 @@
1
1
  import { AppDetails } from '../../types';
2
+ export declare const getIsImagePullBackOff: (appDetails: AppDetails) => boolean;
2
3
  export declare const renderErrorHeaderMessage: (appDetails: AppDetails, key: string, onClickActionButton?: any) => JSX.Element;
@@ -45,6 +45,7 @@ export declare const iconMap: {
45
45
  'ic-ecr': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
46
46
  'ic-env': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
47
47
  'ic-error': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
48
+ 'ic-expand-sm': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
48
49
  'ic-failure': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
49
50
  'ic-file-key': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
50
51
  'ic-folder-user': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
@@ -56,6 +57,7 @@ export declare const iconMap: {
56
57
  'ic-google-container-registry': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
57
58
  'ic-google': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
58
59
  'ic-grid-view': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
60
+ 'ic-hand-pointing': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
59
61
  'ic-heart-green': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
60
62
  'ic-heart-red-animated': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
61
63
  'ic-heart-red': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
@@ -91,6 +93,7 @@ export declare const iconMap: {
91
93
  'ic-pencil': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
92
94
  'ic-quay': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
93
95
  'ic-quote': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
96
+ 'ic-rocket-launch': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
94
97
  'ic-shield-check': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
95
98
  'ic-sliders-vertical': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
96
99
  'ic-sort-ascending': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
@@ -1,3 +1,3 @@
1
1
  import { InfoIconTippyProps } from '../../../Common/Types';
2
- declare const InfoIconTippy: ({ heading, infoText, iconClass, documentationLink, documentationLinkText, additionalContent, iconClassName, placement, dataTestid, children, headingInfo, }: InfoIconTippyProps) => JSX.Element;
2
+ declare const InfoIconTippy: ({ heading, infoText, iconClass, documentationLink, documentationLinkText, additionalContent, iconClassName, placement, dataTestid, children, headingInfo, buttonPadding, }: InfoIconTippyProps) => JSX.Element;
3
3
  export default InfoIconTippy;
@@ -4,6 +4,7 @@ export * from './AnimatedDeployButton';
4
4
  export * from './AnimatedTimer';
5
5
  export * from './AnnouncementBanner';
6
6
  export * from './APIResponseHandler';
7
+ export * from './AppStatusModal';
7
8
  export * from './ArtifactInfoModal';
8
9
  export * from './Backdrop';
9
10
  export * from './BulkOperations';
@@ -111,6 +111,7 @@ export interface Node {
111
111
  canBeHibernated: boolean;
112
112
  isHibernated: boolean;
113
113
  hasDrift?: boolean;
114
+ status?: string;
114
115
  }
115
116
  export interface iNodes extends Array<iNode> {
116
117
  }
@@ -198,6 +199,10 @@ export interface AppDetails {
198
199
  fluxTemplateType?: string;
199
200
  FluxAppStatusDetail?: FluxAppStatusDetail;
200
201
  }
202
+ export interface ConfigDriftModalProps extends Required<Pick<AppDetails, 'appId'>> {
203
+ envId: number;
204
+ handleCloseModal?: () => void;
205
+ }
201
206
  export declare enum RegistryType {
202
207
  GIT = "git",
203
208
  GITHUB = "github",