From d5bf42ad01befad2d3d7f64e349be016d93caff4 Mon Sep 17 00:00:00 2001 From: Hungerdream <1710233908@qq.com> Date: Tue, 28 Jul 2026 14:29:34 +0800 Subject: [PATCH] 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. --- frontend/src/api/delivery.ts | 18 +++ frontend/src/views/service/Catalog.vue | 176 +++++++++++++++++++++++-- 2 files changed, 184 insertions(+), 10 deletions(-) diff --git a/frontend/src/api/delivery.ts b/frontend/src/api/delivery.ts index b799841..1ae72a3 100644 --- a/frontend/src/api/delivery.ts +++ b/frontend/src/api/delivery.ts @@ -79,6 +79,24 @@ export const deliveryApi = { method: 'POST', }) }, + + async retryRollback(taskId: string): Promise { + await authRequest(`/auth/api/v1/delivery/tasks/${encodeURIComponent(taskId)}/rollback/retry`, { + method: 'POST', + }) + }, + + async releaseRollback(taskId: string): Promise { + await authRequest(`/auth/api/v1/delivery/tasks/${encodeURIComponent(taskId)}/rollback/release`, { + method: 'POST', + }) + }, + + async retryCloudDMRegistration(taskId: string): Promise { + await authRequest(`/auth/api/v1/delivery/tasks/${encodeURIComponent(taskId)}/clouddm/retry`, { + method: 'POST', + }) + }, } function createIdempotencyKey(payload: CreateMySQLDeliveryPayload) { diff --git a/frontend/src/views/service/Catalog.vue b/frontend/src/views/service/Catalog.vue index f0574b4..5cd18cd 100644 --- a/frontend/src/views/service/Catalog.vue +++ b/frontend/src/views/service/Catalog.vue @@ -248,7 +248,7 @@
-
+
{{ deliveryFailed ? '!' : '✓' }}

{{ resultTitle }}

@@ -256,6 +256,27 @@
+
+
+ 目标机清理未确认 +

资源目前仍被保护性占用。可重试自动回退,或确认已完成目标机清理后释放。

+
+
+ 重试回退 + 确认清理并释放资源 +
+
+ +
+
+ 实例已交付,CloudDM 注册未完成 +

数据库健康实例和资源账本已保留,仅需重试 CloudDM 注册。

+
+
+ 重试 CloudDM 注册 +
+
+
访问地址 @@ -295,7 +316,7 @@ {{ deliveryForm.version }} {{ currentModeLabel }} {{ resultAddress }} - {{ deliveryFailed ? '已回退' : '正常' }} + {{ deliveryRolledBack ? '已回退' : deliveryAcknowledged ? '已确认释放' : deliveryRegisterFailed ? '实例保留' : deliveryFailed ? '需处理' : '正常' }} {{ activeService.registerTo }} @@ -317,10 +338,11 @@