mirror of https://github.com/buster-so/buster.git
Add reports page
This commit is contained in:
parent
33bdee5ea4
commit
63121edcf4
|
@ -0,0 +1,3 @@
|
||||||
|
import LoadingReportsFile from '@reports/file/loading';
|
||||||
|
|
||||||
|
export default LoadingReportsFile;
|
|
@ -0,0 +1,3 @@
|
||||||
|
import ReportsFilePage from '@reports/file/page';
|
||||||
|
|
||||||
|
export default ReportsFilePage;
|
|
@ -0,0 +1,3 @@
|
||||||
|
import LoadingReports from '@reports/loading';
|
||||||
|
|
||||||
|
export default LoadingReports;
|
|
@ -0,0 +1,3 @@
|
||||||
|
import LoadingMetric from '@metrics/chart/loading';
|
||||||
|
|
||||||
|
export default LoadingMetric;
|
|
@ -0,0 +1,3 @@
|
||||||
|
import MetricChartPage from '@metrics/chart/page';
|
||||||
|
|
||||||
|
export default MetricChartPage;
|
|
@ -0,0 +1,3 @@
|
||||||
|
import LoadingMetric from '@metrics/file/loading';
|
||||||
|
|
||||||
|
export default LoadingMetric;
|
|
@ -0,0 +1,3 @@
|
||||||
|
import MetricFilePage from '@metrics/file/page';
|
||||||
|
|
||||||
|
export default MetricFilePage;
|
|
@ -0,0 +1,4 @@
|
||||||
|
import MetricLayout, { generateMetadata } from '@metrics/layout';
|
||||||
|
|
||||||
|
export default MetricLayout;
|
||||||
|
export { generateMetadata };
|
|
@ -0,0 +1,3 @@
|
||||||
|
import LoadingMetric from '@metrics/loading';
|
||||||
|
|
||||||
|
export default LoadingMetric;
|
|
@ -0,0 +1,18 @@
|
||||||
|
import { redirect } from 'next/navigation';
|
||||||
|
import { BusterRoutes, createBusterRoute } from '@/routes';
|
||||||
|
|
||||||
|
export default async function Page(props: {
|
||||||
|
params: Promise<{ chatId: string; metricId: string; reportId: string }>;
|
||||||
|
}) {
|
||||||
|
const params = await props.params;
|
||||||
|
const { chatId, metricId, reportId } = params;
|
||||||
|
|
||||||
|
return redirect(
|
||||||
|
createBusterRoute({
|
||||||
|
route: BusterRoutes.APP_CHAT_ID_REPORT_ID_METRIC_ID_CHART,
|
||||||
|
chatId,
|
||||||
|
metricId,
|
||||||
|
reportId
|
||||||
|
})
|
||||||
|
);
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
import LoadingMetric from '@metrics/results/loading';
|
||||||
|
|
||||||
|
export default LoadingMetric;
|
|
@ -0,0 +1,3 @@
|
||||||
|
import MetricResultsPage from '@metrics/results/page';
|
||||||
|
|
||||||
|
export default MetricResultsPage;
|
|
@ -0,0 +1,3 @@
|
||||||
|
import LoadingMetric from '@metrics/sql/loading';
|
||||||
|
|
||||||
|
export default LoadingMetric;
|
|
@ -0,0 +1,3 @@
|
||||||
|
import MetricSQLPage from '@metrics/sql/page';
|
||||||
|
|
||||||
|
export default MetricSQLPage;
|
|
@ -0,0 +1,3 @@
|
||||||
|
import ReportsPage from '@reports/page';
|
||||||
|
|
||||||
|
export default ReportsPage;
|
|
@ -11,32 +11,32 @@ const meta = {
|
||||||
msw: {
|
msw: {
|
||||||
handlers: [
|
handlers: [
|
||||||
// // Mock Supabase auth endpoints to prevent MSW warnings
|
// // Mock Supabase auth endpoints to prevent MSW warnings
|
||||||
// http.post('http://127.0.0.1:54321/auth/v1/token', ({ request }) => {
|
http.post('http://127.0.0.1:54321/auth/v1/token', ({ request }) => {
|
||||||
// return HttpResponse.json({
|
return HttpResponse.json({
|
||||||
// access_token: 'mock_access_token',
|
access_token: 'mock_access_token',
|
||||||
// token_type: 'bearer',
|
token_type: 'bearer',
|
||||||
// expires_in: 3600,
|
expires_in: 3600,
|
||||||
// refresh_token: 'mock_refresh_token',
|
refresh_token: 'mock_refresh_token',
|
||||||
// user: {
|
user: {
|
||||||
// id: 'mock_user_id',
|
id: 'mock_user_id',
|
||||||
// email: 'mock@example.com',
|
email: 'mock@example.com',
|
||||||
// is_anonymous: false
|
is_anonymous: false
|
||||||
// }
|
}
|
||||||
// });
|
});
|
||||||
// }),
|
}),
|
||||||
// http.post('http://127.0.0.1:54321/auth/v1/refresh', ({ request }) => {
|
http.post('http://127.0.0.1:54321/auth/v1/refresh', ({ request }) => {
|
||||||
// return HttpResponse.json({
|
return HttpResponse.json({
|
||||||
// access_token: 'mock_refreshed_access_token',
|
access_token: 'mock_refreshed_access_token',
|
||||||
// token_type: 'bearer',
|
token_type: 'bearer',
|
||||||
// expires_in: 3600,
|
expires_in: 3600,
|
||||||
// refresh_token: 'mock_new_refresh_token',
|
refresh_token: 'mock_new_refresh_token',
|
||||||
// user: {
|
user: {
|
||||||
// id: 'mock_user_id',
|
id: 'mock_user_id',
|
||||||
// email: 'mock@example.com',
|
email: 'mock@example.com',
|
||||||
// is_anonymous: false
|
is_anonymous: false
|
||||||
// }
|
}
|
||||||
// });
|
});
|
||||||
// })
|
})
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -13,7 +13,10 @@
|
||||||
"paths": {
|
"paths": {
|
||||||
"@/*": ["src/*"],
|
"@/*": ["src/*"],
|
||||||
"@metrics/*": ["src/app/app/(primary_layout)/(chat_experience)/metrics/[metricId]/*"],
|
"@metrics/*": ["src/app/app/(primary_layout)/(chat_experience)/metrics/[metricId]/*"],
|
||||||
"@dashboards/*": ["src/app/app/(primary_layout)/(chat_experience)/dashboards/[dashboardId]/*"]
|
"@dashboards/*": [
|
||||||
|
"src/app/app/(primary_layout)/(chat_experience)/dashboards/[dashboardId]/*"
|
||||||
|
],
|
||||||
|
"@reports/*": ["src/app/app/(primary_layout)/(chat_experience)/reports/[reportId]/*"]
|
||||||
},
|
},
|
||||||
"plugins": [
|
"plugins": [
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue