@devtron-labs/devtron-fe-common-lib 0.3.5-beta-2 → 0.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/Common/Constants.d.ts +2 -0
- package/dist/Common/CustomInput/CustomInput.d.ts +1 -1
- package/dist/Common/CustomInput/Types.d.ts +1 -1
- package/dist/Common/DeleteComponentModal/types.d.ts +1 -4
- package/dist/Common/Helper.d.ts +6 -0
- 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 +1 -0
- 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/Sidebar.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 +4 -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 +4 -0
- package/dist/Shared/Components/Security/SecurityModal/service.d.ts +5 -0
- package/dist/Shared/Components/Security/SecurityModal/types.d.ts +269 -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 +16 -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 +25 -0
- package/dist/Shared/Components/Security/Vulnerabilities/utils.d.ts +13 -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/index.d.ts +1 -1
- package/dist/Shared/Hooks/index.d.ts +0 -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-uwn3xArb.js → cssMode-C2DbOm5G.js} +1 -1
- package/dist/{freemarker2-CaMhuqPe.js → freemarker2-DIAXDvZh.js} +1 -1
- package/dist/{handlebars-CTnClFcN.js → handlebars-BNSBHLYi.js} +1 -1
- package/dist/{html-dSNw58aO.js → html-BYhqChCC.js} +1 -1
- package/dist/{htmlMode-YCmi4Oec.js → htmlMode-Yi80fKa_.js} +1 -1
- package/dist/{index-CQ_tnSZb.js → index-B_5eS34k.js} +34557 -32957
- package/dist/index.js +336 -328
- package/dist/{javascript-BOjyNMQb.js → javascript-qbJFaknq.js} +1 -1
- package/dist/{jsonMode-Wch8DjET.js → jsonMode-BIO3_Bhv.js} +1 -1
- package/dist/{liquid-yOyHP9Wm.js → liquid-BhQxjMmC.js} +1 -1
- package/dist/{mdx-CkdjZgHK.js → mdx-BcxpAgOj.js} +1 -1
- package/dist/{python-CuKcH7j4.js → python-lNzFF1gZ.js} +1 -1
- package/dist/{razor-CMkeVh_3.js → razor-Bt-aSObe.js} +1 -1
- package/dist/{tsMode-C6w4n8l9.js → tsMode-Dp7Djl6H.js} +1 -1
- package/dist/{typescript-isK37BH_.js → typescript-VVpDVimM.js} +1 -1
- package/dist/{xml-BlWNjX_p.js → xml-w67VngZW.js} +1 -1
- package/dist/{yaml-BFN6QLOY.js → yaml-DLRfXLkQ.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
- package/dist/Shared/Hooks/useForm/index.d.ts +0 -2
- package/dist/Shared/Hooks/useForm/useForm.d.ts +0 -71
- package/dist/Shared/Hooks/useForm/useForm.types.d.ts +0 -69
- package/dist/Shared/Hooks/useForm/useForm.utils.d.ts +0 -10
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { SeverityCount } from '../../../types';
|
|
2
|
+
import { AppDetailsPayload, ExecutionDetailsPayload } from '../SecurityModal';
|
|
3
|
+
interface ExecutionDetailsPayloadType {
|
|
4
|
+
executionDetailsPayload: ExecutionDetailsPayload;
|
|
5
|
+
appDetailsPayload?: never;
|
|
6
|
+
}
|
|
7
|
+
interface AppDetailsPayloadType {
|
|
8
|
+
executionDetailsPayload?: never;
|
|
9
|
+
appDetailsPayload: AppDetailsPayload;
|
|
10
|
+
}
|
|
11
|
+
export type SecuritySummaryCardProps = {
|
|
12
|
+
severityCount: SeverityCount;
|
|
13
|
+
scanToolId: number;
|
|
14
|
+
rootClassName?: string;
|
|
15
|
+
} & (ExecutionDetailsPayloadType | AppDetailsPayloadType);
|
|
16
|
+
export {};
|
package/dist/Shared/Components/{Vulnerabilities → Security/Vulnerabilities}/Vulnerabilities.d.ts
RENAMED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { VulnerabilitiesProps } from './types';
|
|
2
|
-
declare const Vulnerabilities: ({ isScanned, isScanEnabled, artifactId, applicationId, environmentId, setVulnerabilityCount, }: VulnerabilitiesProps) => JSX.Element;
|
|
2
|
+
declare const Vulnerabilities: ({ isScanned, isScanEnabled, artifactId, applicationId, environmentId, setVulnerabilityCount, isScanV2Enabled, }: VulnerabilitiesProps) => JSX.Element;
|
|
3
3
|
export default Vulnerabilities;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { LastExecutionResponseType } from '
|
|
1
|
+
import { LastExecutionResponseType } from '../../../types';
|
|
2
2
|
export declare function getLastExecutionByArtifactAppEnv(artifactId: string | number, appId: number | string, envId: number | string): Promise<LastExecutionResponseType>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { MaterialSecurityInfoType } from '../../../types';
|
|
2
|
+
import { getSecurityScan } from '../SecurityModal';
|
|
3
|
+
import { getLastExecutionByArtifactAppEnv } from './service';
|
|
4
|
+
export interface VulnerabilitiesProps extends MaterialSecurityInfoType {
|
|
5
|
+
artifactId: number;
|
|
6
|
+
applicationId: number;
|
|
7
|
+
environmentId: number;
|
|
8
|
+
setVulnerabilityCount: React.Dispatch<React.SetStateAction<number>>;
|
|
9
|
+
isScanV2Enabled: boolean;
|
|
10
|
+
}
|
|
11
|
+
export interface UseGetSecurityVulnerabilitiesProps {
|
|
12
|
+
artifactId: string;
|
|
13
|
+
appId: string;
|
|
14
|
+
envId: string;
|
|
15
|
+
isScanned: boolean;
|
|
16
|
+
isScanEnabled: boolean;
|
|
17
|
+
isScanV2Enabled: boolean;
|
|
18
|
+
}
|
|
19
|
+
export interface UseGetSecurityVulnerabilitiesReturnType {
|
|
20
|
+
scanDetailsLoading: boolean;
|
|
21
|
+
scanResultResponse: Awaited<ReturnType<typeof getSecurityScan>>;
|
|
22
|
+
executionDetailsResponse: Awaited<ReturnType<typeof getLastExecutionByArtifactAppEnv>>;
|
|
23
|
+
scanDetailsError: any;
|
|
24
|
+
reloadScanDetails: () => void;
|
|
25
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { LastExecutionResponseType, LastExecutionResultType } from '../../../types';
|
|
2
|
+
import { 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, }: {
|
|
7
|
+
artifactId: any;
|
|
8
|
+
appId: any;
|
|
9
|
+
envId: any;
|
|
10
|
+
isScanned: any;
|
|
11
|
+
isScanEnabled: any;
|
|
12
|
+
isScanV2Enabled: any;
|
|
13
|
+
}) => 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;
|
|
@@ -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
|
}
|