2026-02-03 08:56:11 +00:00
|
|
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
|
|
|
import { AdminDashboardView } from './AdminDashboardView';
|
refactor(web): split AdminDashboardView into admin-dashboard-view module
- types: DashboardStats, UploadItem, AuditLogItem, StatCardProps, Report
- useAdminDashboardView: fetchData, handleAction, triggerProtocol
- Header, StatCard, TrafficCard, ProtocolsCard, NodeHealthCard, Tabs
- AdminDashboardSkeleton for Loading state
- max-w-layout-content, text-xs, gap-0.5 (no arbitrary values)
- Stories: Default, Loading (Skeleton). Decorator min-h-layout-page
- Re-export from AdminDashboardView.tsx
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-06 16:54:02 +00:00
|
|
|
import { AdminDashboardSkeleton } from './admin-dashboard-view';
|
2026-02-03 23:44:40 +00:00
|
|
|
import { ToastProvider } from '../../components/feedback/ToastProvider';
|
2026-02-03 08:56:11 +00:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* AdminDashboardView - Centre de commande admin
|
|
|
|
|
*
|
|
|
|
|
* Vue principale d'administration avec métriques en temps réel,
|
|
|
|
|
* visualisation du trafic, queue de modération et logs système.
|
|
|
|
|
*/
|
|
|
|
|
const meta: Meta<typeof AdminDashboardView> = {
|
refactor(web): split AdminDashboardView into admin-dashboard-view module
- types: DashboardStats, UploadItem, AuditLogItem, StatCardProps, Report
- useAdminDashboardView: fetchData, handleAction, triggerProtocol
- Header, StatCard, TrafficCard, ProtocolsCard, NodeHealthCard, Tabs
- AdminDashboardSkeleton for Loading state
- max-w-layout-content, text-xs, gap-0.5 (no arbitrary values)
- Stories: Default, Loading (Skeleton). Decorator min-h-layout-page
- Re-export from AdminDashboardView.tsx
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-06 16:54:02 +00:00
|
|
|
title: 'Components/Features/Admin/AdminDashboardView',
|
|
|
|
|
component: AdminDashboardView,
|
|
|
|
|
parameters: {
|
|
|
|
|
layout: 'fullscreen',
|
|
|
|
|
docs: {
|
|
|
|
|
description: {
|
|
|
|
|
component:
|
|
|
|
|
'Dashboard admin avec métriques, graphiques de trafic et contrôles système.',
|
|
|
|
|
},
|
2026-02-03 08:56:11 +00:00
|
|
|
},
|
refactor(web): split AdminDashboardView into admin-dashboard-view module
- types: DashboardStats, UploadItem, AuditLogItem, StatCardProps, Report
- useAdminDashboardView: fetchData, handleAction, triggerProtocol
- Header, StatCard, TrafficCard, ProtocolsCard, NodeHealthCard, Tabs
- AdminDashboardSkeleton for Loading state
- max-w-layout-content, text-xs, gap-0.5 (no arbitrary values)
- Stories: Default, Loading (Skeleton). Decorator min-h-layout-page
- Re-export from AdminDashboardView.tsx
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-06 16:54:02 +00:00
|
|
|
},
|
|
|
|
|
tags: ['autodocs'],
|
|
|
|
|
decorators: [
|
|
|
|
|
(Story) => (
|
|
|
|
|
<ToastProvider>
|
|
|
|
|
<div className="bg-kodo-background min-h-layout-page p-4">
|
|
|
|
|
<Story />
|
|
|
|
|
</div>
|
|
|
|
|
</ToastProvider>
|
|
|
|
|
),
|
|
|
|
|
],
|
2026-02-03 08:56:11 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export default meta;
|
|
|
|
|
type Story = StoryObj<typeof meta>;
|
|
|
|
|
|
|
|
|
|
export const Default: Story = {
|
refactor(web): split AdminDashboardView into admin-dashboard-view module
- types: DashboardStats, UploadItem, AuditLogItem, StatCardProps, Report
- useAdminDashboardView: fetchData, handleAction, triggerProtocol
- Header, StatCard, TrafficCard, ProtocolsCard, NodeHealthCard, Tabs
- AdminDashboardSkeleton for Loading state
- max-w-layout-content, text-xs, gap-0.5 (no arbitrary values)
- Stories: Default, Loading (Skeleton). Decorator min-h-layout-page
- Re-export from AdminDashboardView.tsx
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-06 16:54:02 +00:00
|
|
|
name: 'Par défaut',
|
2026-02-03 08:56:11 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export const Loading: Story = {
|
refactor(web): split AdminDashboardView into admin-dashboard-view module
- types: DashboardStats, UploadItem, AuditLogItem, StatCardProps, Report
- useAdminDashboardView: fetchData, handleAction, triggerProtocol
- Header, StatCard, TrafficCard, ProtocolsCard, NodeHealthCard, Tabs
- AdminDashboardSkeleton for Loading state
- max-w-layout-content, text-xs, gap-0.5 (no arbitrary values)
- Stories: Default, Loading (Skeleton). Decorator min-h-layout-page
- Re-export from AdminDashboardView.tsx
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-06 16:54:02 +00:00
|
|
|
name: 'Chargement',
|
|
|
|
|
render: () => <AdminDashboardSkeleton />,
|
|
|
|
|
parameters: {
|
|
|
|
|
docs: {
|
|
|
|
|
description: {
|
|
|
|
|
story: 'Skeleton pendant le chargement des données admin.',
|
|
|
|
|
},
|
2026-02-03 08:56:11 +00:00
|
|
|
},
|
refactor(web): split AdminDashboardView into admin-dashboard-view module
- types: DashboardStats, UploadItem, AuditLogItem, StatCardProps, Report
- useAdminDashboardView: fetchData, handleAction, triggerProtocol
- Header, StatCard, TrafficCard, ProtocolsCard, NodeHealthCard, Tabs
- AdminDashboardSkeleton for Loading state
- max-w-layout-content, text-xs, gap-0.5 (no arbitrary values)
- Stories: Default, Loading (Skeleton). Decorator min-h-layout-page
- Re-export from AdminDashboardView.tsx
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-06 16:54:02 +00:00
|
|
|
},
|
2026-02-03 08:56:11 +00:00
|
|
|
};
|