import type { Server, K8sCluster, K8sNode, K8sPod, AlertRule, AlertEvent, Ticket, ApprovalFlow, ApprovalInstance, AppRelease, User, Role, OperationLog, CronJob, Script, DashboardData, ResourceModel, ModelInstance, Cabinet, Device, TopologyNode, TopologyEdge, MetricData, LogEntry, } from '@/types'; // 仪表盘数据 export const pipelines = [ { id: 'pipe-001', name: 'user-service-pipeline', description: '用户服务CI/CD流水线', template: 'nodejs', stages: [{ name: '检出代码', status: 'success', duration: 15 }, { name: '构建', status: 'success', duration: 120 }, { name: '单元测试', status: 'success', duration: 60 }], createdAt: '2025-03-01', lastRun: '2025-04-14 10:00:00' }, { id: 'pipe-002', name: 'order-service-pipeline', description: '订单服务CI/CD流水线', template: 'java', stages: [{ name: '检出代码', status: 'success', duration: 12 }, { name: '编译', status: 'success', duration: 180 }, { name: '集成测试', status: 'running', duration: 0 }], createdAt: '2025-03-05', lastRun: '2025-04-14 11:00:00' } ]; export const pipelineExecutions = [ { id: 'exec-001', pipelineId: 'pipe-001', pipelineName: 'user-service-pipeline', status: 'success', branch: 'main', commitId: 'a1b2c3d', triggeredBy: '张工程师', startedAt: '2025-04-14 10:00:00', duration: 510 }, { id: 'exec-002', pipelineId: 'pipe-001', pipelineName: 'user-service-pipeline', status: 'failed', branch: 'feature/new-ui', commitId: 'e4f5g6h', triggeredBy: '王开发', startedAt: '2025-04-14 09:00:00', duration: 245 }, { id: 'exec-003', pipelineId: 'pipe-002', pipelineName: 'order-service-pipeline', status: 'running', branch: 'main', commitId: 'i7j8k9l', triggeredBy: '李运维', startedAt: '2025-04-14 11:00:00', duration: 0 } ]; // ============ 发布数据 ============ export const appReleases: AppRelease[] = [ { id: 'release-001', appName: '用户中心服务', version: 'v2.5.1', environment: 'prod', status: 'success', pipeline: 'user-service-pipeline', commitId: 'a1b2c3d', branch: 'main', deployer: 'user-002', startedAt: '2025-03-30T06:00:00Z', completedAt: '2025-03-30T06:15:00Z', duration: 900, }, { id: 'release-002', appName: '订单服务', version: 'v3.2.0', environment: 'staging', status: 'deploying', pipeline: 'order-service-pipeline', commitId: 'e4f5g6h', branch: 'release/v3.2.0', deployer: 'user-002', startedAt: '2025-03-30T10:00:00Z', }, { id: 'release-003', appName: '支付网关', version: 'v1.8.5', environment: 'prod', status: 'failed', pipeline: 'payment-gateway-pipeline', commitId: 'i7j8k9l', branch: 'hotfix/payment-bug', deployer: 'user-003', startedAt: '2025-03-29T20:00:00Z', completedAt: '2025-03-29T20:05:00Z', duration: 300, }, { id: 'release-004', appName: '消息推送服务', version: 'v2.1.0', environment: 'prod', status: 'rolled_back', pipeline: 'notification-service-pipeline', commitId: 'm0n1o2p', branch: 'main', deployer: 'user-002', startedAt: '2025-03-28T14:00:00Z', completedAt: '2025-03-28T14:30:00Z', duration: 1800, }, { id: 'release-005', appName: '数据分析平台', version: 'v4.0.0-beta', environment: 'test', status: 'building', pipeline: 'analytics-platform-pipeline', commitId: 'q3r4s5t', branch: 'feature/new-dashboard', deployer: 'user-004', startedAt: '2025-03-30T09:30:00Z', }, ]; // 用户数据 export const releases = [ { id: 'rel-001', appName: '用户中心服务', version: 'v2.5.1', environment: 'prod', status: 'success', pipeline: 'user-service-pipeline', commitId: 'a1b2c3d', branch: 'main', deployer: '张工程师', startedAt: '2025-04-14 06:00:00', completedAt: '2025-04-14 06:15:00', duration: 900 }, { id: 'rel-002', appName: '订单服务', version: 'v3.2.0', environment: 'staging', status: 'deploying', pipeline: 'order-service-pipeline', commitId: 'e4f5g6h', branch: 'release/v3.2.0', deployer: '李运维', startedAt: '2025-04-14 10:00:00' }, { id: 'rel-003', appName: '支付网关', version: 'v1.8.5', environment: 'prod', status: 'failed', pipeline: 'payment-gateway-pipeline', commitId: 'i7j8k9l', branch: 'hotfix/payment-bug', deployer: '张工程师', startedAt: '2025-04-13 20:00:00', completedAt: '2025-04-13 20:05:00', duration: 300 } ]; // ============ 定时任务数据 ============