@devtron-labs/devtron-fe-common-lib 0.0.9-beta-1 → 0.0.9-beta-3
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/Types.d.ts
CHANGED
|
@@ -48,6 +48,7 @@ export interface TippyCustomizedProps {
|
|
|
48
48
|
visible?: boolean;
|
|
49
49
|
heading?: ReactNode | string;
|
|
50
50
|
headingInfo?: string;
|
|
51
|
+
noHeadingBorder?: boolean;
|
|
51
52
|
infoTextHeading?: string;
|
|
52
53
|
placement: Placement;
|
|
53
54
|
className?: string;
|
|
@@ -242,7 +243,7 @@ export interface CommonNodeAttr {
|
|
|
242
243
|
}
|
|
243
244
|
export interface VulnerabilityType {
|
|
244
245
|
name: string;
|
|
245
|
-
severity:
|
|
246
|
+
severity: 'CRITICAL' | 'MODERATE' | 'LOW';
|
|
246
247
|
package: string;
|
|
247
248
|
version: string;
|
|
248
249
|
fixedVersion: string;
|
|
@@ -293,7 +294,7 @@ export interface CDMaterialResponseType {
|
|
|
293
294
|
userApprovalConfig: UserApprovalConfigType;
|
|
294
295
|
requestedUserId: number;
|
|
295
296
|
}
|
|
296
|
-
export declare enum
|
|
297
|
+
export declare enum ApplyPolicyToStage {
|
|
297
298
|
PRE_CI = "PRE_CI",
|
|
298
299
|
POST_CI = "POST_CI",
|
|
299
300
|
PRE_OR_POST_CI = "PRE_OR_POST_CI"
|
|
@@ -303,6 +304,17 @@ export declare enum PluginRequiredStage {
|
|
|
303
304
|
POST_CI = "postBuildStage",
|
|
304
305
|
PRE_OR_POST_CI = "PRE_OR_POST_CI"
|
|
305
306
|
}
|
|
307
|
+
interface DefinitionSourceType {
|
|
308
|
+
projectName: string;
|
|
309
|
+
isDueToProductionEnvironment: boolean;
|
|
310
|
+
isDueToLinkedPipeline: boolean;
|
|
311
|
+
policyName: string;
|
|
312
|
+
appName?: string;
|
|
313
|
+
clusterName?: string;
|
|
314
|
+
environmentName?: string;
|
|
315
|
+
branchName?: string;
|
|
316
|
+
ciPipelineName?: string;
|
|
317
|
+
}
|
|
306
318
|
export interface MandatoryPluginDetailType {
|
|
307
319
|
id: number;
|
|
308
320
|
name: string;
|
|
@@ -311,6 +323,7 @@ export interface MandatoryPluginDetailType {
|
|
|
311
323
|
applied?: boolean;
|
|
312
324
|
inputVariables?: VariableType[];
|
|
313
325
|
outputVariables?: VariableType[];
|
|
326
|
+
definitionSources?: DefinitionSourceType[];
|
|
314
327
|
}
|
|
315
328
|
export interface MandatoryPluginDataType {
|
|
316
329
|
pluginData: MandatoryPluginDetailType[];
|
package/dist/index.js
CHANGED
|
@@ -254,12 +254,12 @@ exports.DeploymentNodeType = void 0;
|
|
|
254
254
|
DeploymentNodeType["POSTCD"] = "POSTCD";
|
|
255
255
|
DeploymentNodeType["APPROVAL"] = "APPROVAL";
|
|
256
256
|
})(exports.DeploymentNodeType || (exports.DeploymentNodeType = {}));
|
|
257
|
-
exports.
|
|
258
|
-
(function (
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
})(exports.
|
|
257
|
+
exports.ApplyPolicyToStage = void 0;
|
|
258
|
+
(function (ApplyPolicyToStage) {
|
|
259
|
+
ApplyPolicyToStage["PRE_CI"] = "PRE_CI";
|
|
260
|
+
ApplyPolicyToStage["POST_CI"] = "POST_CI";
|
|
261
|
+
ApplyPolicyToStage["PRE_OR_POST_CI"] = "PRE_OR_POST_CI";
|
|
262
|
+
})(exports.ApplyPolicyToStage || (exports.ApplyPolicyToStage = {}));
|
|
263
263
|
exports.PluginRequiredStage = void 0;
|
|
264
264
|
(function (PluginRequiredStage) {
|
|
265
265
|
PluginRequiredStage["PRE_CI"] = "preBuildStage";
|
|
@@ -8692,7 +8692,9 @@ function TippyCustomized(props) {
|
|
|
8692
8692
|
};
|
|
8693
8693
|
var getTippyContent = function () {
|
|
8694
8694
|
var Icon = props.Icon, iconPath = props.iconPath, iconClass = props.iconClass, iconSize = props.iconSize, onImageLoadError = props.onImageLoadError, heading = props.heading, headingInfo = props.headingInfo, infoTextHeading = props.infoTextHeading, infoText = props.infoText, showCloseButton = props.showCloseButton, additionalContent = props.additionalContent, documentationLink = props.documentationLink, documentationLinkText = props.documentationLinkText;
|
|
8695
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", __assign({ className: "dc__word-break dc__hyphens-auto flex left ".concat(isWhiteTheme
|
|
8695
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", __assign({ className: "dc__word-break dc__hyphens-auto flex left ".concat(isWhiteTheme
|
|
8696
|
+
? "p-12 cn-9 ".concat(props.noHeadingBorder ? '' : 'dc__border-bottom-n1')
|
|
8697
|
+
: 'pt-20 pb-12 pr-20 pl-20 cn-0 top') }, { children: [iconPath ? (jsxRuntime.jsx("img", { className: "icon-dim-".concat(iconSize || 20, " mr-6 ").concat(iconClass || ''), src: iconPath, alt: "Heading", onError: onImageLoadError })) : (Icon && (jsxRuntime.jsx("div", __assign({ className: "icon-dim-".concat(iconSize || 20, " mr-6") }, { children: jsxRuntime.jsx(Icon, { className: "icon-dim-".concat(iconSize || 20, " ").concat(iconClass || '') }) })))), heading && jsxRuntime.jsx("span", __assign({ className: "fs-14 fw-6 lh-20 ".concat(showCloseButton ? 'mr-6' : '') }, { children: heading })), headingInfo && (jsxRuntime.jsx("div", __assign({ className: "icon-dim-20 cursor", onClick: toggleHeadingInfo }, { children: jsxRuntime.jsx(SvgIcHelp, { className: "icon-dim-20" }) }))), showCloseButton && (jsxRuntime.jsx("div", __assign({ className: "icon-dim-16 ml-auto" }, { children: jsxRuntime.jsx(SvgIcCross, { className: "icon-dim-16 cursor ".concat(isWhiteTheme ? 'fcn-9' : 'fcn-0'), onClick: closeTippy }) })))] })), showHeadingInfo && (jsxRuntime.jsxs("div", __assign({ className: "flex left bcv-1 fs-13 fw-4 lh-20 pt-8 pb-8 ".concat(isWhiteTheme ? 'pl-12 pr-12' : 'pl-20 pr-20') }, { children: [jsxRuntime.jsx("div", __assign({ className: "icon-dim-20 mr-8" }, { children: jsxRuntime.jsx(SvgIcHelp, { className: "icon-dim-20 fcv-5" }) })), jsxRuntime.jsx("div", __assign({ className: "dc__word-break dc__hyphens-auto" }, { children: headingInfo }))] }))), infoTextHeading && (jsxRuntime.jsx("div", __assign({ className: "dc__word-break dc__hyphens-auto fs-14 fw-6 lh-20 ".concat(isWhiteTheme ? 'pl-12 pr-12' : 'pl-20 pr-20') }, { children: infoTextHeading }))), infoText && (jsxRuntime.jsx("div", __assign({ className: "dc__word-break dc__hyphens-auto fs-13 fw-4 lh-20 ".concat(isWhiteTheme
|
|
8696
8698
|
? 'p-12'
|
|
8697
8699
|
: "pl-20 pr-20 pt-4 ".concat(additionalContent && documentationLink ? 'pb-12' : 'pb-20')) }, { children: infoText }))), additionalContent, documentationLink && (jsxRuntime.jsx("div", __assign({ className: "pl-12 pb-12" }, { children: jsxRuntime.jsx("a", __assign({ href: documentationLink, target: "_blank", rel: "noreferrer noopener", className: "fs-13 cb-5", onClick: closeTippy }, { children: documentationLinkText || 'Learn more' })) })))] }));
|
|
8698
8700
|
};
|
package/package.json
CHANGED
|
@@ -60,7 +60,9 @@ export function TippyCustomized(props: TippyCustomizedProps) {
|
|
|
60
60
|
<>
|
|
61
61
|
<div
|
|
62
62
|
className={`dc__word-break dc__hyphens-auto flex left ${
|
|
63
|
-
isWhiteTheme
|
|
63
|
+
isWhiteTheme
|
|
64
|
+
? `p-12 cn-9 ${props.noHeadingBorder ? '' : 'dc__border-bottom-n1'}`
|
|
65
|
+
: 'pt-20 pb-12 pr-20 pl-20 cn-0 top'
|
|
64
66
|
}`}
|
|
65
67
|
>
|
|
66
68
|
{iconPath ? (
|
package/src/Common/Types.ts
CHANGED
|
@@ -54,6 +54,7 @@ export interface TippyCustomizedProps {
|
|
|
54
54
|
visible?: boolean
|
|
55
55
|
heading?: ReactNode | string
|
|
56
56
|
headingInfo?: string
|
|
57
|
+
noHeadingBorder?: boolean
|
|
57
58
|
infoTextHeading?: string
|
|
58
59
|
placement: Placement
|
|
59
60
|
className?: string
|
|
@@ -188,7 +189,7 @@ export enum DeploymentNodeType {
|
|
|
188
189
|
PRECD = 'PRECD',
|
|
189
190
|
CD = 'CD',
|
|
190
191
|
POSTCD = 'POSTCD',
|
|
191
|
-
APPROVAL = 'APPROVAL'
|
|
192
|
+
APPROVAL = 'APPROVAL',
|
|
192
193
|
}
|
|
193
194
|
|
|
194
195
|
export interface UserApprovalConfigType {
|
|
@@ -264,19 +265,18 @@ export interface CommonNodeAttr {
|
|
|
264
265
|
isVirtualEnvironment?: boolean
|
|
265
266
|
}
|
|
266
267
|
|
|
267
|
-
|
|
268
268
|
export interface VulnerabilityType {
|
|
269
|
-
name: string
|
|
270
|
-
severity:
|
|
271
|
-
package: string
|
|
272
|
-
version: string
|
|
273
|
-
fixedVersion: string
|
|
274
|
-
policy: string
|
|
275
|
-
url?: string
|
|
269
|
+
name: string
|
|
270
|
+
severity: 'CRITICAL' | 'MODERATE' | 'LOW'
|
|
271
|
+
package: string
|
|
272
|
+
version: string
|
|
273
|
+
fixedVersion: string
|
|
274
|
+
policy: string
|
|
275
|
+
url?: string
|
|
276
276
|
}
|
|
277
277
|
|
|
278
278
|
export interface ScanVulnerabilitiesTableProps {
|
|
279
|
-
vulnerabilities: VulnerabilityType[]
|
|
279
|
+
vulnerabilities: VulnerabilityType[]
|
|
280
280
|
}
|
|
281
281
|
|
|
282
282
|
export interface MaterialInfo {
|
|
@@ -323,28 +323,41 @@ export interface CDMaterialResponseType {
|
|
|
323
323
|
requestedUserId: number
|
|
324
324
|
}
|
|
325
325
|
|
|
326
|
-
export enum
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
326
|
+
export enum ApplyPolicyToStage {
|
|
327
|
+
PRE_CI = 'PRE_CI',
|
|
328
|
+
POST_CI = 'POST_CI',
|
|
329
|
+
PRE_OR_POST_CI = 'PRE_OR_POST_CI',
|
|
330
330
|
}
|
|
331
331
|
|
|
332
332
|
export enum PluginRequiredStage {
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
333
|
+
PRE_CI = 'preBuildStage',
|
|
334
|
+
POST_CI = 'postBuildStage',
|
|
335
|
+
PRE_OR_POST_CI = 'PRE_OR_POST_CI',
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
interface DefinitionSourceType {
|
|
339
|
+
projectName: string
|
|
340
|
+
isDueToProductionEnvironment: boolean
|
|
341
|
+
isDueToLinkedPipeline: boolean
|
|
342
|
+
policyName: string
|
|
343
|
+
appName?: string
|
|
344
|
+
clusterName?: string
|
|
345
|
+
environmentName?: string
|
|
346
|
+
branchName?: string
|
|
347
|
+
ciPipelineName?: string
|
|
336
348
|
}
|
|
337
349
|
export interface MandatoryPluginDetailType {
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
350
|
+
id: number
|
|
351
|
+
name: string
|
|
352
|
+
description?: string
|
|
353
|
+
requiredIn: PluginRequiredStage
|
|
354
|
+
applied?: boolean
|
|
355
|
+
inputVariables?: VariableType[]
|
|
356
|
+
outputVariables?: VariableType[]
|
|
357
|
+
definitionSources?: DefinitionSourceType[]
|
|
345
358
|
}
|
|
346
359
|
export interface MandatoryPluginDataType {
|
|
347
360
|
pluginData: MandatoryPluginDetailType[]
|
|
348
361
|
isValidPre: boolean
|
|
349
362
|
isValidPost: boolean
|
|
350
|
-
}
|
|
363
|
+
}
|