@devtron-labs/devtron-fe-common-lib 0.3.5-beta-3 → 0.3.5-beta-5

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.
Files changed (65) hide show
  1. package/dist/Common/Constants.d.ts +0 -2
  2. package/dist/Common/Drawer/Drawer.d.ts +1 -1
  3. package/dist/Common/Security/ScanVulnerabilitiesTable.d.ts +2 -0
  4. package/dist/Common/Security/types.d.ts +4 -0
  5. package/dist/Common/index.d.ts +1 -0
  6. package/dist/Pages/App/AppConfigurations/utils.d.ts +1 -1
  7. package/dist/Shared/Components/ImageCardAccordion/ImageCardAccordion.d.ts +1 -1
  8. package/dist/Shared/Components/ImageCardAccordion/types.d.ts +0 -1
  9. package/dist/Shared/Components/TabGroup/TabGroup.types.d.ts +6 -1
  10. package/dist/Shared/Components/TabGroup/TabGroup.utils.d.ts +1 -0
  11. package/dist/Shared/Components/{Security/Vulnerabilities → Vulnerabilities}/Vulnerabilities.d.ts +1 -1
  12. package/dist/Shared/Components/Vulnerabilities/constants.d.ts +4 -0
  13. package/dist/Shared/Components/{Security/Vulnerabilities → Vulnerabilities}/index.d.ts +0 -1
  14. package/dist/Shared/Components/{Security/Vulnerabilities → Vulnerabilities}/service.d.ts +1 -1
  15. package/dist/Shared/Components/Vulnerabilities/types.d.ts +7 -0
  16. package/dist/Shared/Components/Vulnerabilities/utils.d.ts +4 -0
  17. package/dist/Shared/Components/index.d.ts +1 -1
  18. package/dist/Shared/constants.d.ts +0 -4
  19. package/dist/Shared/types.d.ts +0 -1
  20. package/dist/assets/index.css +1 -1
  21. package/dist/{cssMode-C2DbOm5G.js → cssMode-CnfwP9nj.js} +1 -1
  22. package/dist/{freemarker2-DIAXDvZh.js → freemarker2-DIOv5Xlf.js} +1 -1
  23. package/dist/{handlebars-BNSBHLYi.js → handlebars-Cz8zefAf.js} +1 -1
  24. package/dist/{html-BYhqChCC.js → html-DhY2MHAU.js} +1 -1
  25. package/dist/{htmlMode-Yi80fKa_.js → htmlMode-BZQRWrco.js} +1 -1
  26. package/dist/{index-B_5eS34k.js → index-DHjs_Ff2.js} +32296 -33911
  27. package/dist/index.js +328 -336
  28. package/dist/{javascript-qbJFaknq.js → javascript-CxG0rbLe.js} +1 -1
  29. package/dist/{jsonMode-BIO3_Bhv.js → jsonMode-BYzgd2UL.js} +1 -1
  30. package/dist/{liquid-BhQxjMmC.js → liquid-Db9c17la.js} +1 -1
  31. package/dist/{mdx-BcxpAgOj.js → mdx-BX6Mvf3D.js} +1 -1
  32. package/dist/{python-lNzFF1gZ.js → python-Dbxpo_sO.js} +1 -1
  33. package/dist/{razor-Bt-aSObe.js → razor-DGraqnWe.js} +1 -1
  34. package/dist/{tsMode-Dp7Djl6H.js → tsMode-CWTNr7IO.js} +1 -1
  35. package/dist/{typescript-VVpDVimM.js → typescript-DYeWUV__.js} +1 -1
  36. package/dist/{xml-w67VngZW.js → xml-DHUeUam1.js} +1 -1
  37. package/dist/{yaml-DLRfXLkQ.js → yaml-B1Z6ROGl.js} +1 -1
  38. package/package.json +3 -4
  39. package/dist/Shared/Components/Security/SecurityModal/SecurityModal.d.ts +0 -14
  40. package/dist/Shared/Components/Security/SecurityModal/components/IndexedTextDisplay.d.ts +0 -4
  41. package/dist/Shared/Components/Security/SecurityModal/components/InfoCard.d.ts +0 -4
  42. package/dist/Shared/Components/Security/SecurityModal/components/OpenDetailViewButton.d.ts +0 -4
  43. package/dist/Shared/Components/Security/SecurityModal/components/Sidebar.d.ts +0 -4
  44. package/dist/Shared/Components/Security/SecurityModal/components/Table.d.ts +0 -4
  45. package/dist/Shared/Components/Security/SecurityModal/components/index.d.ts +0 -4
  46. package/dist/Shared/Components/Security/SecurityModal/config/CodeScan.d.ts +0 -100
  47. package/dist/Shared/Components/Security/SecurityModal/config/EmptyState.d.ts +0 -2
  48. package/dist/Shared/Components/Security/SecurityModal/config/ImageScan.d.ts +0 -4
  49. package/dist/Shared/Components/Security/SecurityModal/config/InfoCard.d.ts +0 -2
  50. package/dist/Shared/Components/Security/SecurityModal/config/KubernetesManifest.d.ts +0 -4
  51. package/dist/Shared/Components/Security/SecurityModal/config/Sidebar.d.ts +0 -2
  52. package/dist/Shared/Components/Security/SecurityModal/config/Table.d.ts +0 -2
  53. package/dist/Shared/Components/Security/SecurityModal/config/index.d.ts +0 -3
  54. package/dist/Shared/Components/Security/SecurityModal/constants.d.ts +0 -56
  55. package/dist/Shared/Components/Security/SecurityModal/index.d.ts +0 -4
  56. package/dist/Shared/Components/Security/SecurityModal/service.d.ts +0 -5
  57. package/dist/Shared/Components/Security/SecurityModal/types.d.ts +0 -269
  58. package/dist/Shared/Components/Security/SecurityModal/utils.d.ts +0 -34
  59. package/dist/Shared/Components/Security/SecuritySummaryCard/SecuritySummaryCard.d.ts +0 -3
  60. package/dist/Shared/Components/Security/SecuritySummaryCard/index.d.ts +0 -1
  61. package/dist/Shared/Components/Security/SecuritySummaryCard/types.d.ts +0 -16
  62. package/dist/Shared/Components/Security/Vulnerabilities/types.d.ts +0 -25
  63. package/dist/Shared/Components/Security/Vulnerabilities/utils.d.ts +0 -13
  64. package/dist/Shared/Components/Security/index.d.ts +0 -4
  65. package/dist/Shared/Components/Security/utils.d.ts +0 -4
@@ -1,4 +1,4 @@
1
- import { conf as t, language as e } from "./typescript-VVpDVimM.js";
1
+ import { conf as t, language as e } from "./typescript-DYeWUV__.js";
2
2
  /*!-----------------------------------------------------------------------------
3
3
  * Copyright (c) Microsoft Corporation. All rights reserved.
4
4
  * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)
@@ -1,7 +1,7 @@
1
1
  var $e = Object.defineProperty;
2
2
  var Ge = (e, n, i) => n in e ? $e(e, n, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[n] = i;
3
3
  var C = (e, n, i) => Ge(e, typeof n != "symbol" ? n + "" : n, i);
4
- import { m as Qe } from "./index-B_5eS34k.js";
4
+ import { m as Qe } from "./index-DHjs_Ff2.js";
5
5
  /*!-----------------------------------------------------------------------------
6
6
  * Copyright (c) Microsoft Corporation. All rights reserved.
7
7
  * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)
@@ -1,4 +1,4 @@
1
- import { m as l } from "./index-B_5eS34k.js";
1
+ import { m as l } from "./index-DHjs_Ff2.js";
2
2
  /*!-----------------------------------------------------------------------------
3
3
  * Copyright (c) Microsoft Corporation. All rights reserved.
4
4
  * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)
@@ -1,4 +1,4 @@
1
- import { m as s } from "./index-B_5eS34k.js";
1
+ import { m as s } from "./index-DHjs_Ff2.js";
2
2
  /*!-----------------------------------------------------------------------------
3
3
  * Copyright (c) Microsoft Corporation. All rights reserved.
4
4
  * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)
@@ -1,4 +1,4 @@
1
- import { m as i } from "./index-B_5eS34k.js";
1
+ import { m as i } from "./index-DHjs_Ff2.js";
2
2
  /*!-----------------------------------------------------------------------------
3
3
  * Copyright (c) Microsoft Corporation. All rights reserved.
4
4
  * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)
@@ -1,4 +1,4 @@
1
- import { m } from "./index-B_5eS34k.js";
1
+ import { m } from "./index-DHjs_Ff2.js";
2
2
  /*!-----------------------------------------------------------------------------
3
3
  * Copyright (c) Microsoft Corporation. All rights reserved.
4
4
  * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)
@@ -1,7 +1,7 @@
1
1
  var N = Object.defineProperty;
2
2
  var M = (e, t, r) => t in e ? N(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
3
  var _ = (e, t, r) => M(e, typeof t != "symbol" ? t + "" : t, r);
4
- import { t as R, m as K } from "./index-B_5eS34k.js";
4
+ import { t as R, m as K } from "./index-DHjs_Ff2.js";
5
5
  /*!-----------------------------------------------------------------------------
6
6
  * Copyright (c) Microsoft Corporation. All rights reserved.
7
7
  * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)
@@ -1,4 +1,4 @@
1
- import { m as s } from "./index-B_5eS34k.js";
1
+ import { m as s } from "./index-DHjs_Ff2.js";
2
2
  /*!-----------------------------------------------------------------------------
3
3
  * Copyright (c) Microsoft Corporation. All rights reserved.
4
4
  * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)
@@ -1,4 +1,4 @@
1
- import { m as r } from "./index-B_5eS34k.js";
1
+ import { m as r } from "./index-DHjs_Ff2.js";
2
2
  /*!-----------------------------------------------------------------------------
3
3
  * Copyright (c) Microsoft Corporation. All rights reserved.
4
4
  * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)
@@ -1,4 +1,4 @@
1
- import { m as l } from "./index-B_5eS34k.js";
1
+ import { m as l } from "./index-DHjs_Ff2.js";
2
2
  /*!-----------------------------------------------------------------------------
3
3
  * Copyright (c) Microsoft Corporation. All rights reserved.
4
4
  * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devtron-labs/devtron-fe-common-lib",
3
- "version": "0.3.5-beta-3",
3
+ "version": "0.3.5-beta-5",
4
4
  "description": "Supporting common component library",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -73,6 +73,7 @@
73
73
  "vite-tsconfig-paths": "5.0.1"
74
74
  },
75
75
  "peerDependencies": {
76
+ "react-select": "5.8.0",
76
77
  "@rjsf/core": "^5.13.3",
77
78
  "@rjsf/utils": "^5.13.3",
78
79
  "@rjsf/validator-ajv8": "^5.13.3",
@@ -86,17 +87,15 @@
86
87
  "react-mde": "^11.5.0",
87
88
  "react-router": "^5.3.0",
88
89
  "react-router-dom": "^5.3.0",
89
- "react-select": "5.8.0",
90
90
  "rxjs": "^7.8.1",
91
91
  "yaml": "^2.4.1"
92
92
  },
93
93
  "dependencies": {
94
94
  "@types/react-dates": "^21.8.6",
95
95
  "ansi_up": "^5.2.1",
96
- "dayjs": "^1.11.12",
97
96
  "fast-json-patch": "^3.1.1",
98
- "jsonpath-plus": "^9.0.0",
99
97
  "react-dates": "^21.8.0",
98
+ "jsonpath-plus": "^9.0.0",
100
99
  "react-monaco-editor": "^0.54.0",
101
100
  "sass": "^1.69.7",
102
101
  "tslib": "2.7.0"
@@ -1,14 +0,0 @@
1
- import { default as React } from 'react';
2
- import { SecurityModalPropsType } from './types';
3
- /**
4
- * NOTE: the security modal is split into 3 sections - ImageScan, CodeScan & Kubernetes Manifest;
5
- * Each category has 1 or more subCategories from the set (Vulnerability, License, MisConfigurations & ExposedSecrets)
6
- * Since each combination of category & subCategory results in the data being visualized through InfoCard & Table
7
- * the components are declared & called only once and only the data (props) passed to these components differ
8
- * between the different configurations of category & subCategory. Some row elements from some combinations
9
- * of Category & SubCategory can allow users to view that particular data in detail (taking user to detailView)
10
- * So to showcase the detail data, the data is set into detailViewData property of ModalState.
11
- * For further detail please refer the types to understand the Api Response and workflow of the modal component.
12
- * */
13
- declare const SecurityModal: React.FC<SecurityModalPropsType>;
14
- export default SecurityModal;
@@ -1,4 +0,0 @@
1
- import { default as React } from 'react';
2
- import { IndexedTextDisplayPropsType } from '../types';
3
- declare const IndexedTextDisplay: React.FC<IndexedTextDisplayPropsType>;
4
- export default IndexedTextDisplay;
@@ -1,4 +0,0 @@
1
- import { default as React } from 'react';
2
- import { InfoCardPropsType } from '../types';
3
- declare const InfoCard: React.FC<InfoCardPropsType>;
4
- export default InfoCard;
@@ -1,4 +0,0 @@
1
- import { PropsWithChildren } from 'react';
2
- import { OpenDetailViewButtonProps } from '../types';
3
- declare const OpenDetailViewButton: ({ children, detailViewData, setDetailViewData, }: PropsWithChildren<OpenDetailViewButtonProps>) => JSX.Element;
4
- export default OpenDetailViewButton;
@@ -1,4 +0,0 @@
1
- import { default as React } from 'react';
2
- import { SidebarPropsType } from '../types';
3
- declare const Sidebar: React.FC<SidebarPropsType>;
4
- export default Sidebar;
@@ -1,4 +0,0 @@
1
- import { default as React } from 'react';
2
- import { TablePropsType } from '../types';
3
- declare const Table: React.FC<TablePropsType>;
4
- export default Table;
@@ -1,4 +0,0 @@
1
- export { default as Sidebar } from './Sidebar';
2
- export { default as Table } from './Table';
3
- export { default as InfoCard } from './InfoCard';
4
- export { default as OpenDetailViewButton } from './OpenDetailViewButton';
@@ -1,100 +0,0 @@
1
- import { ApiResponseResultType, CodeScan, DetailViewDataType, EmptyStateType, InfoCardPropsType, OpenDetailViewButtonProps, SecurityModalStateType, StatusType, TablePropsType } from '../types';
2
- export declare const getCodeScanVulnerabilities: (data: CodeScan["vulnerability"]) => {
3
- headers: ({
4
- headerText: string;
5
- isSortable: boolean;
6
- width: number;
7
- compareFunc?: undefined;
8
- defaultSortOrder?: undefined;
9
- } | {
10
- headerText: string;
11
- isSortable: boolean;
12
- width: number;
13
- compareFunc: (a: import('../types').SeveritiesDTO, b: import('../types').SeveritiesDTO) => number;
14
- defaultSortOrder: import('../types').SortOrderEnum;
15
- })[];
16
- rows: {
17
- id: number;
18
- expandableComponent: any;
19
- cells: {
20
- component: JSX.Element;
21
- cellContent: string;
22
- }[];
23
- }[];
24
- defaultSortIndex: number;
25
- };
26
- export declare const getCodeScanLicense: (data: CodeScan["license"]) => {
27
- headers: ({
28
- headerText: string;
29
- isSortable: boolean;
30
- width: number;
31
- compareFunc?: undefined;
32
- defaultSortOrder?: undefined;
33
- } | {
34
- headerText: string;
35
- isSortable: boolean;
36
- width: number;
37
- compareFunc: (a: import('../types').SeveritiesDTO, b: import('../types').SeveritiesDTO) => number;
38
- defaultSortOrder: import('../types').SortOrderEnum;
39
- })[];
40
- rows: {
41
- id: number;
42
- expandableComponent: any;
43
- cells: {
44
- component: JSX.Element;
45
- cellContent: string;
46
- }[];
47
- }[];
48
- defaultSortIndex: number;
49
- };
50
- export declare const getCodeScanMisconfigurations: (data: CodeScan["misConfigurations"], setDetailViewData: OpenDetailViewButtonProps["setDetailViewData"], lastScanTimeString: string, status: StatusType["status"], scanToolName: StatusType["scanToolName"]) => {
51
- headers: ({
52
- headerText: string;
53
- isSortable: boolean;
54
- width: number;
55
- compareFunc?: undefined;
56
- } | {
57
- headerText: string;
58
- isSortable: boolean;
59
- width: number;
60
- compareFunc: (a: Record<import('../types').SeveritiesDTO, number>, b: Record<import('../types').SeveritiesDTO, number>) => number;
61
- })[];
62
- rows: {
63
- id: number;
64
- expandableComponent: any;
65
- cells: ({
66
- component: JSX.Element;
67
- cellContent: string;
68
- } | {
69
- component: JSX.Element;
70
- cellContent: Partial<Record<import('../types').SeveritiesDTO, number>>;
71
- })[];
72
- }[];
73
- };
74
- export declare const getCodeScanExposedSecrets: (data: CodeScan["exposedSecrets"], setDetailViewData: OpenDetailViewButtonProps["setDetailViewData"], lastScanTimeString: string, status: StatusType["status"], scanToolName: StatusType["scanToolName"]) => {
75
- headers: ({
76
- headerText: string;
77
- isSortable: boolean;
78
- width: number;
79
- compareFunc?: undefined;
80
- } | {
81
- headerText: string;
82
- isSortable: boolean;
83
- width: number;
84
- compareFunc: (a: Record<import('../types').SeveritiesDTO, number>, b: Record<import('../types').SeveritiesDTO, number>) => number;
85
- })[];
86
- rows: {
87
- id: number;
88
- expandableComponent: any;
89
- cells: ({
90
- component: JSX.Element;
91
- cellContent: string;
92
- } | {
93
- component: JSX.Element;
94
- cellContent: Partial<Record<import('../types').SeveritiesDTO, number>>;
95
- })[];
96
- }[];
97
- };
98
- export declare const getCodeScanTableData: (data: CodeScan, subCategory: SecurityModalStateType["subCategory"], setDetailViewData: OpenDetailViewButtonProps["setDetailViewData"]) => TablePropsType;
99
- export declare const getCodeScanInfoCardData: (data: CodeScan, subCategory: SecurityModalStateType["subCategory"]) => InfoCardPropsType;
100
- export declare const getCodeScanEmptyState: (data: ApiResponseResultType, subCategory: SecurityModalStateType["subCategory"], detailViewData: DetailViewDataType) => EmptyStateType;
@@ -1,2 +0,0 @@
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,4 +0,0 @@
1
- import { DetailViewDataType, ImageScan, SecurityModalStateType, TablePropsType, InfoCardPropsType, EmptyStateType, ApiResponseResultType, OpenDetailViewButtonProps } from '../types';
2
- export declare const getImageScanTableData: (data: ImageScan, subCategory: SecurityModalStateType["subCategory"], setDetailViewData: OpenDetailViewButtonProps["setDetailViewData"]) => TablePropsType;
3
- export declare const getImageScanInfoCardData: (data: ImageScan, subCategory: SecurityModalStateType["subCategory"]) => InfoCardPropsType;
4
- export declare const getImageScanEmptyState: (data: ApiResponseResultType, subCategory: SecurityModalStateType["subCategory"], detailViewData: DetailViewDataType) => EmptyStateType;
@@ -1,2 +0,0 @@
1
- import { InfoCardPropsType, ApiResponseResultType, SecurityModalStateType } from '../types';
2
- export declare const getInfoCardData: (data: ApiResponseResultType, category: SecurityModalStateType["category"], subCategory: SecurityModalStateType["subCategory"]) => InfoCardPropsType;
@@ -1,4 +0,0 @@
1
- import { ApiResponseResultType, DetailViewDataType, EmptyStateType, InfoCardPropsType, KubernetesManifest, OpenDetailViewButtonProps, SecurityModalStateType, TablePropsType } from '../types';
2
- export declare const getKubernetesManifestTableData: (data: KubernetesManifest, subCategory: SecurityModalStateType["subCategory"], setDetailViewData: OpenDetailViewButtonProps["setDetailViewData"]) => TablePropsType;
3
- export declare const getKubernetesManifestInfoCardData: (data: KubernetesManifest, subCategory: SecurityModalStateType["subCategory"]) => InfoCardPropsType;
4
- export declare const getKubernetesManifestEmptyState: (data: ApiResponseResultType, subCategory: SecurityModalStateType["subCategory"], detailViewData: DetailViewDataType) => EmptyStateType;
@@ -1,2 +0,0 @@
1
- import { SidebarDataType } from '../types';
2
- export declare const SIDEBAR_DATA: SidebarDataType[];
@@ -1,2 +0,0 @@
1
- import { ApiResponseResultType, OpenDetailViewButtonProps, SecurityModalStateType, TablePropsType } from '../types';
2
- export declare const getTableData: (data: ApiResponseResultType, category: SecurityModalStateType["category"], subCategory: SecurityModalStateType["subCategory"], setDetailViewData: OpenDetailViewButtonProps["setDetailViewData"]) => TablePropsType;
@@ -1,3 +0,0 @@
1
- export { getTableData } from './Table';
2
- export { getInfoCardData } from './InfoCard';
3
- export { SIDEBAR_DATA } from './Sidebar';
@@ -1,56 +0,0 @@
1
- import { SeveritiesDTO, SortOrderEnum, EmptyStateType, StatusType } from './types';
2
- export declare const DEFAULT_SECURITY_MODAL_STATE: {
3
- category: "imageScan";
4
- subCategory: "vulnerability";
5
- detailViewData: any;
6
- };
7
- export declare const CATEGORY_LABELS: {
8
- readonly IMAGE_SCAN: "Image Scan";
9
- readonly CODE_SCAN: "Code Scan";
10
- readonly KUBERNETES_MANIFEST: "Kubernetes Manifest";
11
- };
12
- export declare const SUB_CATEGORY_LABELS: {
13
- readonly VULNERABILITIES: "Vulnerability";
14
- readonly LICENSE: "License Risks";
15
- readonly MISCONFIGURATIONS: "Misconfigurations";
16
- readonly EXPOSED_SECRETS: "Exposed Secrets";
17
- };
18
- export declare const SEVERITIES: {
19
- readonly CRITICAL: {
20
- readonly label: "Critical";
21
- readonly color: "#B21212";
22
- };
23
- readonly HIGH: {
24
- readonly label: "High";
25
- readonly color: "#F33E3E";
26
- };
27
- readonly MEDIUM: {
28
- readonly label: "Medium";
29
- readonly color: "#FF7E5B";
30
- };
31
- readonly LOW: {
32
- readonly label: "Low";
33
- readonly color: "#FFB549";
34
- };
35
- readonly UNKNOWN: {
36
- readonly label: "Unknown";
37
- readonly color: "#B1B7BC";
38
- };
39
- readonly fail: {
40
- readonly label: "Failures";
41
- readonly color: "#F33E3E";
42
- };
43
- readonly success: {
44
- readonly label: "Successes";
45
- readonly color: "#1DAD70";
46
- };
47
- readonly exceptions: {
48
- readonly label: "Exceptions";
49
- readonly color: "#B1B7BC";
50
- };
51
- };
52
- export declare const ORDERED_SEVERITY_KEYS: readonly [SeveritiesDTO.CRITICAL, SeveritiesDTO.HIGH, SeveritiesDTO.MEDIUM, SeveritiesDTO.LOW, SeveritiesDTO.UNKNOWN, SeveritiesDTO.FAILURES, SeveritiesDTO.EXCEPTIONS, SeveritiesDTO.SUCCESSES];
53
- export declare const SEVERITY_DEFAULT_SORT_ORDER = SortOrderEnum['DESC'];
54
- export declare const SCAN_FAILED_EMPTY_STATE: EmptyStateType;
55
- export declare const SCAN_IN_PROGRESS_EMPTY_STATE: EmptyStateType;
56
- export declare const MAP_SCAN_TOOL_NAME_TO_SCAN_TOOL_ID: Record<StatusType['scanToolName'], number>;
@@ -1,4 +0,0 @@
1
- export { default as SecurityModal } from './SecurityModal';
2
- export { getSecurityScan } from './service';
3
- export { getSecurityScanSeveritiesCount } from './utils';
4
- export type { AppDetailsPayload, ExecutionDetailsPayload, ApiResponseResultType } from './types';
@@ -1,5 +0,0 @@
1
- import { ResponseType } from '../../../../Common/Types';
2
- import { ApiResponseResultType, GetResourceScanDetailsPayloadType, SecurityModalPropsType } from './types';
3
- export declare const getExecutionDetails: (executionDetailPayload: SecurityModalPropsType["executionDetailsPayload"]) => Promise<ResponseType<ApiResponseResultType>>;
4
- export declare const getResourceScanDetails: ({ name, namespace, clusterId, group, version, kind, appId, appType, deploymentType, isAppDetailView, }: GetResourceScanDetailsPayloadType) => Promise<ResponseType<ApiResponseResultType>>;
5
- export declare const getSecurityScan: ({ appId, envId, installedAppId, artifactId, installedAppVersionHistoryId, }: SecurityModalPropsType["appDetailsPayload"]) => Promise<ResponseType<ApiResponseResultType>>;
@@ -1,269 +0,0 @@
1
- import { default as React } from 'react';
2
- import { GenericEmptyStateType } from '../../../../Common/Types';
3
- import { LastExecutionResultType, NodeType, Nodes } from '../../../types';
4
- import { SegmentedBarChartProps } from '../../../../Common/SegmentedBarChart';
5
- export interface GetResourceScanDetailsPayloadType {
6
- name: string;
7
- namespace: string;
8
- group: string;
9
- version: string;
10
- kind: Nodes | NodeType;
11
- clusterId: number;
12
- appId?: string;
13
- appType?: number;
14
- deploymentType?: number;
15
- isAppDetailView?: boolean;
16
- }
17
- interface SecurityModalBaseProps {
18
- handleModalClose: (event?: React.MouseEvent<HTMLElement>) => void;
19
- isExternalCI?: boolean;
20
- }
21
- export interface AppDetailsPayload {
22
- appId?: number | string;
23
- envId?: number | string;
24
- installedAppId?: number | string;
25
- artifactId?: number | string;
26
- installedAppVersionHistoryId?: number | string;
27
- }
28
- export interface ExecutionDetailsPayload extends Partial<Pick<AppDetailsPayload, 'appId' | 'envId'>> {
29
- imageScanDeployInfoId?: number | string;
30
- artifactId?: number | string;
31
- }
32
- interface SecurityModalAppDetailsPropsType {
33
- appDetailsPayload: AppDetailsPayload;
34
- resourceScanPayload?: never;
35
- executionDetailsPayload?: never;
36
- }
37
- interface SecurityModalResourceScanPropsType {
38
- appDetailsPayload?: never;
39
- resourceScanPayload: GetResourceScanDetailsPayloadType;
40
- executionDetailsPayload?: never;
41
- }
42
- interface SecurityModalExecutionDetailsPropsType {
43
- appDetailsPayload?: never;
44
- resourceScanPayload?: never;
45
- executionDetailsPayload: ExecutionDetailsPayload;
46
- }
47
- export type SecurityModalPropsType = SecurityModalBaseProps & (SecurityModalAppDetailsPropsType | SecurityModalResourceScanPropsType | SecurityModalExecutionDetailsPropsType);
48
- export declare const CATEGORIES: {
49
- readonly IMAGE_SCAN: "imageScan";
50
- readonly CODE_SCAN: "codeScan";
51
- readonly KUBERNETES_MANIFEST: "kubernetesManifest";
52
- };
53
- export declare const SUB_CATEGORIES: {
54
- readonly VULNERABILITIES: "vulnerability";
55
- readonly LICENSE: "license";
56
- readonly MISCONFIGURATIONS: "misConfigurations";
57
- readonly EXPOSED_SECRETS: "exposedSecrets";
58
- };
59
- export declare enum SortOrderEnum {
60
- 'ASC' = 1,
61
- 'DESC' = -1
62
- }
63
- export type TableRowCellType = {
64
- component: React.ReactNode | JSX.Element;
65
- cellContent: string | object;
66
- };
67
- export type TableHeaderCellType = {
68
- headerText: string;
69
- isSortable: boolean;
70
- width: number;
71
- compareFunc?: (a: TableRowCellType['cellContent'], b: TableRowCellType['cellContent']) => number;
72
- defaultSortOrder?: SortOrderEnum;
73
- };
74
- export interface TableRowType {
75
- id: string | number;
76
- cells: Array<TableRowCellType>;
77
- expandableComponent: React.ReactNode | JSX.Element;
78
- }
79
- export interface TablePropsType {
80
- headers: Array<TableHeaderCellType>;
81
- rows: Array<TableRowType>;
82
- defaultSortIndex?: number;
83
- hasExpandableRows?: boolean;
84
- headerTopPosition?: number;
85
- }
86
- export type TableSortStateType = {
87
- index: number;
88
- order: SortOrderEnum;
89
- };
90
- export interface InfoCardPropsType {
91
- entities: SegmentedBarChartProps['entities'];
92
- lastScanTimeString?: string;
93
- scanToolId?: number;
94
- }
95
- export interface StatusType {
96
- status: 'Completed' | 'Running' | 'Failed' | 'Progressing';
97
- StartedOn: string;
98
- scanToolName: 'TRIVY' | 'CLAIR';
99
- }
100
- export type DetailViewDataType = {
101
- titlePrefix: string;
102
- title: string;
103
- status: StatusType['status'];
104
- } & TablePropsType & InfoCardPropsType;
105
- export type SecurityModalStateType = {
106
- category: (typeof CATEGORIES)[keyof typeof CATEGORIES];
107
- subCategory: (typeof SUB_CATEGORIES)[keyof typeof SUB_CATEGORIES];
108
- detailViewData: DetailViewDataType[];
109
- };
110
- export interface SidebarPropsType extends Pick<SecurityModalBaseProps, 'isExternalCI'> {
111
- isHelmApp: boolean;
112
- modalState: SecurityModalStateType;
113
- setModalState: React.Dispatch<React.SetStateAction<SecurityModalStateType>>;
114
- }
115
- export declare enum SeveritiesDTO {
116
- CRITICAL = "CRITICAL",
117
- HIGH = "HIGH",
118
- MEDIUM = "MEDIUM",
119
- LOW = "LOW",
120
- UNKNOWN = "UNKNOWN",
121
- FAILURES = "fail",
122
- SUCCESSES = "success",
123
- EXCEPTIONS = "exceptions"
124
- }
125
- type Summary<T extends 'severities' | 'status'> = Record<T, Partial<Record<SeveritiesDTO, number>>>;
126
- type GenericGroupType<T> = {
127
- list: T[];
128
- };
129
- type GenericGroupTypeWithSummary<T> = {
130
- summary: Summary<'severities'>;
131
- } & GenericGroupType<T>;
132
- type GenericGroupTypeWithMisConfSummary<T> = {
133
- misConfSummary: Summary<'status'>;
134
- } & GenericGroupType<T>;
135
- export interface CodeScanVulnerabilityType {
136
- cveId: string;
137
- severity: SeveritiesDTO;
138
- package: string;
139
- currentVersion: string;
140
- fixedInVersion: string;
141
- }
142
- export interface ImageScanVulnerabilityType extends CodeScanVulnerabilityType {
143
- target?: string;
144
- }
145
- export interface ImageScanVulnerabilityListType extends StatusType {
146
- image: string;
147
- summary: Summary<'severities'>;
148
- list: ImageScanVulnerabilityType[];
149
- }
150
- export interface CodeScanLicenseType {
151
- classification: string;
152
- severity: string;
153
- license: string;
154
- package: string;
155
- source: string;
156
- }
157
- export interface ImageScanLicenseListType extends StatusType {
158
- image: string;
159
- summary: Summary<'severities'>;
160
- list: CodeScanLicenseType[];
161
- }
162
- export type ImageScan = {
163
- [SUB_CATEGORIES.VULNERABILITIES]: GenericGroupTypeWithSummary<ImageScanVulnerabilityListType>;
164
- [SUB_CATEGORIES.LICENSE]: GenericGroupTypeWithSummary<ImageScanLicenseListType>;
165
- };
166
- export interface Line {
167
- number: number;
168
- content: string;
169
- isCause: boolean;
170
- truncated: boolean;
171
- }
172
- export interface CauseMetadata {
173
- startLine: number;
174
- EndLine: number;
175
- lines?: Line[];
176
- }
177
- export interface CodeScanMisconfigurationsDetailListType {
178
- id: string;
179
- title: string;
180
- message: string;
181
- resolution: string;
182
- status: string;
183
- severity: string;
184
- causeMetadata: CauseMetadata;
185
- }
186
- export interface CodeScanMisconfigurationsListType {
187
- filePath: string;
188
- link: string;
189
- type: string;
190
- misConfSummary: Summary<'status'>;
191
- summary: Summary<'severities'>;
192
- list: CodeScanMisconfigurationsDetailListType[];
193
- }
194
- export interface CodeScanExposedSecretsDetailListType {
195
- severity: string;
196
- ruleId: string;
197
- category: string;
198
- startLine: number;
199
- EndLine: number;
200
- title: string;
201
- lines: Line[];
202
- }
203
- export interface CodeScanExposedSecretsListType {
204
- filePath: string;
205
- link: string;
206
- summary: Summary<'severities'>;
207
- list: CodeScanExposedSecretsDetailListType[];
208
- }
209
- export type CodeScan = {
210
- [SUB_CATEGORIES.VULNERABILITIES]: GenericGroupTypeWithSummary<CodeScanVulnerabilityType>;
211
- [SUB_CATEGORIES.LICENSE]: GenericGroupTypeWithSummary<CodeScanLicenseType>;
212
- [SUB_CATEGORIES.MISCONFIGURATIONS]: GenericGroupTypeWithMisConfSummary<CodeScanMisconfigurationsListType>;
213
- [SUB_CATEGORIES.EXPOSED_SECRETS]: GenericGroupTypeWithSummary<CodeScanExposedSecretsListType>;
214
- } & StatusType;
215
- export type KubernetesManifest = {
216
- [SUB_CATEGORIES.MISCONFIGURATIONS]: GenericGroupTypeWithMisConfSummary<CodeScanMisconfigurationsListType>;
217
- [SUB_CATEGORIES.EXPOSED_SECRETS]: GenericGroupTypeWithSummary<CodeScanExposedSecretsListType>;
218
- } & StatusType;
219
- export type ApiResponseResultType = {
220
- scanned: boolean;
221
- [CATEGORIES.IMAGE_SCAN]: ImageScan;
222
- [CATEGORIES.CODE_SCAN]: CodeScan;
223
- [CATEGORIES.KUBERNETES_MANIFEST]: KubernetesManifest;
224
- };
225
- export interface IndexedTextDisplayPropsType {
226
- title: string;
227
- lines: Line[];
228
- link: string;
229
- }
230
- export type SidebarDataChildType = {
231
- label: string;
232
- value: {
233
- category: (typeof CATEGORIES)[keyof typeof CATEGORIES];
234
- subCategory: (typeof SUB_CATEGORIES)[keyof typeof SUB_CATEGORIES];
235
- };
236
- };
237
- export type SidebarDataType = {
238
- label: string;
239
- isExpanded: boolean;
240
- children: NonNullable<SidebarDataChildType[]>;
241
- hideInHelmApp?: boolean;
242
- };
243
- export type EmptyStateType = Pick<GenericEmptyStateType, 'image' | 'SvgImage' | 'subTitle' | 'title' | 'children'>;
244
- export declare const VulnerabilityState: {
245
- readonly [-1]: "Failed";
246
- readonly 0: "Progressing";
247
- readonly 1: "Completed";
248
- };
249
- export interface ImageVulnerabilityType {
250
- image: string;
251
- state: keyof typeof VulnerabilityState;
252
- error?: string;
253
- scanResult: LastExecutionResultType | null;
254
- }
255
- export interface VulnerabilityCountType {
256
- unknownVulnerabilitiesCount: number;
257
- lowVulnerabilitiesCount: number;
258
- mediumVulnerabilitiesCount: number;
259
- highVulnerabilitiesCount: number;
260
- criticalVulnerabilitiesCount: number;
261
- }
262
- export interface GetResourceScanDetailsResponseType extends VulnerabilityCountType {
263
- imageVulnerabilities: ImageVulnerabilityType[];
264
- }
265
- export interface OpenDetailViewButtonProps {
266
- detailViewData: DetailViewDataType;
267
- setDetailViewData: (detailViewData: DetailViewDataType) => void;
268
- }
269
- export {};