@devtron-labs/devtron-fe-common-lib 0.0.7-beta-49 → 0.0.7-beta-50
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/CIPipeline.Types.d.ts +263 -0
- package/dist/Common/Constants.d.ts +5 -0
- package/dist/Common/CustomTagSelector/ValidationRules.d.ts +1 -1
- package/dist/Common/Helper.d.ts +0 -22
- package/dist/Common/Types.d.ts +28 -2
- package/dist/Common/index.d.ts +1 -1
- package/dist/index.js +123 -242
- package/package.json +1 -1
- package/src/Assets/Icon/ic-help.svg +3 -0
- package/src/Common/CIPipeline.Types.ts +275 -0
- package/src/Common/Constants.ts +6 -0
- package/src/Common/CustomTagSelector/TagDetails.tsx +2 -2
- package/src/Common/CustomTagSelector/TagLabelSelect.tsx +1 -5
- package/src/Common/CustomTagSelector/TagLabelValueSelector.tsx +2 -2
- package/src/Common/CustomTagSelector/ValidationRules.ts +17 -21
- package/src/Common/Helper.tsx +36 -199
- package/src/Common/TippyCustomized.tsx +28 -2
- package/src/Common/Types.ts +30 -2
- package/src/Common/index.ts +1 -1
- package/dist/Common/DeleteComponentModal/DeleteComponent.d.ts +0 -4
- package/dist/Common/DeleteComponentModal/types.d.ts +0 -15
- package/src/Assets/Icon/ic-info-filled.svg +0 -7
- package/src/Assets/Icon/ic-warning.svg +0 -7
- package/src/Common/DeleteComponentModal/DeleteComponent.tsx +0 -95
- package/src/Common/DeleteComponentModal/types.ts +0 -15
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
export interface MaterialType {
|
|
2
|
+
name: string;
|
|
3
|
+
type: string;
|
|
4
|
+
value: string;
|
|
5
|
+
gitMaterialId: number;
|
|
6
|
+
id: number;
|
|
7
|
+
isSelected: boolean;
|
|
8
|
+
gitHostId: number;
|
|
9
|
+
gitProviderId: number;
|
|
10
|
+
regex?: string;
|
|
11
|
+
isRegex: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface Githost {
|
|
14
|
+
id: number;
|
|
15
|
+
name: string;
|
|
16
|
+
active: boolean;
|
|
17
|
+
webhookSecret: string;
|
|
18
|
+
webhookUrl: string;
|
|
19
|
+
}
|
|
20
|
+
export interface WebhookEvent {
|
|
21
|
+
id: number;
|
|
22
|
+
gitHostId: number;
|
|
23
|
+
name: string;
|
|
24
|
+
isActive: boolean;
|
|
25
|
+
selectors: WebhookEventSelectors[];
|
|
26
|
+
}
|
|
27
|
+
interface WebhookEventSelectors {
|
|
28
|
+
id: number;
|
|
29
|
+
eventId: number;
|
|
30
|
+
name: string;
|
|
31
|
+
selector: string;
|
|
32
|
+
toShowInCiFilter: boolean;
|
|
33
|
+
fixValue: string;
|
|
34
|
+
toShow: boolean;
|
|
35
|
+
possibleValues: string;
|
|
36
|
+
isActive: boolean;
|
|
37
|
+
}
|
|
38
|
+
export interface CiPipelineSourceTypeOption {
|
|
39
|
+
label: string;
|
|
40
|
+
value: string;
|
|
41
|
+
isDisabled: boolean;
|
|
42
|
+
isSelected: boolean;
|
|
43
|
+
isWebhook: boolean;
|
|
44
|
+
}
|
|
45
|
+
export declare enum RefVariableType {
|
|
46
|
+
GLOBAL = "GLOBAL",
|
|
47
|
+
FROM_PREVIOUS_STEP = "FROM_PREVIOUS_STEP",
|
|
48
|
+
NEW = "NEW"
|
|
49
|
+
}
|
|
50
|
+
export declare enum PluginType {
|
|
51
|
+
INLINE = "INLINE",
|
|
52
|
+
PLUGIN_REF = "REF_PLUGIN"
|
|
53
|
+
}
|
|
54
|
+
export declare enum ScriptType {
|
|
55
|
+
SHELL = "SHELL",
|
|
56
|
+
DOCKERFILE = "DOCKERFILE",
|
|
57
|
+
CONTAINERIMAGE = "CONTAINER_IMAGE"
|
|
58
|
+
}
|
|
59
|
+
export declare enum MountPath {
|
|
60
|
+
TRUE = "Yes",
|
|
61
|
+
FALSE = "No"
|
|
62
|
+
}
|
|
63
|
+
export declare enum ConditionType {
|
|
64
|
+
SKIP = "SKIP",
|
|
65
|
+
TRIGGER = "TRIGGER",
|
|
66
|
+
PASS = "PASS",
|
|
67
|
+
FAIL = "FAIL"
|
|
68
|
+
}
|
|
69
|
+
export declare enum RefVariableStageType {
|
|
70
|
+
PRE_CI = "PRE_CI",
|
|
71
|
+
POST_CI = "POST_CI"
|
|
72
|
+
}
|
|
73
|
+
export interface VariableType {
|
|
74
|
+
id: number;
|
|
75
|
+
name: string;
|
|
76
|
+
value: string;
|
|
77
|
+
format: string;
|
|
78
|
+
description: string;
|
|
79
|
+
defaultValue: string;
|
|
80
|
+
variableType: RefVariableType;
|
|
81
|
+
refVariableStepIndex: number;
|
|
82
|
+
refVariableName: string;
|
|
83
|
+
refVariableStage?: RefVariableStageType;
|
|
84
|
+
variableStepIndexInPlugin?: number;
|
|
85
|
+
}
|
|
86
|
+
interface CommandArgsMap {
|
|
87
|
+
command: string;
|
|
88
|
+
args: string[];
|
|
89
|
+
}
|
|
90
|
+
export interface PortMapType {
|
|
91
|
+
portOnLocal: number;
|
|
92
|
+
portOnContainer: number;
|
|
93
|
+
}
|
|
94
|
+
interface ConditionDetails {
|
|
95
|
+
id: number;
|
|
96
|
+
conditionOnVariable: string;
|
|
97
|
+
conditionOperator: string;
|
|
98
|
+
conditionType: ConditionType;
|
|
99
|
+
conditionalValue: string;
|
|
100
|
+
}
|
|
101
|
+
interface InlineStepDetailType {
|
|
102
|
+
scriptType: ScriptType;
|
|
103
|
+
isMountCustomScript?: boolean;
|
|
104
|
+
script?: string;
|
|
105
|
+
dockerFileExists?: boolean;
|
|
106
|
+
mountPath?: string;
|
|
107
|
+
mountCodeToContainer?: boolean;
|
|
108
|
+
mountDirectoryFromHost?: boolean;
|
|
109
|
+
containerImagePath?: string;
|
|
110
|
+
imagePullSecret?: string;
|
|
111
|
+
commandArgsMap?: CommandArgsMap[];
|
|
112
|
+
portMap?: PortMapType[];
|
|
113
|
+
mountPathMap?: {
|
|
114
|
+
filePathOnDisk: string;
|
|
115
|
+
filePathOnContainer: string;
|
|
116
|
+
}[];
|
|
117
|
+
inputVariables?: VariableType[];
|
|
118
|
+
outputVariables?: VariableType[];
|
|
119
|
+
conditionDetails: ConditionDetails[];
|
|
120
|
+
}
|
|
121
|
+
interface PluginRefStepDetailType {
|
|
122
|
+
id: number;
|
|
123
|
+
pluginId: number;
|
|
124
|
+
inputVariables?: VariableType[];
|
|
125
|
+
outputVariables?: VariableType[];
|
|
126
|
+
conditionDetails?: ConditionDetails[];
|
|
127
|
+
}
|
|
128
|
+
export interface StepType {
|
|
129
|
+
id: number;
|
|
130
|
+
index: number;
|
|
131
|
+
name: string;
|
|
132
|
+
description: string;
|
|
133
|
+
stepType: PluginType;
|
|
134
|
+
outputDirectoryPath: string[];
|
|
135
|
+
inlineStepDetail?: InlineStepDetailType;
|
|
136
|
+
pluginRefStepDetail?: PluginRefStepDetailType;
|
|
137
|
+
triggerIfParentStageFail: boolean;
|
|
138
|
+
isMandatory?: boolean;
|
|
139
|
+
}
|
|
140
|
+
export interface BuildStageType {
|
|
141
|
+
id: number;
|
|
142
|
+
steps: StepType[];
|
|
143
|
+
}
|
|
144
|
+
export declare enum CIBuildType {
|
|
145
|
+
SELF_DOCKERFILE_BUILD_TYPE = "self-dockerfile-build",
|
|
146
|
+
MANAGED_DOCKERFILE_BUILD_TYPE = "managed-dockerfile-build",
|
|
147
|
+
BUILDPACK_BUILD_TYPE = "buildpack-build"
|
|
148
|
+
}
|
|
149
|
+
export interface BuildPackConfigType {
|
|
150
|
+
builderId: string;
|
|
151
|
+
language: string;
|
|
152
|
+
languageVersion: string;
|
|
153
|
+
projectPath: string;
|
|
154
|
+
builderLangEnvParam?: string;
|
|
155
|
+
currentBuilderLangEnvParam?: string;
|
|
156
|
+
buildPacks?: any;
|
|
157
|
+
args?: Record<string, string>;
|
|
158
|
+
}
|
|
159
|
+
export interface DockerBuildConfigType {
|
|
160
|
+
dockerfileContent: string;
|
|
161
|
+
dockerfileRelativePath: string;
|
|
162
|
+
buildContext: string;
|
|
163
|
+
dockerfilePath?: string;
|
|
164
|
+
dockerfileRepository?: string;
|
|
165
|
+
args?: Record<string, string>;
|
|
166
|
+
targetPlatform?: any;
|
|
167
|
+
language?: string;
|
|
168
|
+
languageFramework?: string;
|
|
169
|
+
}
|
|
170
|
+
export interface CIBuildConfigType {
|
|
171
|
+
buildPackConfig: BuildPackConfigType;
|
|
172
|
+
ciBuildType: CIBuildType;
|
|
173
|
+
dockerBuildConfig: DockerBuildConfigType;
|
|
174
|
+
gitMaterialId: number;
|
|
175
|
+
buildContextGitMaterialId: number;
|
|
176
|
+
id?: number;
|
|
177
|
+
}
|
|
178
|
+
export interface DockerConfigOverrideType {
|
|
179
|
+
dockerRegistry: string;
|
|
180
|
+
dockerRepository: string;
|
|
181
|
+
ciBuildConfig: CIBuildConfigType;
|
|
182
|
+
}
|
|
183
|
+
export interface FormType {
|
|
184
|
+
name: string;
|
|
185
|
+
args: {
|
|
186
|
+
key: string;
|
|
187
|
+
value: string;
|
|
188
|
+
}[];
|
|
189
|
+
materials: MaterialType[];
|
|
190
|
+
gitHost: Githost;
|
|
191
|
+
webhookEvents: WebhookEvent[];
|
|
192
|
+
ciPipelineSourceTypeOptions: CiPipelineSourceTypeOption[];
|
|
193
|
+
webhookConditionList: {
|
|
194
|
+
selectorId: number;
|
|
195
|
+
value: string;
|
|
196
|
+
}[];
|
|
197
|
+
triggerType: string;
|
|
198
|
+
scanEnabled?: boolean;
|
|
199
|
+
beforeDockerBuildScripts?: {
|
|
200
|
+
id: number;
|
|
201
|
+
name: string;
|
|
202
|
+
outputLocation: string;
|
|
203
|
+
script: string;
|
|
204
|
+
isCollapsed: boolean;
|
|
205
|
+
index: number;
|
|
206
|
+
}[];
|
|
207
|
+
afterDockerBuildScripts?: {
|
|
208
|
+
id: number;
|
|
209
|
+
name: string;
|
|
210
|
+
outputLocation: string;
|
|
211
|
+
script: string;
|
|
212
|
+
isCollapsed: boolean;
|
|
213
|
+
index: number;
|
|
214
|
+
}[];
|
|
215
|
+
ciPipelineEditable: true;
|
|
216
|
+
preBuildStage?: BuildStageType;
|
|
217
|
+
postBuildStage?: BuildStageType;
|
|
218
|
+
isDockerConfigOverridden?: boolean;
|
|
219
|
+
dockerConfigOverride?: DockerConfigOverrideType;
|
|
220
|
+
}
|
|
221
|
+
export interface ErrorObj {
|
|
222
|
+
isValid: boolean;
|
|
223
|
+
message: string | null;
|
|
224
|
+
}
|
|
225
|
+
export interface TaskErrorObj {
|
|
226
|
+
isValid: boolean;
|
|
227
|
+
name: ErrorObj;
|
|
228
|
+
inlineStepDetail?: {
|
|
229
|
+
inputVariables?: ErrorObj[];
|
|
230
|
+
outputVariables?: ErrorObj[];
|
|
231
|
+
};
|
|
232
|
+
pluginRefStepDetail?: {
|
|
233
|
+
inputVariables?: ErrorObj[];
|
|
234
|
+
outputVariables?: ErrorObj[];
|
|
235
|
+
};
|
|
236
|
+
}
|
|
237
|
+
export interface FormErrorObjectType {
|
|
238
|
+
name: ErrorObj;
|
|
239
|
+
materials?: MaterialType[];
|
|
240
|
+
preBuildStage?: {
|
|
241
|
+
isValid: boolean;
|
|
242
|
+
steps: TaskErrorObj[];
|
|
243
|
+
};
|
|
244
|
+
buildStage?: {
|
|
245
|
+
isValid: boolean;
|
|
246
|
+
name: ErrorObj;
|
|
247
|
+
};
|
|
248
|
+
postBuildStage?: {
|
|
249
|
+
isValid: boolean;
|
|
250
|
+
steps: TaskErrorObj[];
|
|
251
|
+
};
|
|
252
|
+
}
|
|
253
|
+
export interface PluginDetailType {
|
|
254
|
+
id: number;
|
|
255
|
+
name: string;
|
|
256
|
+
type: string;
|
|
257
|
+
description: string;
|
|
258
|
+
icon: string;
|
|
259
|
+
tags: string[];
|
|
260
|
+
inputVariables?: VariableType[];
|
|
261
|
+
outputVariables?: VariableType[];
|
|
262
|
+
}
|
|
263
|
+
export {};
|
package/dist/Common/Helper.d.ts
CHANGED
|
@@ -17,26 +17,4 @@ export declare function not(e: any): boolean;
|
|
|
17
17
|
export declare function useEffectAfterMount(cb: any, dependencies: any): void;
|
|
18
18
|
export declare function getCookie(sKey: any): string;
|
|
19
19
|
export declare function getLoginInfo(): any;
|
|
20
|
-
export declare function useForm(stateSchema: any, validationSchema: {}, callback: any): {
|
|
21
|
-
state: any;
|
|
22
|
-
disable: boolean;
|
|
23
|
-
handleOnChange: (event: any) => void;
|
|
24
|
-
handleOnSubmit: (event: any) => void;
|
|
25
|
-
};
|
|
26
|
-
export declare function CustomInput({ name, value, error, onChange, onBlur, onFocus, label, type, disabled, autoComplete, labelClassName, placeholder, tabIndex, dataTestid, }: {
|
|
27
|
-
name: any;
|
|
28
|
-
value: any;
|
|
29
|
-
error: any;
|
|
30
|
-
onChange: any;
|
|
31
|
-
onBlur?: (e: any) => void;
|
|
32
|
-
onFocus?: (e: any) => void;
|
|
33
|
-
label: any;
|
|
34
|
-
type?: string;
|
|
35
|
-
disabled?: boolean;
|
|
36
|
-
autoComplete?: string;
|
|
37
|
-
labelClassName?: string;
|
|
38
|
-
placeholder?: string;
|
|
39
|
-
tabIndex?: number;
|
|
40
|
-
dataTestid?: string;
|
|
41
|
-
}): JSX.Element;
|
|
42
20
|
export {};
|
package/dist/Common/Types.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ReactNode, CSSProperties } from 'react';
|
|
2
2
|
import { Placement } from 'tippy.js';
|
|
3
|
+
import { VariableType } from './CIPipeline.Types';
|
|
3
4
|
export interface ResponseType {
|
|
4
5
|
code: number;
|
|
5
6
|
status: string;
|
|
@@ -45,7 +46,8 @@ export interface CheckboxProps {
|
|
|
45
46
|
export interface TippyCustomizedProps {
|
|
46
47
|
theme: TippyTheme;
|
|
47
48
|
visible?: boolean;
|
|
48
|
-
heading?:
|
|
49
|
+
heading?: string;
|
|
50
|
+
headingInfo?: string;
|
|
49
51
|
infoTextHeading?: string;
|
|
50
52
|
placement: Placement;
|
|
51
53
|
className?: string;
|
|
@@ -234,7 +236,7 @@ export interface CommonNodeAttr {
|
|
|
234
236
|
approvalUsers?: string[];
|
|
235
237
|
userApprovalConfig?: UserApprovalConfigType;
|
|
236
238
|
requestedUserId?: number;
|
|
237
|
-
|
|
239
|
+
showPluginWarning?: boolean;
|
|
238
240
|
}
|
|
239
241
|
export interface VulnerabilityType {
|
|
240
242
|
name: string;
|
|
@@ -289,4 +291,28 @@ export interface CDMaterialResponseType {
|
|
|
289
291
|
userApprovalConfig: UserApprovalConfigType;
|
|
290
292
|
requestedUserId: number;
|
|
291
293
|
}
|
|
294
|
+
export declare enum PluginRequiredStageKeys {
|
|
295
|
+
PRE_CI = "PRE_CI",
|
|
296
|
+
POST_CI = "POST_CI",
|
|
297
|
+
PRE_OR_POST_CI = "PRE_OR_POST_CI"
|
|
298
|
+
}
|
|
299
|
+
export declare enum PluginRequiredStage {
|
|
300
|
+
PRE_CI = "preBuildStage",
|
|
301
|
+
POST_CI = "postBuildStage",
|
|
302
|
+
PRE_OR_POST_CI = "PRE_OR_POST_CI"
|
|
303
|
+
}
|
|
304
|
+
export interface MandatoryPluginDetailType {
|
|
305
|
+
id: number;
|
|
306
|
+
name: string;
|
|
307
|
+
description?: string;
|
|
308
|
+
requiredIn: PluginRequiredStage;
|
|
309
|
+
applied?: boolean;
|
|
310
|
+
inputVariables?: VariableType[];
|
|
311
|
+
outputVariables?: VariableType[];
|
|
312
|
+
}
|
|
313
|
+
export interface MandatoryPluginDataType {
|
|
314
|
+
pluginData: MandatoryPluginDetailType[];
|
|
315
|
+
isValidPre: boolean;
|
|
316
|
+
isValidPost: boolean;
|
|
317
|
+
}
|
|
292
318
|
export {};
|
package/dist/Common/index.d.ts
CHANGED
|
@@ -29,4 +29,4 @@ export { default as GenericEmptyState } from './EmptyState/GenericEmptyState';
|
|
|
29
29
|
export { default as Toggle } from './Toggle/Toggle';
|
|
30
30
|
export { default as ScanVulnerabilitiesTable } from './Security/ScanVulnerabilitiesTable';
|
|
31
31
|
export { default as StyledRadioGroup } from './RadioGroup/RadioGroup';
|
|
32
|
-
export
|
|
32
|
+
export * from './CIPipeline.Types';
|