@devtron-labs/devtron-fe-common-lib 0.7.3-beta-5 → 1.0.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/Common/Api.d.ts +1 -1
- package/dist/Common/Common.service.d.ts +0 -7
- package/dist/Common/Constants.d.ts +2 -14
- package/dist/Common/DraggableWrapper/types.d.ts +2 -1
- package/dist/Common/Helper.d.ts +3 -6
- package/dist/Common/RJSF/Form.d.ts +2 -1
- package/dist/Common/Types.d.ts +9 -0
- package/dist/Pages/Applications/DevtronApps/Details/AppConfigurations/utils.d.ts +1 -1
- package/dist/Pages/ResourceBrowser/ResourceBrowser.Types.d.ts +47 -0
- package/dist/Pages/ResourceBrowser/index.d.ts +2 -0
- package/dist/Pages/ResourceBrowser/service.d.ts +3 -0
- package/dist/Pages/ResourceBrowser/types.d.ts +10 -0
- package/dist/Shared/API/APIQueuing.d.ts +1 -1
- package/dist/Shared/Components/BulkSelection/types.d.ts +8 -5
- package/dist/Shared/Components/CICDHistory/CiPipelineSourceConfig.d.ts +11 -2
- package/dist/Shared/Components/CICDHistory/types.d.ts +0 -11
- package/dist/Shared/Components/CollapsibleList/CollapsibleList.types.d.ts +2 -1
- package/dist/Shared/Components/GitCommitInfoGeneric/GitCommitInfoGeneric.d.ts +1 -1
- package/dist/Shared/Components/Security/SecurityModal/config/ImageScan.d.ts +2 -1
- package/dist/Shared/Components/Security/SecurityModal/config/index.d.ts +1 -0
- package/dist/Shared/Components/Security/SecurityModal/index.d.ts +1 -1
- package/dist/Shared/Components/Security/SecurityModal/utils.d.ts +1 -1
- package/dist/Shared/Helpers.d.ts +0 -14
- package/dist/Shared/Services/app.types.d.ts +1 -2
- package/dist/Shared/types.d.ts +37 -1
- package/dist/Shared/validations.d.ts +1 -0
- package/dist/assets/index.css +1 -1
- package/dist/{cssMode-D0LUdqNd.js → cssMode-Cms6MtyR.js} +1 -1
- package/dist/{freemarker2-D4nrEXvC.js → freemarker2-3FE3rIRb.js} +1 -1
- package/dist/{handlebars-BhT09NQU.js → handlebars-DeT_KQct.js} +1 -1
- package/dist/{html-pjjVssrU.js → html-W6MJJ6Cd.js} +1 -1
- package/dist/{htmlMode-DJEv10z8.js → htmlMode-X1lmmOke.js} +1 -1
- package/dist/{index-oW4hAVO9.js → index-BAPwGfmH.js} +21012 -20923
- package/dist/index.d.ts +1 -0
- package/dist/index.js +428 -427
- package/dist/{javascript-B8H8ALqH.js → javascript-DBHHMxuE.js} +1 -1
- package/dist/{jsonMode-BzcyCsJ0.js → jsonMode-R_Ioy9kM.js} +1 -1
- package/dist/{liquid-DaKDt32S.js → liquid-CgBcKItj.js} +1 -1
- package/dist/{mdx-CsQwVU4-.js → mdx-5zADcGgC.js} +1 -1
- package/dist/{python-DAEOwAsp.js → python-Ct8AOOli.js} +1 -1
- package/dist/{razor-DOko_5-K.js → razor-DBKs2NDr.js} +1 -1
- package/dist/{tsMode-dx1lFOSb.js → tsMode-2mDlxLKe.js} +1 -1
- package/dist/{typescript-KWvfFv3I.js → typescript-_jgELbQ9.js} +1 -1
- package/dist/{xml-D0kYPOuB.js → xml-Da6smlqJ.js} +1 -1
- package/dist/{yaml-BrfWTCCn.js → yaml-BNTzHcuk.js} +1 -1
- package/package.json +2 -1
package/dist/Common/Api.d.ts
CHANGED
|
@@ -12,4 +12,4 @@ export declare const abortPreviousRequests: <T>(callback: () => Promise<T>, abor
|
|
|
12
12
|
/**
|
|
13
13
|
* Returns true if the error is due to a aborted request
|
|
14
14
|
*/
|
|
15
|
-
export declare const getIsRequestAborted: (error: any) =>
|
|
15
|
+
export declare const getIsRequestAborted: (error: any) => boolean;
|
|
@@ -27,11 +27,4 @@ export declare function getClusterListMin(): Promise<ResponseType<any>>;
|
|
|
27
27
|
export declare const getResourceGroupListRaw: (clusterId: string) => Promise<ResponseType<ApiResourceType>>;
|
|
28
28
|
export declare function getNamespaceListMin(clusterIdsCsv: string): Promise<EnvironmentListHelmResponse>;
|
|
29
29
|
export declare function getWebhookEventsForEventId(eventId: string | number): Promise<ResponseType<any>>;
|
|
30
|
-
/**
|
|
31
|
-
*
|
|
32
|
-
* @param gitUrl Git URL of the repository
|
|
33
|
-
* @param branchName Branch name
|
|
34
|
-
* @returns URL to the branch in the Git repository
|
|
35
|
-
*/
|
|
36
|
-
export declare const getGitBranchUrl: (gitUrl: string, branchName: string) => string | null;
|
|
37
30
|
export {};
|
|
@@ -46,6 +46,7 @@ export declare const URLS: {
|
|
|
46
46
|
GLOBAL_CONFIG_DEPLOYMENT_CHARTS_LIST: string;
|
|
47
47
|
NETWORK_STATUS_INTERFACE: string;
|
|
48
48
|
CONFIG_DRIFT: string;
|
|
49
|
+
RESOURCE_BROWSER: string;
|
|
49
50
|
};
|
|
50
51
|
export declare const ROUTES: {
|
|
51
52
|
APP: string;
|
|
@@ -92,6 +93,7 @@ export declare const ROUTES: {
|
|
|
92
93
|
DEPLOYMENT_CHARTS_LIST: string;
|
|
93
94
|
USER_LIST_MIN: string;
|
|
94
95
|
CONFIG_DATA: string;
|
|
96
|
+
K8S_RESOURCE_LIST: string;
|
|
95
97
|
};
|
|
96
98
|
export declare enum KEY_VALUE {
|
|
97
99
|
KEY = "key",
|
|
@@ -291,17 +293,3 @@ export declare const VULNERABILITIES_SORT_PRIORITY: {
|
|
|
291
293
|
unknown: number;
|
|
292
294
|
};
|
|
293
295
|
export declare const IS_PLATFORM_MAC_OS: boolean;
|
|
294
|
-
/**
|
|
295
|
-
* Git provider types
|
|
296
|
-
*/
|
|
297
|
-
export declare enum GitProviderType {
|
|
298
|
-
GITHUB = "github",
|
|
299
|
-
GITLAB = "gitlab",
|
|
300
|
-
BITBUCKET = "bitbucket",
|
|
301
|
-
AZURE = "azure",
|
|
302
|
-
GITEA = "gitea"
|
|
303
|
-
}
|
|
304
|
-
/**
|
|
305
|
-
* Formats the schema removing any irregularity in the existing schema
|
|
306
|
-
*/
|
|
307
|
-
export declare const getFormattedSchema: (schema?: string) => string;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { HTMLAttributes, ReactNode, RefObject } from 'react';
|
|
2
2
|
export declare enum DraggablePositionVariant {
|
|
3
3
|
PARENT_BOTTOM_CENTER = "PARENT_BOTTOM_CENTER",
|
|
4
|
-
SCREEN_BOTTOM_CENTER = "SCREEN_BOTTOM_CENTER"
|
|
4
|
+
SCREEN_BOTTOM_CENTER = "SCREEN_BOTTOM_CENTER",
|
|
5
|
+
SCREEN_BOTTOM_RIGHT = "SCREEN_BOTTOM_RIGHT"
|
|
5
6
|
}
|
|
6
7
|
export interface DraggableWrapperProps {
|
|
7
8
|
children: ReactNode;
|
package/dist/Common/Helper.d.ts
CHANGED
|
@@ -121,12 +121,9 @@ export declare function mapByKey<T = Map<any, any>>(arr: any[], id: string): T;
|
|
|
121
121
|
export declare function asyncWrap(promise: any): any[];
|
|
122
122
|
export declare const prefixZeroIfSingleDigit: (value?: number) => string | number;
|
|
123
123
|
export declare const throttle: <T extends (...args: unknown[]) => unknown>(func: T, delay?: number) => ((...args: Parameters<T>) => void);
|
|
124
|
+
export declare const getSanitizedIframe: (iframeString: string) => string;
|
|
124
125
|
/**
|
|
125
|
-
*
|
|
126
|
-
* @param sourceType - SourceTypeMap
|
|
127
|
-
* @param _isRegex - boolean
|
|
128
|
-
* @param webhookEventName - WebhookEventNameType
|
|
129
|
-
* @returns - Icon
|
|
126
|
+
* This method adds default attributes to iframe - title, loading ="lazy", width="100%", height="100%"
|
|
130
127
|
*/
|
|
131
|
-
export declare const
|
|
128
|
+
export declare const getIframeWithDefaultAttributes: (iframeString: string, defaultName?: string) => string;
|
|
132
129
|
export {};
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
import { default as RJSF } from '@rjsf/core';
|
|
1
2
|
import { FormProps } from './types';
|
|
2
|
-
export declare const RJSFForm: (
|
|
3
|
+
export declare const RJSFForm: import('react').ForwardRefExoticComponent<Pick<FormProps, "children" | "className" | "id" | "onFocus" | "onBlur" | "onChange" | "onSubmit" | "onError" | "action" | "disabled" | "name" | "target" | "tagName" | "autoComplete" | "noValidate" | "readonly" | "schema" | "uiSchema" | "formContext" | "formData" | "idPrefix" | "idSeparator" | "fields" | "templates" | "widgets" | "translateString" | "acceptcharset" | "acceptCharset" | "enctype" | "method" | "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>>>;
|
package/dist/Common/Types.d.ts
CHANGED
|
@@ -856,4 +856,13 @@ export interface EnvironmentHelmResult {
|
|
|
856
856
|
allowedDeploymentTypes?: DeploymentAppTypes[];
|
|
857
857
|
}
|
|
858
858
|
export type EnvironmentListHelmResponse = ResponseType<EnvironmentListHelmResult[]>;
|
|
859
|
+
export interface WidgetEventDetails {
|
|
860
|
+
message: string;
|
|
861
|
+
namespace: string;
|
|
862
|
+
object: string;
|
|
863
|
+
source: string;
|
|
864
|
+
count: number;
|
|
865
|
+
age: string;
|
|
866
|
+
lastSeen: string;
|
|
867
|
+
}
|
|
859
868
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { DeploymentStageType } from '../../../../../Shared/constants';
|
|
2
|
-
export declare const getDeploymentStageTitle: (stage: DeploymentStageType) => "
|
|
2
|
+
export declare const getDeploymentStageTitle: (stage: DeploymentStageType) => "-" | "deployment" | "pre-deployment" | "post-deployment";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { NodeType, Nodes } from '../../Shared/types';
|
|
2
|
+
import { RefObject } from 'react';
|
|
2
3
|
export interface GVKType {
|
|
3
4
|
Group: string;
|
|
4
5
|
Version: string;
|
|
@@ -18,3 +19,49 @@ export interface K8SObjectBaseType {
|
|
|
18
19
|
name: string;
|
|
19
20
|
isExpanded: boolean;
|
|
20
21
|
}
|
|
22
|
+
interface K8sRequestResourceIdentifierType {
|
|
23
|
+
groupVersionKind: GVKType;
|
|
24
|
+
namespace?: string;
|
|
25
|
+
name?: string;
|
|
26
|
+
}
|
|
27
|
+
interface ResourceListPayloadK8sRequestType {
|
|
28
|
+
resourceIdentifier: K8sRequestResourceIdentifierType;
|
|
29
|
+
patch?: string;
|
|
30
|
+
forceDelete?: boolean;
|
|
31
|
+
}
|
|
32
|
+
export interface K8sResourceListPayloadType {
|
|
33
|
+
clusterId: number;
|
|
34
|
+
filter?: string;
|
|
35
|
+
k8sRequest: ResourceListPayloadK8sRequestType;
|
|
36
|
+
}
|
|
37
|
+
export type K8sResourceDetailDataType = {
|
|
38
|
+
[key: string]: string | number | object;
|
|
39
|
+
};
|
|
40
|
+
export interface K8sResourceDetailType {
|
|
41
|
+
headers: string[];
|
|
42
|
+
data: K8sResourceDetailDataType[];
|
|
43
|
+
}
|
|
44
|
+
export interface BulkSelectionActionWidgetProps {
|
|
45
|
+
count: number;
|
|
46
|
+
handleOpenBulkDeleteModal: () => void;
|
|
47
|
+
handleClearBulkSelection: () => void;
|
|
48
|
+
handleOpenRestartWorkloadModal: () => void;
|
|
49
|
+
parentRef: RefObject<HTMLDivElement>;
|
|
50
|
+
showBulkRestartOption: boolean;
|
|
51
|
+
}
|
|
52
|
+
export interface BulkOperation {
|
|
53
|
+
name: string;
|
|
54
|
+
operation: (signal: AbortSignal, data?: unknown) => Promise<void>;
|
|
55
|
+
}
|
|
56
|
+
export type BulkOperationModalProps = {
|
|
57
|
+
operationType: 'restart' | 'delete';
|
|
58
|
+
clusterName: string;
|
|
59
|
+
operations: NonNullable<BulkOperation[]>;
|
|
60
|
+
handleModalClose: () => void;
|
|
61
|
+
resourceKind: string;
|
|
62
|
+
handleReloadDataAfterBulkOperation?: () => void;
|
|
63
|
+
hideResultsDrawer?: boolean;
|
|
64
|
+
shouldAllowForceOperation?: true;
|
|
65
|
+
};
|
|
66
|
+
export type BulkOperationModalState = BulkOperationModalProps['operationType'] | 'closed';
|
|
67
|
+
export {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { ResponseType } from '../../Common/Types';
|
|
2
|
+
import { K8sResourceDetailType, K8sResourceListPayloadType } from './ResourceBrowser.Types';
|
|
3
|
+
export declare const getK8sResourceList: (resourceListPayload: K8sResourceListPayloadType, signal?: AbortSignal) => Promise<ResponseType<K8sResourceDetailType>>;
|
|
@@ -6,5 +6,5 @@ import { ApiQueuingWithBatchResponseItem } from '../types';
|
|
|
6
6
|
* @param shouldRejectOnError If set to true, the promise will reject if any of the function calls rejects, i.e, acts like Promise.all else Promise.allSettled . Defaults to false.
|
|
7
7
|
* @returns A promise that resolves to a array of objects containing the status and value of the batch execution.
|
|
8
8
|
*/
|
|
9
|
-
declare const ApiQueuingWithBatch: <T>(functionCalls: any,
|
|
9
|
+
declare const ApiQueuingWithBatch: <T>(functionCalls: any, shouldRejectOnError?: boolean, batchSize?: number) => Promise<ApiQueuingWithBatchResponseItem<T>[]>;
|
|
10
10
|
export default ApiQueuingWithBatch;
|
|
@@ -24,6 +24,7 @@ export interface UseBulkSelectionReturnType<T> extends GetBulkSelectionCheckboxV
|
|
|
24
24
|
handleBulkSelection: ({ action, data }: HandleBulkSelectionType<T>) => void;
|
|
25
25
|
isBulkSelectionApplied: boolean;
|
|
26
26
|
getSelectedIdentifiersCount: () => number;
|
|
27
|
+
setIdentifiers: React.Dispatch<React.SetStateAction<T>>;
|
|
27
28
|
}
|
|
28
29
|
export interface BulkSelectionProps {
|
|
29
30
|
showPagination: boolean;
|
|
@@ -44,14 +45,16 @@ export declare enum SelectAllDialogStatus {
|
|
|
44
45
|
}
|
|
45
46
|
export type BulkSelectionIdentifiersType<T> = Record<string | number, T>;
|
|
46
47
|
export interface UseBulkSelectionProps<T> {
|
|
47
|
-
/**
|
|
48
|
-
* Response from API, assuming structure to be array of objects with key and values
|
|
49
|
-
* This will the given ids on current page
|
|
50
|
-
*/
|
|
51
|
-
identifiers: T;
|
|
52
48
|
/**
|
|
53
49
|
* Act as buffer between select all across pages and select all on page state
|
|
54
50
|
*/
|
|
55
51
|
getSelectAllDialogStatus: () => SelectAllDialogStatus;
|
|
52
|
+
/**
|
|
53
|
+
* Response from API, assuming structure to be array of objects with key and values
|
|
54
|
+
* This will the given ids on current page.
|
|
55
|
+
*
|
|
56
|
+
* NOTE!: Please wrap this value with a useMemo since it goes into useEffect dependency
|
|
57
|
+
*/
|
|
58
|
+
identifiers?: T;
|
|
56
59
|
children?: React.ReactNode;
|
|
57
60
|
}
|
|
@@ -1,2 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
export interface CIPipelineSourceConfigInterface {
|
|
2
|
+
sourceType: any;
|
|
3
|
+
sourceValue: any;
|
|
4
|
+
showTooltip?: boolean;
|
|
5
|
+
showIcons?: boolean;
|
|
6
|
+
baseText?: string;
|
|
7
|
+
regex?: any;
|
|
8
|
+
isRegex?: boolean;
|
|
9
|
+
primaryBranchAfterRegex?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare const CiPipelineSourceConfig: ({ sourceType, sourceValue, showTooltip, showIcons, baseText, regex, isRegex, primaryBranchAfterRegex, }: CIPipelineSourceConfigInterface) => JSX.Element;
|
|
@@ -666,15 +666,4 @@ export type CreateMarkupPropsType = {
|
|
|
666
666
|
export type TriggerHistoryFilterCriteriaType = `${string}|${string}|${string}`[];
|
|
667
667
|
export declare const terminalStatus: Set<string>;
|
|
668
668
|
export declare const statusSet: Set<string>;
|
|
669
|
-
export interface CIPipelineSourceConfigInterface {
|
|
670
|
-
sourceType: string;
|
|
671
|
-
sourceValue: any;
|
|
672
|
-
showTooltip?: boolean;
|
|
673
|
-
showIcons?: boolean;
|
|
674
|
-
baseText?: string;
|
|
675
|
-
regex?: any;
|
|
676
|
-
isRegex?: boolean;
|
|
677
|
-
primaryBranchAfterRegex?: string;
|
|
678
|
-
rootClassName?: string;
|
|
679
|
-
}
|
|
680
669
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { TippyProps } from '@tippyjs/react';
|
|
3
|
+
import { NavLinkProps } from 'react-router-dom';
|
|
3
4
|
interface ButtonTab {
|
|
4
5
|
/**
|
|
5
6
|
* Is tab active ( for button tab )
|
|
@@ -24,7 +25,7 @@ interface NavLinkTab {
|
|
|
24
25
|
}
|
|
25
26
|
export type TabOptions = 'button' | 'navLink';
|
|
26
27
|
type ConditionalTabType<TabType extends TabOptions> = TabType extends 'button' ? ButtonTab : NavLinkTab;
|
|
27
|
-
export type CollapsibleListItem<TabType extends TabOptions> = ConditionalTabType<TabType> & {
|
|
28
|
+
export type CollapsibleListItem<TabType extends TabOptions> = Pick<NavLinkProps, 'isActive'> & ConditionalTabType<TabType> & {
|
|
28
29
|
/**
|
|
29
30
|
* The title of the list item.
|
|
30
31
|
*/
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { GitCommitInfoGenericProps } from './types';
|
|
2
|
-
declare const GitCommitInfoGeneric: ({ materialSourceType, materialSourceValue, commitInfo, selectedCommitInfo, materialUrl, showMaterialInfoHeader, index, isExcluded, }: GitCommitInfoGenericProps) => JSX.Element;
|
|
2
|
+
declare const GitCommitInfoGeneric: ({ materialSourceType, materialSourceValue, commitInfo, selectedCommitInfo, materialUrl, showMaterialInfoHeader, canTriggerBuild, index, isExcluded, }: GitCommitInfoGenericProps) => JSX.Element;
|
|
3
3
|
export default GitCommitInfoGeneric;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { DetailViewDataType, ImageScan, SecurityModalStateType, TablePropsType, InfoCardPropsType, EmptyStateType, ApiResponseResultType, OpenDetailViewButtonProps } from '../types';
|
|
1
|
+
import { DetailViewDataType, ImageScan, SecurityModalStateType, TablePropsType, StatusType, InfoCardPropsType, EmptyStateType, ApiResponseResultType, OpenDetailViewButtonProps } from '../types';
|
|
2
|
+
export declare const getProgressingStateForStatus: (status: StatusType["status"]) => JSX.Element;
|
|
2
3
|
export declare const getImageScanTableData: (data: ImageScan, subCategory: SecurityModalStateType["subCategory"], setDetailViewData: OpenDetailViewButtonProps["setDetailViewData"], hidePolicy: boolean) => TablePropsType;
|
|
3
4
|
export declare const getImageScanInfoCardData: (data: ImageScan, subCategory: SecurityModalStateType["subCategory"]) => InfoCardPropsType;
|
|
4
5
|
export declare const getImageScanEmptyState: (data: ApiResponseResultType, subCategory: SecurityModalStateType["subCategory"], detailViewData: DetailViewDataType) => EmptyStateType;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { default as SecurityModal } from './SecurityModal';
|
|
2
2
|
export { getSecurityScanSeveritiesCount, getTotalVulnerabilityCount, parseGetResourceScanDetailsResponse, parseExecutionDetailResponse, } from './utils';
|
|
3
3
|
export type { AppDetailsPayload, ExecutionDetailsPayload, ApiResponseResultType, SidebarPropsType, SidebarDataChildType, SidebarDataType, GetResourceScanDetailsPayloadType, GetResourceScanDetailsResponseType, } from './types';
|
|
4
|
-
export { SIDEBAR_DATA } from './config';
|
|
4
|
+
export { SIDEBAR_DATA, getProgressingStateForStatus } from './config';
|
|
5
5
|
export { CATEGORY_LABELS } from './constants';
|
|
6
6
|
export { getExecutionDetails } from './service';
|
|
@@ -2,7 +2,7 @@ import { ApiResponseResultType, SeveritiesDTO, GetResourceScanDetailsResponseTyp
|
|
|
2
2
|
import { SEVERITIES } from './constants';
|
|
3
3
|
export declare const mapSeveritiesToSegmentedBarChartEntities: (severities: Partial<Record<keyof typeof SEVERITIES, number>>) => {
|
|
4
4
|
color: "#B1B7BC" | "#B21212" | "#F33E3E" | "#FF7E5B" | "#FFB549" | "#1DAD70";
|
|
5
|
-
label: "
|
|
5
|
+
label: "Critical" | "High" | "Medium" | "Low" | "Unknown" | "Failures" | "Successes" | "Exceptions";
|
|
6
6
|
value: number;
|
|
7
7
|
}[];
|
|
8
8
|
export declare const stringifySeverities: (severities: Partial<Record<keyof typeof SEVERITIES, number>>) => string;
|
package/dist/Shared/Helpers.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
2
|
import { Pair } from 'yaml';
|
|
3
|
-
import { MaterialHistoryType } from '@Shared/Services/app.types';
|
|
4
3
|
import { MaterialInfo, SortingOrder, UserApprovalConfigType } from '../Common';
|
|
5
4
|
import { GitTriggers, IntersectionChangeHandler, IntersectionOptions, WebhookEventNameType } from './types';
|
|
6
5
|
import { AggregatedNodes, DeploymentStatusDetailsBreakdownDataType, DeploymentStatusDetailsType, PodMetadatum } from './Components';
|
|
@@ -64,17 +63,4 @@ export declare const getDefaultValueFromType: (value: unknown) => {};
|
|
|
64
63
|
* and the values are arrays of objects that share the same key value.
|
|
65
64
|
*/
|
|
66
65
|
export declare const groupArrayByObjectKey: <T extends Record<string, any>, K extends keyof T>(array: T[], key: K) => Record<string, T[]>;
|
|
67
|
-
/**
|
|
68
|
-
* @description - Function to get the lower case object
|
|
69
|
-
* @param input - The input object
|
|
70
|
-
* @returns Record<string, any>
|
|
71
|
-
*/
|
|
72
|
-
export declare const getLowerCaseObject: (input: any) => Record<string, any>;
|
|
73
|
-
/**
|
|
74
|
-
* @description - Function to get the webhook date
|
|
75
|
-
* @param materialSourceType - The type of material source (e.g., WEBHOOK)
|
|
76
|
-
* @param history - The history object containing commit information
|
|
77
|
-
* @returns - Formatted webhook date if available, otherwise an empty string
|
|
78
|
-
*/
|
|
79
|
-
export declare const getWebhookDate: (materialSourceType: string, history: MaterialHistoryType) => string;
|
|
80
66
|
export {};
|
|
@@ -12,7 +12,7 @@ interface MaterialHistoryDTO {
|
|
|
12
12
|
Changes: unknown[];
|
|
13
13
|
WebhookData: WebhookDataType;
|
|
14
14
|
}
|
|
15
|
-
|
|
15
|
+
interface MaterialHistoryType {
|
|
16
16
|
commitURL: string;
|
|
17
17
|
commit: MaterialHistoryDTO['Commit'];
|
|
18
18
|
author: MaterialHistoryDTO['Author'];
|
|
@@ -56,7 +56,6 @@ export interface CIMaterialType extends Pick<CIMaterialDTO, 'id' | 'gitMaterialI
|
|
|
56
56
|
gitURL: CIMaterialDTO['url'];
|
|
57
57
|
history: MaterialHistoryType[];
|
|
58
58
|
isSelected: boolean;
|
|
59
|
-
gitMaterialUrl?: string;
|
|
60
59
|
}
|
|
61
60
|
interface ImageCommentDTO {
|
|
62
61
|
id: number;
|
package/dist/Shared/types.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Dayjs } from 'dayjs';
|
|
1
2
|
import { OptionType, CommonNodeAttr, ResponseType, UserApprovalConfigType, VulnerabilityType, DeploymentAppTypes, ServerErrors, SortingParams } from '../Common';
|
|
2
3
|
import { KeyValueListType } from './Components';
|
|
3
4
|
import { EnvironmentTypeEnum, PatchOperationType } from './constants';
|
|
@@ -84,7 +85,9 @@ export declare enum Nodes {
|
|
|
84
85
|
PodDisruptionBudget = "PodDisruptionBudget",
|
|
85
86
|
Event = "Event",
|
|
86
87
|
Namespace = "Namespace",
|
|
87
|
-
Overview = "Overview"
|
|
88
|
+
Overview = "Overview",
|
|
89
|
+
MonitoringDashboard = "MonitoringDashboard",
|
|
90
|
+
UpgradeCluster = "UpgradeCluster"
|
|
88
91
|
}
|
|
89
92
|
export type NodeType = keyof typeof Nodes;
|
|
90
93
|
export interface Node {
|
|
@@ -583,6 +586,7 @@ export declare enum ConfigurationType {
|
|
|
583
586
|
export interface BaseURLParams {
|
|
584
587
|
appId: string;
|
|
585
588
|
envId: string;
|
|
589
|
+
clusterId: string;
|
|
586
590
|
}
|
|
587
591
|
export interface ConfigKeysWithLockType {
|
|
588
592
|
config: string[];
|
|
@@ -629,4 +633,36 @@ export interface CustomRoleAndMeta {
|
|
|
629
633
|
possibleRolesMetaForCluster: MetaPossibleRoles;
|
|
630
634
|
possibleRolesMetaForJob: MetaPossibleRoles;
|
|
631
635
|
}
|
|
636
|
+
interface CommonTabArgsType {
|
|
637
|
+
name: string;
|
|
638
|
+
kind?: string;
|
|
639
|
+
url: string;
|
|
640
|
+
isSelected: boolean;
|
|
641
|
+
title?: string;
|
|
642
|
+
isDeleted?: boolean;
|
|
643
|
+
position: number;
|
|
644
|
+
iconPath?: string;
|
|
645
|
+
dynamicTitle?: string;
|
|
646
|
+
showNameOnSelect?: boolean;
|
|
647
|
+
/**
|
|
648
|
+
* @default false
|
|
649
|
+
*/
|
|
650
|
+
hideName?: boolean;
|
|
651
|
+
isAlive?: boolean;
|
|
652
|
+
lastSyncMoment?: Dayjs;
|
|
653
|
+
componentKey?: string;
|
|
654
|
+
tippyConfig?: {
|
|
655
|
+
title: string;
|
|
656
|
+
descriptions: {
|
|
657
|
+
info: string;
|
|
658
|
+
value: string;
|
|
659
|
+
}[];
|
|
660
|
+
};
|
|
661
|
+
}
|
|
662
|
+
export interface InitTabType extends CommonTabArgsType {
|
|
663
|
+
idPrefix: string;
|
|
664
|
+
}
|
|
665
|
+
export interface DynamicTabType extends CommonTabArgsType {
|
|
666
|
+
id: string;
|
|
667
|
+
}
|
|
632
668
|
export {};
|
|
@@ -45,3 +45,4 @@ export declare const validateSemanticVersioning: (version: string) => Validation
|
|
|
45
45
|
export declare const validateDisplayName: (name: string) => ValidationResponseType;
|
|
46
46
|
export declare const validateJSON: (json: string) => ValidationResponseType;
|
|
47
47
|
export declare const validateDateAndTime: (date: Date) => ValidationResponseType;
|
|
48
|
+
export declare const validateIframe: (input: string) => ValidationResponseType;
|