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.
This commit is contained in:
Hungerdream
2026-07-28 19:15:14 +08:00
parent c139ed6d2f
commit f01398cc67
2 changed files with 1444 additions and 627 deletions
+30 -16
View File
@@ -26,25 +26,26 @@ export interface CreateMySQLDeliveryPayload {
mysql_port?: number
data_disk: string
target_host?: string
cpu_cores: number
memory_gb: number
storage_gb: number
cpu_milli: number
memory_mi: number
storage_gi: number
param_template: string
timezone: string
lower_case_table_names: number
character_set: string
collation: string
max_connections: string | number
innodb_redo_log_capacity: string
innodb_flush_log_at_trx_commit: number
sync_binlog: number
innodb_io_capacity: number
long_query_time: number
binlog_expire_logs_seconds: number
max_binlog_size: string
cpu_cores?: number
memory_gb?: number
storage_gb?: number
timezone?: string
lower_case_table_names?: number
character_set?: string
collation?: string
max_connections?: string | number
innodb_redo_log_capacity?: string
innodb_flush_log_at_trx_commit?: number
sync_binlog?: number
innodb_io_capacity?: number
long_query_time?: number
binlog_expire_logs_seconds?: number
max_binlog_size?: string
mysql_root_password?: string
mysql_admin_password?: string
}
export interface DeliveryTask {
@@ -83,6 +84,12 @@ export interface DeliveryTaskSnapshot {
events: TaskEvent[]
}
export interface DeploymentCredential {
username: string
host: string
password: string
}
export interface MySQLServiceLedgerItem {
name: string
datacenter: string
@@ -172,6 +179,13 @@ export const deliveryApi = {
method: 'POST',
})
},
async revealCredentials(taskId: string): Promise<DeploymentCredential[]> {
const data = await authRequest(`/auth/api/v1/delivery/tasks/${encodeURIComponent(taskId)}/credentials/reveal`, {
method: 'POST',
})
return Array.isArray(data.items) ? data.items : []
},
}
function createIdempotencyKey(payload: CreateMySQLDeliveryPayload) {
File diff suppressed because it is too large Load Diff