Skip to content

Commit

Permalink
Merge pull request #2 from MiriSafra/bulk-download-reports
Browse files Browse the repository at this point in the history
✨Add download modal for analysis details reports
  • Loading branch information
Shevijacobson authored Oct 28, 2024
2 parents c4ec692 + 181d859 commit c6b3ebf
Showing 1 changed file with 31 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ import {
DropdownItem,
Modal,
Tooltip,
FormGroup,
} from "@patternfly/react-core";
import {
CodeIcon,
PencilAltIcon,
TagIcon,
WarningTriangleIcon,
Expand Down Expand Up @@ -1357,6 +1359,35 @@ export const ApplicationsTable: React.FC = () => {
}}
/>
</div>
<Modal
isOpen={isDownloadModalOpen}
variant="small"
title={t("actions.download", { what: "analysis details reports" })}
onClose={() => setIsDownloadModalOpen(false)} // סגור את המודל
>
<FormGroup label="Select Format" fieldId="format-select">
<div>
<Button
variant={selectedFormat === "json" ? "primary" : "secondary"}
onClick={() => setSelectedFormat("json")}
>
{<CodeIcon />}
JSON
</Button>
<Button
variant={selectedFormat === "yaml" ? "primary" : "secondary"}
onClick={() => setSelectedFormat("yaml")}
>
{<CodeIcon />}
YAML
</Button>
</div>
<p>Selected Format: {selectedFormat}</p>
</FormGroup>
<Button variant="primary" onClick={handleDownload}>
{t("actions.download")}
</Button>
</Modal>
</ConditionalRender>
);
};

0 comments on commit c6b3ebf

Please sign in to comment.