@devtron-labs/devtron-fe-common-lib 0.0.12 → 0.0.13
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/Common.service.d.ts +10 -1
- package/dist/Common/Constants.d.ts +2 -0
- package/dist/Common/ImageTags.Types.d.ts +39 -0
- package/dist/Common/ImageTags.d.ts +4 -0
- package/dist/Common/Types.d.ts +32 -24
- package/dist/Common/index.d.ts +2 -0
- package/dist/index.js +554 -110
- package/package.json +1 -1
- package/src/Assets/Icon/ic-arrow-counter-clockwise.svg +5 -0
- package/src/Assets/Icon/ic-enter.svg +3 -0
- package/src/Assets/Icon/ic-error-exclamation.svg +6 -0
- package/src/Assets/Icon/ic-minus.svg +3 -0
- package/src/Assets/Icon/ic-pencil.svg +3 -0
- package/src/Common/Common.service.ts +18 -3
- package/src/Common/Constants.ts +2 -0
- package/src/Common/ImageTags.Types.ts +43 -0
- package/src/Common/ImageTags.tsx +585 -0
- package/src/Common/Types.ts +38 -26
- package/src/Common/index.ts +2 -0
|
@@ -1,2 +1,11 @@
|
|
|
1
|
-
import { TeamList } from './Types';
|
|
1
|
+
import { TeamList, ResponseType } from './Types';
|
|
2
2
|
export declare const getTeamListMin: () => Promise<TeamList>;
|
|
3
|
+
interface UserRole extends ResponseType {
|
|
4
|
+
result?: {
|
|
5
|
+
roles: string[];
|
|
6
|
+
superAdmin: boolean;
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
export declare function getUserRole(appName?: string): Promise<UserRole>;
|
|
10
|
+
export declare function setImageTags(request: any, pipelineId: number, artifactId: number): Promise<ResponseType>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export interface ReleaseTag {
|
|
2
|
+
id: number;
|
|
3
|
+
tagName: string;
|
|
4
|
+
appId: number;
|
|
5
|
+
deleted: boolean;
|
|
6
|
+
artifactId: number;
|
|
7
|
+
duplicateTag: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface ImageComment {
|
|
10
|
+
id: number;
|
|
11
|
+
comment: string;
|
|
12
|
+
artifactId: number;
|
|
13
|
+
}
|
|
14
|
+
export interface ImageTaggingContainerType {
|
|
15
|
+
ciPipelineId?: number;
|
|
16
|
+
artifactId?: number;
|
|
17
|
+
imageComment?: ImageComment;
|
|
18
|
+
imageReleaseTags?: ReleaseTag[];
|
|
19
|
+
updateCurrentAppMaterial?: (matId: number, releaseTags?: ReleaseTag[], imageComment?: ImageComment) => void;
|
|
20
|
+
appReleaseTagNames?: string[];
|
|
21
|
+
tagsEditable?: boolean;
|
|
22
|
+
forceReInit?: boolean;
|
|
23
|
+
setAppReleaseTagNames?: (appReleaseTags: string[]) => void;
|
|
24
|
+
setTagsEditable?: (tagsEditable: boolean) => void;
|
|
25
|
+
toggleCardMode?: (id: number) => void;
|
|
26
|
+
hideHardDelete?: boolean;
|
|
27
|
+
}
|
|
28
|
+
export interface ImageButtonType {
|
|
29
|
+
text: string;
|
|
30
|
+
isSoftDeleted: boolean;
|
|
31
|
+
isEditing: boolean;
|
|
32
|
+
onSoftDeleteClick?: any;
|
|
33
|
+
onHardDeleteClick?: any;
|
|
34
|
+
tagId: number;
|
|
35
|
+
softDeleteTags: any;
|
|
36
|
+
isSuperAdmin: any;
|
|
37
|
+
duplicateTag?: boolean;
|
|
38
|
+
hideHardDelete?: boolean;
|
|
39
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ImageButtonType, ImageTaggingContainerType } from './ImageTags.Types';
|
|
3
|
+
export declare const ImageTagsContainer: ({ ciPipelineId, artifactId, imageComment, imageReleaseTags, updateCurrentAppMaterial, appReleaseTagNames, setAppReleaseTagNames, tagsEditable, setTagsEditable, toggleCardMode, hideHardDelete, forceReInit, }: ImageTaggingContainerType) => JSX.Element;
|
|
4
|
+
export declare const ImageTagButton: ({ text, isSoftDeleted, isEditing, onSoftDeleteClick, onHardDeleteClick, tagId, softDeleteTags, isSuperAdmin, duplicateTag, hideHardDelete, }: ImageButtonType) => JSX.Element;
|
package/dist/Common/Types.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { ReactNode, CSSProperties } from 'react';
|
|
1
|
+
import React, { ReactNode, CSSProperties } from 'react';
|
|
2
2
|
import { Placement } from 'tippy.js';
|
|
3
|
+
import { ImageComment, ReleaseTag } from "./ImageTags.Types";
|
|
3
4
|
export interface ResponseType {
|
|
4
5
|
code: number;
|
|
5
6
|
status: string;
|
|
@@ -189,6 +190,32 @@ export interface UserApprovalMetadataType {
|
|
|
189
190
|
approvedUsersData: ApprovalUserDataType[];
|
|
190
191
|
requestedUserData: ApprovalUserDataType;
|
|
191
192
|
}
|
|
193
|
+
export interface CDMaterialType {
|
|
194
|
+
index: number;
|
|
195
|
+
id: string;
|
|
196
|
+
materialInfo: MaterialInfo[];
|
|
197
|
+
tab: CDModalTabType;
|
|
198
|
+
scanEnabled: boolean;
|
|
199
|
+
scanned: boolean;
|
|
200
|
+
vulnerabilitiesLoading: boolean;
|
|
201
|
+
lastExecution: string;
|
|
202
|
+
vulnerabilities: VulnerabilityType[];
|
|
203
|
+
vulnerable: boolean;
|
|
204
|
+
deployedTime: string;
|
|
205
|
+
deployedBy?: string;
|
|
206
|
+
wfrId?: number;
|
|
207
|
+
buildTime: string;
|
|
208
|
+
image: string;
|
|
209
|
+
isSelected: boolean;
|
|
210
|
+
showSourceInfo: boolean;
|
|
211
|
+
latest: boolean;
|
|
212
|
+
runningOnParentCd?: boolean;
|
|
213
|
+
userApprovalMetadata?: UserApprovalMetadataType;
|
|
214
|
+
triggeredBy?: number;
|
|
215
|
+
imageComment?: ImageComment;
|
|
216
|
+
imageReleaseTags?: ReleaseTag[];
|
|
217
|
+
artifactStatus?: string;
|
|
218
|
+
}
|
|
192
219
|
export interface CommonNodeAttr {
|
|
193
220
|
connectingCiPipelineId?: number;
|
|
194
221
|
parents: string | number[] | string[];
|
|
@@ -245,6 +272,8 @@ export interface CommonNodeAttr {
|
|
|
245
272
|
action: any;
|
|
246
273
|
metadataField: string;
|
|
247
274
|
};
|
|
275
|
+
appReleaseTagNames?: string[];
|
|
276
|
+
tagsEditable?: boolean;
|
|
248
277
|
}
|
|
249
278
|
export interface VulnerabilityType {
|
|
250
279
|
name: string;
|
|
@@ -270,33 +299,12 @@ export interface MaterialInfo {
|
|
|
270
299
|
url?: string;
|
|
271
300
|
type?: string;
|
|
272
301
|
}
|
|
273
|
-
export interface CDMaterialType {
|
|
274
|
-
index: number;
|
|
275
|
-
id: string;
|
|
276
|
-
materialInfo: MaterialInfo[];
|
|
277
|
-
tab: CDModalTabType;
|
|
278
|
-
scanEnabled: boolean;
|
|
279
|
-
scanned: boolean;
|
|
280
|
-
vulnerabilitiesLoading: boolean;
|
|
281
|
-
lastExecution: string;
|
|
282
|
-
vulnerabilities: VulnerabilityType[];
|
|
283
|
-
vulnerable: boolean;
|
|
284
|
-
deployedTime: string;
|
|
285
|
-
deployedBy?: string;
|
|
286
|
-
wfrId?: number;
|
|
287
|
-
buildTime: string;
|
|
288
|
-
image: string;
|
|
289
|
-
isSelected: boolean;
|
|
290
|
-
showSourceInfo: boolean;
|
|
291
|
-
latest: boolean;
|
|
292
|
-
runningOnParentCd?: boolean;
|
|
293
|
-
userApprovalMetadata?: UserApprovalMetadataType;
|
|
294
|
-
triggeredBy?: number;
|
|
295
|
-
}
|
|
296
302
|
export interface CDMaterialResponseType {
|
|
297
303
|
approvalUsers: string[];
|
|
298
304
|
materials: any[];
|
|
299
305
|
userApprovalConfig: UserApprovalConfigType;
|
|
300
306
|
requestedUserId: number;
|
|
307
|
+
tagsEditable: boolean;
|
|
308
|
+
appReleaseTagNames: string[];
|
|
301
309
|
}
|
|
302
310
|
export {};
|
package/dist/Common/index.d.ts
CHANGED
|
@@ -32,3 +32,5 @@ export { default as StyledRadioGroup } from './RadioGroup/RadioGroup';
|
|
|
32
32
|
export * from './CIPipeline.Types';
|
|
33
33
|
export * from './Policy.Types';
|
|
34
34
|
export { default as DeleteComponent } from './DeleteComponentModal/DeleteComponent';
|
|
35
|
+
export * from './ImageTags';
|
|
36
|
+
export * from './ImageTags.Types';
|