@devtron-labs/devtron-fe-common-lib 0.0.10-beta-21 → 0.0.10-beta-22
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.d.ts +4 -0
- package/dist/Common/Types.d.ts +70 -25
- package/dist/Common/index.d.ts +1 -0
- package/dist/index.js +562 -111
- 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.tsx +594 -0
- package/src/Common/RadioGroup.tsx +2 -2
- package/src/Common/Types.ts +80 -27
- package/src/Common/index.ts +1 -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,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ImageButtonType, ImageTaggingContainerType } from './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,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode, CSSProperties } from 'react';
|
|
1
|
+
import React, { ReactNode, CSSProperties } from 'react';
|
|
2
2
|
import { Placement } from 'tippy.js';
|
|
3
3
|
export interface ResponseType {
|
|
4
4
|
code: number;
|
|
@@ -109,7 +109,6 @@ export interface ReloadType {
|
|
|
109
109
|
export interface RadioGroupItemProps {
|
|
110
110
|
value: string;
|
|
111
111
|
dataTestId?: string;
|
|
112
|
-
disabled?: boolean;
|
|
113
112
|
}
|
|
114
113
|
export interface RadioGroupProps {
|
|
115
114
|
value: string;
|
|
@@ -189,6 +188,32 @@ export interface UserApprovalMetadataType {
|
|
|
189
188
|
approvedUsersData: ApprovalUserDataType[];
|
|
190
189
|
requestedUserData: ApprovalUserDataType;
|
|
191
190
|
}
|
|
191
|
+
export interface CDMaterialType {
|
|
192
|
+
index: number;
|
|
193
|
+
id: string;
|
|
194
|
+
materialInfo: MaterialInfo[];
|
|
195
|
+
tab: CDModalTabType;
|
|
196
|
+
scanEnabled: boolean;
|
|
197
|
+
scanned: boolean;
|
|
198
|
+
vulnerabilitiesLoading: boolean;
|
|
199
|
+
lastExecution: string;
|
|
200
|
+
vulnerabilities: VulnerabilityType[];
|
|
201
|
+
vulnerable: boolean;
|
|
202
|
+
deployedTime: string;
|
|
203
|
+
deployedBy?: string;
|
|
204
|
+
wfrId?: number;
|
|
205
|
+
buildTime: string;
|
|
206
|
+
image: string;
|
|
207
|
+
isSelected: boolean;
|
|
208
|
+
showSourceInfo: boolean;
|
|
209
|
+
latest: boolean;
|
|
210
|
+
runningOnParentCd?: boolean;
|
|
211
|
+
userApprovalMetadata?: UserApprovalMetadataType;
|
|
212
|
+
triggeredBy?: number;
|
|
213
|
+
imageComment?: ImageComment;
|
|
214
|
+
imageReleaseTags?: ReleaseTag[];
|
|
215
|
+
artifactStatus?: string;
|
|
216
|
+
}
|
|
192
217
|
export interface CommonNodeAttr {
|
|
193
218
|
connectingCiPipelineId?: number;
|
|
194
219
|
parents: string | number[] | string[];
|
|
@@ -245,6 +270,8 @@ export interface CommonNodeAttr {
|
|
|
245
270
|
action: any;
|
|
246
271
|
metadataField: string;
|
|
247
272
|
};
|
|
273
|
+
appReleaseTagNames?: string[];
|
|
274
|
+
tagsEditable?: boolean;
|
|
248
275
|
}
|
|
249
276
|
export interface VulnerabilityType {
|
|
250
277
|
name: string;
|
|
@@ -270,33 +297,51 @@ export interface MaterialInfo {
|
|
|
270
297
|
url?: string;
|
|
271
298
|
type?: string;
|
|
272
299
|
}
|
|
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
300
|
export interface CDMaterialResponseType {
|
|
297
301
|
approvalUsers: string[];
|
|
298
302
|
materials: any[];
|
|
299
303
|
userApprovalConfig: UserApprovalConfigType;
|
|
300
304
|
requestedUserId: number;
|
|
305
|
+
tagsEditable: boolean;
|
|
306
|
+
appReleaseTagNames: string[];
|
|
307
|
+
}
|
|
308
|
+
export interface ReleaseTag {
|
|
309
|
+
id: number;
|
|
310
|
+
tagName: string;
|
|
311
|
+
appId: number;
|
|
312
|
+
deleted: boolean;
|
|
313
|
+
artifactId: number;
|
|
314
|
+
duplicateTag: boolean;
|
|
315
|
+
}
|
|
316
|
+
export interface ImageComment {
|
|
317
|
+
id: number;
|
|
318
|
+
comment: string;
|
|
319
|
+
artifactId: number;
|
|
320
|
+
}
|
|
321
|
+
export interface ImageTaggingContainerType {
|
|
322
|
+
ciPipelineId?: number;
|
|
323
|
+
artifactId?: number;
|
|
324
|
+
imageComment?: ImageComment;
|
|
325
|
+
imageReleaseTags?: ReleaseTag[];
|
|
326
|
+
updateCurrentAppMaterial?: (matId: number, releaseTags?: ReleaseTag[], imageComment?: ImageComment) => void;
|
|
327
|
+
appReleaseTagNames?: string[];
|
|
328
|
+
tagsEditable?: boolean;
|
|
329
|
+
forceReInit?: boolean;
|
|
330
|
+
setAppReleaseTagNames?: (appReleaseTags: string[]) => void;
|
|
331
|
+
setTagsEditable?: (tagsEditable: boolean) => void;
|
|
332
|
+
toggleCardMode?: (id: number) => void;
|
|
333
|
+
hideHardDelete?: boolean;
|
|
334
|
+
}
|
|
335
|
+
export interface ImageButtonType {
|
|
336
|
+
text: string;
|
|
337
|
+
isSoftDeleted: boolean;
|
|
338
|
+
isEditing: boolean;
|
|
339
|
+
onSoftDeleteClick?: any;
|
|
340
|
+
onHardDeleteClick?: any;
|
|
341
|
+
tagId: number;
|
|
342
|
+
softDeleteTags: any;
|
|
343
|
+
isSuperAdmin: any;
|
|
344
|
+
duplicateTag?: boolean;
|
|
345
|
+
hideHardDelete?: boolean;
|
|
301
346
|
}
|
|
302
347
|
export {};
|
package/dist/Common/index.d.ts
CHANGED