@devtron-labs/devtron-fe-common-lib 1.8.4 → 1.8.6-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-CECO9rTe.js → @code-editor-BdGij9tO.js} +7125 -6948
- package/dist/{@common-rjsf-CAp5a9od.js → @common-rjsf-D-u0GkOU.js} +2 -2
- package/dist/{@framer-motion-DrRBF6oz.js → @framer-motion-DpViUwiU.js} +1 -1
- package/dist/{@react-dates-DTh8Zdbr.js → @react-dates-DImxPZnP.js} +20 -20
- package/dist/{@react-select-Bsomcqq-.js → @react-select-CMmT3rFY.js} +1 -1
- package/dist/{@react-virtualized-sticky-tree-DjqdMMRP.js → @react-virtualized-sticky-tree-DLIJD4ml.js} +1 -1
- package/dist/{@vendor-Bb3ljJxt.js → @vendor-JJZeSNjd.js} +7533 -7494
- package/dist/Common/CodeEditor/types.d.ts +1 -2
- package/dist/Common/CodeMirror/CodeEditor.constants.d.ts +3 -0
- package/dist/Common/CodeMirror/CodeEditorRenderer.d.ts +1 -1
- package/dist/Common/CodeMirror/Extensions/DiffMinimap.d.ts +2 -0
- package/dist/Common/CodeMirror/Extensions/index.d.ts +1 -0
- package/dist/Common/CodeMirror/types.d.ts +10 -18
- package/dist/Common/CodeMirror/utils.d.ts +4 -1
- package/dist/Common/Common.service.d.ts +1 -8
- package/dist/Common/Constants.d.ts +1 -0
- package/dist/Common/Hooks/UseGetUserRoles/UseGetUserRoles.d.ts +7 -0
- package/dist/Common/Hooks/UseGetUserRoles/index.d.ts +1 -0
- package/dist/Common/Hooks/UseGetUserRoles/types.d.ts +8 -0
- package/dist/Common/Hooks/UseRegisterShortcut/utils.d.ts +1 -1
- package/dist/Common/Hooks/index.d.ts +1 -1
- package/dist/Common/RJSF/Form.d.ts +1 -1
- package/dist/Common/Toggle/Toggle.d.ts +2 -1
- package/dist/Common/Types.d.ts +21 -1
- package/dist/Pages/Applications/DevtronApps/Details/AppConfigurations/DeploymentTemplate/types.d.ts +4 -0
- package/dist/Pages/Applications/DevtronApps/Details/CDPipeline/types.d.ts +1 -1
- package/dist/Shared/Components/CICDHistory/constants.d.ts +1 -1
- package/dist/Shared/Components/CICDHistory/types.d.ts +8 -0
- package/dist/Shared/Components/GenericSectionErrorState/GenericSectionErrorState.component.d.ts +1 -1
- package/dist/Shared/Components/GenericSectionErrorState/types.d.ts +18 -5
- package/dist/Shared/Components/Icon/Icon.d.ts +2 -0
- package/dist/Shared/Components/Security/SecurityModal/utils.d.ts +2 -2
- package/dist/Shared/Providers/types.d.ts +15 -1
- package/dist/Shared/Services/common.service.d.ts +2 -1
- package/dist/Shared/Services/types.d.ts +6 -0
- package/dist/Shared/Store/IndexStore.d.ts +1 -1
- package/dist/Shared/types.d.ts +19 -8
- package/dist/assets/@code-editor.css +1 -1
- package/dist/assets/ic-crown.868ff2a9.svg +3 -0
- package/dist/assets/ic-user-key.523f6939.svg +4 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +790 -786
- package/package.json +1 -1
- package/dist/Common/CodeMirror/CodeEditor.reducer.d.ts +0 -4
- package/dist/Common/Hooks/UseSuperAdmin/UseSuperAdmin.d.ts +0 -6
- package/dist/Common/Hooks/UseSuperAdmin/types.d.ts +0 -3
@@ -57,7 +57,6 @@ export interface CodeEditorHeaderInterface {
|
|
57
57
|
children?: any;
|
58
58
|
className?: string;
|
59
59
|
hideDefaultSplitHeader?: boolean;
|
60
|
-
diffViewWidth?: boolean;
|
61
60
|
}
|
62
61
|
export interface CodeEditorComposition {
|
63
62
|
Header?: React.FC<any>;
|
@@ -80,7 +79,7 @@ export interface CodeEditorHeaderComposition {
|
|
80
79
|
ValidationError?: React.FC<any>;
|
81
80
|
Clipboard?: React.FC<any>;
|
82
81
|
}
|
83
|
-
|
82
|
+
type ActionTypes = 'changeLanguage' | 'setDiff' | 'setTheme' | 'setCode' | 'setDefaultCode' | 'setHeight';
|
84
83
|
export interface Action {
|
85
84
|
type: ActionTypes;
|
86
85
|
value: any;
|
@@ -5,3 +5,6 @@ export declare const REPLACE_SHORTCUT_KEYS: SupportedKeyboardKeysType[];
|
|
5
5
|
export declare const REPLACE_ALL_SHORTCUT_KEYS: SupportedKeyboardKeysType[];
|
6
6
|
export declare const CLOSE_SEARCH_SHORTCUT_KEYS: SupportedKeyboardKeysType[];
|
7
7
|
export declare const READ_ONLY_TOOLTIP_TIMEOUT = 2000;
|
8
|
+
export declare const CODE_EDITOR_FONT_SIZE = 15;
|
9
|
+
export declare const CODE_EDITOR_LINE_HEIGHT = 1.4;
|
10
|
+
export declare const CODE_EDITOR_MIN_OVERLAY_HEIGHT = 20;
|
@@ -1,2 +1,2 @@
|
|
1
1
|
import { CodeEditorRendererProps } from './types';
|
2
|
-
export declare const CodeEditorRenderer: ({ theme, loading, customLoader, height,
|
2
|
+
export declare const CodeEditorRenderer: ({ codemirrorMergeKey, theme, loading, customLoader, height, codeEditorTheme, readOnly, isOriginalModifiable, handleLhsOnChange, originalViewExtensions, handleOnChange, modifiedViewExtensions, codeMirrorParentDivRef, shebang, placeholder, onFocus, onBlur, extensions, autoFocus, diffMinimapExtensions, }: CodeEditorRendererProps) => JSX.Element;
|
@@ -1,6 +1,7 @@
|
|
1
|
-
import { Dispatch, FunctionComponent, Key, MutableRefObject, ReactNode, SVGProps } from 'react';
|
1
|
+
import { Dispatch, FunctionComponent, Key, MutableRefObject, ReactNode, SetStateAction, SVGProps } from 'react';
|
2
2
|
import { JSONSchema7 } from 'json-schema';
|
3
3
|
import { EditorView, ReactCodeMirrorProps } from '@uiw/react-codemirror';
|
4
|
+
import { CodeMirrorMergeRef } from 'react-codemirror-merge';
|
4
5
|
import { SearchQuery } from '@codemirror/search';
|
5
6
|
import { MODES } from '../Constants';
|
6
7
|
import { Never } from '../../Shared/types';
|
@@ -69,24 +70,12 @@ export interface FindReplaceProps {
|
|
69
70
|
/** Default value for showReplaceField state. */
|
70
71
|
defaultShowReplace: boolean;
|
71
72
|
}
|
72
|
-
export
|
73
|
-
export interface CodeEditorPayloadType {
|
74
|
-
type: CodeEditorActionTypes;
|
75
|
-
value: any;
|
76
|
-
}
|
77
|
-
export interface CodeEditorInitialValueType extends Pick<CodeEditorProps, 'value' | 'noParsing' | 'tabSize' | 'mode'> {
|
78
|
-
lhsValue: ReactCodeMirrorProps['value'];
|
79
|
-
diffView: boolean;
|
80
|
-
}
|
81
|
-
export interface CodeEditorState extends Pick<CodeEditorProps, 'noParsing'> {
|
82
|
-
code: CodeEditorProps['value'];
|
83
|
-
lhsCode: CodeEditorProps<true>['originalValue'];
|
73
|
+
export interface CodeEditorContextProps extends Required<Pick<CodeEditorProps, 'readOnly' | 'theme'>> {
|
84
74
|
diffMode: CodeEditorProps<boolean>['diffView'];
|
85
|
-
|
86
|
-
|
87
|
-
state: CodeEditorState;
|
75
|
+
value: CodeEditorProps['value'];
|
76
|
+
lhsValue: CodeEditorProps<true>['originalValue'];
|
88
77
|
hasCodeEditorContainer: boolean;
|
89
|
-
|
78
|
+
setDiffMode: Dispatch<SetStateAction<CodeEditorProps<boolean>['diffView']>>;
|
90
79
|
}
|
91
80
|
export interface FindReplaceToggleButtonProps {
|
92
81
|
isChecked: boolean;
|
@@ -99,11 +88,14 @@ export type CodeEditorRendererProps = Required<Pick<CodeEditorProps, 'theme' | '
|
|
99
88
|
codemirrorMergeKey: Key;
|
100
89
|
codeMirrorParentDivRef: MutableRefObject<HTMLDivElement>;
|
101
90
|
codeEditorTheme: ReactCodeMirrorProps['theme'];
|
102
|
-
state: CodeEditorState;
|
103
91
|
handleOnChange: ReactCodeMirrorProps['onChange'];
|
104
92
|
handleLhsOnChange: ReactCodeMirrorProps['onChange'];
|
105
93
|
originalViewExtensions: ReactCodeMirrorProps['extensions'];
|
106
94
|
modifiedViewExtensions: ReactCodeMirrorProps['extensions'];
|
107
95
|
extensions: ReactCodeMirrorProps['extensions'];
|
96
|
+
diffMinimapExtensions: ReactCodeMirrorProps['extensions'];
|
108
97
|
};
|
98
|
+
export interface DiffMinimapProps extends Pick<CodeEditorRendererProps, 'diffMinimapExtensions' | 'codeEditorTheme' | 'theme'> {
|
99
|
+
view: CodeMirrorMergeRef['view'];
|
100
|
+
}
|
109
101
|
export {};
|
@@ -1,14 +1,17 @@
|
|
1
|
+
import { CodeMirrorMergeRef } from 'react-codemirror-merge';
|
1
2
|
import { SearchQuery } from '@codemirror/search';
|
2
3
|
import { EditorView, Extension } from '@uiw/react-codemirror';
|
3
4
|
import { CodeEditorProps, FindReplaceToggleButtonProps, GetCodeEditorHeightReturnType } from './types';
|
5
|
+
export declare const parseValueToCode: (value: string, mode: string, tabSize: number) => string;
|
4
6
|
export declare const getCodeEditorHeight: (height: CodeEditorProps["height"]) => GetCodeEditorHeightReturnType;
|
5
7
|
export declare const getFindReplaceToggleButtonIconClass: ({ iconType, isChecked, }: Pick<FindReplaceToggleButtonProps, "iconType" | "isChecked">) => "scb-5" | "scn-7" | "fcb-5" | "fcn-7";
|
6
8
|
export declare const getUpdatedSearchMatchesCount: (newQuery: SearchQuery, view: EditorView) => {
|
7
9
|
count: number;
|
8
10
|
current: number;
|
9
11
|
};
|
12
|
+
export declare const updateDiffMinimapValues: (view: CodeMirrorMergeRef["view"], value: string, lhsValue: string) => void;
|
10
13
|
export declare const getFoldGutterElement: (open: boolean) => HTMLSpanElement;
|
11
14
|
export declare const getReadOnlyElement: () => HTMLDivElement;
|
12
15
|
export declare const getRevertControlButton: () => HTMLButtonElement;
|
13
|
-
export declare const getLanguageExtension: (mode: CodeEditorProps["mode"]) => Extension;
|
16
|
+
export declare const getLanguageExtension: (mode: CodeEditorProps["mode"], disableLint?: boolean) => Extension;
|
14
17
|
export declare const getValidationSchema: ({ mode, validatorSchema, schemaURI, }: Pick<CodeEditorProps, "schemaURI" | "validatorSchema" | "mode">) => Extension[];
|
@@ -1,14 +1,8 @@
|
|
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 } from './Types';
|
3
|
+
import { TeamList, ResponseType, DeploymentNodeType, CDMaterialServiceEnum, CDMaterialServiceQueryParams, CDMaterialResponseType, CDMaterialFilterQuery, EnvironmentListHelmResponse, UserApprovalMetadataType, GlobalVariableOptionType, UserRole } from './Types';
|
4
4
|
import { ApiResourceType } from '../Pages';
|
5
5
|
export declare const getTeamListMin: () => Promise<TeamList>;
|
6
|
-
interface UserRole extends ResponseType {
|
7
|
-
result?: {
|
8
|
-
roles: string[];
|
9
|
-
superAdmin: boolean;
|
10
|
-
};
|
11
|
-
}
|
12
6
|
export declare const SourceTypeMap: {
|
13
7
|
BranchFixed: string;
|
14
8
|
WEBHOOK: string;
|
@@ -41,4 +35,3 @@ export declare const getGlobalVariables: ({ appId, isCD, abortControllerRef, }:
|
|
41
35
|
isCD?: boolean;
|
42
36
|
abortControllerRef?: MutableRefObject<AbortController>;
|
43
37
|
}) => Promise<GlobalVariableOptionType[]>;
|
44
|
-
export {};
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { UseGetUserRolesType } from './types';
|
2
|
+
/**
|
3
|
+
* @description It will return isSuperAdmin and would be set to false by default, might need few optimizations like dep, etc
|
4
|
+
* @returns {UseGetUserRolesType} isSuperAdmin, canManageAllAccess
|
5
|
+
*/
|
6
|
+
declare const useGetUserRoles: () => UseGetUserRolesType;
|
7
|
+
export default useGetUserRoles;
|
@@ -0,0 +1 @@
|
|
1
|
+
export { default as useGetUserRoles } from './UseGetUserRoles';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { ShortcutType } from './types';
|
2
2
|
export declare const preprocessKeys: (keys: ShortcutType["keys"]) => {
|
3
|
-
keys: ("
|
3
|
+
keys: ("Escape" | "Control" | "Alt" | "F" | "E" | "R" | "K" | "Shift" | "Meta" | "Enter")[];
|
4
4
|
id: string;
|
5
5
|
};
|
6
6
|
export declare const verifyCallbackStack: (stack: ShortcutType["callbackStack"]) => void;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { useGetUserRoles } from './UseGetUserRoles';
|
2
2
|
export { useClickOutside } from './UseClickOutside/UseClickOutside';
|
3
3
|
export { useWindowSize } from './UseWindowSize/UseWindowSize';
|
4
4
|
export * from './useUrlFilters';
|
@@ -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, "
|
3
|
+
export declare const RJSFForm: import('react').ForwardRefExoticComponent<Pick<FormProps, "className" | "children" | "disabled" | "id" | "name" | "target" | "onFocus" | "onBlur" | "onChange" | "onSubmit" | "onError" | "autoComplete" | "noValidate" | "tagName" | "readonly" | "schema" | "uiSchema" | "formContext" | "formData" | "idPrefix" | "idSeparator" | "fields" | "templates" | "widgets" | "translateString" | "acceptcharset" | "acceptCharset" | "action" | "enctype" | "method" | "customValidate" | "extraErrors" | "extraErrorsBlockSubmit" | "noHtml5Validate" | "liveValidate" | "liveOmit" | "omitExtraData" | "showErrorList" | "transformErrors" | "focusOnFirstError" | "experimental_defaultFormStateBehavior" | "_internalFormWrapper"> & import('react').RefAttributes<RJSF<any, import('./types').RJSFFormSchema, any>>>;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
declare const Toggle: ({ selected, onSelect, color, rootClassName, disabled, dataTestId, Icon, iconClass, throttleOnChange, ...props }: {
|
1
|
+
declare const Toggle: ({ selected, onSelect, color, rootClassName, disabled, dataTestId, Icon, iconClass, throttleOnChange, shouldToggleValueOnLabelClick, ...props }: {
|
2
2
|
[x: string]: any;
|
3
3
|
selected?: boolean;
|
4
4
|
onSelect?: any;
|
@@ -9,5 +9,6 @@ declare const Toggle: ({ selected, onSelect, color, rootClassName, disabled, dat
|
|
9
9
|
Icon?: any;
|
10
10
|
iconClass?: string;
|
11
11
|
throttleOnChange?: boolean;
|
12
|
+
shouldToggleValueOnLabelClick?: boolean;
|
12
13
|
}) => JSX.Element;
|
13
14
|
export default Toggle;
|
package/dist/Common/Types.d.ts
CHANGED
@@ -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, ComponentLayoutType } from '../Shared';
|
5
|
+
import { MandatoryPluginBaseStateType, RegistryType, RuntimePluginVariables, Severity, PolicyBlockInfo, TargetPlatformItemDTO, ButtonProps, ComponentLayoutType } 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
|
@@ -158,6 +158,7 @@ interface InfoColourBarTextConfigType {
|
|
158
158
|
* If given would be shown below the heading (if given)
|
159
159
|
*/
|
160
160
|
description: string;
|
161
|
+
actionButtonConfig?: ButtonProps;
|
161
162
|
}
|
162
163
|
type InfoColourBarMessageProp = {
|
163
164
|
message: ReactNode;
|
@@ -917,4 +918,23 @@ export type GlobalVariableOptionType = Omit<GlobalVariableDTO, 'name'> & {
|
|
917
918
|
value: string;
|
918
919
|
variableType: Extract<RefVariableType, RefVariableType.GLOBAL>;
|
919
920
|
};
|
921
|
+
export interface UserRole extends ResponseType {
|
922
|
+
result?: {
|
923
|
+
roles: string[];
|
924
|
+
superAdmin: boolean;
|
925
|
+
/**
|
926
|
+
* Defines if a user is access manager and can manage all access
|
927
|
+
*/
|
928
|
+
canManageAllAccess?: boolean;
|
929
|
+
};
|
930
|
+
}
|
931
|
+
export declare enum ActionTypes {
|
932
|
+
MANAGER = "manager",
|
933
|
+
ADMIN = "admin",
|
934
|
+
TRIGGER = "trigger",
|
935
|
+
VIEW = "view",
|
936
|
+
UPDATE = "update",
|
937
|
+
EDIT = "edit",
|
938
|
+
APPROVER = "approver"
|
939
|
+
}
|
920
940
|
export {};
|
package/dist/Pages/Applications/DevtronApps/Details/AppConfigurations/DeploymentTemplate/types.d.ts
CHANGED
@@ -96,6 +96,10 @@ export interface SelectedChartDetailsType {
|
|
96
96
|
selectedChartRefId: number;
|
97
97
|
selectedChart: DeploymentChartVersionType;
|
98
98
|
}
|
99
|
+
export declare enum PipelineMigratedFromType {
|
100
|
+
HELM_RELEASE = "helmRelease",
|
101
|
+
ARGO_APPLICATION = "argoApplication"
|
102
|
+
}
|
99
103
|
interface EnvironmentConfigType {
|
100
104
|
id: number;
|
101
105
|
status: number;
|
@@ -81,6 +81,6 @@ export declare const TERMINAL_STATUS_COLOR_CLASS_MAP: {
|
|
81
81
|
readonly [x: string]: "cr-5" | "cg-5" | "co-5";
|
82
82
|
};
|
83
83
|
export declare const PROGRESSING_STATUS: {
|
84
|
-
readonly [x: string]: "
|
84
|
+
readonly [x: string]: "running" | "progressing" | "starting" | "initiating" | "queued";
|
85
85
|
};
|
86
86
|
export declare const FAILED_WORKFLOW_STAGE_STATUS_MAP: Record<Extract<WorkflowStageStatusType, WorkflowStageStatusType.ABORTED | WorkflowStageStatusType.FAILED | WorkflowStageStatusType.TIMEOUT>, true>;
|
@@ -519,6 +519,14 @@ export interface StatusFilterButtonType {
|
|
519
519
|
handleFilterClick?: (selectedFilter: string) => void;
|
520
520
|
maxInlineFiltersCount?: number;
|
521
521
|
}
|
522
|
+
export declare enum NodeStatusDTO {
|
523
|
+
Healthy = "Healthy",
|
524
|
+
Progressing = "Progressing",
|
525
|
+
Unknown = "Unknown",
|
526
|
+
Suspended = "Suspended",
|
527
|
+
Degraded = "Degraded",
|
528
|
+
Missing = "Missing"
|
529
|
+
}
|
522
530
|
export declare enum NodeStatus {
|
523
531
|
Degraded = "degraded",
|
524
532
|
Healthy = "healthy",
|
package/dist/Shared/Components/GenericSectionErrorState/GenericSectionErrorState.component.d.ts
CHANGED
@@ -1,3 +1,3 @@
|
|
1
1
|
import { GenericSectionErrorStateProps } from './types';
|
2
|
-
declare const GenericSectionErrorState: ({ reload, withBorder, title, subTitle, description, buttonText, rootClassName, useInfoIcon, }: GenericSectionErrorStateProps) => JSX.Element;
|
2
|
+
declare const GenericSectionErrorState: ({ reload, withBorder, title, subTitle, description, buttonText, rootClassName, useInfoIcon, progressingProps, }: GenericSectionErrorStateProps) => JSX.Element;
|
3
3
|
export default GenericSectionErrorState;
|
@@ -1,4 +1,6 @@
|
|
1
|
-
|
1
|
+
import { ReactNode } from 'react';
|
2
|
+
import { ProgressingProps } from '../../../Common/Types';
|
3
|
+
export type GenericSectionErrorStateProps = {
|
2
4
|
/**
|
3
5
|
* Handler for reloading the section
|
4
6
|
*/
|
@@ -16,11 +18,11 @@ export interface GenericSectionErrorStateProps {
|
|
16
18
|
/**
|
17
19
|
* @default 'We could not load the information on this page.'
|
18
20
|
*/
|
19
|
-
subTitle?:
|
21
|
+
subTitle?: ReactNode;
|
20
22
|
/**
|
21
23
|
* @default 'Please reload or try again later'
|
22
24
|
*/
|
23
|
-
description?:
|
25
|
+
description?: ReactNode;
|
24
26
|
/**
|
25
27
|
* @default 'Reload'
|
26
28
|
*/
|
@@ -29,10 +31,21 @@ export interface GenericSectionErrorStateProps {
|
|
29
31
|
* to be applied on parent div
|
30
32
|
*/
|
31
33
|
rootClassName?: string;
|
34
|
+
} & ({
|
35
|
+
/**
|
36
|
+
* If provided, would render the Progressing component with given props instead of error icon
|
37
|
+
*/
|
38
|
+
progressingProps: ProgressingProps;
|
39
|
+
useInfoIcon?: never;
|
40
|
+
} | {
|
41
|
+
progressingProps?: never;
|
32
42
|
/**
|
33
43
|
* If true, info icon would be used instead of error
|
34
44
|
*
|
35
45
|
* @default false
|
36
46
|
*/
|
37
|
-
useInfoIcon
|
38
|
-
}
|
47
|
+
useInfoIcon: boolean;
|
48
|
+
} | {
|
49
|
+
progressingProps?: never;
|
50
|
+
useInfoIcon?: never;
|
51
|
+
});
|
@@ -16,6 +16,7 @@ export declare const iconMap: {
|
|
16
16
|
'ic-close-small': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
17
17
|
'ic-code': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
18
18
|
'ic-container': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
19
|
+
'ic-crown': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
19
20
|
'ic-cube': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
20
21
|
'ic-dockerhub': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
21
22
|
'ic-ecr': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
@@ -60,6 +61,7 @@ export declare const iconMap: {
|
|
60
61
|
'ic-suspended': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
61
62
|
'ic-timeout-two-dash': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
62
63
|
'ic-unknown': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
64
|
+
'ic-user-key': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
63
65
|
'ic-warning': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
64
66
|
};
|
65
67
|
export type IconName = keyof typeof iconMap;
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { ScanResultDTO, SeveritiesDTO, GetResourceScanDetailsResponseType, ImageScanVulnerabilityType, ImageVulnerabilityType, VulnerabilityCountType } from './types';
|
2
2
|
import { SEVERITIES } from './constants';
|
3
3
|
export declare const mapSeveritiesToSegmentedBarChartEntities: (severities: Partial<Record<keyof typeof SEVERITIES, number>>) => {
|
4
|
-
color: "var(--
|
5
|
-
label: "
|
4
|
+
color: "var(--G500)" | "var(--N300)" | "var(--R700)" | "var(--R500)" | "var(--O500)" | "var(--Y500)";
|
5
|
+
label: "Unknown" | "Critical" | "High" | "Medium" | "Low" | "Failures" | "Successes" | "Exceptions";
|
6
6
|
value: number;
|
7
7
|
}[];
|
8
8
|
export declare const stringifySeverities: (severities: Partial<Record<keyof typeof SEVERITIES, number>>) => string;
|
@@ -22,8 +22,22 @@ export interface MainContext {
|
|
22
22
|
};
|
23
23
|
isAirgapped: boolean;
|
24
24
|
isSuperAdmin: boolean;
|
25
|
+
featureGitOpsFlags: {
|
26
|
+
/**
|
27
|
+
* Would define whether gitops (Global config tab) feature is enabled or not
|
28
|
+
*/
|
29
|
+
isFeatureGitOpsEnabled: boolean;
|
30
|
+
/**
|
31
|
+
* Would define whether user can select allow custom repo in gitops global config
|
32
|
+
*/
|
33
|
+
isFeatureUserDefinedGitOpsEnabled: boolean;
|
34
|
+
/**
|
35
|
+
* Feature flag for Migrate to devtron from argo cd
|
36
|
+
*/
|
37
|
+
isFeatureArgoCdMigrationEnabled: boolean;
|
38
|
+
};
|
25
39
|
isManifestScanningEnabled: boolean;
|
26
|
-
|
40
|
+
canOnlyViewPermittedEnvOrgLevel: boolean;
|
27
41
|
viewIsPipelineRBACConfiguredNode: ReactNode;
|
28
42
|
}
|
29
43
|
export interface MainContextProviderProps {
|
@@ -1,6 +1,7 @@
|
|
1
|
-
import { GetPolicyApiUrlProps, GetResourceApiUrlProps, UserPreferencesType } from './types';
|
1
|
+
import { EnvironmentDataValuesDTO, GetPolicyApiUrlProps, GetResourceApiUrlProps, UserPreferencesType } from './types';
|
2
2
|
export declare const getResourceApiUrl: <T>({ baseUrl, kind, version, suffix, queryParams }: GetResourceApiUrlProps<T>) => string;
|
3
3
|
export declare const getPolicyApiUrl: <T>({ kind, version, queryParams, suffix }: GetPolicyApiUrlProps<T>) => string;
|
4
4
|
export declare const saveCDPipeline: (request: any) => Promise<import('../../Common').ResponseType<any>>;
|
5
|
+
export declare const getEnvironmentData: () => Promise<import('../../Common').ResponseType<EnvironmentDataValuesDTO>>;
|
5
6
|
export declare const getUserPreferences: () => Promise<UserPreferencesType>;
|
6
7
|
export declare const updateUserPreferences: (updatedUserPreferences: UserPreferencesType, shouldThrowError?: boolean) => Promise<boolean>;
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { MainContext } from '../Providers';
|
1
2
|
import { getUrlWithSearchParams } from '../../Common';
|
2
3
|
import { PolicyKindType, ResourceKindType, ResourceVersionType, ViewIsPipelineRBACConfiguredRadioTabs } from '../types';
|
3
4
|
import { USER_PREFERENCES_ATTRIBUTE_KEY } from './constants';
|
@@ -29,6 +30,11 @@ export interface GetResourceApiUrlProps<T> extends BaseGetApiUrlProps<T, Resourc
|
|
29
30
|
}
|
30
31
|
export interface GetPolicyApiUrlProps<T> extends Omit<BaseGetApiUrlProps<T, PolicyKindType, ResourceVersionType>, 'baseUrl'> {
|
31
32
|
}
|
33
|
+
export interface EnvironmentDataValuesDTO extends Pick<MainContext, 'featureGitOpsFlags'> {
|
34
|
+
isAirGapEnvironment: boolean;
|
35
|
+
isManifestScanningEnabled: boolean;
|
36
|
+
canOnlyViewPermittedEnvOrgLevel: boolean;
|
37
|
+
}
|
32
38
|
export interface GetUserPreferencesQueryParamsType {
|
33
39
|
key: typeof USER_PREFERENCES_ATTRIBUTE_KEY;
|
34
40
|
}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { AppDetails, AppType, EnvDetails, Node, PodMetaData, iNode } from '../types';
|
2
2
|
export declare function getiNodesByRootNodeWithChildNodes(_nodes: Array<Node>, rootNodes: Array<iNode>, podMetadata?: Array<PodMetaData>): Array<iNode>;
|
3
|
-
export declare const reduceKindStatus: (aggregatedStatus: string, newStatus: string) => "
|
3
|
+
export declare const reduceKindStatus: (aggregatedStatus: string, newStatus: string) => "progressing" | "healthy" | "degraded";
|
4
4
|
export declare function getiNodesByKindWithChildNodes(_nodes: Array<Node>, _kind: string): Array<iNode>;
|
5
5
|
export declare function getPodsRootParentNameAndStatus(_nodes: Array<Node>): Array<[string, string]>;
|
6
6
|
export declare const getPodsForRootNodeName: (_rootNode: string, _treeNodes: Array<Node>) => Array<iNode>;
|
package/dist/Shared/types.d.ts
CHANGED
@@ -2,6 +2,7 @@ import { Dayjs } from 'dayjs';
|
|
2
2
|
import { APIOptions, ApprovalConfigDataType } from '../Common/Types';
|
3
3
|
import { OptionType, CommonNodeAttr, VulnerabilityType, DeploymentAppTypes, ServerErrors, SortingParams, TriggerBlockType, ValueConstraintType, VariableType, RefVariableType, PluginType } from '../Common';
|
4
4
|
import { BASE_CONFIGURATION_ENV_ID, EnvironmentTypeEnum, PatchOperationType } from './constants';
|
5
|
+
import { SelectPickerOptionType } from './Components';
|
5
6
|
export declare enum EnvType {
|
6
7
|
CHART = "helm_charts",
|
7
8
|
APPLICATION = "apps"
|
@@ -640,11 +641,26 @@ export type MetaPossibleRoles = Record<CustomRoles['roleName'], {
|
|
640
641
|
}>;
|
641
642
|
export interface CustomRoleAndMeta {
|
642
643
|
customRoles: CustomRoles[];
|
643
|
-
|
644
|
-
|
644
|
+
possibleRolesMetaForDevtron: MetaPossibleRoles;
|
645
|
+
possibleJobRoles: SelectPickerOptionType<string>[];
|
645
646
|
possibleRolesMetaForCluster: MetaPossibleRoles;
|
646
|
-
possibleRolesMetaForJob: MetaPossibleRoles;
|
647
647
|
}
|
648
|
+
export interface UserRoleConfig {
|
649
|
+
baseRole: string;
|
650
|
+
/**
|
651
|
+
* Only for devtron apps
|
652
|
+
*/
|
653
|
+
additionalRoles?: Set<string>;
|
654
|
+
/**
|
655
|
+
* Only for devtron apps
|
656
|
+
*/
|
657
|
+
accessManagerRoles?: Set<string>;
|
658
|
+
}
|
659
|
+
export type RoleType = keyof UserRoleConfig;
|
660
|
+
export type RoleSelectorOptionType = Pick<SelectPickerOptionType, 'label' | 'description'> & {
|
661
|
+
value: string;
|
662
|
+
roleType: RoleType;
|
663
|
+
};
|
648
664
|
interface CommonTabArgsType {
|
649
665
|
/**
|
650
666
|
* Name for the tab.
|
@@ -828,11 +844,6 @@ export declare enum ViewIsPipelineRBACConfiguredRadioTabs {
|
|
828
844
|
ALL_ENVIRONMENTS = "All environments",
|
829
845
|
ACCESS_ONLY = "Access only"
|
830
846
|
}
|
831
|
-
export interface EnvironmentDataValuesDTO {
|
832
|
-
isAirGapEnvironment: boolean;
|
833
|
-
isManifestScanningEnabled: boolean;
|
834
|
-
canOnlyViewPermittedEnvOrgLevel: boolean;
|
835
|
-
}
|
836
847
|
export type ComponentLayoutType = 'row' | 'column';
|
837
848
|
export interface BorderConfigType {
|
838
849
|
/**
|