@devtron-labs/devtron-fe-common-lib 1.3.5-beta-2 → 1.3.5-beta-3
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-CV_fswVm.js → @code-editor-DEHhDqRd.js} +5348 -5189
- package/dist/{@common-rjsf-C_sf1uQ_.js → @common-rjsf-bVQbG0HR.js} +1 -1
- package/dist/Common/Constants.d.ts +1 -1
- package/dist/Shared/Components/Button/Button.component.d.ts +1 -1
- package/dist/Shared/Components/Button/types.d.ts +6 -0
- package/dist/Shared/Components/ImageCardAccordion/ImageCardAccordion.d.ts +1 -1
- package/dist/Shared/Components/ImageCardAccordion/types.d.ts +3 -2
- package/dist/Shared/Components/Security/SecurityModal/config/CodeScan.d.ts +2 -2
- package/dist/Shared/Components/Security/SecurityModal/config/EmptyState.d.ts +2 -2
- package/dist/Shared/Components/Security/SecurityModal/config/ImageScan.d.ts +2 -2
- package/dist/Shared/Components/Security/SecurityModal/config/InfoCard.d.ts +2 -2
- package/dist/Shared/Components/Security/SecurityModal/config/KubernetesManifest.d.ts +2 -2
- package/dist/Shared/Components/Security/SecurityModal/config/Sidebar.d.ts +2 -2
- package/dist/Shared/Components/Security/SecurityModal/config/Table.d.ts +2 -2
- package/dist/Shared/Components/Security/SecurityModal/config/index.d.ts +1 -1
- package/dist/Shared/Components/Security/SecurityModal/constants.d.ts +5 -5
- package/dist/Shared/Components/Security/SecurityModal/index.d.ts +4 -4
- package/dist/Shared/Components/Security/SecurityModal/service.d.ts +3 -2
- package/dist/Shared/Components/Security/SecurityModal/types.d.ts +18 -11
- package/dist/Shared/Components/Security/SecurityModal/utils.d.ts +4 -3
- package/dist/Shared/Components/Security/SecuritySummaryCard/SecuritySummaryCard.d.ts +1 -1
- package/dist/Shared/Components/Security/SecuritySummaryCard/types.d.ts +4 -2
- package/dist/Shared/Components/Security/Vulnerabilities/Vulnerabilities.d.ts +1 -1
- package/dist/Shared/Components/Security/Vulnerabilities/types.d.ts +17 -1
- package/dist/Shared/Components/Security/Vulnerabilities/utils.d.ts +5 -0
- package/dist/Shared/Components/SelectPicker/SelectPicker.component.d.ts +1 -1
- package/dist/Shared/Components/SelectPicker/common.d.ts +3 -1
- package/dist/Shared/Components/SelectPicker/type.d.ts +13 -1
- package/dist/Shared/types.d.ts +3 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +388 -384
- package/package.json +1 -1
@@ -2,7 +2,7 @@ import { j as n, J as A } from "./@vendor-BG3OpQCq.js";
|
|
2
2
|
import E, { forwardRef as $ } from "react";
|
3
3
|
import L, { getDefaultRegistry as k } from "@rjsf/core";
|
4
4
|
import D from "@rjsf/validator-ajv8";
|
5
|
-
import { T as y, c as H, a as J, d as w } from "./@code-editor-
|
5
|
+
import { T as y, c as H, a as J, d as w } from "./@code-editor-DEHhDqRd.js";
|
6
6
|
import M, { components as O } from "react-select";
|
7
7
|
import { getUiOptions as B, getTemplate as I, getSubmitButtonOptions as U, ADDITIONAL_PROPERTY_FLAG as P, errorId as W, englishStringTranslator as V, TranslatableString as q, titleId as K, canExpand as Y, deepEquals as z } from "@rjsf/utils";
|
8
8
|
import { ReactComponent as G } from "./assets/ic-chevron-down.fc70d7a7.svg";
|
@@ -67,7 +67,7 @@ export declare const ROUTES: {
|
|
67
67
|
CD_MATERIAL_GET: string;
|
68
68
|
DEPLOYMENT_TEMPLATE_LIST: string;
|
69
69
|
INFRA_CONFIG_PROFILE: string;
|
70
|
-
|
70
|
+
SECURITY_SCAN_EXECUTION_DETAILS: string;
|
71
71
|
NOTIFIER: string;
|
72
72
|
APP_LIST: string;
|
73
73
|
TELEMETRY_EVENT: string;
|
@@ -63,5 +63,5 @@ import { ButtonProps } from './types';
|
|
63
63
|
* <Button icon={<ICCube />} ariaLabel="Label" />
|
64
64
|
* ```
|
65
65
|
*/
|
66
|
-
declare const Button: ({ dataTestId, text, variant, size, style, startIcon, endIcon, disabled, isLoading, showTooltip, tooltipProps, icon, ariaLabel, showAriaLabelInTippy, fullWidth, ...props }: ButtonProps) => JSX.Element;
|
66
|
+
declare const Button: ({ dataTestId, text, variant, size, style, startIcon, endIcon, disabled, isLoading, showTooltip, tooltipProps, icon, ariaLabel, showAriaLabelInTippy, fullWidth, isOpacityHoverChild, ...props }: ButtonProps) => JSX.Element;
|
67
67
|
export default Button;
|
@@ -80,6 +80,12 @@ export type ButtonProps = ({
|
|
80
80
|
* @default false
|
81
81
|
*/
|
82
82
|
fullWidth?: boolean;
|
83
|
+
/**
|
84
|
+
* If true, the opacity is turned as 1 on hover of class with dc__opacity-hover--parent
|
85
|
+
*
|
86
|
+
* @default false
|
87
|
+
*/
|
88
|
+
isOpacityHoverChild?: boolean;
|
83
89
|
} & ({
|
84
90
|
/**
|
85
91
|
* If true, the tooltip is shown for the button
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import { ImageCardAccordionProps } from './types';
|
2
|
-
declare const ImageCardAccordion: ({ isSecurityModuleInstalled, artifactId, applicationId, environmentId, changesCard, isScanned, isScanEnabled, SecurityModalSidebar, }: ImageCardAccordionProps) => JSX.Element;
|
2
|
+
declare const ImageCardAccordion: ({ isSecurityModuleInstalled, artifactId, applicationId, environmentId, changesCard, isScanned, isScanEnabled, SecurityModalSidebar, getSecurityScan, }: ImageCardAccordionProps) => JSX.Element;
|
3
3
|
export default ImageCardAccordion;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { default as React, ReactNode } from 'react';
|
2
|
-
import { CDModalTabType, VulnerabilityType } from '../../../Common';
|
2
|
+
import { CDModalTabType, ResponseType, VulnerabilityType } from '../../../Common';
|
3
3
|
import { MaterialSecurityInfoType } from '../../types';
|
4
|
-
import { SidebarPropsType } from '../Security';
|
4
|
+
import { ApiResponseResultType, AppDetailsPayload, SidebarPropsType } from '../Security';
|
5
5
|
export interface ImageCardAccordionProps extends MaterialSecurityInfoType {
|
6
6
|
isSecurityModuleInstalled: boolean;
|
7
7
|
artifactId: number;
|
@@ -11,6 +11,7 @@ export interface ImageCardAccordionProps extends MaterialSecurityInfoType {
|
|
11
11
|
isScanned: boolean;
|
12
12
|
isScanEnabled: boolean;
|
13
13
|
SecurityModalSidebar: React.FC<SidebarPropsType>;
|
14
|
+
getSecurityScan: (props: Pick<AppDetailsPayload, 'appId' | 'artifactId'>) => Promise<ResponseType<ApiResponseResultType>>;
|
14
15
|
}
|
15
16
|
export interface SecurityDetailsType {
|
16
17
|
vulnerabilities: VulnerabilityType[];
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { ApiResponseResultType, CodeScan, DetailViewDataType, EmptyStateType, InfoCardPropsType, OpenDetailViewButtonProps, SecurityModalStateType, StatusType, TablePropsType } from '../types';
|
2
2
|
export declare const getCodeScanVulnerabilities: (data: CodeScan["vulnerability"], hidePolicy: boolean) => {
|
3
3
|
headers: ({
|
4
4
|
headerText: string;
|
@@ -97,4 +97,4 @@ export declare const getCodeScanExposedSecrets: (data: CodeScan["exposedSecrets"
|
|
97
97
|
};
|
98
98
|
export declare const getCodeScanTableData: (data: CodeScan, subCategory: SecurityModalStateType["subCategory"], setDetailViewData: OpenDetailViewButtonProps["setDetailViewData"], hidePolicy: boolean) => TablePropsType;
|
99
99
|
export declare const getCodeScanInfoCardData: (data: CodeScan, subCategory: SecurityModalStateType["subCategory"]) => InfoCardPropsType;
|
100
|
-
export declare const getCodeScanEmptyState: (data:
|
100
|
+
export declare const getCodeScanEmptyState: (data: ApiResponseResultType, subCategory: SecurityModalStateType["subCategory"], detailViewData: DetailViewDataType) => EmptyStateType;
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import {
|
2
|
-
export declare const getEmptyStateValues: (data:
|
1
|
+
import { ApiResponseResultType, DetailViewDataType, SecurityModalStateType } from '../types';
|
2
|
+
export declare const getEmptyStateValues: (data: ApiResponseResultType, category: SecurityModalStateType["category"], subCategory: SecurityModalStateType["subCategory"], detailViewData: DetailViewDataType) => import('../types').EmptyStateType;
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { DetailViewDataType, ImageScan, SecurityModalStateType, TablePropsType, StatusType, InfoCardPropsType, EmptyStateType,
|
1
|
+
import { DetailViewDataType, ImageScan, SecurityModalStateType, TablePropsType, StatusType, InfoCardPropsType, EmptyStateType, ApiResponseResultType, OpenDetailViewButtonProps } from '../types';
|
2
2
|
export declare const getProgressingStateForStatus: (status: StatusType["status"]) => JSX.Element;
|
3
3
|
export declare const getImageScanTableData: (data: ImageScan, subCategory: SecurityModalStateType["subCategory"], setDetailViewData: OpenDetailViewButtonProps["setDetailViewData"], hidePolicy: boolean) => TablePropsType;
|
4
4
|
export declare const getImageScanInfoCardData: (data: ImageScan, subCategory: SecurityModalStateType["subCategory"]) => InfoCardPropsType;
|
5
|
-
export declare const getImageScanEmptyState: (data:
|
5
|
+
export declare const getImageScanEmptyState: (data: ApiResponseResultType, subCategory: SecurityModalStateType["subCategory"], detailViewData: DetailViewDataType) => EmptyStateType;
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import { InfoCardPropsType,
|
2
|
-
export declare const getInfoCardData: (data:
|
1
|
+
import { InfoCardPropsType, ApiResponseResultType, SecurityModalStateType } from '../types';
|
2
|
+
export declare const getInfoCardData: (data: ApiResponseResultType, category: SecurityModalStateType["category"], subCategory: SecurityModalStateType["subCategory"]) => InfoCardPropsType;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { ApiResponseResultType, DetailViewDataType, EmptyStateType, InfoCardPropsType, KubernetesManifest, OpenDetailViewButtonProps, SecurityModalStateType, TablePropsType } from '../types';
|
2
2
|
export declare const getKubernetesManifestTableData: (data: KubernetesManifest, subCategory: SecurityModalStateType["subCategory"], setDetailViewData: OpenDetailViewButtonProps["setDetailViewData"]) => TablePropsType;
|
3
3
|
export declare const getKubernetesManifestInfoCardData: (data: KubernetesManifest, subCategory: SecurityModalStateType["subCategory"]) => InfoCardPropsType;
|
4
|
-
export declare const getKubernetesManifestEmptyState: (data:
|
4
|
+
export declare const getKubernetesManifestEmptyState: (data: ApiResponseResultType, subCategory: SecurityModalStateType["subCategory"], detailViewData: DetailViewDataType) => EmptyStateType;
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import { SidebarDataType
|
2
|
-
export declare const
|
1
|
+
import { SidebarDataType } from '../types';
|
2
|
+
export declare const SIDEBAR_DATA: SidebarDataType[];
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import {
|
2
|
-
export declare const getTableData: (data:
|
1
|
+
import { ApiResponseResultType, OpenDetailViewButtonProps, SecurityModalStateType, TablePropsType } from '../types';
|
2
|
+
export declare const getTableData: (data: ApiResponseResultType, category: SecurityModalStateType["category"], subCategory: SecurityModalStateType["subCategory"], setDetailViewData: OpenDetailViewButtonProps["setDetailViewData"], hidePolicy: boolean) => TablePropsType;
|
@@ -16,23 +16,23 @@ export declare const SUB_CATEGORY_LABELS: {
|
|
16
16
|
readonly EXPOSED_SECRETS: "Exposed Secrets";
|
17
17
|
};
|
18
18
|
export declare const SEVERITIES: {
|
19
|
-
readonly
|
19
|
+
readonly CRITICAL: {
|
20
20
|
readonly label: "Critical";
|
21
21
|
readonly color: "#B21212";
|
22
22
|
};
|
23
|
-
readonly
|
23
|
+
readonly HIGH: {
|
24
24
|
readonly label: "High";
|
25
25
|
readonly color: "#F33E3E";
|
26
26
|
};
|
27
|
-
readonly
|
27
|
+
readonly MEDIUM: {
|
28
28
|
readonly label: "Medium";
|
29
29
|
readonly color: "#FF7E5B";
|
30
30
|
};
|
31
|
-
readonly
|
31
|
+
readonly LOW: {
|
32
32
|
readonly label: "Low";
|
33
33
|
readonly color: "#FFB549";
|
34
34
|
};
|
35
|
-
readonly
|
35
|
+
readonly UNKNOWN: {
|
36
36
|
readonly label: "Unknown";
|
37
37
|
readonly color: "#B1B7BC";
|
38
38
|
};
|
@@ -1,6 +1,6 @@
|
|
1
1
|
export { default as SecurityModal } from './SecurityModal';
|
2
|
-
export { getSecurityScanSeveritiesCount, getTotalVulnerabilityCount, parseGetResourceScanDetailsResponse, } from './utils';
|
3
|
-
export type { AppDetailsPayload,
|
4
|
-
export {
|
2
|
+
export { getSecurityScanSeveritiesCount, getTotalVulnerabilityCount, parseGetResourceScanDetailsResponse, parseExecutionDetailResponse, } from './utils';
|
3
|
+
export type { AppDetailsPayload, ExecutionDetailsPayload, ApiResponseResultType, SidebarPropsType, SidebarDataChildType, SidebarDataType, GetResourceScanDetailsPayloadType, GetResourceScanDetailsResponseType, } from './types';
|
4
|
+
export { SIDEBAR_DATA, getProgressingStateForStatus } from './config';
|
5
5
|
export { CATEGORY_LABELS } from './constants';
|
6
|
-
export {
|
6
|
+
export { getExecutionDetails } from './service';
|
@@ -1,2 +1,3 @@
|
|
1
|
-
import {
|
2
|
-
|
1
|
+
import { ResponseType } from '../../../../Common/Types';
|
2
|
+
import { ApiResponseResultType, ExecutionDetailsPayload } from './types';
|
3
|
+
export declare const getExecutionDetails: (executionDetailPayload: ExecutionDetailsPayload) => Promise<ResponseType<ApiResponseResultType>>;
|
@@ -22,6 +22,10 @@ export interface AppDetailsPayload {
|
|
22
22
|
artifactId?: number | string;
|
23
23
|
installedAppVersionHistoryId?: number | string;
|
24
24
|
}
|
25
|
+
export interface ExecutionDetailsPayload extends Partial<Pick<AppDetailsPayload, 'appId' | 'envId'>> {
|
26
|
+
imageScanDeployInfoId?: number | string;
|
27
|
+
artifactId?: number | string;
|
28
|
+
}
|
25
29
|
export declare const CATEGORIES: {
|
26
30
|
readonly IMAGE_SCAN: "imageScan";
|
27
31
|
readonly CODE_SCAN: "codeScan";
|
@@ -85,16 +89,17 @@ export type SecurityModalStateType = {
|
|
85
89
|
detailViewData: DetailViewDataType[];
|
86
90
|
};
|
87
91
|
export interface SidebarPropsType {
|
92
|
+
isHelmApp: boolean;
|
88
93
|
modalState: SecurityModalStateType;
|
89
94
|
setModalState: React.Dispatch<React.SetStateAction<SecurityModalStateType>>;
|
90
|
-
|
95
|
+
isExternalCI: boolean;
|
91
96
|
}
|
92
97
|
export declare enum SeveritiesDTO {
|
93
|
-
CRITICAL = "
|
94
|
-
HIGH = "
|
95
|
-
MEDIUM = "
|
96
|
-
LOW = "
|
97
|
-
UNKNOWN = "
|
98
|
+
CRITICAL = "CRITICAL",
|
99
|
+
HIGH = "HIGH",
|
100
|
+
MEDIUM = "MEDIUM",
|
101
|
+
LOW = "LOW",
|
102
|
+
UNKNOWN = "UNKNOWN",
|
98
103
|
FAILURES = "fail",
|
99
104
|
SUCCESSES = "success",
|
100
105
|
EXCEPTIONS = "exceptions"
|
@@ -194,19 +199,21 @@ export type KubernetesManifest = {
|
|
194
199
|
[SUB_CATEGORIES.MISCONFIGURATIONS]: GenericGroupTypeWithMisConfSummary<CodeScanMisconfigurationsListType>;
|
195
200
|
[SUB_CATEGORIES.EXPOSED_SECRETS]: GenericGroupTypeWithSummary<CodeScanExposedSecretsListType>;
|
196
201
|
} & StatusType;
|
197
|
-
export type
|
202
|
+
export type ApiResponseResultType = {
|
198
203
|
scanned: boolean;
|
199
|
-
isImageScanEnabled: boolean;
|
200
204
|
[CATEGORIES.IMAGE_SCAN]: ImageScan;
|
201
205
|
[CATEGORIES.CODE_SCAN]: CodeScan;
|
202
206
|
[CATEGORIES.KUBERNETES_MANIFEST]: KubernetesManifest;
|
203
207
|
};
|
204
|
-
interface SecurityModalBaseProps {
|
208
|
+
interface SecurityModalBaseProps extends Partial<Pick<SidebarPropsType, 'isExternalCI'>> {
|
205
209
|
isLoading: boolean;
|
206
210
|
error: ServerErrors;
|
207
|
-
responseData:
|
211
|
+
responseData: ApiResponseResultType;
|
208
212
|
handleModalClose: (event?: React.MouseEvent<HTMLElement>) => void;
|
209
|
-
Sidebar
|
213
|
+
Sidebar: React.FC<SidebarPropsType>;
|
214
|
+
isHelmApp?: boolean;
|
215
|
+
isResourceScan?: boolean;
|
216
|
+
isSecurityScanV2Enabled: boolean;
|
210
217
|
hidePolicy?: boolean;
|
211
218
|
}
|
212
219
|
export type SecurityModalPropsType = SecurityModalBaseProps;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { ApiResponseResultType, 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
4
|
color: "#B1B7BC" | "#B21212" | "#F33E3E" | "#FF7E5B" | "#FFB549" | "#1DAD70";
|
@@ -8,7 +8,7 @@ export declare const mapSeveritiesToSegmentedBarChartEntities: (severities: Part
|
|
8
8
|
export declare const stringifySeverities: (severities: Partial<Record<keyof typeof SEVERITIES, number>>) => string;
|
9
9
|
export declare const getSeverityWeight: (severity: SeveritiesDTO) => number;
|
10
10
|
export declare const compareSeverity: (a: SeveritiesDTO, b: SeveritiesDTO) => number;
|
11
|
-
export declare const getSecurityScanSeveritiesCount: (data:
|
11
|
+
export declare const getSecurityScanSeveritiesCount: (data: ApiResponseResultType) => {
|
12
12
|
critical: number;
|
13
13
|
high: number;
|
14
14
|
medium: number;
|
@@ -22,7 +22,8 @@ export declare const getScanCompletedEmptyState: (scanToolId: number) => {
|
|
22
22
|
children: JSX.Element;
|
23
23
|
};
|
24
24
|
export declare const compareStringAndObject: (a: string | object, b: string | object) => number;
|
25
|
-
export declare const
|
25
|
+
export declare const parseExecutionDetailResponse: (scanResult: any) => ApiResponseResultType;
|
26
|
+
export declare const parseGetResourceScanDetailsResponse: (data: GetResourceScanDetailsResponseType) => ApiResponseResultType;
|
26
27
|
export declare const getTotalVulnerabilityCount: (scannedResult: ImageVulnerabilityType[]) => VulnerabilityCountType;
|
27
28
|
export declare const groupByTarget: (list: ImageScanVulnerabilityType[]) => {
|
28
29
|
source: string;
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import { SecuritySummaryCardProps } from './types';
|
2
|
-
declare const SecuritySummaryCard: ({ severityCount, scanToolId, rootClassName, SecurityModalSidebar, responseData, hidePolicy, }: SecuritySummaryCardProps) => JSX.Element;
|
2
|
+
declare const SecuritySummaryCard: ({ severityCount, scanToolId, rootClassName, isHelmApp, SecurityModalSidebar, responseData, isSecurityScanV2Enabled, hidePolicy, }: SecuritySummaryCardProps) => JSX.Element;
|
3
3
|
export default SecuritySummaryCard;
|
@@ -1,10 +1,12 @@
|
|
1
1
|
import { SeverityCount } from '../../../types';
|
2
2
|
import { ImageCardAccordionProps } from '@Shared/Components/ImageCardAccordion/types';
|
3
|
-
import {
|
3
|
+
import { ApiResponseResultType } from '../SecurityModal';
|
4
4
|
export type SecuritySummaryCardProps = {
|
5
5
|
severityCount: SeverityCount;
|
6
6
|
scanToolId: number;
|
7
7
|
rootClassName?: string;
|
8
|
-
|
8
|
+
isHelmApp?: boolean;
|
9
|
+
isSecurityScanV2Enabled: boolean;
|
10
|
+
responseData: ApiResponseResultType;
|
9
11
|
hidePolicy?: boolean;
|
10
12
|
} & Pick<ImageCardAccordionProps, 'SecurityModalSidebar'>;
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import { VulnerabilitiesProps } from './types';
|
2
|
-
declare const Vulnerabilities: ({ isScanned, isScanEnabled, artifactId, applicationId, environmentId, setVulnerabilityCount, SecurityModalSidebar, }: VulnerabilitiesProps) => JSX.Element;
|
2
|
+
declare const Vulnerabilities: ({ isScanned, isScanEnabled, artifactId, applicationId, environmentId, setVulnerabilityCount, SecurityModalSidebar, getSecurityScan, }: VulnerabilitiesProps) => JSX.Element;
|
3
3
|
export default Vulnerabilities;
|
@@ -1,8 +1,24 @@
|
|
1
|
+
import { ResponseType } from '../../../../Common/Types';
|
1
2
|
import { ImageCardAccordionProps } from '@Shared/Components/ImageCardAccordion/types';
|
2
3
|
import { MaterialSecurityInfoType } from '../../../types';
|
3
|
-
|
4
|
+
import { ApiResponseResultType } from '../SecurityModal';
|
5
|
+
export interface VulnerabilitiesProps extends MaterialSecurityInfoType, Pick<ImageCardAccordionProps, 'SecurityModalSidebar' | 'getSecurityScan'> {
|
4
6
|
artifactId: number;
|
5
7
|
applicationId: number;
|
6
8
|
environmentId: number;
|
7
9
|
setVulnerabilityCount: React.Dispatch<React.SetStateAction<number>>;
|
8
10
|
}
|
11
|
+
export interface UseGetSecurityVulnerabilitiesProps extends Pick<ImageCardAccordionProps, 'getSecurityScan'> {
|
12
|
+
artifactId: string;
|
13
|
+
appId: string;
|
14
|
+
envId: number;
|
15
|
+
isScanned: boolean;
|
16
|
+
isScanEnabled: boolean;
|
17
|
+
isScanV2Enabled: boolean;
|
18
|
+
}
|
19
|
+
export interface UseGetSecurityVulnerabilitiesReturnType {
|
20
|
+
scanDetailsLoading: boolean;
|
21
|
+
scanResultResponse: ResponseType<ApiResponseResultType>;
|
22
|
+
scanDetailsError: any;
|
23
|
+
reloadScanDetails: () => void;
|
24
|
+
}
|
@@ -1 +1,6 @@
|
|
1
|
+
import { LastExecutionResponseType, LastExecutionResultType } from '../../../types';
|
2
|
+
import { UseGetSecurityVulnerabilitiesProps, UseGetSecurityVulnerabilitiesReturnType } from './types';
|
1
3
|
export declare const getSortedVulnerabilities: (vulnerabilities: any) => any;
|
4
|
+
export declare const getParsedScanResult: (scanResult: any) => LastExecutionResultType;
|
5
|
+
export declare const parseLastExecutionResponse: (response: any) => LastExecutionResponseType;
|
6
|
+
export declare const useGetSecurityVulnerabilities: ({ artifactId, appId, envId, isScanned, isScanEnabled, isScanV2Enabled, getSecurityScan, }: UseGetSecurityVulnerabilitiesProps) => UseGetSecurityVulnerabilitiesReturnType;
|
@@ -134,5 +134,5 @@ import { SelectPickerProps } from './type';
|
|
134
134
|
* />
|
135
135
|
* ```
|
136
136
|
*/
|
137
|
-
declare const SelectPicker: <OptionValue, IsMulti extends boolean>({ error, icon, helperText, placeholder, label, showSelectedOptionIcon, size, disabledTippyContent, showSelectedOptionsCount, menuSize, optionListError, reloadOptionList, menuPosition, variant, disableDescriptionEllipsis, multiSelectProps, isMulti, name, classNamePrefix, shouldRenderCustomOptions, isSearchable, selectRef, shouldMenuAlignRight, fullWidth, customSelectedOptionsCount, renderMenuListFooter,
|
137
|
+
declare const SelectPicker: <OptionValue, IsMulti extends boolean>({ error, icon, helperText, placeholder, label, showSelectedOptionIcon, size, disabledTippyContent, showSelectedOptionsCount, menuSize, optionListError, reloadOptionList, menuPosition, variant, disableDescriptionEllipsis, multiSelectProps, isMulti, name, classNamePrefix, shouldRenderCustomOptions, isSearchable, selectRef, shouldMenuAlignRight, fullWidth, customSelectedOptionsCount, renderMenuListFooter, isCreatable, onCreateOption, closeMenuOnSelect, shouldShowNoOptionsMessage, shouldHideMenu, ...props }: SelectPickerProps<OptionValue, IsMulti>) => JSX.Element;
|
138
138
|
export default SelectPicker;
|
@@ -3,7 +3,9 @@ import { SelectPickerGroupHeadingProps, SelectPickerOptionType, SelectPickerProp
|
|
3
3
|
export declare const SelectPickerDropdownIndicator: <OptionValue>(props: DropdownIndicatorProps<SelectPickerOptionType<OptionValue>>) => JSX.Element;
|
4
4
|
export declare const SelectPickerClearIndicator: <OptionValue>(props: ClearIndicatorProps<SelectPickerOptionType<OptionValue>>) => JSX.Element;
|
5
5
|
export declare const SelectPickerControl: <OptionValue>(props: ControlProps<SelectPickerOptionType<OptionValue>>) => JSX.Element;
|
6
|
-
export declare const SelectPickerValueContainer: <OptionValue, IsMulti extends boolean>({ showSelectedOptionsCount, customSelectedOptionsCount, ...props }: ValueContainerProps<SelectPickerOptionType<OptionValue>> & Pick<SelectPickerProps<OptionValue, IsMulti>, "showSelectedOptionsCount" | "customSelectedOptionsCount">
|
6
|
+
export declare const SelectPickerValueContainer: <OptionValue, IsMulti extends boolean>({ showSelectedOptionsCount, customSelectedOptionsCount, isFocussed, ...props }: ValueContainerProps<SelectPickerOptionType<OptionValue>> & Pick<SelectPickerProps<OptionValue, IsMulti>, "showSelectedOptionsCount" | "customSelectedOptionsCount"> & {
|
7
|
+
isFocussed: boolean;
|
8
|
+
}) => JSX.Element;
|
7
9
|
export declare const SelectPickerLoadingIndicator: () => JSX.Element;
|
8
10
|
export declare const SelectPickerOption: <OptionValue, IsMulti extends boolean>({ disableDescriptionEllipsis, ...props }: OptionProps<SelectPickerOptionType<OptionValue>> & Pick<SelectPickerProps<OptionValue, IsMulti>, "disableDescriptionEllipsis">) => JSX.Element;
|
9
11
|
export declare const SelectPickerMenuList: <OptionValue>(props: MenuListProps<SelectPickerOptionType<OptionValue>>) => JSX.Element;
|
@@ -55,6 +55,12 @@ declare module 'react-select/base' {
|
|
55
55
|
* @default 'true'
|
56
56
|
*/
|
57
57
|
showSelectedOptionIcon?: boolean;
|
58
|
+
/**
|
59
|
+
* If provided, the custom display text is shown in the value container
|
60
|
+
*
|
61
|
+
* @default null
|
62
|
+
*/
|
63
|
+
customDisplayText?: string;
|
58
64
|
/** Render function for the footer at the end of the options list. */
|
59
65
|
renderOptionsFooter?: () => ReactNode;
|
60
66
|
}
|
@@ -155,9 +161,15 @@ export type SelectPickerProps<OptionValue = number | string, IsMulti extends boo
|
|
155
161
|
* @default true
|
156
162
|
*/
|
157
163
|
shouldShowNoOptionsMessage?: boolean;
|
164
|
+
/**
|
165
|
+
* If true, the menu list and the dropdown indicator are hidden. Suitable for use cases like multi-inputs
|
166
|
+
*
|
167
|
+
* @default false
|
168
|
+
*/
|
169
|
+
shouldHideMenu?: boolean;
|
158
170
|
} & (IsMulti extends true ? {
|
159
171
|
isMulti: IsMulti | boolean;
|
160
|
-
multiSelectProps?: {
|
172
|
+
multiSelectProps?: Partial<Pick<SelectProps<OptionValue, IsMulti>, 'customDisplayText'>> & {
|
161
173
|
/**
|
162
174
|
* If true, the group heading can be selected
|
163
175
|
*
|
package/dist/Shared/types.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Dayjs } from 'dayjs';
|
2
|
-
import { OptionType, CommonNodeAttr, UserApprovalConfigType, VulnerabilityType, DeploymentAppTypes, ServerErrors, SortingParams, TriggerBlockType, ValueConstraintType, VariableType, RefVariableType, PluginType } from '../Common';
|
2
|
+
import { OptionType, CommonNodeAttr, ResponseType, UserApprovalConfigType, VulnerabilityType, DeploymentAppTypes, ServerErrors, SortingParams, TriggerBlockType, ValueConstraintType, VariableType, RefVariableType, PluginType } from '../Common';
|
3
3
|
import { EnvironmentTypeEnum, PatchOperationType } from './constants';
|
4
4
|
export declare enum EnvType {
|
5
5
|
CHART = "helm_charts",
|
@@ -438,6 +438,8 @@ export interface LastExecutionResultType {
|
|
438
438
|
scanToolId?: number;
|
439
439
|
imageScanDeployInfoId?: number;
|
440
440
|
}
|
441
|
+
export interface LastExecutionResponseType extends ResponseType<LastExecutionResultType> {
|
442
|
+
}
|
441
443
|
export interface MaterialSecurityInfoType {
|
442
444
|
isScanned: boolean;
|
443
445
|
isScanEnabled: boolean;
|
package/dist/index.d.ts
CHANGED
@@ -58,6 +58,7 @@ export interface customEnv {
|
|
58
58
|
HIDE_RELEASES?: boolean;
|
59
59
|
ENABLE_RESOURCE_SCAN?: boolean;
|
60
60
|
FEATURE_USER_DEFINED_GITOPS_REPO_ENABLE: boolean;
|
61
|
+
ENABLE_RESOURCE_SCAN_V2?: boolean;
|
61
62
|
HIDE_RESOURCE_WATCHER?: boolean;
|
62
63
|
ORGANIZATION_NAME: string;
|
63
64
|
FEATURE_EXTERNAL_FLUX_CD_ENABLE: boolean;
|