Skip to content

Commit

Permalink
web: Bring back ProposalTransactionalInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
ancorgs committed Nov 20, 2024
1 parent 1d64605 commit ce0778f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions web/src/components/storage/ProposalPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import React, { useRef } from "react";
import { Grid, GridItem, Stack } from "@patternfly/react-core";
import { Page, Drawer } from "~/components/core/";
import ProposalResultSection from "./ProposalResultSection";
import ProposalTransactionalInfo from "./ProposalTransactionalInfo";
import ProposalActionsSummary from "~/components/storage/ProposalActionsSummary";
import { ProposalActionsDialog } from "~/components/storage";
import { _ } from "~/i18n";
Expand Down Expand Up @@ -86,6 +87,9 @@ export default function ProposalPage() {

<Page.Content>
<Grid hasGutter>
<GridItem sm={12}>
<ProposalTransactionalInfo />
</GridItem>
<GridItem sm={12}>
<Drawer
ref={drawerRef}
Expand Down
6 changes: 4 additions & 2 deletions web/src/components/storage/ProposalTransactionalInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import { Alert } from "@patternfly/react-core";
import { _ } from "~/i18n";
import { sprintf } from "sprintf-js";
import { useProduct } from "~/queries/software";
import { useVolumeTemplates } from "~/queries/storage";
import { isTransactionalSystem } from "~/components/storage/utils";
import { ProposalSettings } from "~/types/storage";

Expand All @@ -35,10 +36,11 @@ import { ProposalSettings } from "~/types/storage";
* @param props
* @param props.settings - Settings used for calculating a proposal.
*/
export default function ProposalTransactionalInfo({ settings }: { settings: ProposalSettings }) {
export default function ProposalTransactionalInfo() {
const { selectedProduct } = useProduct({ suspense: true });
const volumes = useVolumeTemplates({ suspense: true });

if (!isTransactionalSystem(settings?.volumes)) return;
if (!isTransactionalSystem(volumes)) return;

const title = _("Transactional root file system");
/* TRANSLATORS: %s is replaced by a product name (e.g., openSUSE Tumbleweed) */
Expand Down

0 comments on commit ce0778f

Please sign in to comment.