Skip to content

Commit b6ddcd3

Browse files
committed
StatsHouse UI: remove old code
1 parent 8616304 commit b6ddcd3

File tree

132 files changed

+101
-13761
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

132 files changed

+101
-13761
lines changed

statshouse-ui/src/App.tsx

Lines changed: 2 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,11 @@
77
import '@/store2';
88
import React, { Suspense, useEffect } from 'react';
99
import { Navigate, Route, Routes, useLocation } from 'react-router-dom';
10-
// import { Admin } from './admin/Admin';
11-
// import { ViewPage } from './view/ViewPage';
1210
import { QueryClientProvider } from '@tanstack/react-query';
1311
import { queryClient } from './common/queryClient';
1412
import { 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

2216
const FAQ = React.lazy(() => import('./doc/FAQ'));
2317
const Admin = React.lazy(() => import('./admin/Admin'));
@@ -26,8 +20,6 @@ const GroupPage = React.lazy(() => import('./view/Settings/GroupPage'));
2620
const NamespacePage = React.lazy(() => import('./view/Settings/NamespacePage'));
2721
const DashboardListView = React.lazy(() => import('./view/DashboardListView'));
2822

29-
const View2Page = React.lazy(() => import('./view2/ViewPage'));
30-
const Core = React.lazy(() => import('./view2/Core'));
3123
const yAxisSize = 54; // must be synced with .u-legend padding-left
3224

3325
export 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-
11369
function NotFound() {
11470
const location = useLocation();
11571

statshouse-ui/src/AppOld.tsx

Lines changed: 0 additions & 81 deletions
This file was deleted.

statshouse-ui/src/admin/pages/FormPage.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import { IBackendMetric, IKind, IMetric, ITagAlias } from '../models/metric';
1010
import { MetricFormValuesContext, MetricFormValuesStorage } from '../storages/MetricFormValues';
1111
import { ReactComponent as SVGTrash } from 'bootstrap-icons/icons/trash.svg';
1212
import { IActions } from '../storages/MetricFormValues/reducer';
13-
import { useStore } from '@/store';
1413
import { RawValueKind } from '@/view/api';
1514
import { METRIC_TYPE, METRIC_TYPE_DESCRIPTION, MetricType } from '@/api/enum';
1615
import { maxTagsSize } from '@/common/settings';
@@ -31,8 +30,6 @@ import { API_HISTORY } from '@/api/history';
3130
import { HistoryList } from '@/components2/HistoryList';
3231
import { HistoryDashboardLabel } from '@/components2/HistoryDashboardLabel';
3332

34-
const { clearMetricsMeta } = useStore.getState();
35-
3633
const METRIC_TYPE_KEYS: MetricType[] = Object.values(METRIC_TYPE) as MetricType[];
3734

3835
export function FormPage(props: { yAxisSize: number; adminMode: boolean }) {
@@ -900,7 +897,6 @@ function useSubmit(values: IMetric, dispatch: Dispatch<IActions>, isHistoricalMe
900897
.catch((err) => setError(err.message))
901898
.finally(() => {
902899
setRunning(false);
903-
clearMetricsMeta(values.name);
904900
});
905901
};
906902

statshouse-ui/src/api/tableOld.ts

Lines changed: 0 additions & 104 deletions
This file was deleted.

statshouse-ui/src/common/TimeHelper.test.ts

Lines changed: 0 additions & 22 deletions
This file was deleted.

statshouse-ui/src/common/TimeHelper.ts

Lines changed: 0 additions & 44 deletions
This file was deleted.

0 commit comments

Comments
 (0)