@devtron-labs/devtron-fe-common-lib 1.22.8-beta-1 → 1.22.8-beta-2
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-Cf0USXSx.js → @code-editor-BgL972n1.js} +8910 -8934
- package/dist/{@common-rjsf-B_NLMb7K.js → @common-rjsf-Z4aUSkCB.js} +2 -2
- package/dist/{@framer-motion-LZK2bgCK.js → @framer-motion-Bi7d_Mil.js} +64 -64
- package/dist/{@react-dates-CbpfVsC0.js → @react-dates-CR-uCH60.js} +1 -1
- package/dist/{@react-select-BuPEYnTv.js → @react-select-C5q5RdNV.js} +1 -1
- package/dist/{@react-virtualized-sticky-tree-DX7VkyTZ.js → @react-virtualized-sticky-tree-LXSXNrbc.js} +1 -1
- package/dist/{@vendor-BsABdDGm.js → @vendor-CtCMPfdc.js} +9266 -9181
- package/dist/Common/API/reactQueryHooks.d.ts +2 -1
- package/dist/Common/Constants.d.ts +4 -1
- package/dist/Common/DraggableWrapper/DraggableWrapper.d.ts +2 -4
- package/dist/Common/DraggableWrapper/types.d.ts +6 -2
- package/dist/Common/Drawer/Drawer.d.ts +2 -2
- package/dist/Common/Modals/VisibleModal.d.ts +1 -0
- package/dist/Common/SortableTableHeaderCell/SortableTableHeaderCell.d.ts +1 -1
- package/dist/Common/SortableTableHeaderCell/types.d.ts +0 -4
- package/dist/Pages-Devtron-2.0/Navigation/types.d.ts +1 -1
- package/dist/Shared/Components/AppStatusModal/AppStatusBody.d.ts +1 -1
- package/dist/Shared/Components/AppStatusModal/types.d.ts +4 -1
- package/dist/Shared/Components/Backdrop/Backdrop.d.ts +1 -1
- package/dist/Shared/Components/Backdrop/types.d.ts +1 -1
- package/dist/Shared/Components/CICDHistory/types.d.ts +0 -6
- package/dist/Shared/Components/Charts/types.d.ts +0 -2
- package/dist/Shared/Components/ConfirmationModal/types.d.ts +1 -0
- package/dist/Shared/Components/DTFocusTrap/DTFocusTrap.d.ts +1 -6
- package/dist/Shared/Components/DTFocusTrap/index.d.ts +1 -1
- package/dist/Shared/Components/DTFocusTrap/types.d.ts +1 -0
- package/dist/Shared/Components/DocLink/constants.d.ts +0 -1
- package/dist/Shared/Components/FloatingVariablesSuggestions/FloatingVariablesSuggestions.d.ts +1 -1
- package/dist/Shared/Components/FloatingVariablesSuggestions/constants.d.ts +4 -1
- package/dist/Shared/Components/FloatingVariablesSuggestions/types.d.ts +4 -2
- package/dist/Shared/Components/GenericModal/GenericModal.component.d.ts +1 -1
- package/dist/Shared/Components/GenericModal/constants.d.ts +2 -1
- package/dist/Shared/Components/GenericModal/types.d.ts +4 -1
- package/dist/Shared/Components/Icon/Icon.d.ts +12 -6
- package/dist/Shared/Components/Illustration/Illustration.d.ts +6 -0
- package/dist/Shared/Components/License/DevtronLicenseCard.d.ts +1 -1
- package/dist/Shared/Components/License/index.d.ts +1 -0
- package/dist/Shared/Components/License/types.d.ts +4 -0
- package/dist/Shared/Components/License/utils.d.ts +1 -1
- package/dist/Shared/Components/Table/InternalTable.d.ts +1 -1
- package/dist/Shared/Components/Table/TableContent.d.ts +1 -1
- package/dist/Shared/Components/Table/constants.d.ts +0 -1
- package/dist/Shared/Components/Table/types.d.ts +7 -27
- package/dist/Shared/Components/Table/utils.d.ts +1 -1
- package/dist/Shared/Helpers.d.ts +3 -3
- package/dist/Shared/Providers/MainContextProvider/index.d.ts +1 -1
- package/dist/Shared/Providers/MainContextProvider/types.d.ts +43 -4
- package/dist/Shared/Services/types.d.ts +1 -0
- package/dist/Shared/constants.d.ts +1 -0
- package/dist/Shared/types.d.ts +47 -20
- package/dist/assets/@code-editor.css +1 -1
- package/dist/assets/cmd-bar-visual.340d6226.webp +0 -0
- package/dist/assets/ic-bell.d2aa01ec.svg +3 -0
- package/dist/assets/ic-bulb.3906a732.svg +7 -0
- package/dist/assets/ic-close-circle.b39dd87d.svg +3 -0
- package/dist/assets/ic-comment.cc141b33.svg +3 -0
- package/dist/assets/ic-curved-arrow.3f3ca92c.svg +3 -0
- package/dist/assets/ic-dot-circle.5ce1fccf.svg +3 -0
- package/dist/assets/ic-nav-cursor.691e4db7.svg +10 -0
- package/dist/assets/ic-new-chat.f7c90f8e.svg +5 -0
- package/dist/assets/ic-piggybank.3a4839d7.svg +3 -0
- package/dist/assets/ic-play-outline.d2551031.svg +19 -0
- package/dist/assets/ic-priority-high-fill.53755d8f.svg +3 -0
- package/dist/assets/ic-priority-low-fill.79e781ae.svg +4 -0
- package/dist/assets/ic-priority-urgent-fill.78d42fa0.svg +10 -0
- package/dist/assets/ic-red-bulb.25e01bfc.svg +9 -0
- package/dist/assets/img-celebration.8ceac2a9.svg +149 -0
- package/dist/assets/img-install-freemium-saas.4388531c.svg +40 -0
- package/dist/assets/img-install-via-aws-marketplace.df85f572.svg +48 -0
- package/dist/assets/img-installing-devtron.1689cddb.svg +160 -0
- package/dist/assets/img-page-not-found.3c4f114b.svg +81 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +998 -994
- package/package.json +1 -1
- package/dist/assets/ic-bell.0f9972dd.svg +0 -3
- package/dist/assets/ic-configuration-file.b9f3ac22.svg +0 -10
- package/dist/assets/ic-image-approve.0cbb58eb.svg +0 -3
- package/dist/assets/ic-play-outline.e18008ce.svg +0 -3
- package/dist/assets/ic-ses.7797b214.svg +0 -6
- package/dist/assets/ic-slack.3c916573.svg +0 -10
- package/dist/assets/ic-smtp.f6f45abc.svg +0 -7
- package/dist/assets/ic-webhook-config.d0dd47eb.svg +0 -5
|
@@ -4,13 +4,10 @@ import { UseStateFiltersProps, UseStateFiltersReturnType, UseUrlFiltersProps, Us
|
|
|
4
4
|
import { GenericEmptyStateType } from '../../../Common/index';
|
|
5
5
|
import { PageSizeOption } from '../../../Common/Pagination/types';
|
|
6
6
|
import { SortableTableHeaderCellProps, useResizableTableConfig } from '../../../Common/SortableTableHeaderCell';
|
|
7
|
-
import { IconsProps } from '../Icon';
|
|
8
7
|
import { useBulkSelection, UseBulkSelectionProps } from '../BulkSelection';
|
|
9
8
|
export interface UseFiltersReturnType extends UseStateFiltersReturnType<string> {
|
|
10
9
|
}
|
|
11
10
|
export declare enum SignalEnum {
|
|
12
|
-
COLLAPSE_ROW = "collapse-row",
|
|
13
|
-
EXPAND_ROW = "expand-row",
|
|
14
11
|
ENTER_PRESSED = "enter-pressed",
|
|
15
12
|
DELETE_PRESSED = "delete-pressed",
|
|
16
13
|
ESCAPE_PRESSED = "escape-pressed",
|
|
@@ -45,18 +42,11 @@ type BaseColumnType = {
|
|
|
45
42
|
*/
|
|
46
43
|
size: SizeType;
|
|
47
44
|
horizontallySticky?: boolean;
|
|
48
|
-
}
|
|
49
|
-
type
|
|
45
|
+
};
|
|
46
|
+
export type RowType<Data extends unknown> = {
|
|
50
47
|
id: string;
|
|
51
48
|
data: Data;
|
|
52
49
|
};
|
|
53
|
-
export type ExpandedRowPrefixType = 'expanded-row-';
|
|
54
|
-
export type ExpandedRowType<Data extends unknown> = CommonRowType<Data> & {
|
|
55
|
-
id: `${ExpandedRowPrefixType}${string}`;
|
|
56
|
-
};
|
|
57
|
-
export type RowType<Data extends unknown> = CommonRowType<Data> & {
|
|
58
|
-
expandableRows?: Array<ExpandedRowType<Data>>;
|
|
59
|
-
};
|
|
60
50
|
export type RowsType<Data extends unknown> = RowType<Data>[];
|
|
61
51
|
export declare enum FiltersTypeEnum {
|
|
62
52
|
STATE = "state",
|
|
@@ -69,9 +59,6 @@ export type CellComponentProps<RowData extends unknown = unknown, FilterVariant
|
|
|
69
59
|
row: RowType<RowData>;
|
|
70
60
|
filterData: FilterVariant extends FiltersTypeEnum.NONE ? null : FilterVariant extends FiltersTypeEnum.STATE ? UseFiltersReturnType : UseUrlFiltersReturnType<string>;
|
|
71
61
|
isRowActive: boolean;
|
|
72
|
-
isExpandedRow: boolean;
|
|
73
|
-
isRowInExpandState: boolean;
|
|
74
|
-
expandRowCallback: (e: MouseEvent<HTMLButtonElement>) => void;
|
|
75
62
|
};
|
|
76
63
|
export type RowActionsOnHoverComponentProps<RowData extends unknown = unknown, AdditionalProps extends Record<string, any> = {}> = {
|
|
77
64
|
row: RowType<RowData>;
|
|
@@ -124,7 +111,7 @@ export type ViewWrapperProps<RowData extends unknown = unknown, FilterVariant ex
|
|
|
124
111
|
filteredRows: RowsType<RowData> | null;
|
|
125
112
|
rows: RowsType<RowData> | null;
|
|
126
113
|
} & (FilterVariant extends FiltersTypeEnum.URL ? Pick<UseUrlFiltersReturnType<string>, 'updateSearchParams'> : {})>;
|
|
127
|
-
type FilterConfig<FilterVariant extends FiltersTypeEnum, RowData extends unknown
|
|
114
|
+
type FilterConfig<FilterVariant extends FiltersTypeEnum, RowData extends unknown> = {
|
|
128
115
|
filtersVariant: FilterVariant;
|
|
129
116
|
/**
|
|
130
117
|
* Props for useUrlFilters/useStateFilters hooks
|
|
@@ -136,9 +123,8 @@ type FilterConfig<FilterVariant extends FiltersTypeEnum, RowData extends unknown
|
|
|
136
123
|
*
|
|
137
124
|
* If filter is only being used for sorting, then send `noop` in this prop
|
|
138
125
|
*/
|
|
139
|
-
filter: FilterVariant extends FiltersTypeEnum.NONE ? null : (row: RowType<RowData>, filterData: UseFiltersReturnType
|
|
126
|
+
filter: FilterVariant extends FiltersTypeEnum.NONE ? null : (row: RowType<RowData>, filterData: UseFiltersReturnType) => boolean;
|
|
140
127
|
clearFilters?: FilterVariant extends FiltersTypeEnum.URL ? () => void : FilterVariant extends FiltersTypeEnum.STATE ? never : never;
|
|
141
|
-
areFiltersApplied?: FilterVariant extends FiltersTypeEnum.NONE ? never : boolean;
|
|
142
128
|
};
|
|
143
129
|
export type InternalTableProps<RowData extends unknown, FilterVariant extends FiltersTypeEnum, AdditionalProps extends Record<string, any>> = Required<Pick<ConfigurableColumnsType<RowData, FilterVariant, AdditionalProps>, 'visibleColumns' | 'setVisibleColumns'>> & {
|
|
144
130
|
id: `table__${string}`;
|
|
@@ -183,12 +169,6 @@ export type InternalTableProps<RowData extends unknown, FilterVariant extends Fi
|
|
|
183
169
|
handleClearBulkSelection: () => void;
|
|
184
170
|
handleToggleBulkSelectionOnRow: (row: RowType<RowData>) => void;
|
|
185
171
|
ViewWrapper?: FunctionComponent<ViewWrapperProps<RowData, FilterVariant, AdditionalProps>>;
|
|
186
|
-
/**
|
|
187
|
-
* An icon as the first element of the row, that hides actions like expand or bulk select icons
|
|
188
|
-
* until user hovers over the row or the row has focus from keyboard navigation
|
|
189
|
-
*/
|
|
190
|
-
rowStartIconConfig?: Omit<IconsProps, 'dataTestId'>;
|
|
191
|
-
onRowClick?: (row: RowType<RowData>, isExpandedRow: boolean) => void;
|
|
192
172
|
} & ({
|
|
193
173
|
/**
|
|
194
174
|
* Direct rows data for frontend-only datasets like resource browser.
|
|
@@ -211,12 +191,12 @@ export type InternalTableProps<RowData extends unknown, FilterVariant extends Fi
|
|
|
211
191
|
} | {
|
|
212
192
|
paginationVariant: Omit<PaginationEnum, 'PAGINATED'>;
|
|
213
193
|
pageSizeOptions?: never;
|
|
214
|
-
}) & FilterConfig<FilterVariant, RowData
|
|
194
|
+
}) & FilterConfig<FilterVariant, RowData>;
|
|
215
195
|
export type UseResizableTableConfigWrapperProps<RowData extends unknown, FilterVariant extends FiltersTypeEnum, AdditionalProps extends Record<string, any>> = Omit<InternalTableProps<RowData, FilterVariant, AdditionalProps>, 'resizableConfig'>;
|
|
216
196
|
export type TableWithBulkSelectionProps<RowData extends unknown, FilterVariant extends FiltersTypeEnum, AdditionalProps extends Record<string, any>> = Omit<UseResizableTableConfigWrapperProps<RowData, FilterVariant, AdditionalProps>, 'bulkSelectionReturnValue' | 'handleClearBulkSelection' | 'handleToggleBulkSelectionOnRow'>;
|
|
217
197
|
export type VisibleColumnsWrapperProps<RowData extends unknown, FilterVariant extends FiltersTypeEnum, AdditionalProps extends Record<string, any>> = Omit<TableWithBulkSelectionProps<RowData, FilterVariant, AdditionalProps>, 'visibleColumns' | 'setVisibleColumns'>;
|
|
218
198
|
export type FilterWrapperProps<RowData extends unknown, FilterVariant extends FiltersTypeEnum, AdditionalProps extends Record<string, any>> = Omit<VisibleColumnsWrapperProps<RowData, FilterVariant, AdditionalProps>, 'filterData'>;
|
|
219
|
-
export type TableProps<RowData extends unknown = unknown, FilterVariant extends FiltersTypeEnum = FiltersTypeEnum.NONE, AdditionalProps extends Record<string, any> = {}> = Pick<FilterWrapperProps<RowData, FilterVariant, AdditionalProps>, 'additionalFilterProps' | 'bulkSelectionConfig' | 'areColumnsConfigurable' | 'emptyStateConfig' | 'filtersVariant' | 'filter' | 'additionalProps' | 'columns' | 'getRows' | 'rows' | 'paginationVariant' | 'stylesConfig' | 'id' | 'rowActionOnHoverConfig' | 'loading' | 'ViewWrapper' | 'pageSizeOptions' | 'clearFilters'
|
|
199
|
+
export type TableProps<RowData extends unknown = unknown, FilterVariant extends FiltersTypeEnum = FiltersTypeEnum.NONE, AdditionalProps extends Record<string, any> = {}> = Pick<FilterWrapperProps<RowData, FilterVariant, AdditionalProps>, 'additionalFilterProps' | 'bulkSelectionConfig' | 'areColumnsConfigurable' | 'emptyStateConfig' | 'filtersVariant' | 'filter' | 'additionalProps' | 'columns' | 'getRows' | 'rows' | 'paginationVariant' | 'stylesConfig' | 'id' | 'rowActionOnHoverConfig' | 'loading' | 'ViewWrapper' | 'pageSizeOptions' | 'clearFilters'>;
|
|
220
200
|
export type BulkActionStateType = string | null;
|
|
221
201
|
export interface BulkSelectionActionWidgetProps extends Pick<BulkSelectionConfigType, 'BulkActionsComponent' | 'bulkActionsData'> {
|
|
222
202
|
count: number;
|
|
@@ -234,7 +214,7 @@ export interface RowsResultType<RowData extends unknown> {
|
|
|
234
214
|
filteredRows: RowsType<RowData>;
|
|
235
215
|
totalRows: number;
|
|
236
216
|
}
|
|
237
|
-
export interface TableContentProps<RowData extends unknown, FilterVariant extends FiltersTypeEnum, AdditionalProps extends Record<string, any>> extends Pick<InternalTableProps<RowData, FilterVariant, AdditionalProps>, 'filterData' | 'rows' | 'resizableConfig' | 'additionalProps' | 'visibleColumns' | 'stylesConfig' | 'loading' | 'bulkSelectionConfig' | 'bulkSelectionReturnValue' | 'handleClearBulkSelection' | 'handleToggleBulkSelectionOnRow' | 'paginationVariant' | 'rowActionOnHoverConfig' | 'pageSizeOptions' | 'getRows'
|
|
217
|
+
export interface TableContentProps<RowData extends unknown, FilterVariant extends FiltersTypeEnum, AdditionalProps extends Record<string, any>> extends Pick<InternalTableProps<RowData, FilterVariant, AdditionalProps>, 'filterData' | 'rows' | 'resizableConfig' | 'additionalProps' | 'visibleColumns' | 'stylesConfig' | 'loading' | 'bulkSelectionConfig' | 'bulkSelectionReturnValue' | 'handleClearBulkSelection' | 'handleToggleBulkSelectionOnRow' | 'paginationVariant' | 'rowActionOnHoverConfig' | 'pageSizeOptions' | 'getRows'>, RowsResultType<RowData> {
|
|
238
218
|
areFilteredRowsLoading: boolean;
|
|
239
219
|
}
|
|
240
220
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Column, ConfigurableColumnsType, FiltersTypeEnum, GetFilteringPromiseProps, RowsType, TableProps, UseFiltersReturnType } from './types';
|
|
2
|
-
export declare const searchAndSortRows: <RowData extends unknown, FilterVariant extends FiltersTypeEnum, AdditionalProps extends Record<string, any>>(rows: TableProps<RowData, FilterVariant, AdditionalProps>["rows"], filter: TableProps<RowData, FilterVariant, AdditionalProps>["filter"], filterData: UseFiltersReturnType,
|
|
2
|
+
export declare const searchAndSortRows: <RowData extends unknown, FilterVariant extends FiltersTypeEnum, AdditionalProps extends Record<string, any>>(rows: TableProps<RowData, FilterVariant, AdditionalProps>["rows"], filter: TableProps<RowData, FilterVariant, AdditionalProps>["filter"], filterData: UseFiltersReturnType, comparator?: Column<RowData, FilterVariant, AdditionalProps>["comparator"]) => Awaited<ReturnType<TableProps<RowData>["getRows"]>>;
|
|
3
3
|
export declare const getVisibleColumnsFromLocalStorage: <RowData extends unknown, FilterVariant extends FiltersTypeEnum, AdditionalProps extends Record<string, any>>({ allColumns, id, }: Pick<ConfigurableColumnsType<RowData, FilterVariant, AdditionalProps>, "allColumns"> & Pick<TableProps<RowData, FilterVariant, AdditionalProps>, "id">) => Column<RowData, FilterVariant, AdditionalProps>[];
|
|
4
4
|
export declare const setVisibleColumnsToLocalStorage: <RowData extends unknown, FilterVariant extends FiltersTypeEnum, AdditionalProps extends Record<string, any>>({ id, visibleColumns, }: Pick<ConfigurableColumnsType<RowData, FilterVariant, AdditionalProps>, "visibleColumns"> & Pick<TableProps<RowData, FilterVariant, AdditionalProps>, "id">) => void;
|
|
5
5
|
export declare const getVisibleColumns: <RowData extends unknown, FilterVariant extends FiltersTypeEnum, AdditionalProps extends Record<string, any>>({ areColumnsConfigurable, columns, id, }: Pick<TableProps<RowData, FilterVariant, AdditionalProps>, "areColumnsConfigurable" | "columns" | "id">) => Column<RowData, FilterVariant, AdditionalProps>[];
|
package/dist/Shared/Helpers.d.ts
CHANGED
|
@@ -5,8 +5,8 @@ import { Pair } from 'yaml';
|
|
|
5
5
|
import { MaterialHistoryType } from './Services/app.types';
|
|
6
6
|
import { ApprovalConfigDataType, MaterialInfo, SortingOrder, UserApprovalConfigType, UserApprovalInfo } from '../Common';
|
|
7
7
|
import { GVKType } from '../Pages';
|
|
8
|
-
import { AggregatedNodes
|
|
9
|
-
import { BorderConfigType, GetTimeDifferenceParamsType, GitTriggers, IntersectionChangeHandler, IntersectionOptions, Node, TargetPlatformItemDTO, TargetPlatformsDTO, WebhookEventNameType } from './types';
|
|
8
|
+
import { AggregatedNodes } from './Components';
|
|
9
|
+
import { BorderConfigType, GetTimeDifferenceParamsType, GitTriggers, IntersectionChangeHandler, IntersectionOptions, Node, PodMetaData, TargetPlatformItemDTO, TargetPlatformsDTO, WebhookEventNameType } from './types';
|
|
10
10
|
interface HighlightSearchTextProps {
|
|
11
11
|
/**
|
|
12
12
|
* The text to be highlighted
|
|
@@ -37,7 +37,7 @@ export declare const isNullOrUndefined: (value: unknown) => boolean;
|
|
|
37
37
|
export declare const handleDisableSubmitOnEnter: (event: React.KeyboardEvent<HTMLFormElement>) => void;
|
|
38
38
|
export declare const getKeyToBooleanMapFromArray: <T extends string | number>(arr?: T[]) => Record<T, boolean>;
|
|
39
39
|
export declare const renderValidInputButtonTippy: (children: ReactElement) => JSX.Element;
|
|
40
|
-
export declare function aggregateNodes(nodes: any[], podMetadata:
|
|
40
|
+
export declare function aggregateNodes(nodes: any[], podMetadata: PodMetaData[]): AggregatedNodes;
|
|
41
41
|
export declare const decode: (data: any, isEncoded?: boolean) => {};
|
|
42
42
|
export declare const isTimeStringAvailable: (time: string) => boolean;
|
|
43
43
|
export declare const getTimeDifference: ({ startTime, endTime, fallbackString, }: GetTimeDifferenceParamsType) => string;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export * from './MainContextProvider';
|
|
2
2
|
export type { MainContext, ReloadVersionConfigTypes, SidePanelConfig, TempAppWindowConfig } from './types';
|
|
3
|
-
export { SidePanelTab } from './types';
|
|
3
|
+
export { AIAgentContextSourceType, type AIAgentContextType, SidePanelTab } from './types';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Dispatch, MutableRefObject, ReactNode, SetStateAction } from 'react';
|
|
1
|
+
import { Dispatch, FunctionComponent, MutableRefObject, ReactNode, SetStateAction } from 'react';
|
|
2
2
|
import { SERVER_MODE } from '../../../Common';
|
|
3
3
|
import { DevtronLicenseInfo, EnvironmentDataValuesDTO, IntelligenceConfig, LicenseInfoDialogType, ToastManager } from '../..';
|
|
4
4
|
import { ServerInfo } from '../../Components/Header/types';
|
|
@@ -22,10 +22,43 @@ export interface SidePanelConfig {
|
|
|
22
22
|
/** URL to documentation that should be displayed in the panel */
|
|
23
23
|
docLink: string | null;
|
|
24
24
|
aiSessionId?: string;
|
|
25
|
+
isExpandedView?: boolean;
|
|
25
26
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
export declare enum AIAgentContextSourceType {
|
|
28
|
+
APP_DETAILS = "app-details",
|
|
29
|
+
RESOURCE_BROWSER_CLUSTER = "resource-browser-cluster"
|
|
30
|
+
}
|
|
31
|
+
export type AIAgentAppType = 'devtronApp' | 'devtronHelmChart' | 'externalHelmChart' | 'externalArgoApp' | 'externalFluxApp';
|
|
32
|
+
type AIAgentAppDataMasterType = {
|
|
33
|
+
appId: number | string;
|
|
34
|
+
appName: string;
|
|
35
|
+
envId: number;
|
|
36
|
+
envName: string;
|
|
37
|
+
clusterId: number;
|
|
38
|
+
namespace: string;
|
|
39
|
+
appType: AIAgentAppType;
|
|
40
|
+
fluxAppDeploymentType: string;
|
|
41
|
+
};
|
|
42
|
+
type AIAgentAppDataType<TAppType extends AIAgentAppType, TRequiredFields extends keyof AIAgentAppDataMasterType> = Pick<AIAgentAppDataMasterType, TRequiredFields> & {
|
|
43
|
+
[K in Exclude<keyof AIAgentAppDataMasterType, TRequiredFields | 'appType'>]?: never;
|
|
44
|
+
} & {
|
|
45
|
+
appType: TAppType;
|
|
46
|
+
};
|
|
47
|
+
type CommonContextDataType = Record<string, unknown> & {
|
|
48
|
+
uiMarkup?: string;
|
|
49
|
+
};
|
|
50
|
+
export type AIAgentContextType = {
|
|
51
|
+
source: AIAgentContextSourceType.APP_DETAILS;
|
|
52
|
+
data: AIAgentAppDataType<'devtronApp' | 'devtronHelmChart', 'appId' | 'appName' | 'envId' | 'envName' | 'clusterId'> | AIAgentAppDataType<'externalHelmChart', 'appId' | 'appName' | 'clusterId' | 'namespace'> | AIAgentAppDataType<'externalArgoApp', 'appName' | 'clusterId' | 'namespace'> | (AIAgentAppDataType<'externalFluxApp', 'appName' | 'clusterId' | 'namespace' | 'fluxAppDeploymentType'> & CommonContextDataType);
|
|
53
|
+
} | {
|
|
54
|
+
source: AIAgentContextSourceType.RESOURCE_BROWSER_CLUSTER;
|
|
55
|
+
data: {
|
|
56
|
+
clusterId: number;
|
|
57
|
+
clusterName: string;
|
|
58
|
+
} & CommonContextDataType;
|
|
59
|
+
};
|
|
60
|
+
export type DebugAgentContextType = AIAgentContextType & {
|
|
61
|
+
prompt?: string;
|
|
29
62
|
};
|
|
30
63
|
export interface TempAppWindowConfig {
|
|
31
64
|
/** Whether the temporary window is open */
|
|
@@ -87,6 +120,8 @@ type CommonMainContextProps = {
|
|
|
87
120
|
setLicenseData: Dispatch<SetStateAction<DevtronLicenseInfo>>;
|
|
88
121
|
canFetchHelmAppStatus: boolean;
|
|
89
122
|
setIntelligenceConfig: Dispatch<SetStateAction<IntelligenceConfig>>;
|
|
123
|
+
debugAgentContext: DebugAgentContextType | null;
|
|
124
|
+
setDebugAgentContext: (aiAgentContext: DebugAgentContextType | null) => void;
|
|
90
125
|
setAIAgentContext: (aiAgentContext: AIAgentContextType) => void;
|
|
91
126
|
setSidePanelConfig: Dispatch<SetStateAction<SidePanelConfig>>;
|
|
92
127
|
} & Pick<EnvironmentDataValuesDTO, 'isResourceRecommendationEnabled'>;
|
|
@@ -115,6 +150,8 @@ export type MainContext = CommonMainContextProps & ({
|
|
|
115
150
|
aiAgentContext: AIAgentContextType;
|
|
116
151
|
tempAppWindowConfig: TempAppWindowConfig;
|
|
117
152
|
setTempAppWindowConfig: Dispatch<SetStateAction<TempAppWindowConfig>>;
|
|
153
|
+
AIRecommendations?: FunctionComponent;
|
|
154
|
+
featureAskDevtronExpert: EnvironmentDataValuesDTO['featureAskDevtronExpert'];
|
|
118
155
|
} | {
|
|
119
156
|
isLicenseDashboard: true;
|
|
120
157
|
serverMode: null;
|
|
@@ -132,6 +169,8 @@ export type MainContext = CommonMainContextProps & ({
|
|
|
132
169
|
aiAgentContext: null;
|
|
133
170
|
tempAppWindowConfig: null;
|
|
134
171
|
setTempAppWindowConfig: null;
|
|
172
|
+
AIRecommendations?: null;
|
|
173
|
+
featureAskDevtronExpert?: null;
|
|
135
174
|
});
|
|
136
175
|
export interface MainContextProviderProps {
|
|
137
176
|
children: ReactNode;
|
|
@@ -39,6 +39,7 @@ export interface EnvironmentDataValuesDTO extends Pick<MainContext, 'featureGitO
|
|
|
39
39
|
canOnlyViewPermittedEnvOrgLevel: boolean;
|
|
40
40
|
devtronManagedLicensingEnabled: boolean;
|
|
41
41
|
isResourceRecommendationEnabled?: boolean;
|
|
42
|
+
featureAskDevtronExpert: boolean;
|
|
42
43
|
}
|
|
43
44
|
export interface ClusterMinDTO {
|
|
44
45
|
id: number;
|
|
@@ -419,5 +419,6 @@ export declare const PROGRESSING_DEPLOYMENT_STATUS_POLLING_INTERVAL = 10000;
|
|
|
419
419
|
export declare const STRATEGY_TYPE_TO_TITLE_MAP: Record<DeploymentStrategyTypeWithDefault, string>;
|
|
420
420
|
export declare const CUBIC_BEZIER_CURVE: [number, number, number, number];
|
|
421
421
|
export declare const ALLOW_ACTION_OUTSIDE_FOCUS_TRAP = "allow-action-outside-focus-trap";
|
|
422
|
+
export declare const LICENSE_KEY_QUERY_PARAM = "licenseKey";
|
|
422
423
|
export declare const REMOTE_CONNECTION_TYPE_LABEL_MAP: Record<RemoteConnectionType, string>;
|
|
423
424
|
export declare const TARGET_K8S_VERSION_SEARCH_KEY = "targetK8sVersion";
|
package/dist/Shared/types.d.ts
CHANGED
|
@@ -129,13 +129,21 @@ export interface iNode extends Node {
|
|
|
129
129
|
status: string;
|
|
130
130
|
pNode?: iNode;
|
|
131
131
|
}
|
|
132
|
+
export interface HelmReleaseStatus {
|
|
133
|
+
status: string;
|
|
134
|
+
message: string;
|
|
135
|
+
description: string;
|
|
136
|
+
}
|
|
132
137
|
export interface ResourceTree {
|
|
133
|
-
|
|
138
|
+
nodes: Node[];
|
|
134
139
|
newGenerationReplicaSet: string;
|
|
135
|
-
nodes: Array<Node>;
|
|
136
|
-
podMetadata: Array<PodMetaData>;
|
|
137
140
|
status: string;
|
|
141
|
+
podMetadata: PodMetaData[];
|
|
142
|
+
conditions?: any;
|
|
143
|
+
releaseStatus?: HelmReleaseStatus;
|
|
138
144
|
resourcesSyncResult?: Record<string, string>;
|
|
145
|
+
hasDrift?: boolean;
|
|
146
|
+
lastSnapshotTime?: string;
|
|
139
147
|
wfrId?: number;
|
|
140
148
|
}
|
|
141
149
|
export declare enum AppType {
|
|
@@ -145,11 +153,6 @@ export declare enum AppType {
|
|
|
145
153
|
EXTERNAL_ARGO_APP = "external_argo_app",
|
|
146
154
|
EXTERNAL_FLUX_APP = "external_flux_app"
|
|
147
155
|
}
|
|
148
|
-
export interface HelmReleaseStatus {
|
|
149
|
-
status: string;
|
|
150
|
-
message: string;
|
|
151
|
-
description: string;
|
|
152
|
-
}
|
|
153
156
|
interface MaterialInfo {
|
|
154
157
|
author: string;
|
|
155
158
|
branch: string;
|
|
@@ -173,7 +176,7 @@ export interface AppDetails {
|
|
|
173
176
|
appStoreChartName?: string;
|
|
174
177
|
appStoreInstalledAppVersionId?: number;
|
|
175
178
|
ciArtifactId?: number;
|
|
176
|
-
deprecated?:
|
|
179
|
+
deprecated?: boolean;
|
|
177
180
|
environmentId?: number;
|
|
178
181
|
environmentName: string;
|
|
179
182
|
installedAppId?: number;
|
|
@@ -209,6 +212,12 @@ export interface AppDetails {
|
|
|
209
212
|
FluxAppStatusDetail?: FluxAppStatusDetail;
|
|
210
213
|
isPipelineTriggered?: boolean;
|
|
211
214
|
releaseMode?: ReleaseMode;
|
|
215
|
+
cdPipelineId?: number;
|
|
216
|
+
triggerType?: string;
|
|
217
|
+
parentEnvironmentName?: string;
|
|
218
|
+
ciPipelineId?: number;
|
|
219
|
+
trafficSwitched?: boolean;
|
|
220
|
+
pcoId?: number;
|
|
212
221
|
}
|
|
213
222
|
export interface ConfigDriftModalProps extends Required<Pick<AppDetails, 'appId'>> {
|
|
214
223
|
envId: number;
|
|
@@ -941,18 +950,10 @@ export interface LicenseErrorStruct {
|
|
|
941
950
|
code: LicensingErrorCodes;
|
|
942
951
|
userMessage: string;
|
|
943
952
|
}
|
|
944
|
-
export
|
|
953
|
+
export type DevtronLicenseBaseDTO = {
|
|
945
954
|
fingerprint: string | null;
|
|
946
955
|
isTrial: boolean | null;
|
|
947
956
|
isFreemium: boolean | null;
|
|
948
|
-
/**
|
|
949
|
-
* In timestamp format
|
|
950
|
-
*/
|
|
951
|
-
expiry: string | null;
|
|
952
|
-
/**
|
|
953
|
-
* Can be negative, depicts time left in seconds for license to expire
|
|
954
|
-
*/
|
|
955
|
-
ttl: number | null;
|
|
956
957
|
/**
|
|
957
958
|
* Show a reminder after these many DAYS left for license to expire, i.e,
|
|
958
959
|
* Show if `ttl` is less than `reminderThreshold` [converted to seconds]
|
|
@@ -963,7 +964,28 @@ export interface DevtronLicenseBaseDTO {
|
|
|
963
964
|
domain: string | null;
|
|
964
965
|
} | null;
|
|
965
966
|
license: string | null;
|
|
966
|
-
}
|
|
967
|
+
} & ({
|
|
968
|
+
isSaasInstance: true;
|
|
969
|
+
/**
|
|
970
|
+
* In seconds
|
|
971
|
+
*/
|
|
972
|
+
timeElapsedSinceCreation: number;
|
|
973
|
+
creationTime: string;
|
|
974
|
+
ttl?: never;
|
|
975
|
+
expiry?: never;
|
|
976
|
+
} | {
|
|
977
|
+
isSaasInstance?: false;
|
|
978
|
+
timeElapsedSinceCreation?: never;
|
|
979
|
+
creationTime?: never;
|
|
980
|
+
/**
|
|
981
|
+
* Can be negative, depicts time left in seconds for license to expire
|
|
982
|
+
*/
|
|
983
|
+
ttl: number | null;
|
|
984
|
+
/**
|
|
985
|
+
* In timestamp format
|
|
986
|
+
*/
|
|
987
|
+
expiry: string | null;
|
|
988
|
+
});
|
|
967
989
|
export type DevtronLicenseDTO<isCentralDashboard extends boolean = false> = DevtronLicenseBaseDTO & (isCentralDashboard extends true ? {
|
|
968
990
|
claimedByUserDetails: {
|
|
969
991
|
firstName: string | null;
|
|
@@ -973,8 +995,13 @@ export type DevtronLicenseDTO<isCentralDashboard extends boolean = false> = Devt
|
|
|
973
995
|
showLicenseData?: never;
|
|
974
996
|
licenseStatusError?: never;
|
|
975
997
|
moduleLimits?: never;
|
|
998
|
+
instanceData: {
|
|
999
|
+
devtronUrl: string;
|
|
1000
|
+
devtronPassword: string;
|
|
1001
|
+
} | null;
|
|
976
1002
|
} : {
|
|
977
1003
|
claimedByUserDetails?: never;
|
|
1004
|
+
instanceData?: never;
|
|
978
1005
|
showLicenseData: boolean;
|
|
979
1006
|
licenseStatusError?: LicenseErrorStruct;
|
|
980
1007
|
moduleLimits: {
|
|
@@ -1101,7 +1128,7 @@ export interface DeploymentStatusDetailsBreakdownDataType {
|
|
|
1101
1128
|
}
|
|
1102
1129
|
export interface IntelligenceConfig {
|
|
1103
1130
|
clusterId: number;
|
|
1104
|
-
metadata: Record<string, string>;
|
|
1131
|
+
metadata: Record<string, string | number>;
|
|
1105
1132
|
prompt: string;
|
|
1106
1133
|
analyticsCategory: string;
|
|
1107
1134
|
}
|