77import '@/store2' ;
88import React , { Suspense , useEffect } from 'react' ;
99import { Navigate , Route , Routes , useLocation } from 'react-router-dom' ;
10- // import { Admin } from './admin/Admin';
11- // import { ViewPage } from './view/ViewPage';
1210import { QueryClientProvider } from '@tanstack/react-query' ;
1311import { queryClient } from './common/queryClient' ;
1412import { useStatsHouse } from '@/store2' ;
15- // import { DashboardListView } from './view/DashboardListView';
16- // import { SettingsPage } from './view/Settings/SettingsPage';
17- // import { GroupPage } from './view/Settings/GroupPage';
18- // import { NamespacePage } from './view/Settings/NamespacePage';
19- // import View2Page from './view2/ViewPage';
20- // import Core from './view2/Core';
13+ import View2Page from './view2/ViewPage' ;
14+ import Core from './view2/Core' ;
2115
2216const FAQ = React . lazy ( ( ) => import ( './doc/FAQ' ) ) ;
2317const Admin = React . lazy ( ( ) => import ( './admin/Admin' ) ) ;
@@ -26,8 +20,6 @@ const GroupPage = React.lazy(() => import('./view/Settings/GroupPage'));
2620const NamespacePage = React . lazy ( ( ) => import ( './view/Settings/NamespacePage' ) ) ;
2721const DashboardListView = React . lazy ( ( ) => import ( './view/DashboardListView' ) ) ;
2822
29- const View2Page = React . lazy ( ( ) => import ( './view2/ViewPage' ) ) ;
30- const Core = React . lazy ( ( ) => import ( './view2/Core' ) ) ;
3123const yAxisSize = 54 ; // must be synced with .u-legend padding-left
3224
3325export function App ( ) {
@@ -69,47 +61,11 @@ export function App() {
6961 />
7062 < Route path = "*" element = { < NotFound /> } />
7163 </ Route >
72- { /*<Route path="/" element={<Navigate to="view" replace={true} />} />*/ }
73- { /*<Route path="embed" element={<ViewPage embed={true} yAxisSize={yAxisSize} />} />*/ }
74- { /*<Route path="/" element={<NavbarApp />}>*/ }
75- { /* <Route*/ }
76- { /* path="doc/faq"*/ }
77- { /* element={*/ }
78- { /* <Suspense fallback={<div>FAQ Loading...</div>}>*/ }
79- { /* <FAQ yAxisSize={yAxisSize} />*/ }
80- { /* </Suspense>*/ }
81- { /* }*/ }
82- { /* />*/ }
83- { /* <Route path="admin/*" element={<Admin yAxisSize={yAxisSize} adminMode={ai.admin} />} />*/ }
84- { /* <Route path="settings/*" element={<SettingsPage adminMode={ai.admin} />}>*/ }
85- { /* <Route path="group" element={<GroupPage />} />*/ }
86- { /* <Route path="namespace" element={<NamespacePage />} />*/ }
87- { /* /!*<Route path="prometheus" element={<PrometheusPage />} />*!/*/ }
88- { /* </Route>*/ }
89-
90- { /* <Route path="view" element={<ViewPage yAxisSize={yAxisSize} />} />*/ }
91- { /* <Route path="dash-list" element={<DashboardListView />} />*/ }
92- { /* <Route path="*" element={<NotFound />} />*/ }
93- { /*</Route>*/ }
9464 </ Routes >
9565 </ QueryClientProvider >
9666 ) ;
9767}
9868
99- // const NavbarApp = function _NavbarApp() {
100- // const globalWarning: string = '';
101- // return (
102- // <div className="d-flex flex-row min-vh-100 position-relative">
103- // <HeaderMenu />
104- // <div className="flex-grow-1 w-0 d-flex flex-column">
105- // {globalWarning !== '' && <div className="alert-warning rounded px-2 py-1">{globalWarning}</div> }
106- // <Outlet />
107- // <BuildVersion className="text-end text-secondary build-version container-xl pb-3" />
108- // </div>
109- // </div>
110- // );
111- // };
112-
11369function NotFound ( ) {
11470 const location = useLocation ( ) ;
11571
0 commit comments