Skip to content

Commit 939eb49

Browse files
committed
Merge branch 'main' of https://github.com/devtron-labs/devtron-fe-common-lib into feat/use-download
2 parents c0fb5b4 + d4b195a commit 939eb49

File tree

3 files changed

+27
-34
lines changed

3 files changed

+27
-34
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@devtron-labs/devtron-fe-common-lib",
3-
"version": "0.1.8-beta-4",
3+
"version": "0.1.9-beta-1",
44
"description": "Supporting common component library",
55
"type": "module",
66
"main": "dist/index.js",

src/Shared/Components/CICDHistory/Artifacts.tsx

Lines changed: 24 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ const Artifacts = ({
168168
if (status.toLowerCase() === TERMINAL_STATUS_MAP.RUNNING || status.toLowerCase() === TERMINAL_STATUS_MAP.STARTING) {
169169
return <CIProgressView />
170170
}
171-
if (isJobView && !blobStorageEnabled) {
171+
if (!blobStorageEnabled) {
172172
return (
173173
<div className="flex column p-24 w-100 h-100">
174174
<GenericEmptyState
@@ -194,15 +194,6 @@ const Artifacts = ({
194194
</div>
195195
)
196196
}
197-
if (isJobView && !isArtifactUploaded) {
198-
return (
199-
<GenericEmptyState
200-
title={EMPTY_STATE_STATUS.ARTIFACTS_EMPTY_STATE_TEXTS.NoFilesFound}
201-
subTitle={EMPTY_STATE_STATUS.ARTIFACTS_EMPTY_STATE_TEXTS.NoFilesGenerated}
202-
image={noartifact}
203-
/>
204-
)
205-
}
206197
if (status.toLowerCase() === TERMINAL_STATUS_MAP.FAILED || status.toLowerCase() === TERMINAL_STATUS_MAP.CANCELLED) {
207198
if (isJobCI) {
208199
return (
@@ -220,7 +211,7 @@ const Artifacts = ({
220211
/>
221212
)
222213
}
223-
if (!artifactId && status.toLowerCase() === TERMINAL_STATUS_MAP.SUCCEEDED) {
214+
if (!artifactId && status.toLowerCase() === TERMINAL_STATUS_MAP.SUCCEEDED && !isJobView) {
224215
return (
225216
<GenericEmptyState
226217
title={EMPTY_STATE_STATUS.ARTIFACTS_EMPTY_STATE_TEXTS.NoArtifactsFound}
@@ -260,26 +251,28 @@ const Artifacts = ({
260251
</div>
261252
</CIListItem>
262253
)}
263-
{blobStorageEnabled && getArtifactPromise && (type === HistoryComponentType.CD || isArtifactUploaded) && (
264-
<CIListItem
265-
type="report"
266-
hideImageTaggingHardDelete={hideImageTaggingHardDelete}
267-
isSuperAdmin={isSuperAdmin}
268-
renderCIListHeader={renderCIListHeader}
269-
>
270-
<div className="flex column left">
271-
<div className="cn-9 fs-14">Reports.zip</div>
272-
<button
273-
type="button"
274-
onClick={handleArtifact}
275-
className="anchor p-0 cb-5 fs-12 flex left pointer"
276-
>
277-
Download
278-
<Download className="ml-5 icon-dim-16" />
279-
</button>
280-
</div>
281-
</CIListItem>
282-
)}
254+
{blobStorageEnabled &&
255+
getArtifactPromise &&
256+
(type === HistoryComponentType.CD || isArtifactUploaded || isJobView) && (
257+
<CIListItem
258+
type="report"
259+
hideImageTaggingHardDelete={hideImageTaggingHardDelete}
260+
isSuperAdmin={isSuperAdmin}
261+
renderCIListHeader={renderCIListHeader}
262+
>
263+
<div className="flex column left">
264+
<div className="cn-9 fs-14">Reports.zip</div>
265+
<button
266+
type="button"
267+
onClick={handleArtifact}
268+
className="anchor p-0 cb-5 fs-12 flex left pointer"
269+
>
270+
Download
271+
<Download className="ml-5 icon-dim-16" />
272+
</button>
273+
</div>
274+
</CIListItem>
275+
)}
283276
</div>
284277
)
285278
}

0 commit comments

Comments
 (0)