Commit Graph

95 Commits

Author SHA1 Message Date
Hungerdream dae1bfae90 feat(frontend): polish cluster usage bars, task times and sidebar default
- cluster list: rebuild CPU usage bars with progressbar semantics, NaN/out-of-range clamping and three-tier tone colors for cluster and node tables
- task center: show task creation time next to runner with full timestamp on hover and invalid-date fallbacks
- sidebar: collapse portal group by default
2026-07-30 18:14:32 +08:00
Hungerdream b39f8c313d feat(frontend): replace mock panels with live data sources
- dashboard: load container summary, machine overview, mysql service ledger, active delivery tasks and recent task logs in parallel via Promise.allSettled so one failed source does not block the page
- tenants: back panels with real container summary and mapped Wayne namespaces per business line
- subsystem detail: render real subsystem data instead of mock profile
- components.d.ts: auto-generated ElTag registration
2026-07-30 18:14:19 +08:00
Hungerdream 90434ee39b feat(frontend): unify authenticated requests with 401 session handling
- add utils/session.ts: on 401 clear auth state and redirect to SSO or /login with return path; singleton promise prevents duplicate redirects; typed AuthenticationRequiredError for callers
- add api/authRequest.ts: shared generic authRequest with token injection, response parsing and 401 hook
- migrate businessLine/containerService/delivery/machine/subsystemAuth/taskLog api modules to the shared helper, removing six duplicated implementations; keep getToken only for EventSource query-param auth
- Catalog: silence session-expiry error in instance-name precheck; prefer mysql delivery target by exact template name (matches backend DELIVERY_MYSQL_TEMPLATE_NAME default)
2026-07-30 18:14:09 +08:00
mac 1aa984c7e5 feat(delivery): sync mysql service ledger and credentials 2026-07-30 16:09:13 +08:00
Hungerdream 8b1ed20145 feat(frontend): drive delivery steps by backend stage events
- Map precheck/install/configure/healthcheck/register stage events to
  workbench step states instead of guess-based progression, and prefer
  callback-enabled AWX templates so stage events actually flow
- Replay task events silently on workbench restore to rebuild step
  states without duplicating logs; only reset seen events for new tasks
- Unify instance name generation with a random 6-char suffix (replacing
  the hardcoded -billing-02) and cap the business-line segment so the
  63-char DNS label limit never truncates the suffix
2026-07-30 15:02:52 +08:00
Hungerdream 2de6a1f498 feat(frontend): adapt delivery form to single root account and credential_available
- Remove mysql_admin_password from CreateMySQLDeliveryPayload;
  the delivery form submits a single root password only
- Wire the task's credential_available boolean into the Catalog
  workbench: sync on create/poll/restore, and hide the one-time
  credential entry once it has been claimed
- Preview mock credential account_host changed from localhost to %
2026-07-29 18:39:37 +08:00
mac 35875218c9 feat(delivery): refine base service integrations 2026-07-29 16:47:41 +08:00
Wonder 179d80604c Merge pull request #125 from 2311719626/fix/logs
fix(server): 修复 task log 模块多个问题并添加单元测试
2026-07-29 14:38:55 +08:00
wonder dbb930d0cb fix(frontend): 优化 task log 前端交互体验
- 简化虚拟滚动实现,移除 @tanstack/vue-virtual 依赖
- 添加分页组件,支持翻页查看历史任务
- 添加 SSE 指数退避重试机制(最多 3 次)
- 更新 API 接口支持分页参数
- 添加重试状态指示器

背景:前端存在虚拟滚动与 SSE 不兼容、缺少分页、连接断开无重试等问题

关联 commit:fix/logs 分支
2026-07-29 14:01:12 +08:00
Hungerdream 5715379a26 refactor(ui): embed delivery records into the service ledger
Replace the separate delivery records tab with a per-service dropdown column in the ledger table that opens the existing detail dialog with one-time credential claim. Sync now refreshes ledger, container services and delivery records together; errors surface via message toast. components.d.ts regenerated (dropdown components in, tabs out).
2026-07-29 13:50:29 +08:00
Hungerdream 244f6adfb8 feat(ui): harden MySQL delivery workbench session and credential flow
- Persist workbench state (form, view, task progress) per user/service in sessionStorage; restore on reload re-fetches the task and resumes polling, never persisting the root password itself
- Gate the result tab behind resultReady so an unfinished task cannot show a stale result view
- Add random instance name generation and an async precheck that detects name conflicts against active tasks and delivered instances, mirroring the backend occupancy rules
- Guarantee all four character classes in generated root passwords
- Fetch credentials via the one-time reveal endpoint instead of caching plaintext passwords in localStorage; sanitize legacy history entries and clear the form password once the task is created
2026-07-29 13:50:18 +08:00
Hungerdream 08e9466bad feat(ui): add delivery records tab to service management
Management.vue gains a second tab listing MySQL delivery tasks from the backend (search, status filter, detail dialog, one-time credential reveal with copy/download). components.d.ts regenerated for the new Element Plus components.

Also add narrow-viewport (<=760px) style tweaks to AppHeader/AppMain/DefaultLayout; these are partial small-screen optimizations, not a full mobile adaptation.
2026-07-28 19:15:29 +08:00
Hungerdream f01398cc67 feat(ui): rework MySQL delivery workbench form and flow
Rebuild the MySQL standardized delivery form in Catalog.vue: sectioned layout (scope/resources/db config/advanced params), client-generated root password with regenerate/copy, storage slider, install/data path hints, inline field validation, delivery history and task polling.

Align CreateMySQLDeliveryPayload with the backend MySQLDeliveryInput contract (cpu_milli/memory_mi/storage_gi required, legacy fields optional, drop nonexistent param_template) and send mysql_root_password/mysql_admin_password as a pair so the credential shown to the user is the one actually deployed.
2026-07-28 19:15:14 +08:00
Hungerdream c139ed6d2f fix(ui): remove duplicate function implementations in TaskCenter
scrollToBottom and handleScroll were defined twice (verbatim), causing TS2393 duplicate implementation errors now surfaced by vue-tsc 2.x.
2026-07-28 19:14:59 +08:00
ztkkOip f28bc99401 Merge branch 'main' into feat/base-service-delivery 2026-07-28 18:03:04 +08:00
mac 93981b9aad feat: update delivery and resource frontends 2026-07-28 17:56:58 +08:00
Wonder c0ec5758c6 Merge branch 'main' into feat/task-logs-virtual-scroll 2026-07-28 17:47:26 +08:00
wonder 221d7dcc95 feat(task-logs): 优化任务中心日志前端展示
- 引入 @tanstack/vue-virtual 实现虚拟滚动,仅渲染可见区域日志行
- 添加自动滚动开关,用户可手动控制是否自动滚动
- 实现用户滚动检测,向上滚动时暂停自动滚动,滚到底部时恢复
- 优化日志面板头部布局,添加自动滚动开关 UI
2026-07-28 17:23:03 +08:00
wonder 053fd7027c feat(task-logs): 优化任务中心日志前端展示
- 引入 @tanstack/vue-virtual 实现虚拟滚动,仅渲染可见区域日志行
- 添加自动滚动开关,用户可手动控制是否自动滚动
- 实现用户滚动检测,向上滚动时暂停自动滚动,滚到底部时恢复
- 优化日志面板头部布局,添加自动滚动开关 UI

关联 PR: #119
2026-07-28 17:18:51 +08:00
wonder 8904330632 feat(task-logs): 实现任务日志 SSE 实时推送
实现任务日志 SSE 实时推送功能,解决前端无法流式输出日志的问题

变更内容:
- 后端:新增 /task-logs/stream SSE 端点,支持实时日志推送
- 后端:实现 2 秒轮询间隔检测新日志,支持心跳机制
- 后端:支持通过 query 参数 access_token 传递 JWT 认证
- 前端:新增 createTaskLogStream 函数封装 EventSource
- 前端:修改 TaskCenter.vue 集成 SSE,支持实时更新和自动滚动
- 前端:添加流式连接状态指示器

关联 commit:
- 实现后端 SSE Stream 方法
- 注册 SSE 路由
- 实现前端 SSE 客户端
- 集成 SSE 到任务中心页面
2026-07-28 17:06:44 +08:00
mac 897670b721 Merge remote-tracking branch 'upstream/main' into feat/base-service-delivery
# Conflicts:
#	ansible/mysql-deploy.yml
#	frontend/src/api/delivery.ts
#	frontend/src/views/service/Catalog.vue
#	server/.env.example
#	server/internal/config/config.go
#	server/internal/handler/task_log.go
#	server/internal/service/delivery.go
2026-07-28 15:08:37 +08:00
mac 8e09c30d21 feat: wire mysql delivery to awx callbacks 2026-07-28 14:45:17 +08:00
Hungerdream d5bf42ad01 feat(ui): surface rollback actions in the service catalog
Add retryRollback / releaseRollback / retryCloudDMRegistration API
bindings and wire the corresponding actions and status presentation
into the delivery task view.
2026-07-28 14:29:34 +08:00
mac 5a260c443f feat(delivery): stream task updates with SSE 2026-07-28 09:55:04 +08:00
mac 7b4b9d2ee7 Merge remote-tracking branch 'upstream/main' into feat/base-service-delivery
# Conflicts:
#	server/.env.example
#	server/internal/config/config.go
#	server/internal/service/delivery.go
#	server/internal/service/delivery_test.go
2026-07-28 09:34:37 +08:00
mac 6ddba9aa03 feat(delivery): restore active MySQL tasks 2026-07-27 15:20:03 +08:00
mac a934380c9c feat: switch base delivery to awx task logs 2026-07-23 18:36:24 +08:00
ztkkOip 22eaa3001e Merge pull request #98 from ztkkOip/auth-login
fix(Auth login) 增加了一些主系统数据抽取
2026-07-23 14:17:53 +08:00
Gmarker689 d191948f6d Merge pull request #99 from Gmaker689/fix/dependabot-alerts-7-8-vite-upgrade
fix: upgrade vite to 6.4.3 to fix launch-editor command injection and…
2026-07-22 17:00:26 +08:00
Gmarker689 a974dd03cb fix: upgrade vite to 6.4.3 to fix launch-editor command injection and fs.deny bypass vulnerabilities
- Fixes Dependabot alert #7 (GHSA-c27g-q93r-2cwf): launch-editor command injection via crafted request on Windows, patched in vite >= 5.4.9
- Fixes Dependabot alert #8 (GHSA-fx2h-pf6j-xcff): server.fs.deny bypass on Windows alternate paths, patched in vite >= 6.4.3
- Upgraded @vitejs/plugin-vue to ^5.2.4 for vite 6 compatibility
- Upgraded vue-tsc to ^2.2.12 for vite 6 compatibility
2026-07-22 16:22:01 +08:00
mac c8762619fb chore(frontend): clarify namespace auto binding prompts 2026-07-22 15:05:42 +08:00
mac 7f6f6fa41e feat(container): show business line workloads from Wayne 2026-07-22 15:05:41 +08:00
mac 2db8264c8e feat(service): add deployment task integration 2026-07-21 18:26:50 +08:00
mac c324e2ec59 feat(auth): use Wayne native role APIs 2026-07-21 17:05:48 +08:00
mac 981e9557fe feat(frontend): make mock panels follow business line 2026-07-17 19:28:19 +08:00
mac a112cf742c feat(frontend): add Wayne subsystem authorization page 2026-07-17 19:27:33 +08:00
mac add4b1566e chore: refresh generated component types 2026-07-17 16:32:46 +08:00
wonder a31f274153 feat(frontend): 新增服务管理入口并统一按钮样式
- 侧边栏「机器管理」下方新增「服务管理」导航项(图标 ◈,badge Consul)
- 服务管理页同步按钮文案改为「同步」,添加 type=primary
- 监控看板刷新按钮改为 el-button type=primary,与全局风格统一
2026-07-17 16:00:06 +08:00
wonder c1480f3219 feat(frontend): 将"资源管理"更名为"机器管理"
- 路由路径: resource/management → machine/management
- 路由名称: ResourceManagement → MachineManagement
- 页面标题: 资源管理 → 机器管理
- 侧边栏文案: 资源管理 → 机器管理
- 文件物理路径未改动(views/resource/Management.vue)
2026-07-17 15:46:03 +08:00
mac d9d93fcd20 chore: update generated component types 2026-07-17 15:08:32 +08:00
mac f49b948023 Merge remote-tracking branch 'origin/main' into auth-login 2026-07-17 15:02:47 +08:00
mac d264924d1e feat: add business line permissions and Wayne namespace mapping 2026-07-17 15:02:18 +08:00
wonder 3842a81cb2 refactor(router): 统一前端路由命名与层级
## 背景
前端路由存在层级不一致、英文缩写混用、name 与 sidebar 文本不匹配等问题。

## 变更内容
- 统一使用全称命名(Mgmt → Management, Ops → Operation)
- 统一带前缀路径(/cluster → /infrastructure/cluster)
- 合并可观测性模块(/monitor、/alert → /observable/*)
- 修正 router name 与侧边栏中文标题对应关系

## 路由对照
- /tasks → /task/log (TaskLog)
- /resource/mgmt → /resource/management (ResourceManagement)
- /service/mgmt → /service/management (ServiceManagement)
- /audit/ops → /audit/operation (OperationAudit)
- /cluster → /infrastructure/cluster (InfrastructureCluster)
- /tenants → /business/quota (BusinessQuota)
- /monitor → /observable/monitoring (MonitoringDashboard)
- /alert → /observable/alert (AlertInformation)
- /subsystem/authz → /subsystem/authorization (SubsystemAuthorization)
2026-07-17 14:50:41 +08:00
wonder 1a125e154c feat(service): 容器服务部署独立板块并使用 SSO 跳转
- 新增「容器服务部署」页面板块,与「基础服务目录」同级
- 将容器服务(Wayne)迁移到容器服务部署板块
- Wayne 卡片使用与子系统详情页相同的 SSO 跳转逻辑
- 移除 Wayne 弹窗,改为直接跳转 Wayne 平台
2026-07-17 14:35:37 +08:00
wonder 0cf622b8af refactor(monitor): 将告警相关内容从监控看板移至告警信息页面
- 监控看板移除 P0/P1 告警统计卡片
- 监控看板移除告警来源接入面板
- 告警信息页面添加告警来源接入面板(Zabbix / VictoriaMetrics / 夜莺)
- 告警信息页面添加 dc-* 样式
- 监控看板移除不需要的 dc-* 样式
2026-07-17 14:23:15 +08:00
wonder 096a6a8857 fix(styles): 修复表格中状态文本浮空问题
- 移除 .status-text 的 display: flex,避免破坏 td 的 table-cell 布局
- 删除重复的状态文本样式定义
2026-07-17 14:13:41 +08:00
wonder b58e1d5c3c refactor(monitor): 优化监控告警页面
- 监控页面标题改为监控看板
- 告警页面标题改为告警信息
- 告警页面删除告警通道面板
- 侧边栏导航文本同步更新
2026-07-17 14:11:09 +08:00
wonder 0c5628358f feat(subsystem): 子系统卡片点击跳转到详情页
- 移除 SubsystemCard 直接打开外部链接的逻辑
- 点击卡片后路由跳转到 /subsystem/detail/:name
- 用户需在详情页点击按钮后才会访问外部系统
2026-07-17 14:05:14 +08:00
wonder 454978be7b feat(subsystem): 调整子系统接入状态显示
- Wayne 和 CloudDM 状态设为 active(在线)
- 其他子系统状态设为 integrating(接入改造中)
- 状态文本统一调整为「在线」/「接入改造中」
- 非 active 状态的跳转按钮显示为灰色禁用状态

Co-authored-by: lx <lx@users.noreply.github.com>
2026-07-17 14:01:33 +08:00
wonder 75b71cec29 feat(subsystem): 添加 Superset 日志数据可视化子系统
- 在 mockSubsystems 中添加 Superset 子系统配置(id: 7, 可观测性分类)
- 在侧边栏子系统导航列表中添加 Superset 入口
- 添加青色系 CSS 变量(--tag-cyan-*、--logo-ss-bg)用于 Superset 主题
- 更新 SubsystemCard 和 SubsystemDetail 的颜色映射
- 添加 Superset 详情页描述文案

状态设置为 integrating,支持 SSO 单点登录
2026-07-17 13:55:14 +08:00