@devtron-labs/devtron-fe-common-lib 0.0.9-beta-5 → 0.0.9-beta-7
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/Policy.Types.d.ts +46 -0
- package/dist/Common/Types.d.ts +5 -37
- package/dist/Common/index.d.ts +1 -0
- package/dist/index.js +40 -33
- package/package.json +1 -1
- package/src/Common/Policy.Types.ts +51 -0
- package/src/Common/TippyCustomized.tsx +2 -1
- package/src/Common/Types.ts +6 -41
- package/src/Common/index.ts +1 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { VariableType } from "./CIPipeline.Types";
|
|
2
|
+
export declare enum ApplyPolicyToStage {
|
|
3
|
+
PRE_CI = "PRE_CI",
|
|
4
|
+
POST_CI = "POST_CI",
|
|
5
|
+
PRE_OR_POST_CI = "PRE_OR_POST_CI"
|
|
6
|
+
}
|
|
7
|
+
export declare enum PluginRequiredStage {
|
|
8
|
+
PRE_CI = "preBuildStage",
|
|
9
|
+
POST_CI = "postBuildStage",
|
|
10
|
+
PRE_OR_POST_CI = "PRE_OR_POST_CI"
|
|
11
|
+
}
|
|
12
|
+
export interface DefinitionSourceType {
|
|
13
|
+
projectName: string;
|
|
14
|
+
isDueToProductionEnvironment: boolean;
|
|
15
|
+
isDueToLinkedPipeline: boolean;
|
|
16
|
+
policyName: string;
|
|
17
|
+
appName?: string;
|
|
18
|
+
clusterName?: string;
|
|
19
|
+
environmentName?: string;
|
|
20
|
+
branchNames?: string[];
|
|
21
|
+
ciPipelineName?: string;
|
|
22
|
+
}
|
|
23
|
+
export interface MandatoryPluginDetailType {
|
|
24
|
+
id: number;
|
|
25
|
+
name: string;
|
|
26
|
+
description?: string;
|
|
27
|
+
requiredIn: PluginRequiredStage;
|
|
28
|
+
applied?: boolean;
|
|
29
|
+
inputVariables?: VariableType[];
|
|
30
|
+
outputVariables?: VariableType[];
|
|
31
|
+
definitionSources?: DefinitionSourceType[];
|
|
32
|
+
}
|
|
33
|
+
export interface MandatoryPluginDataType {
|
|
34
|
+
pluginData: MandatoryPluginDetailType[];
|
|
35
|
+
isValidPre: boolean;
|
|
36
|
+
isValidPost: boolean;
|
|
37
|
+
}
|
|
38
|
+
export declare enum ConsequenceAction {
|
|
39
|
+
BLOCK = "BLOCK",
|
|
40
|
+
ALLOW_UNTIL_TIME = "ALLOW_UNTIL_TIME",
|
|
41
|
+
ALLOW_FOREVER = "ALLOW_FOREVER"
|
|
42
|
+
}
|
|
43
|
+
export interface ConsequenceType {
|
|
44
|
+
action: ConsequenceAction;
|
|
45
|
+
metadataField: string;
|
|
46
|
+
}
|
package/dist/Common/Types.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ReactNode, CSSProperties } from 'react';
|
|
2
2
|
import { Placement } from 'tippy.js';
|
|
3
|
-
import { VariableType } from './CIPipeline.Types';
|
|
4
3
|
export interface ResponseType {
|
|
5
4
|
code: number;
|
|
6
5
|
status: string;
|
|
@@ -240,6 +239,11 @@ export interface CommonNodeAttr {
|
|
|
240
239
|
showPluginWarning?: boolean;
|
|
241
240
|
helmPackageName?: string;
|
|
242
241
|
isVirtualEnvironment?: boolean;
|
|
242
|
+
isCITriggerBlocked?: boolean;
|
|
243
|
+
ciBlockState?: {
|
|
244
|
+
action: any;
|
|
245
|
+
metadataField: string;
|
|
246
|
+
};
|
|
243
247
|
}
|
|
244
248
|
export interface VulnerabilityType {
|
|
245
249
|
name: string;
|
|
@@ -294,40 +298,4 @@ export interface CDMaterialResponseType {
|
|
|
294
298
|
userApprovalConfig: UserApprovalConfigType;
|
|
295
299
|
requestedUserId: number;
|
|
296
300
|
}
|
|
297
|
-
export declare enum ApplyPolicyToStage {
|
|
298
|
-
PRE_CI = "PRE_CI",
|
|
299
|
-
POST_CI = "POST_CI",
|
|
300
|
-
PRE_OR_POST_CI = "PRE_OR_POST_CI"
|
|
301
|
-
}
|
|
302
|
-
export declare enum PluginRequiredStage {
|
|
303
|
-
PRE_CI = "preBuildStage",
|
|
304
|
-
POST_CI = "postBuildStage",
|
|
305
|
-
PRE_OR_POST_CI = "PRE_OR_POST_CI"
|
|
306
|
-
}
|
|
307
|
-
export 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
|
-
}
|
|
318
|
-
export interface MandatoryPluginDetailType {
|
|
319
|
-
id: number;
|
|
320
|
-
name: string;
|
|
321
|
-
description?: string;
|
|
322
|
-
requiredIn: PluginRequiredStage;
|
|
323
|
-
applied?: boolean;
|
|
324
|
-
inputVariables?: VariableType[];
|
|
325
|
-
outputVariables?: VariableType[];
|
|
326
|
-
definitionSources?: DefinitionSourceType[];
|
|
327
|
-
}
|
|
328
|
-
export interface MandatoryPluginDataType {
|
|
329
|
-
pluginData: MandatoryPluginDetailType[];
|
|
330
|
-
isValidPre: boolean;
|
|
331
|
-
isValidPost: boolean;
|
|
332
|
-
}
|
|
333
301
|
export {};
|
package/dist/Common/index.d.ts
CHANGED
|
@@ -30,4 +30,5 @@ 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
32
|
export * from './CIPipeline.Types';
|
|
33
|
+
export * from './Policy.Types';
|
|
33
34
|
export { default as DeleteComponent } from './DeleteComponentModal/DeleteComponent';
|
package/dist/index.js
CHANGED
|
@@ -253,19 +253,7 @@ exports.DeploymentNodeType = void 0;
|
|
|
253
253
|
DeploymentNodeType["CD"] = "CD";
|
|
254
254
|
DeploymentNodeType["POSTCD"] = "POSTCD";
|
|
255
255
|
DeploymentNodeType["APPROVAL"] = "APPROVAL";
|
|
256
|
-
})(exports.DeploymentNodeType || (exports.DeploymentNodeType = {}));
|
|
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
|
-
exports.PluginRequiredStage = void 0;
|
|
264
|
-
(function (PluginRequiredStage) {
|
|
265
|
-
PluginRequiredStage["PRE_CI"] = "preBuildStage";
|
|
266
|
-
PluginRequiredStage["POST_CI"] = "postBuildStage";
|
|
267
|
-
PluginRequiredStage["PRE_OR_POST_CI"] = "PRE_OR_POST_CI";
|
|
268
|
-
})(exports.PluginRequiredStage || (exports.PluginRequiredStage = {}));
|
|
256
|
+
})(exports.DeploymentNodeType || (exports.DeploymentNodeType = {}));
|
|
269
257
|
|
|
270
258
|
var responseMessages = {
|
|
271
259
|
100: 'Continue',
|
|
@@ -8658,6 +8646,21 @@ var SvgIcHelp = function SvgIcHelp(props) {
|
|
|
8658
8646
|
})));
|
|
8659
8647
|
};
|
|
8660
8648
|
|
|
8649
|
+
var _path$4;
|
|
8650
|
+
function _extends$7() { _extends$7 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$7.apply(this, arguments); }
|
|
8651
|
+
var SvgIcHelpOutline = function SvgIcHelpOutline(props) {
|
|
8652
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$7({
|
|
8653
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
8654
|
+
viewBox: "0 0 17 16",
|
|
8655
|
+
width: "1em",
|
|
8656
|
+
height: "1em"
|
|
8657
|
+
}, props), _path$4 || (_path$4 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
8658
|
+
fill: "#767D84",
|
|
8659
|
+
fillRule: "evenodd",
|
|
8660
|
+
d: "M9 1.333a6.667 6.667 0 1 1 0 13.334A6.667 6.667 0 0 1 9 1.333zm0 1.334C6.054 2.667 3.667 5.054 3.667 8S6.054 13.333 9 13.333 14.333 10.946 14.333 8 11.946 2.667 9 2.667zm-.137 7.245c.41 0 .747.337.747.747s-.337.747-.747.747-.747-.336-.747-.747a.75.75 0 0 1 .747-.747zm.046-5.245c1.166 0 2.313.537 2.313 1.82 0 1.185-1.357 1.64-1.648 2.068-.22.319-.146.766-.747.766-.392 0-.583-.319-.583-.61 0-1.085 1.593-1.33 1.593-2.223 0-.492-.327-.783-.873-.783-1.166 0-.711 1.202-1.594 1.202-.319 0-.592-.191-.592-.556 0-.893 1.02-1.684 2.13-1.684z"
|
|
8661
|
+
})));
|
|
8662
|
+
};
|
|
8663
|
+
|
|
8661
8664
|
var css_248z$4 = ".tippy-box[data-animation=shift-toward-subtle][data-state=hidden]{opacity:0}.tippy-box[data-animation=shift-toward-subtle][data-state=hidden][data-placement^=top][data-state=hidden]{transform:translateY(-5px)}.tippy-box[data-animation=shift-toward-subtle][data-state=hidden][data-placement^=bottom][data-state=hidden]{transform:translateY(5px)}.tippy-box[data-animation=shift-toward-subtle][data-state=hidden][data-placement^=left][data-state=hidden]{transform:translateX(-5px)}.tippy-box[data-animation=shift-toward-subtle][data-state=hidden][data-placement^=right][data-state=hidden]{transform:translateX(5px)}";
|
|
8662
8665
|
styleInject(css_248z$4);
|
|
8663
8666
|
|
|
@@ -8694,7 +8697,7 @@ function TippyCustomized(props) {
|
|
|
8694
8697
|
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
8698
|
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", __assign({ className: "dc__word-break dc__hyphens-auto flex left ".concat(isWhiteTheme
|
|
8696
8699
|
? "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(
|
|
8700
|
+
: '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(SvgIcHelpOutline, { 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 top 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
|
|
8698
8701
|
? 'p-12'
|
|
8699
8702
|
: "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' })) })))] }));
|
|
8700
8703
|
};
|
|
@@ -8702,16 +8705,16 @@ function TippyCustomized(props) {
|
|
|
8702
8705
|
return (jsxRuntime.jsx(Tippy, __assign({ className: "".concat(isWhiteTheme ? 'tippy-white-container default-white' : 'tippy-black-container default-black', " no-content-padding tippy-shadow ").concat(className), arrow: arrow || false, interactive: interactive || false, placement: placement || 'top', content: getTippyContent(), trigger: trigger || 'mouseenter', onMount: onTippyMount, onClickOutside: closeTippy, showOnCreate: showOnCreate || false, animation: animation || 'fade', duration: duration || 300, visible: props.visible }, { children: children })));
|
|
8703
8706
|
}
|
|
8704
8707
|
|
|
8705
|
-
var _path$
|
|
8706
|
-
function _extends$
|
|
8708
|
+
var _path$3, _circle, _path2;
|
|
8709
|
+
function _extends$6() { _extends$6 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$6.apply(this, arguments); }
|
|
8707
8710
|
var SvgInjectTag = function SvgInjectTag(props) {
|
|
8708
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
8711
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$6({
|
|
8709
8712
|
width: "1em",
|
|
8710
8713
|
height: "1em",
|
|
8711
8714
|
viewBox: "0 0 20 20",
|
|
8712
8715
|
fill: "none",
|
|
8713
8716
|
xmlns: "http://www.w3.org/2000/svg"
|
|
8714
|
-
}, props), _path$
|
|
8717
|
+
}, props), _path$3 || (_path$3 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
8715
8718
|
d: "M10 10H3.333",
|
|
8716
8719
|
stroke: "#596168",
|
|
8717
8720
|
strokeWidth: 1.5,
|
|
@@ -8731,21 +8734,6 @@ var SvgInjectTag = function SvgInjectTag(props) {
|
|
|
8731
8734
|
})));
|
|
8732
8735
|
};
|
|
8733
8736
|
|
|
8734
|
-
var _path$3;
|
|
8735
|
-
function _extends$6() { _extends$6 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$6.apply(this, arguments); }
|
|
8736
|
-
var SvgIcHelpOutline = function SvgIcHelpOutline(props) {
|
|
8737
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$6({
|
|
8738
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
8739
|
-
viewBox: "0 0 17 16",
|
|
8740
|
-
width: "1em",
|
|
8741
|
-
height: "1em"
|
|
8742
|
-
}, props), _path$3 || (_path$3 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
8743
|
-
fill: "#767D84",
|
|
8744
|
-
fillRule: "evenodd",
|
|
8745
|
-
d: "M9 1.333a6.667 6.667 0 1 1 0 13.334A6.667 6.667 0 0 1 9 1.333zm0 1.334C6.054 2.667 3.667 5.054 3.667 8S6.054 13.333 9 13.333 14.333 10.946 14.333 8 11.946 2.667 9 2.667zm-.137 7.245c.41 0 .747.337.747.747s-.337.747-.747.747-.747-.336-.747-.747a.75.75 0 0 1 .747-.747zm.046-5.245c1.166 0 2.313.537 2.313 1.82 0 1.185-1.357 1.64-1.648 2.068-.22.319-.146.766-.747.766-.392 0-.583-.319-.583-.61 0-1.085 1.593-1.33 1.593-2.223 0-.492-.327-.783-.873-.783-1.166 0-.711 1.202-1.594 1.202-.319 0-.592-.191-.592-.556 0-.893 1.02-1.684 2.13-1.684z"
|
|
8746
|
-
})));
|
|
8747
|
-
};
|
|
8748
|
-
|
|
8749
8737
|
function PropagateTagInfo(_a) {
|
|
8750
8738
|
var isCreateApp = _a.isCreateApp;
|
|
8751
8739
|
var additionalInfo = function () {
|
|
@@ -16792,6 +16780,25 @@ exports.CIBuildType = void 0;
|
|
|
16792
16780
|
CIBuildType["BUILDPACK_BUILD_TYPE"] = "buildpack-build";
|
|
16793
16781
|
})(exports.CIBuildType || (exports.CIBuildType = {}));
|
|
16794
16782
|
|
|
16783
|
+
exports.ApplyPolicyToStage = void 0;
|
|
16784
|
+
(function (ApplyPolicyToStage) {
|
|
16785
|
+
ApplyPolicyToStage["PRE_CI"] = "PRE_CI";
|
|
16786
|
+
ApplyPolicyToStage["POST_CI"] = "POST_CI";
|
|
16787
|
+
ApplyPolicyToStage["PRE_OR_POST_CI"] = "PRE_OR_POST_CI";
|
|
16788
|
+
})(exports.ApplyPolicyToStage || (exports.ApplyPolicyToStage = {}));
|
|
16789
|
+
exports.PluginRequiredStage = void 0;
|
|
16790
|
+
(function (PluginRequiredStage) {
|
|
16791
|
+
PluginRequiredStage["PRE_CI"] = "preBuildStage";
|
|
16792
|
+
PluginRequiredStage["POST_CI"] = "postBuildStage";
|
|
16793
|
+
PluginRequiredStage["PRE_OR_POST_CI"] = "PRE_OR_POST_CI";
|
|
16794
|
+
})(exports.PluginRequiredStage || (exports.PluginRequiredStage = {}));
|
|
16795
|
+
exports.ConsequenceAction = void 0;
|
|
16796
|
+
(function (ConsequenceAction) {
|
|
16797
|
+
ConsequenceAction["BLOCK"] = "BLOCK";
|
|
16798
|
+
ConsequenceAction["ALLOW_UNTIL_TIME"] = "ALLOW_UNTIL_TIME";
|
|
16799
|
+
ConsequenceAction["ALLOW_FOREVER"] = "ALLOW_FOREVER";
|
|
16800
|
+
})(exports.ConsequenceAction || (exports.ConsequenceAction = {}));
|
|
16801
|
+
|
|
16795
16802
|
var info = "data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2032%2032%22%3E%20%20%20%20%3Cg%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M0%200h32v32H0z%22%2F%3E%20%20%20%20%20%20%20%20%3Cpath%20fill%3D%22%2306C%22%20d%3D%22M16%202.667C8.64%202.667%202.667%208.64%202.667%2016S8.64%2029.333%2016%2029.333%2029.333%2023.36%2029.333%2016%2023.36%202.667%2016%202.667z%22%2F%3E%20%20%20%20%20%20%20%20%3Cpath%20fill%3D%22%23FFF%22%20d%3D%22M16%2014.667c.736%200%201.333.597%201.333%201.333v5.333a1.333%201.333%200%201%201-2.666%200V16c0-.736.597-1.333%201.333-1.333zm0-5.334A1.333%201.333%200%201%201%2016%2012a1.333%201.333%200%200%201%200-2.667z%22%2F%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E";
|
|
16796
16803
|
|
|
16797
16804
|
function DeleteComponent(_a) {
|
package/package.json
CHANGED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { VariableType } from "./CIPipeline.Types"
|
|
2
|
+
|
|
3
|
+
export enum ApplyPolicyToStage {
|
|
4
|
+
PRE_CI = 'PRE_CI',
|
|
5
|
+
POST_CI = 'POST_CI',
|
|
6
|
+
PRE_OR_POST_CI = 'PRE_OR_POST_CI',
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export enum PluginRequiredStage {
|
|
10
|
+
PRE_CI = 'preBuildStage',
|
|
11
|
+
POST_CI = 'postBuildStage',
|
|
12
|
+
PRE_OR_POST_CI = 'PRE_OR_POST_CI',
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface DefinitionSourceType {
|
|
16
|
+
projectName: string
|
|
17
|
+
isDueToProductionEnvironment: boolean
|
|
18
|
+
isDueToLinkedPipeline: boolean
|
|
19
|
+
policyName: string
|
|
20
|
+
appName?: string
|
|
21
|
+
clusterName?: string
|
|
22
|
+
environmentName?: string
|
|
23
|
+
branchNames?: string[]
|
|
24
|
+
ciPipelineName?: string
|
|
25
|
+
}
|
|
26
|
+
export interface MandatoryPluginDetailType {
|
|
27
|
+
id: number
|
|
28
|
+
name: string
|
|
29
|
+
description?: string
|
|
30
|
+
requiredIn: PluginRequiredStage
|
|
31
|
+
applied?: boolean
|
|
32
|
+
inputVariables?: VariableType[]
|
|
33
|
+
outputVariables?: VariableType[]
|
|
34
|
+
definitionSources?: DefinitionSourceType[]
|
|
35
|
+
}
|
|
36
|
+
export interface MandatoryPluginDataType {
|
|
37
|
+
pluginData: MandatoryPluginDetailType[]
|
|
38
|
+
isValidPre: boolean
|
|
39
|
+
isValidPost: boolean
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export enum ConsequenceAction {
|
|
43
|
+
BLOCK = 'BLOCK',
|
|
44
|
+
ALLOW_UNTIL_TIME = 'ALLOW_UNTIL_TIME',
|
|
45
|
+
ALLOW_FOREVER = 'ALLOW_FOREVER',
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface ConsequenceType {
|
|
49
|
+
action: ConsequenceAction
|
|
50
|
+
metadataField: string
|
|
51
|
+
}
|
|
@@ -2,6 +2,7 @@ import React, { useRef, useState } from 'react'
|
|
|
2
2
|
import Tippy from '@tippyjs/react'
|
|
3
3
|
import { ReactComponent as CloseIcon } from '../Assets/Icon/ic-cross.svg'
|
|
4
4
|
import { ReactComponent as QuestionFilled } from '../Assets/Icon/ic-help.svg'
|
|
5
|
+
import { ReactComponent as Question } from '../Assets/Icon/ic-help-outline.svg'
|
|
5
6
|
import 'tippy.js/animations/shift-toward-subtle.css'
|
|
6
7
|
import { TippyCustomizedProps, TippyTheme } from './Types'
|
|
7
8
|
import { not } from './Helper'
|
|
@@ -82,7 +83,7 @@ export function TippyCustomized(props: TippyCustomizedProps) {
|
|
|
82
83
|
{heading && <span className={`fs-14 fw-6 lh-20 ${showCloseButton ? 'mr-6' : ''}`}>{heading}</span>}
|
|
83
84
|
{headingInfo && (
|
|
84
85
|
<div className="icon-dim-20 cursor" onClick={toggleHeadingInfo}>
|
|
85
|
-
<
|
|
86
|
+
<Question className="icon-dim-20" />
|
|
86
87
|
</div>
|
|
87
88
|
)}
|
|
88
89
|
{showCloseButton && (
|
package/src/Common/Types.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ReactNode, CSSProperties } from 'react'
|
|
2
2
|
import { Placement } from 'tippy.js'
|
|
3
|
-
import { VariableType } from './CIPipeline.Types'
|
|
4
3
|
export interface ResponseType {
|
|
5
4
|
code: number
|
|
6
5
|
status: string
|
|
@@ -263,6 +262,11 @@ export interface CommonNodeAttr {
|
|
|
263
262
|
showPluginWarning?: boolean
|
|
264
263
|
helmPackageName?: string
|
|
265
264
|
isVirtualEnvironment?: boolean
|
|
265
|
+
isCITriggerBlocked?: boolean
|
|
266
|
+
ciBlockState?: {
|
|
267
|
+
action: any,
|
|
268
|
+
metadataField: string
|
|
269
|
+
}
|
|
266
270
|
}
|
|
267
271
|
|
|
268
272
|
export interface VulnerabilityType {
|
|
@@ -321,43 +325,4 @@ export interface CDMaterialResponseType {
|
|
|
321
325
|
materials: any[]
|
|
322
326
|
userApprovalConfig: UserApprovalConfigType
|
|
323
327
|
requestedUserId: number
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
export enum ApplyPolicyToStage {
|
|
327
|
-
PRE_CI = 'PRE_CI',
|
|
328
|
-
POST_CI = 'POST_CI',
|
|
329
|
-
PRE_OR_POST_CI = 'PRE_OR_POST_CI',
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
export enum PluginRequiredStage {
|
|
333
|
-
PRE_CI = 'preBuildStage',
|
|
334
|
-
POST_CI = 'postBuildStage',
|
|
335
|
-
PRE_OR_POST_CI = 'PRE_OR_POST_CI',
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
export 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
|
|
348
|
-
}
|
|
349
|
-
export interface MandatoryPluginDetailType {
|
|
350
|
-
id: number
|
|
351
|
-
name: string
|
|
352
|
-
description?: string
|
|
353
|
-
requiredIn: PluginRequiredStage
|
|
354
|
-
applied?: boolean
|
|
355
|
-
inputVariables?: VariableType[]
|
|
356
|
-
outputVariables?: VariableType[]
|
|
357
|
-
definitionSources?: DefinitionSourceType[]
|
|
358
|
-
}
|
|
359
|
-
export interface MandatoryPluginDataType {
|
|
360
|
-
pluginData: MandatoryPluginDetailType[]
|
|
361
|
-
isValidPre: boolean
|
|
362
|
-
isValidPost: boolean
|
|
363
|
-
}
|
|
328
|
+
}
|
package/src/Common/index.ts
CHANGED
|
@@ -30,4 +30,5 @@ 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
32
|
export * from './CIPipeline.Types'
|
|
33
|
+
export * from './Policy.Types'
|
|
33
34
|
export { default as DeleteComponent } from './DeleteComponentModal/DeleteComponent'
|