Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
joseivanlopez committed Mar 14, 2023
1 parent 368eaf9 commit 5c78dd5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 16 deletions.
9 changes: 8 additions & 1 deletion web/src/components/storage/ProposalPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,12 @@

import React, { useReducer, useEffect } from "react";
import { Alert } from "@patternfly/react-core";
import { Link } from "react-router-dom";

import { useInstallerClient } from "~/context/installer";
import { useCancellablePromise } from "~/utils";
import { Icon } from "~/components/layout";
import { Page, SectionSkeleton } from "~/components/core";
import { Page, PageOptions, SectionSkeleton } from "~/components/core";
import {
ProposalTargetSection,
ProposalSettingsSection,
Expand Down Expand Up @@ -115,6 +116,12 @@ export default function ProposalPage() {
return (
<Page title="Storage Settings" icon="hard_drive" actionLabel="Back" actionVariant="secondary">
<PageContent />
<PageOptions title="Storage">
<Link to="/storage/iscsi">
<Icon name="settings" size="24" />
Configure iSCSI
</Link>
</PageOptions>
</Page>
);
}
15 changes: 0 additions & 15 deletions web/src/components/storage/ProposalTargetSection.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import { useNavigate } from "react-router-dom";
import { Button } from "@patternfly/react-core";

import { If, Popup, Section } from "~/components/core";
import { Icon } from "~/components/layout";
import { ProposalSummary, ProposalTargetForm } from "~/components/storage";

export default function ProposalTargetSection({ proposal, calculateProposal }) {
Expand All @@ -43,23 +42,9 @@ export default function ProposalTargetSection({ proposal, calculateProposal }) {
const renderSelector = availableDevices.length > 0;

const Content = () => {
const ISCSIButton = () => {
return (
<Button
isInline
variant="link"
icon={<Icon name="settings" size="16" />}
onClick={navigateToISCSIPage}
>
Configure iSCSI
</Button>
);
};

return (
<>
<ProposalSummary proposal={proposal} />
<ISCSIButton />
<Popup aria-label="Device selection" isOpen={isOpen}>
<ProposalTargetForm id="target-form" proposal={proposal} onSubmit={onTargetChange} />
<Popup.Actions>
Expand Down

0 comments on commit 5c78dd5

Please sign in to comment.