Backend changes: - Created /api/stats endpoint in server/routes/stats.js - Provides system overview (documents, pages, storage) - Shows document status breakdown - Lists recent uploads and documents - Calculates health score - Registered stats route in server/index.js Frontend changes: - Created StatsView.vue with responsive dashboard layout - Added 4 overview metric cards (documents, pages, storage, health) - Document status breakdown section - Recent uploads chart (last 7 days) - Recent documents list with click-to-view - Added /stats route to router.js - Added Stats button to HomeView header navigation Features: - Real-time statistics with refresh button - Loading and error states - Responsive grid layout - Click on recent docs to view details - Formatted timestamps and file sizes - Health score calculation (success vs failed ratio) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
39 lines
801 B
JavaScript
39 lines
801 B
JavaScript
/**
|
|
* Vue Router configuration
|
|
*/
|
|
|
|
import { createRouter, createWebHistory } from 'vue-router'
|
|
import HomeView from './views/HomeView.vue'
|
|
|
|
const router = createRouter({
|
|
history: createWebHistory(import.meta.env.BASE_URL),
|
|
routes: [
|
|
{
|
|
path: '/',
|
|
name: 'home',
|
|
component: HomeView
|
|
},
|
|
{
|
|
path: '/search',
|
|
name: 'search',
|
|
component: () => import('./views/SearchView.vue')
|
|
},
|
|
{
|
|
path: '/document/:id',
|
|
name: 'document',
|
|
component: () => import('./views/DocumentView.vue')
|
|
},
|
|
{
|
|
path: '/jobs',
|
|
name: 'jobs',
|
|
component: () => import('./views/JobsView.vue')
|
|
},
|
|
{
|
|
path: '/stats',
|
|
name: 'stats',
|
|
component: () => import('./views/StatsView.vue')
|
|
}
|
|
]
|
|
})
|
|
|
|
export default router
|