Skip to content

Commit

Permalink
fix: enable deletion of images queued for download (#5376)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jay-Topher committed Mar 26, 2024
1 parent bb3080b commit 754acdd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/app/images/components/ImagesTable/ImagesTable.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ it("disables delete action for images being downloaded", async () => {
title: "18.04 LTS",
complete: false,
status: "Downloading 50%",
downloading: true,
}),
];
const image = {
Expand Down
3 changes: 2 additions & 1 deletion src/app/images/components/ImagesTable/ImagesTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@ const generateResourceRow = ({
const { os, release } = splitResourceName(resource.name);
const isCommissioningImage =
os === "ubuntu" && release === commissioningRelease;
const canBeDeleted = !isCommissioningImage && resource.complete;
const canBeDeleted =
!isCommissioningImage && (resource.complete || !resource.downloading);
let statusIcon = <Spinner />;
let statusText = resource.status;

Expand Down

0 comments on commit 754acdd

Please sign in to comment.