Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove old dashboards / analytics page #8608

Closed
linear bot opened this issue May 17, 2024 · 2 comments
Closed

Remove old dashboards / analytics page #8608

linear bot opened this issue May 17, 2024 · 2 comments

Comments

@linear
Copy link

linear bot commented May 17, 2024

No description provided.

Copy link
Author

linear bot commented May 17, 2024

Copy link

greptile-apps bot commented May 17, 2024

To remove old dashboards and analytics pages, follow these steps:

  1. Remove DashboardPage Component:

    • Delete the file: /frontend/src/pages/Dashboards/pages/Dashboard/DashboardPage.tsx
  2. Remove DashboardsHomePage Component:

    • Delete the file: /frontend/src/pages/Dashboards/pages/DashboardsHomePage/DashboardsHomePage.tsx
  3. Update DashboardsRouter:

    • Modify /frontend/src/pages/Dashboards/DashboardsRouter.tsx to remove routes related to dashboards and analytics.
    import { Navigate, Route, Routes } from 'react-router-dom';
    import HomePageV2 from '@pages/Home/HomePageV2';
    
    const DashboardsRouter = () => {
      const { project_id } = useParams<{ project_id: string }>();
      
      return (
        <Routes>
          <Route path="/analytics/*" element={<HomePageV2 />} />
          <Route path="*" element={<Navigate to={`/${project_id}/sessions`} replace />} />
        </Routes>
      );
    };
    
    export default DashboardsRouter;
  4. Remove DashboardOverview Component:

    • Delete the file: /frontend/src/pages/Graphing/DashboardOverview.tsx
  5. Update SQL Script:

    • Modify /scripts/migrations/set_dashboard_is_default.sql to remove references to old dashboards.
    UPDATE dashboards
    SET is_default = false
    WHERE name IN ('Home', 'Web Vitals', 'Frontend Observability');
  6. Remove Unused Components and Hooks:

    • Delete any unused components and hooks related to dashboards and analytics in the /frontend/src/pages/Dashboards and /frontend/src/pages/Graphing directories.

References

/frontend/src/pages/Dashboards/pages/Dashboard/DashboardPage.tsx
/frontend/src/pages/Dashboards/pages/DashboardsHomePage/DashboardsHomePage.tsx
/frontend/src/pages/Dashboards/DashboardsRouter.tsx
/frontend/src/pages/Graphing/DashboardOverview.tsx
/scripts/migrations/set_dashboard_is_default.sql
/frontend/src/pages/Dashboards
/frontend/src/pages/Graphing/Dashboard.tsx
/backend/private-graph/graph/schema.resolvers.go
/backend/private-graph/graph/generated/generated.go

Ask Greptile

@linear linear bot closed this as completed May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants