Skip to content

Commit

Permalink
Renamed staging
Browse files Browse the repository at this point in the history
  • Loading branch information
dlabrecq committed Nov 1, 2023
1 parent 9f17032 commit be173a4
Show file tree
Hide file tree
Showing 12 changed files with 55 additions and 58 deletions.
36 changes: 18 additions & 18 deletions src/routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,23 @@ import React, { lazy, Suspense } from 'react';
import { Route, Routes as RouterRoutes } from 'react-router-dom';

const NotFound = lazy(() => import(/* webpackChunkName: "notFound" */ 'routes/components/page/notFound'));
const OptimizationsBadgeDemo = lazy(
() => import(/* webpackChunkName: "recommendations" */ 'routes/demos/optimizations/optimizationsBadgeDemo')
const OptimizationsBadgeStaging = lazy(
() => import(/* webpackChunkName: "recommendations" */ 'routes/staging/optimizations/optimizationsBadgeStaging')
);
const OptimizationsBreakdownDemo = lazy(
() => import(/* webpackChunkName: "recommendations" */ 'routes/demos/optimizations/optimizationsBreakdownDemo')
const OptimizationsBreakdownStaging = lazy(
() => import(/* webpackChunkName: "recommendations" */ 'routes/staging/optimizations/optimizationsBreakdownStaging')
);
const OptimizationsDetailsDemo = lazy(
() => import(/* webpackChunkName: "recommendations" */ 'routes/demos/optimizations/optimizationsDetailsDemo')
const OptimizationsDetailsStaging = lazy(
() => import(/* webpackChunkName: "recommendations" */ 'routes/staging/optimizations/optimizationsDetailsStaging')
);
const OptimizationsLinkDemo = lazy(
() => import(/* webpackChunkName: "recommendations" */ 'routes/demos/optimizations/optimizationsLinkDemo')
const OptimizationsLinkStaging = lazy(
() => import(/* webpackChunkName: "recommendations" */ 'routes/staging/optimizations/optimizationsLinkStaging')
);
const OptimizationsSummaryDemo = lazy(
() => import(/* webpackChunkName: "recommendations" */ 'routes/demos/optimizations/optimizationsSummaryDemo')
const OptimizationsSummaryStaging = lazy(
() => import(/* webpackChunkName: "recommendations" */ 'routes/staging/optimizations/optimizationsSummaryStaging')
);
const OptimizationsTableDemo = lazy(
() => import(/* webpackChunkName: "recommendations" */ 'routes/demos/optimizations/optimizationsTableDemo')
const OptimizationsTableStaging = lazy(
() => import(/* webpackChunkName: "recommendations" */ 'routes/staging/optimizations/optimizationsTableStaging')
);
const Welcome = lazy(() => import(/* webpackChunkName: "ocpDetails" */ 'routes/components/page/welcome/welcome'));

Expand All @@ -30,27 +30,27 @@ const routes = {
path: '/ocm/overview',
},
optimizationsBadge: {
element: userAccess(OptimizationsBadgeDemo),
element: userAccess(OptimizationsBadgeStaging),
path: '/ros/optimizations/badge',
},
optimizationsBreakdown: {
element: userAccess(OptimizationsBreakdownDemo),
element: userAccess(OptimizationsBreakdownStaging),
path: '/ros/optimizations/breakdown',
},
optimizationsDetails: {
element: userAccess(OptimizationsDetailsDemo),
element: userAccess(OptimizationsDetailsStaging),
path: '/ros/optimizations/details',
},
optimizationsLink: {
element: userAccess(OptimizationsLinkDemo),
element: userAccess(OptimizationsLinkStaging),
path: '/ros/optimizations/link',
},
optimizationsSummary: {
element: userAccess(OptimizationsSummaryDemo),
element: userAccess(OptimizationsSummaryStaging),
path: '/ros/optimizations/summary',
},
optimizationsTable: {
element: userAccess(OptimizationsTableDemo),
element: userAccess(OptimizationsTableStaging),
path: '/ros/optimizations/table',
},
welcome: {
Expand Down
2 changes: 0 additions & 2 deletions src/routes/components/optimizations/index.ts

This file was deleted.

14 changes: 0 additions & 14 deletions src/routes/demos/optimizations/optimizationsBreakdownDemo.tsx

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ import { useDispatch, useSelector } from 'react-redux';
import { useLocation } from 'react-router-dom';
import type { AnyAction } from 'redux';
import type { ThunkDispatch } from 'redux-thunk';
import {
OptimizationsDataTable as OptimizationsDataTable,
OptimizationsToolbar,
} from 'routes/components/optimizations';
import { Loading } from 'routes/components/page/loading';
import { NoOptimizations } from 'routes/components/page/noOptimizations';
import { NotAvailable } from 'routes/components/page/notAvailable';
Expand All @@ -26,6 +22,9 @@ import type { RootState } from 'store';
import { FetchStatus } from 'store/common';
import { rosActions, rosSelectors } from 'store/ros';

import { OptimizationsDataTable } from './optimizationsDataTable';
import { OptimizationsToolbar } from './optimizationsToolbar';

interface OptimizationsTableOwnProps {
breadcrumbLabel?: string;
breadcrumbPath?: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ import { PageSection } from '@patternfly/react-core';
import React from 'react';
import { OptimizationsBadge } from 'routes/optimizations/optimizationsBadge';

interface OptimizationsBadgeDemoOwnProps {
interface OptimizationsBadgeStagingOwnProps {
// TBD...
}

type OptimizationsBadgeDemoProps = OptimizationsBadgeDemoOwnProps;
type OptimizationsBadgeStagingProps = OptimizationsBadgeStagingOwnProps;

const OptimizationsBadgeDemo: React.FC<OptimizationsBadgeDemoProps> = () => {
const OptimizationsBadgeStaging: React.FC<OptimizationsBadgeStagingProps> = () => {
return (
<PageSection isFilled>
<OptimizationsBadge groupBy="project" groupByValue="openshift" />
</PageSection>
);
};

export default OptimizationsBadgeDemo;
export default OptimizationsBadgeStaging;
14 changes: 14 additions & 0 deletions src/routes/staging/optimizations/optimizationsBreakdownStaging.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import React from 'react';
import { OptimizationsBreakdown } from 'routes/optimizations/optimizationsBreakdown';

interface OptimizationsDetailsStagingOwnProps {
// TBD...
}

type OptimizationsDetailsStagingProps = OptimizationsDetailsStagingOwnProps;

const OptimizationsDetailsStaging: React.FC<OptimizationsDetailsStagingProps> = () => {
return <OptimizationsBreakdown />;
};

export default OptimizationsDetailsStaging;
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ import { routes } from 'routes';
import { OptimizationsDetails } from 'routes/optimizations/optimizationsDetails';
import { formatPath } from 'utils/paths';

interface OptimizationsDetailsDemoOwnProps {
interface OptimizationsDetailsStagingOwnProps {
// TBD...
}

type OptimizationsDetailsDemoProps = OptimizationsDetailsDemoOwnProps;
type OptimizationsDetailsStagingProps = OptimizationsDetailsStagingOwnProps;

const OptimizationsDetailsDemo: React.FC<OptimizationsDetailsDemoProps> = () => {
const OptimizationsDetailsStaging: React.FC<OptimizationsDetailsStagingProps> = () => {
const intl = useIntl();

return (
Expand All @@ -23,4 +23,4 @@ const OptimizationsDetailsDemo: React.FC<OptimizationsDetailsDemoProps> = () =>
);
};

export default OptimizationsDetailsDemo;
export default OptimizationsDetailsStaging;
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ import { OptimizationsLink } from 'routes/optimizations/optimizationsLink';
import { getBreakdownPath } from 'routes/utils/paths';
import { formatPath } from 'utils/paths';

interface OptimizationsLinkDemoOwnProps {
interface OptimizationsLinkStagingOwnProps {
// TBD...
}

type OptimizationsLinkDemoProps = OptimizationsLinkDemoOwnProps;
type OptimizationsLinkStagingProps = OptimizationsLinkStagingOwnProps;

const OptimizationsLinkDemo: React.FC<OptimizationsLinkDemoProps> = () => {
const OptimizationsLinkStaging: React.FC<OptimizationsLinkStagingProps> = () => {
const location = useLocation();

const groupBy = 'project';
Expand All @@ -38,4 +38,4 @@ const OptimizationsLinkDemo: React.FC<OptimizationsLinkDemoProps> = () => {
);
};

export default OptimizationsLinkDemo;
export default OptimizationsLinkStaging;
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ import { routes } from 'routes';
import { OptimizationsSummary } from 'routes/optimizations/optimizationsSummary';
import { formatPath } from 'utils/paths';

interface OptimizationsSummaryDemoOwnProps {
interface OptimizationsSummaryStagingOwnProps {
// TBD...
}

type OptimizationsSummaryDemoProps = OptimizationsSummaryDemoOwnProps;
type OptimizationsSummaryStagingProps = OptimizationsSummaryStagingOwnProps;

const OptimizationsSummaryDemo: React.FC<OptimizationsSummaryDemoProps> = () => {
const OptimizationsSummaryStaging: React.FC<OptimizationsSummaryStagingProps> = () => {
return (
<PageSection isFilled>
<OptimizationsSummary linkPath={formatPath(routes.optimizationsDetails.path)} />
</PageSection>
);
};

export default OptimizationsSummaryDemo;
export default OptimizationsSummaryStaging;
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@ import { OptimizationsTable } from 'routes/optimizations/optimizationsTable';
import { getGroupById, getGroupByValue } from 'routes/utils/groupBy';
import { formatPath } from 'utils/paths';

interface OptimizationsDetailsDemoOwnProps {
interface OptimizationsDetailsStagingOwnProps {
// TBD...
}

type OptimizationsDetailsDemoProps = OptimizationsDetailsDemoOwnProps;
type OptimizationsDetailsStagingProps = OptimizationsDetailsStagingOwnProps;

const useQueryFromRoute = () => {
const location = useLocation();
return parseQuery<Query>(location.search);
};

const OptimizationsDetailsDemo: React.FC<OptimizationsDetailsDemoProps> = () => {
const OptimizationsDetailsStaging: React.FC<OptimizationsDetailsStagingProps> = () => {
const intl = useIntl();
const queryFromRoute = useQueryFromRoute();

Expand All @@ -41,4 +41,4 @@ const OptimizationsDetailsDemo: React.FC<OptimizationsDetailsDemoProps> = () =>
);
};

export default OptimizationsDetailsDemo;
export default OptimizationsDetailsStaging;

0 comments on commit be173a4

Please sign in to comment.