@devtron-labs/devtron-fe-common-lib 0.0.9-beta-10 → 0.0.9-beta-11
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 +0 -5
- package/dist/Common/Dialogs/Types.d.ts +0 -1
- package/dist/Common/Helper.d.ts +0 -1
- package/dist/Common/Types.d.ts +42 -32
- package/dist/Common/index.d.ts +0 -2
- package/dist/index.js +229 -6028
- package/package.json +1 -2
- package/src/Common/Constants.ts +0 -6
- package/src/Common/Dialogs/DeleteDialog.tsx +27 -45
- package/src/Common/Dialogs/Types.ts +0 -1
- package/src/Common/Helper.tsx +0 -15
- package/src/Common/TippyCustomized.tsx +2 -31
- package/src/Common/Types.ts +59 -42
- package/src/Common/index.ts +0 -2
- package/dist/Common/CIPipeline.Types.d.ts +0 -265
- package/dist/Common/Policy.Types.d.ts +0 -55
- package/src/Assets/Icon/ic-help.svg +0 -3
- package/src/Common/CIPipeline.Types.ts +0 -277
- package/src/Common/Policy.Types.ts +0 -62
- /package/src/Assets/Img/{delete-medium.svg → warning-medium.svg} +0 -0
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { VariableType } from "./CIPipeline.Types";
|
|
2
|
-
import { ResponseType } from "./Types";
|
|
3
|
-
export declare enum ApplyPolicyToStage {
|
|
4
|
-
PRE_CI = "PRE_CI",
|
|
5
|
-
POST_CI = "POST_CI",
|
|
6
|
-
PRE_OR_POST_CI = "PRE_OR_POST_CI"
|
|
7
|
-
}
|
|
8
|
-
export declare enum PluginRequiredStage {
|
|
9
|
-
PRE_CI = "preBuildStage",
|
|
10
|
-
POST_CI = "postBuildStage",
|
|
11
|
-
PRE_OR_POST_CI = "PRE_OR_POST_CI"
|
|
12
|
-
}
|
|
13
|
-
export interface DefinitionSourceType {
|
|
14
|
-
projectName: string;
|
|
15
|
-
isDueToProductionEnvironment: boolean;
|
|
16
|
-
isDueToLinkedPipeline: boolean;
|
|
17
|
-
policyName: string;
|
|
18
|
-
appName?: string;
|
|
19
|
-
clusterName?: string;
|
|
20
|
-
environmentName?: string;
|
|
21
|
-
branchNames?: string[];
|
|
22
|
-
ciPipelineName?: string;
|
|
23
|
-
}
|
|
24
|
-
export interface MandatoryPluginDetailType {
|
|
25
|
-
id: number;
|
|
26
|
-
name: string;
|
|
27
|
-
description?: string;
|
|
28
|
-
requiredIn: PluginRequiredStage;
|
|
29
|
-
applied?: boolean;
|
|
30
|
-
inputVariables?: VariableType[];
|
|
31
|
-
outputVariables?: VariableType[];
|
|
32
|
-
definitionSources?: DefinitionSourceType[];
|
|
33
|
-
}
|
|
34
|
-
export interface MandatoryPluginDataType {
|
|
35
|
-
pluginData: MandatoryPluginDetailType[];
|
|
36
|
-
isValidPre: boolean;
|
|
37
|
-
isValidPost: boolean;
|
|
38
|
-
}
|
|
39
|
-
export declare enum ConsequenceAction {
|
|
40
|
-
BLOCK = "BLOCK",
|
|
41
|
-
ALLOW_UNTIL_TIME = "ALLOW_UNTIL_TIME",
|
|
42
|
-
ALLOW_FOREVER = "ALLOW_FOREVER"
|
|
43
|
-
}
|
|
44
|
-
export interface ConsequenceType {
|
|
45
|
-
action: ConsequenceAction;
|
|
46
|
-
metadataField: string;
|
|
47
|
-
}
|
|
48
|
-
export interface BlockedStateData {
|
|
49
|
-
isOffendingMandatoryPlugin: boolean;
|
|
50
|
-
isCITriggerBlocked: boolean;
|
|
51
|
-
ciBlockState: ConsequenceType;
|
|
52
|
-
}
|
|
53
|
-
export interface GetBlockedStateResponse extends ResponseType {
|
|
54
|
-
result?: BlockedStateData;
|
|
55
|
-
}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
|
|
2
|
-
<path fill="#767D84" fill-rule="evenodd" d="M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2zm-.205 12.868c-.615 0-1.12.505-1.12 1.12 0 .617.505 1.121 1.12 1.121.615 0 1.12-.504 1.12-1.12 0-.616-.506-1.12-1.12-1.12zM11.863 7c-1.667 0-3.197 1.187-3.196 2.527 0 .546.41.833.888.833 1.325 0 .642-1.803 2.39-1.803.82 0 1.311.438 1.311 1.175 0 1.34-2.39 1.708-2.39 3.334 0 .438.287.915.874.915.902 0 .792-.67 1.12-1.148.438-.642 2.473-1.325 2.473-3.101 0-1.927-1.721-2.732-3.47-2.732z"/>
|
|
3
|
-
</svg>
|
|
@@ -1,277 +0,0 @@
|
|
|
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
|
-
|
|
14
|
-
export interface Githost {
|
|
15
|
-
id: number
|
|
16
|
-
name: string
|
|
17
|
-
active: boolean
|
|
18
|
-
webhookSecret: string
|
|
19
|
-
webhookUrl: string
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export interface WebhookEvent {
|
|
23
|
-
id: number
|
|
24
|
-
gitHostId: number
|
|
25
|
-
name: string
|
|
26
|
-
isActive: boolean
|
|
27
|
-
selectors: WebhookEventSelectors[]
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
interface WebhookEventSelectors {
|
|
31
|
-
id: number
|
|
32
|
-
eventId: number
|
|
33
|
-
name: string
|
|
34
|
-
selector: string
|
|
35
|
-
toShowInCiFilter: boolean
|
|
36
|
-
fixValue: string
|
|
37
|
-
toShow: boolean
|
|
38
|
-
possibleValues: string
|
|
39
|
-
isActive: boolean
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export interface CiPipelineSourceTypeOption {
|
|
43
|
-
label: string
|
|
44
|
-
value: string
|
|
45
|
-
isDisabled: boolean
|
|
46
|
-
isSelected: boolean
|
|
47
|
-
isWebhook: boolean
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export enum RefVariableType {
|
|
51
|
-
GLOBAL = 'GLOBAL',
|
|
52
|
-
FROM_PREVIOUS_STEP = 'FROM_PREVIOUS_STEP',
|
|
53
|
-
NEW = 'NEW',
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
export enum PluginType {
|
|
57
|
-
INLINE = 'INLINE',
|
|
58
|
-
PLUGIN_REF = 'REF_PLUGIN',
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export enum ScriptType {
|
|
62
|
-
SHELL = 'SHELL',
|
|
63
|
-
DOCKERFILE = 'DOCKERFILE',
|
|
64
|
-
CONTAINERIMAGE = 'CONTAINER_IMAGE',
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
export enum MountPath {
|
|
68
|
-
TRUE = 'Yes',
|
|
69
|
-
FALSE = 'No',
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
export enum ConditionType {
|
|
73
|
-
SKIP = 'SKIP',
|
|
74
|
-
TRIGGER = 'TRIGGER',
|
|
75
|
-
PASS = 'PASS',
|
|
76
|
-
FAIL = 'FAIL',
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
export enum RefVariableStageType {
|
|
80
|
-
PRE_CI = 'PRE_CI',
|
|
81
|
-
POST_CI = 'POST_CI',
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
export interface VariableType {
|
|
85
|
-
id: number
|
|
86
|
-
name: string
|
|
87
|
-
value: string
|
|
88
|
-
format: string
|
|
89
|
-
description: string
|
|
90
|
-
defaultValue: string
|
|
91
|
-
variableType: RefVariableType
|
|
92
|
-
refVariableStepIndex: number
|
|
93
|
-
refVariableName: string
|
|
94
|
-
refVariableStage?: RefVariableStageType
|
|
95
|
-
variableStepIndexInPlugin?: number
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
interface CommandArgsMap {
|
|
99
|
-
command: string
|
|
100
|
-
args: string[]
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
export interface PortMapType {
|
|
104
|
-
portOnLocal: number
|
|
105
|
-
portOnContainer: number
|
|
106
|
-
}
|
|
107
|
-
interface ConditionDetails {
|
|
108
|
-
id: number
|
|
109
|
-
conditionOnVariable: string
|
|
110
|
-
conditionOperator: string
|
|
111
|
-
conditionType: ConditionType
|
|
112
|
-
conditionalValue: string
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
interface InlineStepDetailType {
|
|
116
|
-
scriptType: ScriptType
|
|
117
|
-
isMountCustomScript?: boolean
|
|
118
|
-
script?: string
|
|
119
|
-
dockerFileExists?: boolean
|
|
120
|
-
mountPath?: string
|
|
121
|
-
mountCodeToContainer?: boolean
|
|
122
|
-
mountDirectoryFromHost?: boolean
|
|
123
|
-
containerImagePath?: string
|
|
124
|
-
imagePullSecret?: string
|
|
125
|
-
commandArgsMap?: CommandArgsMap[]
|
|
126
|
-
portMap?: PortMapType[]
|
|
127
|
-
mountPathMap?: {
|
|
128
|
-
filePathOnDisk: string
|
|
129
|
-
filePathOnContainer: string
|
|
130
|
-
}[]
|
|
131
|
-
inputVariables?: VariableType[]
|
|
132
|
-
outputVariables?: VariableType[]
|
|
133
|
-
conditionDetails: ConditionDetails[]
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
interface PluginRefStepDetailType {
|
|
137
|
-
id: number
|
|
138
|
-
pluginId: number
|
|
139
|
-
inputVariables?: VariableType[]
|
|
140
|
-
outputVariables?: VariableType[]
|
|
141
|
-
conditionDetails?: ConditionDetails[]
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
export interface StepType {
|
|
145
|
-
id: number
|
|
146
|
-
index: number
|
|
147
|
-
name: string
|
|
148
|
-
description: string
|
|
149
|
-
stepType: PluginType
|
|
150
|
-
outputDirectoryPath: string[]
|
|
151
|
-
inlineStepDetail?: InlineStepDetailType
|
|
152
|
-
pluginRefStepDetail?: PluginRefStepDetailType
|
|
153
|
-
triggerIfParentStageFail: boolean
|
|
154
|
-
isMandatory?: boolean
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
export interface BuildStageType {
|
|
158
|
-
id: number
|
|
159
|
-
steps: StepType[]
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
export enum CIBuildType {
|
|
163
|
-
SELF_DOCKERFILE_BUILD_TYPE = 'self-dockerfile-build',
|
|
164
|
-
MANAGED_DOCKERFILE_BUILD_TYPE = 'managed-dockerfile-build',
|
|
165
|
-
BUILDPACK_BUILD_TYPE = 'buildpack-build',
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
export interface BuildPackConfigType {
|
|
169
|
-
builderId: string
|
|
170
|
-
language: string
|
|
171
|
-
languageVersion: string
|
|
172
|
-
projectPath: string
|
|
173
|
-
builderLangEnvParam?: string
|
|
174
|
-
currentBuilderLangEnvParam?: string
|
|
175
|
-
buildPacks?: any
|
|
176
|
-
args?: Record<string, string>
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
export interface DockerBuildConfigType {
|
|
180
|
-
dockerfileContent: string
|
|
181
|
-
dockerfileRelativePath: string
|
|
182
|
-
buildContext: string
|
|
183
|
-
dockerfilePath?: string
|
|
184
|
-
dockerfileRepository?: string
|
|
185
|
-
args?: Record<string, string>
|
|
186
|
-
targetPlatform?: any
|
|
187
|
-
language?: string
|
|
188
|
-
languageFramework?: string
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
export interface CIBuildConfigType {
|
|
192
|
-
buildPackConfig: BuildPackConfigType
|
|
193
|
-
ciBuildType: CIBuildType
|
|
194
|
-
dockerBuildConfig: DockerBuildConfigType
|
|
195
|
-
gitMaterialId: number
|
|
196
|
-
buildContextGitMaterialId: number
|
|
197
|
-
id?: number
|
|
198
|
-
useRootBuildContext: boolean
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
export interface DockerConfigOverrideType {
|
|
202
|
-
dockerRegistry: string
|
|
203
|
-
dockerRepository: string
|
|
204
|
-
ciBuildConfig: CIBuildConfigType
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
export interface FormType {
|
|
208
|
-
name: string
|
|
209
|
-
args: { key: string; value: string }[]
|
|
210
|
-
materials: MaterialType[]
|
|
211
|
-
gitHost: Githost
|
|
212
|
-
webhookEvents: WebhookEvent[]
|
|
213
|
-
ciPipelineSourceTypeOptions: CiPipelineSourceTypeOption[]
|
|
214
|
-
webhookConditionList: { selectorId: number; value: string }[]
|
|
215
|
-
triggerType: string
|
|
216
|
-
scanEnabled?: boolean
|
|
217
|
-
beforeDockerBuildScripts?: {
|
|
218
|
-
id: number
|
|
219
|
-
name: string
|
|
220
|
-
outputLocation: string
|
|
221
|
-
script: string
|
|
222
|
-
isCollapsed: boolean
|
|
223
|
-
index: number
|
|
224
|
-
}[]
|
|
225
|
-
afterDockerBuildScripts?: {
|
|
226
|
-
id: number
|
|
227
|
-
name: string
|
|
228
|
-
outputLocation: string
|
|
229
|
-
script: string
|
|
230
|
-
isCollapsed: boolean
|
|
231
|
-
index: number
|
|
232
|
-
}[]
|
|
233
|
-
ciPipelineEditable: true
|
|
234
|
-
preBuildStage?: BuildStageType
|
|
235
|
-
postBuildStage?: BuildStageType
|
|
236
|
-
isDockerConfigOverridden?: boolean
|
|
237
|
-
dockerConfigOverride?: DockerConfigOverrideType
|
|
238
|
-
isOffendingMandatoryPlugin?: boolean
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
export interface ErrorObj {
|
|
242
|
-
isValid: boolean
|
|
243
|
-
message: string | null
|
|
244
|
-
}
|
|
245
|
-
export interface TaskErrorObj {
|
|
246
|
-
isValid: boolean
|
|
247
|
-
name: ErrorObj
|
|
248
|
-
inlineStepDetail?: { inputVariables?: ErrorObj[]; outputVariables?: ErrorObj[] }
|
|
249
|
-
pluginRefStepDetail?: { inputVariables?: ErrorObj[]; outputVariables?: ErrorObj[] }
|
|
250
|
-
}
|
|
251
|
-
export interface FormErrorObjectType {
|
|
252
|
-
name: ErrorObj
|
|
253
|
-
materials?: MaterialType[]
|
|
254
|
-
preBuildStage?: {
|
|
255
|
-
isValid: boolean
|
|
256
|
-
steps: TaskErrorObj[]
|
|
257
|
-
}
|
|
258
|
-
buildStage?: {
|
|
259
|
-
isValid: boolean
|
|
260
|
-
name: ErrorObj
|
|
261
|
-
}
|
|
262
|
-
postBuildStage?: {
|
|
263
|
-
isValid: boolean
|
|
264
|
-
steps: TaskErrorObj[]
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
export interface PluginDetailType {
|
|
269
|
-
id: number
|
|
270
|
-
name: string
|
|
271
|
-
type: string
|
|
272
|
-
description: string
|
|
273
|
-
icon: string
|
|
274
|
-
tags: string[]
|
|
275
|
-
inputVariables?: VariableType[]
|
|
276
|
-
outputVariables?: VariableType[]
|
|
277
|
-
}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { VariableType } from "./CIPipeline.Types"
|
|
2
|
-
import { ResponseType } from "./Types"
|
|
3
|
-
|
|
4
|
-
export enum ApplyPolicyToStage {
|
|
5
|
-
PRE_CI = 'PRE_CI',
|
|
6
|
-
POST_CI = 'POST_CI',
|
|
7
|
-
PRE_OR_POST_CI = 'PRE_OR_POST_CI',
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export enum PluginRequiredStage {
|
|
11
|
-
PRE_CI = 'preBuildStage',
|
|
12
|
-
POST_CI = 'postBuildStage',
|
|
13
|
-
PRE_OR_POST_CI = 'PRE_OR_POST_CI',
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export interface DefinitionSourceType {
|
|
17
|
-
projectName: string
|
|
18
|
-
isDueToProductionEnvironment: boolean
|
|
19
|
-
isDueToLinkedPipeline: boolean
|
|
20
|
-
policyName: string
|
|
21
|
-
appName?: string
|
|
22
|
-
clusterName?: string
|
|
23
|
-
environmentName?: string
|
|
24
|
-
branchNames?: string[]
|
|
25
|
-
ciPipelineName?: string
|
|
26
|
-
}
|
|
27
|
-
export interface MandatoryPluginDetailType {
|
|
28
|
-
id: number
|
|
29
|
-
name: string
|
|
30
|
-
description?: string
|
|
31
|
-
requiredIn: PluginRequiredStage
|
|
32
|
-
applied?: boolean
|
|
33
|
-
inputVariables?: VariableType[]
|
|
34
|
-
outputVariables?: VariableType[]
|
|
35
|
-
definitionSources?: DefinitionSourceType[]
|
|
36
|
-
}
|
|
37
|
-
export interface MandatoryPluginDataType {
|
|
38
|
-
pluginData: MandatoryPluginDetailType[]
|
|
39
|
-
isValidPre: boolean
|
|
40
|
-
isValidPost: boolean
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export enum ConsequenceAction {
|
|
44
|
-
BLOCK = 'BLOCK',
|
|
45
|
-
ALLOW_UNTIL_TIME = 'ALLOW_UNTIL_TIME',
|
|
46
|
-
ALLOW_FOREVER = 'ALLOW_FOREVER',
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export interface ConsequenceType {
|
|
50
|
-
action: ConsequenceAction
|
|
51
|
-
metadataField: string
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export interface BlockedStateData {
|
|
55
|
-
isOffendingMandatoryPlugin: boolean
|
|
56
|
-
isCITriggerBlocked: boolean
|
|
57
|
-
ciBlockState: ConsequenceType
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
export interface GetBlockedStateResponse extends ResponseType {
|
|
61
|
-
result?: BlockedStateData
|
|
62
|
-
}
|
|
File without changes
|