feat:db automatic database backup #4377
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
π€[deprecated] Generated by Copilot at 0170ef1
Summary
ππ οΈπΎ
This pull request adds a new feature to the frontend of the dbprovider, which allows users to turn off the automatic backup of a cluster and view the backup policy details. It also updates the backup API and UI components to use the new backup policy structure in the cluster spec, and fixes some localization and git issues. The main files affected are
BackupModal.tsx
,BackupTable.tsx
,backup.ts
,updatePolicy.ts
, andadapt.ts
.Walkthrough
getBackupPolicyByCluster
function from backup API module to backup API file (link)getBackupPolicy
function from backup policy API file (link)dbName
,dbType
, andpatch
parameters for debugging (link)apps.kubeblocks.io
group andclusters
plural for patching cluster resource (link)dbName
as name andpatch
as body ofpatchNamespacedCustomObject
call (link)data
property with patch result injsonRes
call (link)useConfirm
hook to create confirmation dialog for turning off automatic backup (link)updateBackupPolicy
API function to turn off automatic backup by settingenabled
to false (link)defaultVal.start
and callCloseAutoBackup
function withonclickCloseAutoBackup
function as argument (link)AutoBackupConfirmChild
component as confirmation dialog (link)getBackupPolicyByCluster
function from backup API module (link)getBackupPolicyByCluster
function instead ofgetBackupPolicy
function inuseQuery
hook call (link)adaptBackupPolicy
function toadapt.ts
module to adapt backup policy data from cluster spec to auto backup form type (link)--rebase
option forgit pull
command to avoid merge conflicts (link)error
parameter toconsole.log
statement to print error message if git operation times out (link)