The `handle` metadata on route definitions (name, icon and needsRegistrableProduct) fed the sidebar navigation, which was removed along with the old layout when the current interface workflow landed. Nothing has read it since: no component calls useMatches, and rootRoutes has no importer outside router.tsx. Removes the RouteHandle type, the nine remaining handle entries, the now unused N_ imports and the dead rootRoutes export. Every page title and icon users actually see comes from each page's own breadcrumbs, so nothing changes on screen.
126 lines
3.7 KiB
TypeScript
126 lines
3.7 KiB
TypeScript
/*
|
|
* Copyright (c) [2024-2026] SUSE LLC
|
|
*
|
|
* All Rights Reserved.
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify it
|
|
* under the terms of the GNU General Public License as published by the Free
|
|
* Software Foundation; either version 2 of the License, or (at your option)
|
|
* any later version.
|
|
*
|
|
* 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.
|
|
*/
|
|
|
|
import React from "react";
|
|
import { Route } from "~/types/routes";
|
|
import BootSelectionPage from "~/components/storage/BootSelectionPage";
|
|
import EncryptionSettingsPage from "~/components/storage/EncryptionSettingsPage";
|
|
import SpacePolicySelectionPage from "~/components/storage/SpacePolicySelectionPage";
|
|
import ProposalPage from "~/components/storage/ProposalPage";
|
|
import ISCSIPage from "~/components/storage/ISCSIPage";
|
|
import FormattableDeviceForm from "~/components/storage/formattable-device-form/Form";
|
|
import PartitionForm from "~/components/storage/partition-form/Form";
|
|
import LvmPage from "~/components/storage/LvmPage";
|
|
import LogicalVolumeForm from "~/components/storage/logical-volume-form/Form";
|
|
import ZFCPPage from "~/components/storage/zfcp/ZFCPPage";
|
|
import ZFCPControllersPage from "~/components/storage/zfcp/ZFCPControllersPage";
|
|
import DASDPage from "~/components/storage/dasd/DASDPage";
|
|
import TargetLoginPage from "~/components/storage/iscsi/TargetLoginPage";
|
|
import DiscoverFormPage from "~/components/storage/iscsi/DiscoverFormPage";
|
|
import DeviceSelectorPage from "~/components/storage/DeviceSelectorPage";
|
|
import { STORAGE as PATHS } from "~/routes/paths";
|
|
import InitiatorFormPage from "~/components/storage/iscsi/InitiatorFormPage";
|
|
|
|
const routes = (): Route => ({
|
|
path: PATHS.root,
|
|
children: [
|
|
{
|
|
index: true,
|
|
element: <ProposalPage />,
|
|
},
|
|
{
|
|
path: PATHS.editBootDevice,
|
|
element: <BootSelectionPage />,
|
|
},
|
|
{
|
|
path: PATHS.selectDevice,
|
|
element: <DeviceSelectorPage />,
|
|
},
|
|
{
|
|
path: PATHS.editEncryption,
|
|
element: <EncryptionSettingsPage />,
|
|
},
|
|
{
|
|
path: PATHS.editSpacePolicy,
|
|
element: <SpacePolicySelectionPage />,
|
|
},
|
|
{
|
|
path: PATHS.formatDevice,
|
|
element: <FormattableDeviceForm />,
|
|
},
|
|
{
|
|
path: PATHS.addPartition,
|
|
element: <PartitionForm />,
|
|
},
|
|
{
|
|
path: PATHS.editPartition,
|
|
element: <PartitionForm />,
|
|
},
|
|
{
|
|
path: PATHS.volumeGroup.add,
|
|
element: <LvmPage />,
|
|
},
|
|
{
|
|
path: PATHS.volumeGroup.edit,
|
|
element: <LvmPage />,
|
|
},
|
|
{
|
|
path: PATHS.volumeGroup.logicalVolume.add,
|
|
element: <LogicalVolumeForm />,
|
|
},
|
|
{
|
|
path: PATHS.volumeGroup.logicalVolume.edit,
|
|
element: <LogicalVolumeForm />,
|
|
},
|
|
{
|
|
path: PATHS.iscsi.root,
|
|
element: <ISCSIPage />,
|
|
},
|
|
{
|
|
path: PATHS.iscsi.initiator,
|
|
element: <InitiatorFormPage />,
|
|
},
|
|
{
|
|
path: PATHS.iscsi.discover,
|
|
element: <DiscoverFormPage />,
|
|
},
|
|
{
|
|
path: PATHS.iscsi.login,
|
|
element: <TargetLoginPage />,
|
|
},
|
|
{
|
|
path: PATHS.dasd,
|
|
element: <DASDPage />,
|
|
},
|
|
{
|
|
path: PATHS.zfcp.root,
|
|
element: <ZFCPPage />,
|
|
},
|
|
{
|
|
path: PATHS.zfcp.controllers,
|
|
element: <ZFCPControllersPage />,
|
|
},
|
|
],
|
|
});
|
|
|
|
export default routes;
|
|
export { PATHS };
|