@devtron-labs/devtron-fe-common-lib 0.3.6-beta-1 → 0.3.6-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/Common/Drawer/Drawer.d.ts +1 -1
- package/dist/Common/index.d.ts +0 -1
- package/dist/Pages/App/AppConfigurations/utils.d.ts +1 -1
- package/dist/Shared/Components/ImageCardAccordion/ImageCardAccordion.d.ts +1 -1
- package/dist/Shared/Components/ImageCardAccordion/types.d.ts +4 -1
- package/dist/Shared/Components/Security/SecurityModal/SecurityModal.d.ts +14 -0
- package/dist/Shared/Components/Security/SecurityModal/components/IndexedTextDisplay.d.ts +4 -0
- package/dist/Shared/Components/Security/SecurityModal/components/InfoCard.d.ts +4 -0
- package/dist/Shared/Components/Security/SecurityModal/components/OpenDetailViewButton.d.ts +4 -0
- package/dist/Shared/Components/Security/SecurityModal/components/Table.d.ts +4 -0
- package/dist/Shared/Components/Security/SecurityModal/components/index.d.ts +3 -0
- package/dist/Shared/Components/Security/SecurityModal/config/CodeScan.d.ts +100 -0
- package/dist/Shared/Components/Security/SecurityModal/config/EmptyState.d.ts +2 -0
- package/dist/Shared/Components/Security/SecurityModal/config/ImageScan.d.ts +4 -0
- package/dist/Shared/Components/Security/SecurityModal/config/InfoCard.d.ts +2 -0
- package/dist/Shared/Components/Security/SecurityModal/config/KubernetesManifest.d.ts +4 -0
- package/dist/Shared/Components/Security/SecurityModal/config/Sidebar.d.ts +2 -0
- package/dist/Shared/Components/Security/SecurityModal/config/Table.d.ts +2 -0
- package/dist/Shared/Components/Security/SecurityModal/config/index.d.ts +3 -0
- package/dist/Shared/Components/Security/SecurityModal/constants.d.ts +56 -0
- package/dist/Shared/Components/Security/SecurityModal/index.d.ts +6 -0
- package/dist/Shared/Components/Security/SecurityModal/service.d.ts +3 -0
- package/dist/Shared/Components/Security/SecurityModal/types.d.ts +262 -0
- package/dist/Shared/Components/Security/SecurityModal/utils.d.ts +34 -0
- package/dist/Shared/Components/Security/SecuritySummaryCard/SecuritySummaryCard.d.ts +3 -0
- package/dist/Shared/Components/Security/SecuritySummaryCard/index.d.ts +1 -0
- package/dist/Shared/Components/Security/SecuritySummaryCard/types.d.ts +11 -0
- package/dist/Shared/Components/{Vulnerabilities → Security/Vulnerabilities}/Vulnerabilities.d.ts +1 -1
- package/dist/Shared/Components/{Vulnerabilities → Security/Vulnerabilities}/index.d.ts +1 -0
- package/dist/Shared/Components/{Vulnerabilities → Security/Vulnerabilities}/service.d.ts +1 -1
- package/dist/Shared/Components/Security/Vulnerabilities/types.d.ts +26 -0
- package/dist/Shared/Components/Security/Vulnerabilities/utils.d.ts +6 -0
- package/dist/Shared/Components/Security/index.d.ts +4 -0
- package/dist/Shared/Components/Security/utils.d.ts +4 -0
- package/dist/Shared/Components/TabGroup/TabGroup.types.d.ts +5 -24
- package/dist/Shared/Components/TabGroup/TabGroup.utils.d.ts +0 -1
- package/dist/Shared/Components/index.d.ts +1 -1
- package/dist/Shared/constants.d.ts +4 -0
- package/dist/Shared/types.d.ts +1 -0
- package/dist/assets/index.css +1 -1
- package/dist/{cssMode-DyAvOBkY.js → cssMode-B4JrdN3F.js} +1 -1
- package/dist/{freemarker2-tPNqkUTQ.js → freemarker2-djJv4T6c.js} +1 -1
- package/dist/{handlebars-C1mESqod.js → handlebars-DcN-3O7u.js} +1 -1
- package/dist/{html-Cv3tbe3V.js → html-l7hxU9Z5.js} +1 -1
- package/dist/{htmlMode-D9FROfxJ.js → htmlMode-DkosUubE.js} +1 -1
- package/dist/{index-6HckNOg7.js → index-CzpCwzU5.js} +31498 -29921
- package/dist/index.js +494 -481
- package/dist/{javascript-D-S0ZH6k.js → javascript-BXBdVBaV.js} +1 -1
- package/dist/{jsonMode-BCOgENbK.js → jsonMode-DmBC3ctU.js} +1 -1
- package/dist/{liquid-BHU4NPDq.js → liquid-B8fSvF6L.js} +1 -1
- package/dist/{mdx-CgZj4bIA.js → mdx-VecYXjT_.js} +1 -1
- package/dist/{python-Dtb925za.js → python-Dp5nIDq8.js} +1 -1
- package/dist/{razor-Bx48A-N3.js → razor-LXhCh8qE.js} +1 -1
- package/dist/{tsMode-nB_hYIwB.js → tsMode-CrqSxeoO.js} +1 -1
- package/dist/{typescript-Cr3j4nqE.js → typescript-DtfqSpUl.js} +1 -1
- package/dist/{xml-D0QNf3dP.js → xml-Cmoj4ihR.js} +1 -1
- package/dist/{yaml-9jPH8omw.js → yaml-exLX0oJH.js} +1 -1
- package/package.json +4 -3
- package/dist/Common/Security/ScanVulnerabilitiesTable.d.ts +0 -2
- package/dist/Common/Security/types.d.ts +0 -4
- package/dist/Shared/Components/Vulnerabilities/constants.d.ts +0 -4
- package/dist/Shared/Components/Vulnerabilities/types.d.ts +0 -7
- package/dist/Shared/Components/Vulnerabilities/utils.d.ts +0 -4
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ResponseType } from '../../../../Common/Types';
|
|
2
|
+
import { ImageCardAccordionProps } from '@Shared/Components/ImageCardAccordion/types';
|
|
3
|
+
import { MaterialSecurityInfoType } from '../../../types';
|
|
4
|
+
import { ApiResponseResultType } from '../SecurityModal';
|
|
5
|
+
import { getLastExecutionByArtifactAppEnv } from './service';
|
|
6
|
+
export interface VulnerabilitiesProps extends MaterialSecurityInfoType, Pick<ImageCardAccordionProps, 'SecurityModalSidebar' | 'getSecurityScan'> {
|
|
7
|
+
artifactId: number;
|
|
8
|
+
applicationId: number;
|
|
9
|
+
environmentId: number;
|
|
10
|
+
setVulnerabilityCount: React.Dispatch<React.SetStateAction<number>>;
|
|
11
|
+
}
|
|
12
|
+
export interface UseGetSecurityVulnerabilitiesProps extends Pick<ImageCardAccordionProps, 'getSecurityScan'> {
|
|
13
|
+
artifactId: string;
|
|
14
|
+
appId: string;
|
|
15
|
+
envId: string;
|
|
16
|
+
isScanned: boolean;
|
|
17
|
+
isScanEnabled: boolean;
|
|
18
|
+
isScanV2Enabled: boolean;
|
|
19
|
+
}
|
|
20
|
+
export interface UseGetSecurityVulnerabilitiesReturnType {
|
|
21
|
+
scanDetailsLoading: boolean;
|
|
22
|
+
scanResultResponse: ResponseType<ApiResponseResultType>;
|
|
23
|
+
executionDetailsResponse: Awaited<ReturnType<typeof getLastExecutionByArtifactAppEnv>>;
|
|
24
|
+
scanDetailsError: any;
|
|
25
|
+
reloadScanDetails: () => void;
|
|
26
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { LastExecutionResponseType, LastExecutionResultType } from '../../../types';
|
|
2
|
+
import { UseGetSecurityVulnerabilitiesProps, UseGetSecurityVulnerabilitiesReturnType } from './types';
|
|
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;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { SeverityCount } from '../../types';
|
|
2
|
+
import { SeveritiesDTO } from './SecurityModal/types';
|
|
3
|
+
export declare const getTotalSeverityCount: (severityCount: SeverityCount) => number;
|
|
4
|
+
export declare const getSeverityCountFromSummary: (scanResultSeverities: Partial<Record<SeveritiesDTO, number>>) => SeverityCount;
|
|
@@ -4,7 +4,7 @@ import { DataAttributes } from '../../types';
|
|
|
4
4
|
type TabComponentProps<TabTypeProps> = TabTypeProps & DataAttributes;
|
|
5
5
|
type ConditionalTabType = {
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* Type of the tab, either `button`, `link` or `navLink`.
|
|
8
8
|
*/
|
|
9
9
|
tabType: 'button';
|
|
10
10
|
/**
|
|
@@ -17,7 +17,7 @@ type ConditionalTabType = {
|
|
|
17
17
|
active?: boolean;
|
|
18
18
|
} | {
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
20
|
+
* Type of the tab, either `button`, `link` or `navLink`.
|
|
21
21
|
*/
|
|
22
22
|
tabType: 'navLink';
|
|
23
23
|
/**
|
|
@@ -27,10 +27,10 @@ type ConditionalTabType = {
|
|
|
27
27
|
/**
|
|
28
28
|
* Active state is determined by matching the URL.
|
|
29
29
|
*/
|
|
30
|
-
active?:
|
|
30
|
+
active?: false;
|
|
31
31
|
} | {
|
|
32
32
|
/**
|
|
33
|
-
*
|
|
33
|
+
* Type of the tab, either `button`, `link` or `navLink`.
|
|
34
34
|
*/
|
|
35
35
|
tabType: 'link';
|
|
36
36
|
/**
|
|
@@ -41,20 +41,6 @@ type ConditionalTabType = {
|
|
|
41
41
|
* Indicates if the tab is currently active.
|
|
42
42
|
*/
|
|
43
43
|
active?: boolean;
|
|
44
|
-
} | {
|
|
45
|
-
/**
|
|
46
|
-
* Type of the tab, either `button`, `link`, `navLink` or `block`.
|
|
47
|
-
* @note When `tabType` is set to `block`, the tab becomes non-interactive. It won't be active and will not have hover states.
|
|
48
|
-
*/
|
|
49
|
-
tabType: 'block';
|
|
50
|
-
/**
|
|
51
|
-
* Props passed to div component.
|
|
52
|
-
*/
|
|
53
|
-
props?: TabComponentProps<Omit<React.ComponentProps<'div'>, 'className' | 'style'>>;
|
|
54
|
-
/**
|
|
55
|
-
* Indicates if the tab is currently active.
|
|
56
|
-
*/
|
|
57
|
-
active?: never | false;
|
|
58
44
|
};
|
|
59
45
|
export type TabProps = {
|
|
60
46
|
/**
|
|
@@ -65,11 +51,6 @@ export type TabProps = {
|
|
|
65
51
|
* Text label for the tab.
|
|
66
52
|
*/
|
|
67
53
|
label: string;
|
|
68
|
-
/**
|
|
69
|
-
* Description for the tab.
|
|
70
|
-
* @note - If passed as a `string[]`, it will be rendered with a bullet in-between strings.
|
|
71
|
-
*/
|
|
72
|
-
description?: string | string[];
|
|
73
54
|
/**
|
|
74
55
|
* Icon component to be displayed in the tab.
|
|
75
56
|
* This should be a functional component that renders an SVG.
|
|
@@ -111,7 +92,7 @@ export interface TabGroupProps {
|
|
|
111
92
|
* Size of the tabs.
|
|
112
93
|
* @default ComponentSizeType.large
|
|
113
94
|
*/
|
|
114
|
-
size?: ComponentSizeType.large | ComponentSizeType.medium
|
|
95
|
+
size?: ComponentSizeType.large | ComponentSizeType.medium;
|
|
115
96
|
/**
|
|
116
97
|
* Optional component to be rendered on the right side of the tab list.
|
|
117
98
|
*/
|
|
@@ -5,4 +5,3 @@ export declare const getClassNameBySizeMap: ({ hideTopPadding, alignActiveBorder
|
|
|
5
5
|
badgeClassName: string;
|
|
6
6
|
}>;
|
|
7
7
|
export declare const getIconColorClassMap: ({ active }: Pick<TabProps, "active">) => Record<TabProps["iconType"], string>;
|
|
8
|
-
export declare const tabGroupClassMap: Record<TabGroupProps['size'], string>;
|
|
@@ -5,7 +5,6 @@ export * from './ImageCard';
|
|
|
5
5
|
export * from './ImageCardAccordion';
|
|
6
6
|
export * from './ExcludedImageNode';
|
|
7
7
|
export * from './ScannedByToolModal';
|
|
8
|
-
export * from './Vulnerabilities';
|
|
9
8
|
export * from './FilterChips';
|
|
10
9
|
export * from './ActivityIndicator';
|
|
11
10
|
export * from './GenericSectionErrorState';
|
|
@@ -40,4 +39,5 @@ export * from './TabGroup';
|
|
|
40
39
|
export * from './EditImageFormField';
|
|
41
40
|
export * from './Collapse';
|
|
42
41
|
export * from './FilterButton';
|
|
42
|
+
export * from './Security';
|
|
43
43
|
export * from './Button';
|
|
@@ -14,6 +14,10 @@ export declare const STAGE_TYPE: {
|
|
|
14
14
|
ROLLBACK: string;
|
|
15
15
|
};
|
|
16
16
|
export declare const SCAN_TOOL_ID_TRIVY = 3;
|
|
17
|
+
/**
|
|
18
|
+
* @description This is only used to show mapping for clair, scan tool id for clair can be either 1 or 2
|
|
19
|
+
* */
|
|
20
|
+
export declare const SCAN_TOOL_ID_CLAIR = 2;
|
|
17
21
|
export declare const IMAGE_SCAN_TOOL: {
|
|
18
22
|
Clair: string;
|
|
19
23
|
Trivy: string;
|
package/dist/Shared/types.d.ts
CHANGED
|
@@ -413,6 +413,7 @@ export interface LastExecutionResultType {
|
|
|
413
413
|
scanned?: boolean;
|
|
414
414
|
scanEnabled?: boolean;
|
|
415
415
|
scanToolId?: number;
|
|
416
|
+
imageScanDeployInfoId?: number;
|
|
416
417
|
}
|
|
417
418
|
export interface LastExecutionResponseType extends ResponseType<LastExecutionResultType> {
|
|
418
419
|
}
|