-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Support for uploading kernel images via CLI * Frontend failure & model changes * Uploading kernel images via CLI * Kernel-Images upload instructions * Kernel image handling in listing view * Ensure kernel images are downloaded with the correct format * Added file size and download confirmation for kernel files * Improve UI for kernel image * Refactor S3 operations and additional changes * Removed f-string from logger * Added checksum for uploading kernel image
- Loading branch information
Showing
9 changed files
with
382 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
frontend/src/components/modals/DownloadConfirmationModal.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import Modal from "@/components/ui/Modal"; | ||
import { Button } from "@/components/ui/button"; | ||
|
||
interface DownloadConfirmationModalProps { | ||
isOpen: boolean; | ||
onClose: () => void; | ||
onDownload: () => void; | ||
fileName: string; | ||
fileSize: string; | ||
} | ||
|
||
const DownloadConfirmationModal = ({ | ||
isOpen, | ||
onClose, | ||
onDownload, | ||
fileName, | ||
fileSize, | ||
}: DownloadConfirmationModalProps) => { | ||
return ( | ||
<Modal isOpen={isOpen} onClose={onClose}> | ||
<div className="p-8 bg-gray-12 rounded-lg shadow-lg"> | ||
<h2 className="text-2xl font-bold mb-4 text-gray-2"> | ||
Download Kernel Image | ||
</h2> | ||
<div className="mb-6 space-y-2 text-gray-7"> | ||
<p>Are you sure you want to download this kernel image?</p> | ||
<p> | ||
<span className="text-gray-2 font-bold mb-4">File: </span> | ||
{fileName} | ||
</p> | ||
<p> | ||
<span className="text-gray-2 front-bold mb-4">Size: </span> | ||
{fileSize} | ||
</p> | ||
</div> | ||
<div className="flex justify-end space-x-4"> | ||
<Button onClick={onClose} variant="outline"> | ||
Cancel | ||
</Button> | ||
<Button | ||
onClick={() => { | ||
onDownload(); | ||
onClose(); | ||
}} | ||
variant="default" | ||
> | ||
Download | ||
</Button> | ||
</div> | ||
</div> | ||
</Modal> | ||
); | ||
}; | ||
|
||
export default DownloadConfirmationModal; |
Oops, something went wrong.