@devtron-labs/devtron-fe-common-lib 1.5.8-beta-6 → 1.5.9-beta-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{@code-editor-DXxCcqw7.js → @code-editor-Q65LZyAb.js} +4542 -4542
- package/dist/{@common-rjsf-CdO37-4J.js → @common-rjsf-Dhg5tqX3.js} +1 -1
- package/dist/Common/DeleteComponentModal/DeleteComponent.d.ts +4 -0
- package/dist/Common/Dialogs/DeleteDialog.d.ts +4 -0
- package/dist/Common/RJSF/Form.d.ts +1 -1
- package/dist/Pages/ResourceBrowser/ResourceBrowser.Types.d.ts +1 -6
- package/dist/Pages/ResourceBrowser/constants.d.ts +0 -46
- package/dist/Pages/ResourceBrowser/index.d.ts +0 -1
- package/dist/Pages/ResourceBrowser/service.d.ts +1 -3
- package/dist/Pages/ResourceBrowser/types.d.ts +0 -24
- package/dist/Shared/Components/ConfirmationModal/CannotDeleteModal.d.ts +2 -0
- package/dist/Shared/Components/ConfirmationModal/DeleteConfirmationModal.d.ts +3 -0
- package/dist/Shared/Components/ConfirmationModal/ForceDeleteConfirmationModal.d.ts +6 -0
- package/dist/Shared/Components/ConfirmationModal/index.d.ts +4 -1
- package/dist/Shared/Components/ConfirmationModal/types.d.ts +40 -7
- package/dist/Shared/Components/ConfirmationModal/utils.d.ts +2 -2
- package/dist/index.js +542 -545
- package/package.json +1 -1
- package/dist/Pages/ResourceBrowser/NodeDrainOptions.d.ts +0 -3
- package/dist/assets/ic-medium-clean-brush.cb5ff0b0.svg +0 -8
- package/dist/assets/ic-medium-pause.4a3c2b4e.svg +0 -3
- package/dist/assets/ic-medium-play.6b657ef2.svg +0 -3
@@ -2,7 +2,7 @@ import { j as t, J as $ } from "./@vendor-ROKJESOw.js";
|
|
2
2
|
import A, { forwardRef as E } from "react";
|
3
3
|
import L, { getDefaultRegistry as D } from "@rjsf/core";
|
4
4
|
import H from "@rjsf/validator-ajv8";
|
5
|
-
import { T as v, c as U, a as k, i as J, b as w, d as S } from "./@code-editor-
|
5
|
+
import { T as v, c as U, a as k, i as J, b as w, d as S } from "./@code-editor-Q65LZyAb.js";
|
6
6
|
import M, { components as B } from "react-select";
|
7
7
|
import { ReactComponent as W } from "./assets/ic-chevron-down.fc70d7a7.svg";
|
8
8
|
import { getUiOptions as C, getTemplate as I, getSubmitButtonOptions as V, ADDITIONAL_PROPERTY_FLAG as P, errorId as q, englishStringTranslator as K, TranslatableString as Y, titleId as z, canExpand as G, deepEquals as Q } from "@rjsf/utils";
|
@@ -1,3 +1,7 @@
|
|
1
1
|
import { DeleteComponentProps } from './types';
|
2
|
+
/**
|
3
|
+
*
|
4
|
+
* @deprecated Use DeleteConfirmationDialog instead
|
5
|
+
*/
|
2
6
|
declare const DeleteComponent: ({ setDeleting, toggleConfirmation, deleteComponent, title, component, payload, confirmationDialogDescription, redirectTo, url, reload, configuration, closeCustomComponent, }: DeleteComponentProps) => JSX.Element;
|
3
7
|
export default DeleteComponent;
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import { default as RJSF } from '@rjsf/core';
|
2
2
|
import { FormProps } from './types';
|
3
|
-
export declare const RJSFForm: import('react').ForwardRefExoticComponent<Pick<FormProps, "name" | "id" | "children" | "className" | "disabled" | "onFocus" | "onBlur" | "onChange" | "onSubmit" | "onError" | "target" | "action" | "
|
3
|
+
export declare const RJSFForm: import('react').ForwardRefExoticComponent<Pick<FormProps, "name" | "id" | "children" | "className" | "disabled" | "onFocus" | "onBlur" | "onChange" | "onSubmit" | "onError" | "target" | "action" | "tagName" | "autoComplete" | "method" | "noValidate" | "readonly" | "schema" | "uiSchema" | "formContext" | "formData" | "idPrefix" | "idSeparator" | "fields" | "templates" | "widgets" | "translateString" | "acceptcharset" | "acceptCharset" | "enctype" | "customValidate" | "extraErrors" | "extraErrorsBlockSubmit" | "noHtml5Validate" | "liveValidate" | "liveOmit" | "omitExtraData" | "showErrorList" | "transformErrors" | "focusOnFirstError" | "experimental_defaultFormStateBehavior" | "_internalFormWrapper"> & import('react').RefAttributes<RJSF<unknown, import('json-schema').JSONSchema7, import('@rjsf/utils').GenericObjectType>>>;
|
@@ -35,7 +35,7 @@ export interface K8sResourceListPayloadType {
|
|
35
35
|
k8sRequest: ResourceListPayloadK8sRequestType;
|
36
36
|
}
|
37
37
|
export type K8sResourceDetailDataType = {
|
38
|
-
[key: string]: string | number | object
|
38
|
+
[key: string]: string | number | object;
|
39
39
|
};
|
40
40
|
export interface K8sResourceDetailType {
|
41
41
|
headers: string[];
|
@@ -45,15 +45,10 @@ export interface BulkSelectionActionWidgetProps {
|
|
45
45
|
count: number;
|
46
46
|
handleOpenBulkDeleteModal: () => void;
|
47
47
|
handleClearBulkSelection: () => void;
|
48
|
-
handleOpenCordonNodeModal: () => void;
|
49
|
-
handleOpenUncordonNodeModal: () => void;
|
50
|
-
handleOpenDrainNodeModal: () => void;
|
51
48
|
handleOpenRestartWorkloadModal: () => void;
|
52
49
|
parentRef: RefObject<HTMLDivElement>;
|
53
50
|
showBulkRestartOption: boolean;
|
54
|
-
showNodeListingOptions: boolean;
|
55
51
|
}
|
56
|
-
export type RBBulkOperationType = 'restart' | 'delete' | 'cordon' | 'uncordon' | 'drain';
|
57
52
|
export interface CreateResourceRequestBodyType {
|
58
53
|
appId: string;
|
59
54
|
clusterId: number;
|
@@ -1,48 +1,2 @@
|
|
1
1
|
import { SelectPickerOptionType } from '../../Shared/Components';
|
2
|
-
import { NodeDrainRequest } from './types';
|
3
2
|
export declare const ALL_NAMESPACE_OPTION: Readonly<Pick<SelectPickerOptionType<string>, 'value' | 'label'>>;
|
4
|
-
export declare const DRAIN_NODE_MODAL_MESSAGING: {
|
5
|
-
DrainIcon: import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
6
|
-
GracePeriod: {
|
7
|
-
heading: string;
|
8
|
-
infoText: string;
|
9
|
-
};
|
10
|
-
DeleteEmptyDirectoryData: {
|
11
|
-
heading: string;
|
12
|
-
infoText: string;
|
13
|
-
};
|
14
|
-
DisableEviction: {
|
15
|
-
heading: string;
|
16
|
-
infoText: string;
|
17
|
-
};
|
18
|
-
ForceDrain: {
|
19
|
-
heading: string;
|
20
|
-
infoText: string;
|
21
|
-
};
|
22
|
-
IgnoreDaemonSets: {
|
23
|
-
heading: string;
|
24
|
-
infoText: string;
|
25
|
-
};
|
26
|
-
Actions: {
|
27
|
-
infoText: string;
|
28
|
-
drain: string;
|
29
|
-
draining: string;
|
30
|
-
cancel: string;
|
31
|
-
};
|
32
|
-
};
|
33
|
-
export declare const CORDON_NODE_MODAL_MESSAGING: {
|
34
|
-
UncordonIcon: import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
35
|
-
CordonIcon: import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
36
|
-
cordonInfoText: string;
|
37
|
-
uncordonInfoText: string;
|
38
|
-
cordon: string;
|
39
|
-
uncordon: string;
|
40
|
-
cordoning: string;
|
41
|
-
uncordoning: string;
|
42
|
-
cancel: string;
|
43
|
-
};
|
44
|
-
export declare const NODE_DRAIN_OPTIONS_CHECKBOX_CONFIG: {
|
45
|
-
key: Exclude<keyof NodeDrainRequest['nodeDrainOptions'], 'gracePeriodSeconds'>;
|
46
|
-
infoText: string;
|
47
|
-
label: string;
|
48
|
-
}[];
|
@@ -1,10 +1,8 @@
|
|
1
1
|
import { APIOptions, ResponseType } from '../../Common/Types';
|
2
2
|
import { CreateResourceDTO, CreateResourcePayload, K8sResourceDetailType, K8sResourceListPayloadType, NodeActionRequest, ResourceListPayloadType, ResourceType } from './ResourceBrowser.Types';
|
3
|
-
import { ClusterDetail
|
3
|
+
import { ClusterDetail } from './types';
|
4
4
|
export declare const getK8sResourceList: (resourceListPayload: K8sResourceListPayloadType, signal?: AbortSignal) => Promise<ResponseType<K8sResourceDetailType>>;
|
5
5
|
export declare const createNewResource: (resourceListPayload: CreateResourcePayload) => Promise<ResponseType<CreateResourceDTO[]>>;
|
6
6
|
export declare const deleteResource: (resourceListPayload: ResourceListPayloadType, abortControllerRef?: APIOptions["abortControllerRef"]) => Promise<ResponseType<ResourceType[]>>;
|
7
7
|
export declare const deleteNodeCapacity: (requestPayload: NodeActionRequest, abortControllerRef?: APIOptions["abortControllerRef"]) => Promise<ResponseType>;
|
8
|
-
export declare const cordonNodeCapacity: (requestPayload: NodeCordonRequest, abortControllerRef?: APIOptions["abortControllerRef"]) => Promise<ResponseType>;
|
9
|
-
export declare const drainNodeCapacity: (requestPayload: NodeActionRequest, abortControllerRef?: APIOptions["abortControllerRef"]) => Promise<ResponseType>;
|
10
8
|
export declare const getClusterListRaw: () => Promise<ResponseType<ClusterDetail[]>>;
|
@@ -1,5 +1,3 @@
|
|
1
|
-
import { Dispatch, SetStateAction, ReactElement } from 'react';
|
2
|
-
import { NodeActionRequest } from './ResourceBrowser.Types';
|
3
1
|
export declare enum ClusterFiltersType {
|
4
2
|
ALL_CLUSTERS = "all",
|
5
3
|
HEALTHY = "healthy",
|
@@ -49,25 +47,3 @@ export interface ClusterDetail extends ClusterCapacityType {
|
|
49
47
|
nodeNames?: string[];
|
50
48
|
isVirtualCluster?: boolean;
|
51
49
|
}
|
52
|
-
interface NodeCordonOptions {
|
53
|
-
unschedulableDesired: boolean;
|
54
|
-
}
|
55
|
-
export interface NodeCordonRequest extends NodeActionRequest {
|
56
|
-
nodeCordonOptions: NodeCordonOptions;
|
57
|
-
}
|
58
|
-
interface NodeDrainOptions {
|
59
|
-
gracePeriodSeconds: number;
|
60
|
-
deleteEmptyDirData: boolean;
|
61
|
-
disableEviction: boolean;
|
62
|
-
force: boolean;
|
63
|
-
ignoreAllDaemonSets: boolean;
|
64
|
-
}
|
65
|
-
export interface NodeDrainRequest extends NodeActionRequest {
|
66
|
-
nodeDrainOptions: NodeDrainOptions;
|
67
|
-
}
|
68
|
-
export interface AdditionalConfirmationModalOptionsProps<T = unknown> {
|
69
|
-
optionsData: T;
|
70
|
-
setOptionsData: Dispatch<SetStateAction<T>>;
|
71
|
-
children?: ReactElement;
|
72
|
-
}
|
73
|
-
export {};
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import { ForceDeleteConfirmationProps } from './types';
|
2
|
+
/**
|
3
|
+
*
|
4
|
+
* @deprecated Use ForceConfirmationModal instead
|
5
|
+
*/
|
6
|
+
export declare const ForceDeleteConfirmationModal: ({ title, description, onDelete, closeConfirmationModal, showConfirmationModal, }: ForceDeleteConfirmationProps) => JSX.Element;
|
@@ -1,2 +1,5 @@
|
|
1
1
|
export { default as ConfirmationModal } from './ConfirmationModal';
|
2
|
-
export {
|
2
|
+
export { DeleteConfirmationModal } from './DeleteConfirmationModal';
|
3
|
+
export { ForceDeleteConfirmationModal } from './ForceDeleteConfirmationModal';
|
4
|
+
export { CannotDeleteModal } from './CannotDeleteModal';
|
5
|
+
export { ConfirmationModalVariantType } from './types';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { FunctionComponent, ReactNode, SVGProps, SyntheticEvent } from 'react';
|
2
2
|
import { ButtonProps } from '../Button';
|
3
3
|
export declare enum ConfirmationModalVariantType {
|
4
4
|
info = "info",
|
@@ -6,10 +6,10 @@ export declare enum ConfirmationModalVariantType {
|
|
6
6
|
warning = "warning",
|
7
7
|
custom = "custom"
|
8
8
|
}
|
9
|
-
type CommonButtonProps<isConfig extends boolean, isCustomVariant extends boolean> = Pick<ButtonProps, 'text'> & Partial<Pick<ButtonProps, 'startIcon' | 'endIcon'
|
9
|
+
type CommonButtonProps<isConfig extends boolean, isCustomVariant extends boolean> = Pick<ButtonProps, 'text'> & Partial<Pick<ButtonProps, 'startIcon' | 'endIcon'>> & (isConfig extends false ? Pick<ButtonProps, 'disabled'> & {
|
10
10
|
onClick: (...args: Partial<Parameters<ButtonProps['onClick']>>) => void;
|
11
11
|
} : {}) & (isCustomVariant extends true ? Pick<ButtonProps, 'style'> : {});
|
12
|
-
interface
|
12
|
+
interface CustomInputConfig {
|
13
13
|
identifier: string;
|
14
14
|
confirmationKeyword: string;
|
15
15
|
}
|
@@ -23,26 +23,59 @@ type ButtonConfig<isConfig extends boolean, isCustomVariant extends boolean> = {
|
|
23
23
|
primaryButtonConfig?: never;
|
24
24
|
secondaryButtonConfig?: CommonButtonProps<isConfig, isCustomVariant>;
|
25
25
|
};
|
26
|
+
type CustomInputConfigOrChildrenType = {
|
27
|
+
customInputConfig: CustomInputConfig;
|
28
|
+
children?: never;
|
29
|
+
} | {
|
30
|
+
customInputConfig?: never;
|
31
|
+
children: ReactNode;
|
32
|
+
} | {
|
33
|
+
customInputConfig?: never;
|
34
|
+
children?: never;
|
35
|
+
};
|
26
36
|
type ButtonConfigAndVariantType<isConfig extends boolean> = {
|
27
37
|
variant: Exclude<ConfirmationModalVariantType, ConfirmationModalVariantType.custom>;
|
28
38
|
Icon?: never;
|
29
39
|
buttonConfig: ButtonConfig<isConfig, false>;
|
30
40
|
} | {
|
31
41
|
variant: ConfirmationModalVariantType.custom;
|
32
|
-
Icon:
|
42
|
+
Icon: FunctionComponent<SVGProps<SVGSVGElement>>;
|
33
43
|
buttonConfig: ButtonConfig<isConfig, true>;
|
34
44
|
};
|
35
|
-
export type ConfirmationModalProps<isConfig extends boolean = false> =
|
45
|
+
export type ConfirmationModalProps<isConfig extends boolean = false> = {
|
36
46
|
title: string;
|
37
47
|
subtitle: ReactNode;
|
48
|
+
dataTestId?: string;
|
38
49
|
/**
|
39
50
|
* @default true
|
40
51
|
*/
|
41
52
|
shouldCloseOnEscape?: boolean;
|
42
|
-
|
43
|
-
}> & ButtonConfigAndVariantType<isConfig> & (isConfig extends false ? {
|
53
|
+
} & ButtonConfigAndVariantType<isConfig> & CustomInputConfigOrChildrenType & (isConfig extends false ? {
|
44
54
|
handleClose: (e?: SyntheticEvent) => void;
|
45
55
|
showConfirmationModal: boolean;
|
46
56
|
} : {});
|
47
57
|
export type ConfirmationModalBodyProps = Omit<ConfirmationModalProps, 'showConfirmationModal'>;
|
58
|
+
export type DeleteComponentModalProps = {
|
59
|
+
title: string;
|
60
|
+
showConfirmationModal: boolean;
|
61
|
+
closeConfirmationModal: () => void;
|
62
|
+
onDelete: () => void;
|
63
|
+
primaryButtonText?: string;
|
64
|
+
component?: string;
|
65
|
+
description?: ReactNode;
|
66
|
+
successToastMessage?: string;
|
67
|
+
isLoading?: boolean;
|
68
|
+
renderCannotDeleteConfirmationSubTitle?: ReactNode;
|
69
|
+
errorCodeToShowCannotDeleteDialog?: number;
|
70
|
+
reload?: () => void;
|
71
|
+
shouldStopPropagation?: boolean;
|
72
|
+
disabled?: boolean;
|
73
|
+
url?: string;
|
74
|
+
children?: ReactNode;
|
75
|
+
};
|
76
|
+
export interface CannotDeleteModalProps extends Partial<Pick<DeleteComponentModalProps, 'title' | 'description' | 'component' | 'closeConfirmationModal'>> {
|
77
|
+
showCannotDeleteDialogModal: boolean;
|
78
|
+
}
|
79
|
+
export interface ForceDeleteConfirmationProps extends Partial<Pick<DeleteComponentModalProps, 'title' | 'description' | 'onDelete' | 'showConfirmationModal' | 'closeConfirmationModal'>> {
|
80
|
+
}
|
48
81
|
export {};
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import {
|
1
|
+
import { FunctionComponent, ReactNode, SVGProps } from 'react';
|
2
2
|
import { ConfirmationModalVariantType } from './types';
|
3
3
|
import { ButtonStyleType } from '../Button';
|
4
|
-
export declare const getIconFromVariant: (variant: ConfirmationModalVariantType) =>
|
4
|
+
export declare const getIconFromVariant: (variant: ConfirmationModalVariantType) => FunctionComponent<SVGProps<SVGSVGElement>>;
|
5
5
|
export declare const getConfirmationLabel: (confirmationKeyword: string) => ReactNode;
|
6
6
|
export declare const getPrimaryButtonStyleFromVariant: (variant: ConfirmationModalVariantType) => ButtonStyleType;
|