From 9973234d199fffe88ec6bd5577596502ae741dd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Iv=C3=A1n=20L=C3=B3pez=20Gonz=C3=A1lez?= Date: Fri, 25 Nov 2022 16:37:16 +0000 Subject: [PATCH] [web] Add overview namespace --- web/src/components/core/index.js | 1 - .../{core => overview}/Overview.jsx | 4 ++-- .../{core => overview}/Overview.test.jsx | 0 .../StorageSection.jsx} | 2 +- web/src/components/overview/index.js | 23 +++++++++++++++++++ web/src/components/storage/index.js | 1 - web/src/index.js | 2 +- 7 files changed, 27 insertions(+), 6 deletions(-) rename web/src/components/{core => overview}/Overview.jsx (96%) rename web/src/components/{core => overview}/Overview.test.jsx (100%) rename web/src/components/{storage/OverviewSection.jsx => overview/StorageSection.jsx} (98%) create mode 100644 web/src/components/overview/index.js diff --git a/web/src/components/core/index.js b/web/src/components/core/index.js index d1b237f9ec..ebd92529d6 100644 --- a/web/src/components/core/index.js +++ b/web/src/components/core/index.js @@ -28,7 +28,6 @@ export { default as InstallationProgress } from "./InstallationProgress"; export { default as InstallButton } from "./InstallButton"; export { default as InstallerSkeleton } from "./InstallerSkeleton"; export { default as KebabMenu } from "./KebabMenu"; -export { default as Overview } from "./Overview"; export { default as Popup } from "./Popup"; export { default as ProgressReport } from "./ProgressReport"; export { default as ValidationErrors } from "./ValidationErrors"; diff --git a/web/src/components/core/Overview.jsx b/web/src/components/overview/Overview.jsx similarity index 96% rename from web/src/components/core/Overview.jsx rename to web/src/components/overview/Overview.jsx index c8b7320727..a1e20fa487 100644 --- a/web/src/components/core/Overview.jsx +++ b/web/src/components/overview/Overview.jsx @@ -28,7 +28,7 @@ import { Button, Flex, FlexItem } from "@patternfly/react-core"; import { Title, PageIcon, PageActions, MainActions } from "@components/layout"; import { Section, InstallButton } from "@components/core"; import { LanguageSelector } from "@components/language"; -import { OverviewSection as Storage } from "@components/storage"; +import { StorageSection } from "@components/overview"; import { Users } from "@components/users"; import { Network } from "@components/network"; @@ -73,7 +73,7 @@ function Overview() {
, - , + , ]; diff --git a/web/src/components/core/Overview.test.jsx b/web/src/components/overview/Overview.test.jsx similarity index 100% rename from web/src/components/core/Overview.test.jsx rename to web/src/components/overview/Overview.test.jsx diff --git a/web/src/components/storage/OverviewSection.jsx b/web/src/components/overview/StorageSection.jsx similarity index 98% rename from web/src/components/storage/OverviewSection.jsx rename to web/src/components/overview/StorageSection.jsx index c7626573f8..e90212f652 100644 --- a/web/src/components/storage/OverviewSection.jsx +++ b/web/src/components/overview/StorageSection.jsx @@ -54,7 +54,7 @@ const reducer = (state, action) => { } }; -export default function OverviewSection({ showErrors }) { +export default function StorageSection ({ showErrors }) { const client = useInstallerClient(); const { cancellablePromise } = useCancellablePromise(); const navigate = useNavigate(); diff --git a/web/src/components/overview/index.js b/web/src/components/overview/index.js new file mode 100644 index 0000000000..049926e027 --- /dev/null +++ b/web/src/components/overview/index.js @@ -0,0 +1,23 @@ +/* + * Copyright (c) [2022] SUSE LLC + * + * All Rights Reserved. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of version 2 of the GNU General Public License as published + * by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, contact SUSE LLC. + * + * To contact SUSE LLC about this file by physical or electronic mail, you may + * find current contact information at www.suse.com. + */ + +export { default as Overview } from "./Overview"; +export { default as StorageSection } from "./StorageSection"; diff --git a/web/src/components/storage/index.js b/web/src/components/storage/index.js index 0291b6f900..b4e5a490f5 100644 --- a/web/src/components/storage/index.js +++ b/web/src/components/storage/index.js @@ -19,7 +19,6 @@ * find current contact information at www.suse.com. */ -export { default as OverviewSection } from "./OverviewSection"; export { default as ProposalPage } from "./ProposalPage"; export { default as ProposalTargetSection } from "./ProposalTargetSection"; export { default as ProposalSettingsSection } from "./ProposalSettingsSection"; diff --git a/web/src/index.js b/web/src/index.js index 3ee93c45af..174f0098ea 100644 --- a/web/src/index.js +++ b/web/src/index.js @@ -33,7 +33,7 @@ import { createClient } from "@/client"; import App from "@/App"; import Main from "@/Main"; -import { Overview } from "@components/core"; +import { Overview } from "@components/overview"; import { ProductSelectionPage } from "@components/software"; import { ProposalPage as StoragePage } from "@components/storage";