@devtron-labs/devtron-fe-common-lib 0.0.17-beta-7 → 0.0.17-beta-9
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/index.js
CHANGED
|
@@ -22539,6 +22539,12 @@ var getTeamListMin = function () {
|
|
|
22539
22539
|
};
|
|
22540
22540
|
});
|
|
22541
22541
|
};
|
|
22542
|
+
var stageMap = {
|
|
22543
|
+
PRECD: 'PRE',
|
|
22544
|
+
CD: 'DEPLOY',
|
|
22545
|
+
POSTCD: 'POST',
|
|
22546
|
+
APPROVAL: 'APPROVAL',
|
|
22547
|
+
};
|
|
22542
22548
|
function getUserRole(appName) {
|
|
22543
22549
|
return get("".concat(ROUTES.USER_CHECK_ROLE).concat(appName ? "?appName=".concat(appName) : ''));
|
|
22544
22550
|
}
|
|
@@ -22546,7 +22552,7 @@ function setImageTags(request, pipelineId, artifactId) {
|
|
|
22546
22552
|
return post("".concat(ROUTES.IMAGE_TAGGING, "/").concat(pipelineId, "/").concat(artifactId), request);
|
|
22547
22553
|
}
|
|
22548
22554
|
var getCDMaterials = function (cdMaterialId, stageType, abortSignal, isApprovalNode, imageTag) {
|
|
22549
|
-
var URL = (!imageTag) ? "app/cd-pipeline/".concat(cdMaterialId, "/material?stage=").concat(stageType) : "app/cd-pipeline/".concat(cdMaterialId, "/material?stage=").concat(stageType, "&search=").concat(imageTag);
|
|
22555
|
+
var URL = (!imageTag) ? "app/cd-pipeline/".concat(cdMaterialId, "/material?stage=").concat(stageMap[stageType]) : "app/cd-pipeline/".concat(cdMaterialId, "/material?stage=").concat(stageMap[stageType], "&search=").concat(imageTag);
|
|
22550
22556
|
return get(URL, {
|
|
22551
22557
|
signal: abortSignal,
|
|
22552
22558
|
}).then(function (response) {
|
|
@@ -23210,7 +23216,7 @@ var ImageTagsContainer = function (_a) {
|
|
|
23210
23216
|
}
|
|
23211
23217
|
handleSave(tagsToBeCreated);
|
|
23212
23218
|
};
|
|
23213
|
-
return (jsxRuntime.jsx("div", __assign({ className: "mt-8" }, { children: isEditing && tagsEditable ? (jsxRuntime.jsxs("div", __assign({ className: "bcn-0 dc__border-top-n1 " }, { children: [jsxRuntime.jsxs("div", __assign({ className: "cn-7 mt-12 flex left" }, { children: [jsxRuntime.jsx("div", { children: "Release tags (eg. v1.0)" }), renderInfoCard()] })), jsxRuntime.jsxs("div", __assign({ className: "mt-6 dc__position-rel-imp", "data-testid": "add-tag-text-area" }, { children: [jsxRuntime.jsx("input", { className: "form__input", value: textInput, onChange: setInputValue, placeholder: "Type a tag and press enter", onKeyDown: handleKeydown, onBlur: setInputValue, ref: creatableRef }), textInput.length > 0 && (jsxRuntime.jsxs("div", __assign({ onClick: enterTagCreate, className: "dc__position-abs bcn-0 flex cursor pt-2 pb-2 pr-4 pl-4 br-2 cn-7 dc__border dc__border-bottom-2", style: {
|
|
23219
|
+
return (jsxRuntime.jsx("div", __assign({ className: "mt-8" }, { children: isEditing && tagsEditable ? (jsxRuntime.jsxs("div", __assign({ className: "bcn-0 dc__border-top-n1 " }, { children: [jsxRuntime.jsxs("div", __assign({ className: "cn-7 mt-12 flex left" }, { children: [jsxRuntime.jsx("div", { children: "Release tags (eg. v1.0)" }), renderInfoCard()] })), jsxRuntime.jsxs("div", __assign({ className: "mt-6 dc__position-rel-imp", "data-testid": "add-tag-text-area" }, { children: [jsxRuntime.jsx("input", { className: "form__input fs-13", value: textInput, onChange: setInputValue, placeholder: "Type a tag and press enter", onKeyDown: handleKeydown, onBlur: setInputValue, ref: creatableRef }), textInput.length > 0 && (jsxRuntime.jsxs("div", __assign({ onClick: enterTagCreate, className: "dc__position-abs bcn-0 flex cursor pt-2 pb-2 pr-4 pl-4 br-2 cn-7 dc__border dc__border-bottom-2", style: {
|
|
23214
23220
|
top: '50%',
|
|
23215
23221
|
fontFamily: 'monospace',
|
|
23216
23222
|
right: '8px',
|
|
@@ -23221,7 +23227,7 @@ var ImageTagsContainer = function (_a) {
|
|
|
23221
23227
|
}, onHardDeleteClick: function (e) {
|
|
23222
23228
|
stopPropagation(e);
|
|
23223
23229
|
handleTagHardDelete(index);
|
|
23224
|
-
}, tagId: tag.id, softDeleteTags: softDeleteTags, isSuperAdmin: isSuperAdmin, duplicateTag: tag === null || tag === void 0 ? void 0 : tag.duplicateTag, hideHardDelete: hideHardDelete }, tag.id)); }) })), showTagsWarning && (jsxRuntime.jsxs("div", __assign({ className: "cn-7 mb-8 flex left" }, { children: [jsxRuntime.jsx(SvgIcInfoFilled, { className: "form__icon--info icon-dim-16 mr-2" }), "Tags cannot be edited/removed later"] }))), jsxRuntime.jsx("div", __assign({ className: "cn-7 mt-12" }, { children: "Comment" })), jsxRuntime.jsx("div", __assign({ className: "flex left flex-wrap dc__gap-8 w-100 mt-6 mb-12", "data-testid": "add-image-comment-text-area" }, { children: jsxRuntime.jsx("textarea", { value: newDescription, onChange: handleDescriptionChange, className: "flex left flex-wrap dc__gap-8 dc__description-textarea", style: { height: '90px !important' } }) })), descriptionValidationMessage !== '' && (jsxRuntime.jsxs("div", __assign({ className: "flex left" }, { children: [jsxRuntime.jsx(SvgIcWarning, { className: "form__icon form__icon--error" }), jsxRuntime.jsx("div", __assign({ className: "form__error" }, { children: descriptionValidationMessage }))] }))), jsxRuntime.jsxs("div", __assign({ className: "w-100 flex right mt-12" }, { children: [jsxRuntime.jsx("button", __assign({ className: "cta flex cancel h-32 lh-32-imp", type: "button", onClick: function (e) {
|
|
23230
|
+
}, tagId: tag.id, softDeleteTags: softDeleteTags, isSuperAdmin: isSuperAdmin, duplicateTag: tag === null || tag === void 0 ? void 0 : tag.duplicateTag, hideHardDelete: hideHardDelete }, tag.id)); }) })), showTagsWarning && (jsxRuntime.jsxs("div", __assign({ className: "cn-7 mb-8 flex left" }, { children: [jsxRuntime.jsx(SvgIcInfoFilled, { className: "form__icon--info icon-dim-16 mr-2" }), "Tags cannot be edited/removed later"] }))), jsxRuntime.jsx("div", __assign({ className: "cn-7 mt-12" }, { children: "Comment" })), jsxRuntime.jsx("div", __assign({ className: "flex left flex-wrap dc__gap-8 w-100 mt-6 mb-12", "data-testid": "add-image-comment-text-area" }, { children: jsxRuntime.jsx("textarea", { value: newDescription, onChange: handleDescriptionChange, className: "flex left flex-wrap dc__gap-8 dc__description-textarea fs-13", style: { height: '90px !important' } }) })), descriptionValidationMessage !== '' && (jsxRuntime.jsxs("div", __assign({ className: "flex left" }, { children: [jsxRuntime.jsx(SvgIcWarning, { className: "form__icon form__icon--error" }), jsxRuntime.jsx("div", __assign({ className: "form__error" }, { children: descriptionValidationMessage }))] }))), jsxRuntime.jsxs("div", __assign({ className: "w-100 flex right mt-12" }, { children: [jsxRuntime.jsx("button", __assign({ className: "cta flex cancel h-32 lh-32-imp", type: "button", onClick: function (e) {
|
|
23225
23231
|
stopPropagation(e);
|
|
23226
23232
|
handleCancel();
|
|
23227
23233
|
} }, { children: "Cancel" })), jsxRuntime.jsx("button", __assign({ className: "cta flex h-32 lh-32-imp ml-12", "data-testid": "save-tags-button", type: "button", onClick: function (e) {
|
package/package.json
CHANGED
|
@@ -30,6 +30,13 @@ interface UserRole extends ResponseType {
|
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
+
let stageMap = {
|
|
34
|
+
PRECD: 'PRE',
|
|
35
|
+
CD: 'DEPLOY',
|
|
36
|
+
POSTCD: 'POST',
|
|
37
|
+
APPROVAL: 'APPROVAL',
|
|
38
|
+
}
|
|
39
|
+
|
|
33
40
|
export function getUserRole(appName?: string): Promise<UserRole> {
|
|
34
41
|
return get(`${ROUTES.USER_CHECK_ROLE}${appName ? `?appName=${appName}` : ''}`)
|
|
35
42
|
}
|
|
@@ -44,7 +51,7 @@ export const getCDMaterials = (
|
|
|
44
51
|
abortSignal: AbortSignal,
|
|
45
52
|
isApprovalNode?: boolean,
|
|
46
53
|
imageTag?: string): Promise<any> => {
|
|
47
|
-
const URL = (!imageTag) ? `app/cd-pipeline/${cdMaterialId}/material?stage=${stageType}` : `app/cd-pipeline/${cdMaterialId}/material?stage=${stageType}&search=${imageTag}`
|
|
54
|
+
const URL = (!imageTag) ? `app/cd-pipeline/${cdMaterialId}/material?stage=${stageMap[stageType]}` : `app/cd-pipeline/${cdMaterialId}/material?stage=${stageMap[stageType]}&search=${imageTag}`
|
|
48
55
|
|
|
49
56
|
return get(URL, {
|
|
50
57
|
signal: abortSignal,
|
package/src/Common/ImageTags.tsx
CHANGED
|
@@ -352,7 +352,7 @@ export const ImageTagsContainer = ({
|
|
|
352
352
|
</div>
|
|
353
353
|
<div className="mt-6 dc__position-rel-imp" data-testid="add-tag-text-area">
|
|
354
354
|
<input
|
|
355
|
-
className="form__input"
|
|
355
|
+
className="form__input fs-13"
|
|
356
356
|
value={textInput}
|
|
357
357
|
onChange={setInputValue}
|
|
358
358
|
placeholder="Type a tag and press enter"
|
|
@@ -420,7 +420,7 @@ export const ImageTagsContainer = ({
|
|
|
420
420
|
<textarea
|
|
421
421
|
value={newDescription}
|
|
422
422
|
onChange={handleDescriptionChange}
|
|
423
|
-
className="flex left flex-wrap dc__gap-8 dc__description-textarea"
|
|
423
|
+
className="flex left flex-wrap dc__gap-8 dc__description-textarea fs-13"
|
|
424
424
|
style={{ height: '90px !important' }}
|
|
425
425
|
/>
|
|
426
426
|
</div>
|