Fix cluster backup auto-confirm and confirmation Init
- Skip confirmation dialog in auto-confirm mode for cluster backup - Call confirm.Init() to trigger auto-confirm message
This commit is contained in:
@@ -345,6 +345,11 @@ func (m *MenuModel) handleClusterBackup() (tea.Model, tea.Cmd) {
|
||||
m.message = errorStyle.Render("❌ Cluster backup is available only for PostgreSQL targets")
|
||||
return m, nil
|
||||
}
|
||||
// Skip confirmation in auto-confirm mode
|
||||
if m.config.TUIAutoConfirm {
|
||||
executor := NewBackupExecution(m.config, m.logger, m, m.ctx, "cluster", "", 0)
|
||||
return executor, executor.Init()
|
||||
}
|
||||
confirm := NewConfirmationModelWithAction(m.config, m.logger, m,
|
||||
"🗄️ Cluster Backup",
|
||||
"This will backup ALL databases in the cluster. Continue?",
|
||||
@@ -352,7 +357,7 @@ func (m *MenuModel) handleClusterBackup() (tea.Model, tea.Cmd) {
|
||||
executor := NewBackupExecution(m.config, m.logger, m, m.ctx, "cluster", "", 0)
|
||||
return executor, executor.Init()
|
||||
})
|
||||
return confirm, nil
|
||||
return confirm, confirm.Init()
|
||||
}
|
||||
|
||||
// handleViewOperations shows active operations
|
||||
|
||||
Reference in New Issue
Block a user