@devtron-labs/devtron-fe-common-lib 0.0.78 → 0.0.79-beta-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 -0
- package/dist/Common/Common.service.d.ts +1 -0
- package/dist/Common/Constants.d.ts +13 -1
- package/dist/Common/GenericDescription/GenericDescription.d.ts +4 -0
- package/dist/Common/GenericDescription/constant.d.ts +2 -0
- package/dist/Common/GenericDescription/index.d.ts +2 -0
- package/dist/Common/GenericDescription/types.d.ts +14 -0
- package/dist/Common/Helper.d.ts +12 -3
- package/dist/Common/ImageTags.Types.d.ts +1 -1
- package/dist/Common/Markdown/MarkDown.d.ts +4 -0
- package/dist/Common/Markdown/Types.d.ts +7 -0
- package/dist/Common/Markdown/constant.d.ts +28 -0
- package/dist/Common/Markdown/index.d.ts +1 -0
- package/dist/Common/Types.d.ts +63 -6
- package/dist/Common/index.d.ts +2 -0
- package/dist/Shared/Components/APIResponseHandler/APIResponseHandler.d.ts +1 -1
- package/dist/Shared/Components/APIResponseHandler/types.d.ts +9 -0
- package/dist/Shared/Components/ActivityIndicator/ActivityIndicator.d.ts +4 -0
- package/dist/Shared/Components/ActivityIndicator/index.d.ts +1 -0
- package/dist/Shared/Components/ActivityIndicator/types.d.ts +3 -0
- package/dist/Shared/Components/ExcludedImageNode/ExcludedImageNode.d.ts +4 -0
- package/dist/Shared/Components/ExcludedImageNode/index.d.ts +1 -0
- package/dist/Shared/Components/ExcludedImageNode/types.d.ts +3 -0
- package/dist/Shared/Components/GenericSectionErrorState/GenericSectionErrorState.component.d.ts +1 -1
- package/dist/Shared/Components/GenericSectionErrorState/types.d.ts +21 -1
- package/dist/Shared/Components/ImageCard/ArtifactInfo/ArtifactInfo.d.ts +4 -0
- package/dist/Shared/Components/ImageCard/ArtifactInfo/index.d.ts +1 -0
- package/dist/Shared/Components/ImageCard/ArtifactInfo/types.d.ts +4 -0
- package/dist/Shared/Components/ImageCard/ImageCard.d.ts +4 -0
- package/dist/Shared/Components/ImageCard/SequentialCDCardTitle/DeploymentEnvState/DeploymentEnvState.d.ts +4 -0
- package/dist/Shared/Components/ImageCard/SequentialCDCardTitle/DeploymentEnvState/constants.d.ts +6 -0
- package/dist/Shared/Components/ImageCard/SequentialCDCardTitle/DeploymentEnvState/index.d.ts +1 -0
- package/dist/Shared/Components/ImageCard/SequentialCDCardTitle/DeploymentEnvState/types.d.ts +11 -0
- package/dist/Shared/Components/ImageCard/SequentialCDCardTitle/DeploymentEnvState/utils.d.ts +3 -0
- package/dist/Shared/Components/ImageCard/SequentialCDCardTitle/SequentialCDCardTitle.d.ts +4 -0
- package/dist/Shared/Components/ImageCard/SequentialCDCardTitle/index.d.ts +1 -0
- package/dist/Shared/Components/ImageCard/index.d.ts +3 -0
- package/dist/Shared/Components/ImageCard/types.d.ts +41 -0
- package/dist/Shared/Components/ImageCardAccordion/ImageCardAccordion.d.ts +4 -0
- package/dist/Shared/Components/ImageCardAccordion/index.d.ts +1 -0
- package/dist/Shared/Components/ImageCardAccordion/types.d.ts +24 -0
- package/dist/Shared/Components/ReactSelect/utils.d.ts +1 -0
- package/dist/Shared/Components/ScannedByToolModal/ScannedByToolModal.d.ts +4 -0
- package/dist/Shared/Components/ScannedByToolModal/index.d.ts +1 -0
- package/dist/Shared/Components/ScannedByToolModal/types.d.ts +3 -0
- package/dist/Shared/Components/Vulnerabilities/Vulnerabilities.d.ts +4 -0
- package/dist/Shared/Components/Vulnerabilities/constants.d.ts +4 -0
- package/dist/Shared/Components/Vulnerabilities/index.d.ts +1 -0
- package/dist/Shared/Components/Vulnerabilities/service.d.ts +3 -0
- package/dist/Shared/Components/Vulnerabilities/types.d.ts +8 -0
- package/dist/Shared/Components/index.d.ts +6 -0
- package/dist/Shared/Helpers.d.ts +7 -0
- package/dist/Shared/constants.d.ts +35 -0
- package/dist/Shared/index.d.ts +2 -0
- package/dist/Shared/types.d.ts +197 -0
- package/dist/Shared/validations.d.ts +10 -0
- package/dist/assets/index.css +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +10303 -9497
- package/package.json +9 -3
package/dist/Common/Api.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { MutableRefObject } from 'react';
|
|
|
3
3
|
|
|
4
4
|
export declare const post: (url: string, data: object, options?: APIOptions, isMultipartRequest?: boolean) => Promise<ResponseType>;
|
|
5
5
|
export declare const put: (url: string, data: object, options?: APIOptions) => Promise<ResponseType>;
|
|
6
|
+
export declare const patch: (url: string, data: object, options?: APIOptions) => Promise<ResponseType>;
|
|
6
7
|
export declare const get: (url: string, options?: APIOptions) => Promise<ResponseType>;
|
|
7
8
|
export declare const trash: (url: string, data?: object, options?: APIOptions) => Promise<ResponseType>;
|
|
8
9
|
/**
|
|
@@ -18,4 +18,5 @@ export declare const genericCDMaterialsService: (serviceType: CDMaterialServiceE
|
|
|
18
18
|
export declare function extractImage(image: string): string;
|
|
19
19
|
export declare function createGitCommitUrl(url: string, revision: string): string;
|
|
20
20
|
export declare function fetchChartTemplateVersions(): Promise<ResponseType<any>>;
|
|
21
|
+
export declare const getDefaultConfig: () => Promise<ResponseType>;
|
|
21
22
|
export {};
|
|
@@ -27,17 +27,22 @@ export declare const URLS: {
|
|
|
27
27
|
APP_LIST_HELM: string;
|
|
28
28
|
};
|
|
29
29
|
export declare const ROUTES: {
|
|
30
|
+
APP_ARTIFACT_PROMOTE_MATERIAL: string;
|
|
30
31
|
PROJECT_LIST_MIN: string;
|
|
31
32
|
USER_CHECK_ROLE: string;
|
|
32
33
|
IMAGE_TAGGING: string;
|
|
33
34
|
CD_MATERIAL_GET: string;
|
|
34
35
|
DEPLOYMENT_TEMPLATE_LIST: string;
|
|
35
36
|
INFRA_CONFIG_PROFILE: string;
|
|
37
|
+
SECURITY_SCAN_EXECUTION_DETAILS: string;
|
|
38
|
+
NOTIFIER: string;
|
|
36
39
|
APP_LIST: string;
|
|
37
40
|
TELEMETRY_EVENT: string;
|
|
38
41
|
SERVER_INFO_API: string;
|
|
39
42
|
ATTRIBUTES_USER: string;
|
|
40
43
|
UPDATE: string;
|
|
44
|
+
CLUSTER_NOTE: string;
|
|
45
|
+
APPLICATION_NOTE: string;
|
|
41
46
|
};
|
|
42
47
|
export declare enum KEY_VALUE {
|
|
43
48
|
KEY = "key",
|
|
@@ -111,7 +116,8 @@ export declare enum MODES {
|
|
|
111
116
|
}
|
|
112
117
|
export declare enum APPROVAL_MODAL_TYPE {
|
|
113
118
|
CONFIG = "CONFIG",
|
|
114
|
-
DEPLOYMENT = "DEPLOYMENT"
|
|
119
|
+
DEPLOYMENT = "DEPLOYMENT",
|
|
120
|
+
IMAGE_PROMOTION = "IMAGE-PROMOTION"
|
|
115
121
|
}
|
|
116
122
|
export declare const MAX_Z_INDEX = 2147483647;
|
|
117
123
|
export declare const SELECTED_APPROVAL_TAB_STATE: {
|
|
@@ -191,6 +197,7 @@ export declare enum ReactSelectInputAction {
|
|
|
191
197
|
removeValue = "remove-value"
|
|
192
198
|
}
|
|
193
199
|
export declare const ZERO_TIME_STRING = "0001-01-01T00:00:00Z";
|
|
200
|
+
export declare const EXCLUDED_FALSY_VALUES: readonly [any, any, "", number];
|
|
194
201
|
export declare const API_STATUS_CODES: {
|
|
195
202
|
UNAUTHORIZED: number;
|
|
196
203
|
PERMISSION_DENIED: number;
|
|
@@ -217,3 +224,8 @@ export declare const POSTHOG_EVENT_ONBOARDING: {
|
|
|
217
224
|
export declare const MAX_LOGIN_COUNT = 5;
|
|
218
225
|
export declare const BULK_EDIT_HEADER = "Bulk Edit";
|
|
219
226
|
export declare const LOGIN_COUNT = "login-count";
|
|
227
|
+
export declare const DATE_TIME_FORMATS: {
|
|
228
|
+
TWELVE_HOURS_FORMAT: string;
|
|
229
|
+
TWELVE_HOURS_FORMAT_WITHOUT_WEEKDAY: string;
|
|
230
|
+
TWELVE_HOURS_EXPORT_FORMAT: string;
|
|
231
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { GenericDescriptionProps } from './types';
|
|
2
|
+
|
|
3
|
+
declare const GenericDescription: ({ text, updatedBy, updatedOn, isDescriptionPreview, tabIndex, updateDescription, title, minEditorHeight, }: GenericDescriptionProps) => JSX.Element;
|
|
4
|
+
export default GenericDescription;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface GenericDescriptionProps {
|
|
2
|
+
text?: string;
|
|
3
|
+
updatedBy?: string;
|
|
4
|
+
updatedOn?: string;
|
|
5
|
+
isDescriptionPreview: boolean;
|
|
6
|
+
updateDescription: (string: any) => Promise<void>;
|
|
7
|
+
title: string;
|
|
8
|
+
tabIndex?: number;
|
|
9
|
+
minEditorHeight?: number;
|
|
10
|
+
}
|
|
11
|
+
export declare enum MDEditorSelectedTabType {
|
|
12
|
+
WRITE = "write",
|
|
13
|
+
PREVIEW = "preview"
|
|
14
|
+
}
|
package/dist/Common/Helper.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AsyncOptions, UseSearchString } from './Types';
|
|
2
|
-
import { default as React } from 'react';
|
|
2
|
+
import { default as React, SyntheticEvent } from 'react';
|
|
3
3
|
|
|
4
4
|
export declare function showError(serverError: any, showToastOnUnknownError?: boolean, hideAccessError?: boolean): void;
|
|
5
5
|
interface ConditionalWrapper<T> {
|
|
@@ -8,8 +8,9 @@ interface ConditionalWrapper<T> {
|
|
|
8
8
|
children: T;
|
|
9
9
|
}
|
|
10
10
|
export declare const ConditionalWrap: React.FC<ConditionalWrapper<any>>;
|
|
11
|
-
export declare function sortCallback(key: string, a: any, b: any, isCaseSensitive?: boolean):
|
|
11
|
+
export declare function sortCallback(key: string, a: any, b: any, isCaseSensitive?: boolean): 0 | 1 | -1;
|
|
12
12
|
export declare const stopPropagation: (event: any) => void;
|
|
13
|
+
export declare const preventDefault: (event: SyntheticEvent) => void;
|
|
13
14
|
export declare function useThrottledEffect(callback: any, delay: any, deps?: any[]): void;
|
|
14
15
|
export declare function getRandomColor(email: string): string;
|
|
15
16
|
export declare const getAlphabetIcon: (str: string, rootClassName?: string) => JSX.Element;
|
|
@@ -47,7 +48,7 @@ export declare const processDeployedTime: (lastDeployed: any, isArgoInstalled: a
|
|
|
47
48
|
* @param url URL to which the search params needs to be added
|
|
48
49
|
* @param params Object for the search parameters
|
|
49
50
|
*/
|
|
50
|
-
export declare const getUrlWithSearchParams: (url: string, params
|
|
51
|
+
export declare const getUrlWithSearchParams: (url: string, params?: Record<string | number, any>) => string;
|
|
51
52
|
/**
|
|
52
53
|
* Custom exception logger function for logging errors to sentry
|
|
53
54
|
*/
|
|
@@ -77,4 +78,12 @@ export declare const handleRelativeDateSorting: (dateStringA: any, dateStringB:
|
|
|
77
78
|
* Returns a stringified YAML with default indentation & line width
|
|
78
79
|
*/
|
|
79
80
|
export declare const YAMLStringify: (obj: object | unknown, option?: object) => string;
|
|
81
|
+
/**
|
|
82
|
+
* compare Object Length of the object
|
|
83
|
+
*/
|
|
84
|
+
export declare const compareObjectLength: (objA: any, objB: any) => boolean;
|
|
85
|
+
/**
|
|
86
|
+
* Return deep copy of the object
|
|
87
|
+
*/
|
|
88
|
+
export declare function deepEqual(configA: any, configB: any): boolean;
|
|
80
89
|
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export declare const DEFAULT_MARKDOWN_EDITOR_PREVIEW_MESSAGE = "\n<br>\nNothing to preview\n";
|
|
2
|
+
export declare const MARKDOWN_EDITOR_COMMANDS: string[][];
|
|
3
|
+
export declare enum MARKDOWN_EDITOR_COMMAND_TITLE {
|
|
4
|
+
HEADER = "header",
|
|
5
|
+
BOLD = "bold",
|
|
6
|
+
ITALIC = "italic",
|
|
7
|
+
STRIKETHROUGH = "strikethrough",
|
|
8
|
+
LINK = "link",
|
|
9
|
+
QUOTE = "quote",
|
|
10
|
+
CODE = "code",
|
|
11
|
+
IMAGE = "image",
|
|
12
|
+
UNORDERED_LIST = "unordered-list",
|
|
13
|
+
ORDERED_LIST = "ordered-list",
|
|
14
|
+
CHECKED_LIST = "checked-list"
|
|
15
|
+
}
|
|
16
|
+
export declare const MARKDOWN_EDITOR_COMMAND_ICON_TIPPY_CONTENT: {
|
|
17
|
+
header: string;
|
|
18
|
+
bold: string;
|
|
19
|
+
italic: string;
|
|
20
|
+
strikethrough: string;
|
|
21
|
+
link: string;
|
|
22
|
+
quote: string;
|
|
23
|
+
code: string;
|
|
24
|
+
image: string;
|
|
25
|
+
"unordered-list": string;
|
|
26
|
+
"ordered-list": string;
|
|
27
|
+
"checked-list": string;
|
|
28
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as MarkDown } from './MarkDown';
|
package/dist/Common/Types.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { RegistryType } from '../Shared';
|
|
1
2
|
import { ACTION_STATE, DEPLOYMENT_WINDOW_TYPE, DockerConfigOverrideType, SortingOrder, TaskErrorObj } from '.';
|
|
2
3
|
import { ImageComment, ReleaseTag } from './ImageTags.Types';
|
|
3
4
|
import { Placement } from 'tippy.js';
|
|
@@ -52,6 +53,7 @@ export interface CheckboxProps {
|
|
|
52
53
|
onChange: (event: any) => void;
|
|
53
54
|
isChecked: boolean;
|
|
54
55
|
value: 'CHECKED' | 'INTERMEDIATE' | 'BULK_CHECKED';
|
|
56
|
+
name?: string;
|
|
55
57
|
disabled?: boolean;
|
|
56
58
|
tabIndex?: number;
|
|
57
59
|
rootClassName?: string;
|
|
@@ -268,6 +270,34 @@ export declare enum FilterStates {
|
|
|
268
270
|
export declare enum MaterialDataSource {
|
|
269
271
|
EXTERNAL = "ext"
|
|
270
272
|
}
|
|
273
|
+
export declare enum ImagePromotionRuntimeState {
|
|
274
|
+
AWAITING = "AWAITING",
|
|
275
|
+
PROMOTED = "PROMOTED",
|
|
276
|
+
CANCELLED = "CANCELLED",
|
|
277
|
+
STALE = "STALE"
|
|
278
|
+
}
|
|
279
|
+
export interface ImagePromotionPolicyApprovalMetadata {
|
|
280
|
+
approverCount: number;
|
|
281
|
+
allowRequesterFromApprove: boolean;
|
|
282
|
+
allowImageBuilderFromApprove: boolean;
|
|
283
|
+
allowApproverFromDeploy: boolean;
|
|
284
|
+
}
|
|
285
|
+
export interface ImagePromotionPolicyInfoType {
|
|
286
|
+
name: string;
|
|
287
|
+
id: number;
|
|
288
|
+
description: string;
|
|
289
|
+
conditions: FilterConditionsInfo[];
|
|
290
|
+
approvalMetadata: ImagePromotionPolicyApprovalMetadata;
|
|
291
|
+
}
|
|
292
|
+
export interface PromotionApprovalMetadataType {
|
|
293
|
+
approvalRequestId: number;
|
|
294
|
+
approvalRuntimeState: ImagePromotionRuntimeState;
|
|
295
|
+
approvedUsersData: ApprovalUserDataType[];
|
|
296
|
+
requestedUserData: ApprovalUserDataType;
|
|
297
|
+
policy: ImagePromotionPolicyInfoType;
|
|
298
|
+
promotedFrom?: string;
|
|
299
|
+
promotedFromType?: CDMaterialResourceQuery;
|
|
300
|
+
}
|
|
271
301
|
export interface DeploymentWindowArtifactMetadata {
|
|
272
302
|
id: number;
|
|
273
303
|
name: string;
|
|
@@ -299,7 +329,7 @@ export interface CDMaterialType {
|
|
|
299
329
|
imageReleaseTags?: ReleaseTag[];
|
|
300
330
|
artifactStatus?: string;
|
|
301
331
|
filterState: FilterStates;
|
|
302
|
-
registryType?:
|
|
332
|
+
registryType?: RegistryType;
|
|
303
333
|
imagePath?: string;
|
|
304
334
|
registryName?: string;
|
|
305
335
|
scanToolId?: number;
|
|
@@ -309,14 +339,28 @@ export interface CDMaterialType {
|
|
|
309
339
|
createdTime?: string;
|
|
310
340
|
deployed?: boolean;
|
|
311
341
|
dataSource?: MaterialDataSource;
|
|
342
|
+
/**
|
|
343
|
+
* The below two keys: `promotionApprovalMetaData`, `deployedOnEnvironments` are used in image promotion
|
|
344
|
+
* and may not be available to cater other use-cases.
|
|
345
|
+
*/
|
|
346
|
+
promotionApprovalMetadata?: PromotionApprovalMetadataType;
|
|
347
|
+
deployedOnEnvironments?: string[];
|
|
312
348
|
deploymentWindowArtifactMetadata?: DeploymentWindowArtifactMetadata;
|
|
313
349
|
}
|
|
314
350
|
export declare enum CDMaterialServiceEnum {
|
|
315
351
|
ROLLBACK = "rollback",
|
|
316
|
-
CD_MATERIALS = "cd-materials"
|
|
352
|
+
CD_MATERIALS = "cd-materials",
|
|
353
|
+
IMAGE_PROMOTION = "image-promotion"
|
|
317
354
|
}
|
|
318
355
|
export declare enum CDMaterialResourceQuery {
|
|
319
|
-
PENDING_APPROVAL = "PENDING_APPROVAL"
|
|
356
|
+
PENDING_APPROVAL = "PENDING_APPROVAL",
|
|
357
|
+
PROMOTION_APPROVAL_PENDING_NODE = "PROMOTION_APPROVAL_PENDING_NODE",
|
|
358
|
+
CI = "CI",
|
|
359
|
+
ENVIRONMENT = "ENVIRONMENT",
|
|
360
|
+
WEBHOOK = "WEBHOOK",
|
|
361
|
+
LINKED_CI = "LINKED-CI",
|
|
362
|
+
CI_JOB = "CI-JOB",
|
|
363
|
+
LINKED_CD = "LINKED-CD"
|
|
320
364
|
}
|
|
321
365
|
export declare enum CDMaterialFilterQuery {
|
|
322
366
|
RESOURCE = "ELIGIBLE_RESOURCES",
|
|
@@ -327,6 +371,11 @@ export interface CDMaterialServiceQueryParams {
|
|
|
327
371
|
offset?: number;
|
|
328
372
|
size?: number;
|
|
329
373
|
resource?: CDMaterialResourceQuery;
|
|
374
|
+
resourceName?: string;
|
|
375
|
+
resourceId?: number;
|
|
376
|
+
workflowId?: number;
|
|
377
|
+
appId?: number;
|
|
378
|
+
pendingForCurrentUser?: boolean;
|
|
330
379
|
filter?: CDMaterialFilterQuery;
|
|
331
380
|
}
|
|
332
381
|
export interface DownstreamNodesEnvironmentsType {
|
|
@@ -398,6 +447,7 @@ export interface CommonNodeAttr {
|
|
|
398
447
|
deploymentAppCreated?: boolean;
|
|
399
448
|
isLast?: boolean;
|
|
400
449
|
downstreamEnvironments?: DownstreamNodesEnvironmentsType[];
|
|
450
|
+
cipipelineId?: number;
|
|
401
451
|
isDeploymentBlocked?: boolean;
|
|
402
452
|
}
|
|
403
453
|
export declare enum DeploymentAppTypes {
|
|
@@ -447,7 +497,7 @@ export interface FilterConditionsListType {
|
|
|
447
497
|
export interface CDMaterialsApprovalInfo {
|
|
448
498
|
approvalUsers: string[];
|
|
449
499
|
userApprovalConfig: UserApprovalConfigType;
|
|
450
|
-
|
|
500
|
+
canApproverDeploy: boolean;
|
|
451
501
|
}
|
|
452
502
|
export interface CDMaterialsMetaInfo {
|
|
453
503
|
tagsEditable: boolean;
|
|
@@ -455,9 +505,16 @@ export interface CDMaterialsMetaInfo {
|
|
|
455
505
|
hideImageTaggingHardDelete: boolean;
|
|
456
506
|
resourceFilters?: FilterConditionsListType[];
|
|
457
507
|
totalCount: number;
|
|
458
|
-
|
|
508
|
+
/**
|
|
509
|
+
* This is the ID of user that has request the material
|
|
510
|
+
*/
|
|
511
|
+
requestedUserId: number;
|
|
512
|
+
}
|
|
513
|
+
export interface ImagePromotionMaterialInfo {
|
|
514
|
+
isApprovalPendingForPromotion: boolean;
|
|
515
|
+
imagePromotionApproverEmails: string[];
|
|
459
516
|
}
|
|
460
|
-
export interface CDMaterialResponseType extends CDMaterialsMetaInfo, CDMaterialsApprovalInfo {
|
|
517
|
+
export interface CDMaterialResponseType extends CDMaterialsMetaInfo, CDMaterialsApprovalInfo, ImagePromotionMaterialInfo {
|
|
461
518
|
materials: CDMaterialType[];
|
|
462
519
|
}
|
|
463
520
|
export interface InputDetailType {
|
package/dist/Common/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { APIResponseHandlerProps } from './types';
|
|
2
2
|
|
|
3
|
-
declare const APIResponseHandler: ({ isLoading, progressingProps, error, notAuthorized, notFoundText, reloadProps, children, }: APIResponseHandlerProps) => JSX.Element;
|
|
3
|
+
declare const APIResponseHandler: ({ isLoading, progressingProps, customLoader, error, notAuthorized, notFoundText, reloadProps, genericSectionErrorProps, children, }: APIResponseHandlerProps) => JSX.Element;
|
|
4
4
|
export default APIResponseHandler;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { GenericSectionErrorStateProps } from '../GenericSectionErrorState/types';
|
|
1
2
|
import { GenericEmptyStateType, ProgressingProps, ReloadType, ServerErrors } from '../../../Common';
|
|
2
3
|
import { ReactNode } from 'react';
|
|
3
4
|
|
|
@@ -14,6 +15,10 @@ export interface APIResponseHandlerProps {
|
|
|
14
15
|
* If loading is true, would load send these props to Progressing component
|
|
15
16
|
*/
|
|
16
17
|
progressingProps?: ProgressingProps;
|
|
18
|
+
/**
|
|
19
|
+
* If given, would show this component instead of default Progressing component
|
|
20
|
+
*/
|
|
21
|
+
customLoader?: ReactNode;
|
|
17
22
|
/**
|
|
18
23
|
* If true and isLoading is false would show default Reload component
|
|
19
24
|
* In case error code is 404 show default 404 page using GenericEmptyState
|
|
@@ -31,6 +36,10 @@ export interface APIResponseHandlerProps {
|
|
|
31
36
|
* If given, on Error, would load these props
|
|
32
37
|
*/
|
|
33
38
|
reloadProps?: ReloadType;
|
|
39
|
+
/**
|
|
40
|
+
* If given, would show this component instead of default Error component
|
|
41
|
+
*/
|
|
42
|
+
genericSectionErrorProps?: GenericSectionErrorStateProps;
|
|
34
43
|
/**
|
|
35
44
|
* If no Error and no Loading, would load this component
|
|
36
45
|
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as ActivityIndicator } from './ActivityIndicator';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as ExcludedImageNode } from './ExcludedImageNode';
|
package/dist/Shared/Components/GenericSectionErrorState/GenericSectionErrorState.component.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { GenericSectionErrorStateProps } from './types';
|
|
2
2
|
|
|
3
|
-
declare const GenericSectionErrorState: ({ reload, withBorder }: GenericSectionErrorStateProps) => JSX.Element;
|
|
3
|
+
declare const GenericSectionErrorState: ({ reload, withBorder, title, subTitle, description, buttonText, rootClassName, }: GenericSectionErrorStateProps) => JSX.Element;
|
|
4
4
|
export default GenericSectionErrorState;
|
|
@@ -2,11 +2,31 @@ export interface GenericSectionErrorStateProps {
|
|
|
2
2
|
/**
|
|
3
3
|
* Handler for reloading the section
|
|
4
4
|
*/
|
|
5
|
-
reload
|
|
5
|
+
reload?: () => void;
|
|
6
6
|
/**
|
|
7
7
|
* If true, border is added to the section
|
|
8
8
|
*
|
|
9
9
|
* @default false
|
|
10
10
|
*/
|
|
11
11
|
withBorder?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* @default 'Failed to load'
|
|
14
|
+
*/
|
|
15
|
+
title?: string;
|
|
16
|
+
/**
|
|
17
|
+
* @default 'We could not load the information on this page.'
|
|
18
|
+
*/
|
|
19
|
+
subTitle?: string;
|
|
20
|
+
/**
|
|
21
|
+
* @default 'Please reload or try again later'
|
|
22
|
+
*/
|
|
23
|
+
description?: string;
|
|
24
|
+
/**
|
|
25
|
+
* @default 'Reload'
|
|
26
|
+
*/
|
|
27
|
+
buttonText?: string;
|
|
28
|
+
/**
|
|
29
|
+
* to be applied on parent div
|
|
30
|
+
*/
|
|
31
|
+
rootClassName?: string;
|
|
12
32
|
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ArtifactInfoProps } from '../types';
|
|
2
|
+
|
|
3
|
+
declare const ArtifactInfo: ({ imagePath, registryName, registryType, image, deployedTime, deployedBy, isRollbackTrigger, excludedImagePathNode, approvalChecksNode, approvalInfoTippy, }: ArtifactInfoProps) => JSX.Element;
|
|
4
|
+
export default ArtifactInfo;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as ArtifactInfo } from './ArtifactInfo';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ImageCardProps } from './types';
|
|
2
|
+
|
|
3
|
+
declare const ImageCard: ({ testIdLocator, cta, sequentialCDCardTitleProps, artifactInfoProps, imageTagContainerProps, children, rootClassName, materialInfoRootClassName, }: ImageCardProps) => JSX.Element;
|
|
4
|
+
export default ImageCard;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as DeploymentEnvState } from './DeploymentEnvState';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { SequentialCDCardTitleProps } from '../types';
|
|
2
|
+
|
|
3
|
+
declare const SequentialCDCardTitle: ({ isLatest, isRunningOnParentCD, artifactStatus, environmentName, parentEnvironmentName, stageType, showLatestTag, isVirtualEnvironment, deployedOn, additionalInfo, }: SequentialCDCardTitleProps) => JSX.Element;
|
|
4
|
+
export default SequentialCDCardTitle;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as SequentialCDCardTitle } from './SequentialCDCardTitle';
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { RegistryType } from '../..';
|
|
2
|
+
import { ImageTaggingContainerType } from '../../../Common';
|
|
3
|
+
import { ReactNode } from 'react';
|
|
4
|
+
|
|
5
|
+
export interface ArtifactInfoProps {
|
|
6
|
+
imagePath: string;
|
|
7
|
+
registryName: string;
|
|
8
|
+
registryType: RegistryType;
|
|
9
|
+
image: string;
|
|
10
|
+
deployedTime: string;
|
|
11
|
+
deployedBy: string;
|
|
12
|
+
isRollbackTrigger: boolean;
|
|
13
|
+
excludedImagePathNode: ReactNode;
|
|
14
|
+
approvalChecksNode?: ReactNode;
|
|
15
|
+
approvalInfoTippy?: ReactNode;
|
|
16
|
+
}
|
|
17
|
+
export interface SequentialCDCardTitleProps {
|
|
18
|
+
isLatest: boolean;
|
|
19
|
+
isRunningOnParentCD: boolean;
|
|
20
|
+
artifactStatus: string;
|
|
21
|
+
stageType: string;
|
|
22
|
+
showLatestTag: boolean;
|
|
23
|
+
isVirtualEnvironment: boolean;
|
|
24
|
+
deployedOn?: string[];
|
|
25
|
+
environmentName?: string;
|
|
26
|
+
parentEnvironmentName?: string;
|
|
27
|
+
additionalInfo?: ReactNode;
|
|
28
|
+
}
|
|
29
|
+
export interface ImageCardProps {
|
|
30
|
+
testIdLocator: string;
|
|
31
|
+
sequentialCDCardTitleProps: SequentialCDCardTitleProps;
|
|
32
|
+
cta: ReactNode;
|
|
33
|
+
artifactInfoProps: ArtifactInfoProps;
|
|
34
|
+
imageTagContainerProps: ImageTaggingContainerType;
|
|
35
|
+
/**
|
|
36
|
+
* Meant for ImageCardAccordion
|
|
37
|
+
*/
|
|
38
|
+
children?: ReactNode;
|
|
39
|
+
rootClassName?: string;
|
|
40
|
+
materialInfoRootClassName?: string;
|
|
41
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ImageCardAccordionProps } from './types';
|
|
2
|
+
|
|
3
|
+
declare const ImageCardAccordion: ({ isSecurityModuleInstalled, artifactId, applicationId, environmentId, changesCard, isScanned, isScanEnabled, }: ImageCardAccordionProps) => JSX.Element;
|
|
4
|
+
export default ImageCardAccordion;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as ImageCardAccordion } from './ImageCardAccordion';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { MaterialSecurityInfoType } from '../../types';
|
|
2
|
+
import { CDModalTabType, VulnerabilityType } from '../../../Common';
|
|
3
|
+
import { default as React, ReactNode } from 'react';
|
|
4
|
+
|
|
5
|
+
export interface ImageCardAccordionProps extends MaterialSecurityInfoType {
|
|
6
|
+
isSecurityModuleInstalled: boolean;
|
|
7
|
+
artifactId: number;
|
|
8
|
+
applicationId: number;
|
|
9
|
+
environmentId: number;
|
|
10
|
+
changesCard: ReactNode;
|
|
11
|
+
isScanned: boolean;
|
|
12
|
+
isScanEnabled: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface SecurityDetailsType {
|
|
15
|
+
vulnerabilities: VulnerabilityType[];
|
|
16
|
+
scanToolId: number;
|
|
17
|
+
lastExecution: string;
|
|
18
|
+
}
|
|
19
|
+
export interface AccordionItemProps {
|
|
20
|
+
currentTab: CDModalTabType;
|
|
21
|
+
activeTab: CDModalTabType;
|
|
22
|
+
setActiveTab: React.Dispatch<React.SetStateAction<CDModalTabType>>;
|
|
23
|
+
buttonText: string;
|
|
24
|
+
}
|
|
@@ -12,3 +12,4 @@ export declare const getCommonSelectStyle: (styleOverrides?: {}) => {
|
|
|
12
12
|
export declare const getCustomOptionSelectionStyle: (styleOverrides?: {}) => (base: any, state: any) => any;
|
|
13
13
|
export declare const SelectOption: (props: any) => JSX.Element;
|
|
14
14
|
export declare const LoadingIndicator: () => JSX.Element;
|
|
15
|
+
export declare const GroupHeading: (props: any) => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as ScannedByToolModal } from './ScannedByToolModal';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Vulnerabilities } from './Vulnerabilities';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { MaterialSecurityInfoType } from '../../types';
|
|
2
|
+
|
|
3
|
+
export interface VulnerabilitiesProps extends MaterialSecurityInfoType {
|
|
4
|
+
artifactId: number;
|
|
5
|
+
applicationId: number;
|
|
6
|
+
environmentId: number;
|
|
7
|
+
setVulnerabilityCount: React.Dispatch<React.SetStateAction<number>>;
|
|
8
|
+
}
|