mirror of
https://github.com/yyhuni/xingrin.git
synced 2026-01-31 11:46:16 +08:00
- Add comprehensive mock data configuration for all major entities (dashboard, endpoints, organizations, scans, subdomains, targets, vulnerabilities, websites) - Implement mock service layer with centralized config for development and testing - Add vulnerability detail dialog integration to search results with lazy loading - Enhance search result card with vulnerability viewing capability - Update search materialized view migration to include vulnerability name field - Implement default host fuzzy search fallback for bare text queries without operators - Add vulnerability data formatting in search view for consistent API response structure - Configure Vercel deployment settings and update Next.js configuration - Update all service layers to support mock data injection for development environment - Extend search types with improved vulnerability data structure - Add internationalization strings for vulnerability loading errors - Enable rapid frontend development and testing without backend API dependency
72 lines
1.2 KiB
TypeScript
72 lines
1.2 KiB
TypeScript
/**
|
|
* Mock 数据统一导出
|
|
*
|
|
* 使用方式:
|
|
* import { USE_MOCK, mockData } from '@/mock'
|
|
*
|
|
* if (USE_MOCK) {
|
|
* return mockData.dashboard.assetStatistics
|
|
* }
|
|
*/
|
|
|
|
export { USE_MOCK, MOCK_DELAY, mockDelay } from './config'
|
|
|
|
// Dashboard
|
|
export {
|
|
mockDashboardStats,
|
|
mockAssetStatistics,
|
|
mockStatisticsHistory7Days,
|
|
mockStatisticsHistory30Days,
|
|
getMockStatisticsHistory,
|
|
} from './data/dashboard'
|
|
|
|
// Organizations
|
|
export {
|
|
mockOrganizations,
|
|
getMockOrganizations,
|
|
} from './data/organizations'
|
|
|
|
// Targets
|
|
export {
|
|
mockTargets,
|
|
mockTargetDetails,
|
|
getMockTargets,
|
|
getMockTargetById,
|
|
} from './data/targets'
|
|
|
|
// Scans
|
|
export {
|
|
mockScans,
|
|
mockScanStatistics,
|
|
getMockScans,
|
|
getMockScanById,
|
|
} from './data/scans'
|
|
|
|
// Vulnerabilities
|
|
export {
|
|
mockVulnerabilities,
|
|
getMockVulnerabilities,
|
|
getMockVulnerabilityById,
|
|
} from './data/vulnerabilities'
|
|
|
|
// Endpoints
|
|
export {
|
|
mockEndpoints,
|
|
getMockEndpoints,
|
|
getMockEndpointById,
|
|
} from './data/endpoints'
|
|
|
|
// Websites
|
|
export {
|
|
mockWebsites,
|
|
getMockWebsites,
|
|
getMockWebsiteById,
|
|
} from './data/websites'
|
|
|
|
// Subdomains
|
|
export {
|
|
mockSubdomains,
|
|
getMockSubdomains,
|
|
getMockSubdomainById,
|
|
} from './data/subdomains'
|