diff --git a/sqle/api/controller/v1/instance.go b/sqle/api/controller/v1/instance.go index 8af5be26a..f279d0c06 100644 --- a/sqle/api/controller/v1/instance.go +++ b/sqle/api/controller/v1/instance.go @@ -16,6 +16,7 @@ import ( "github.com/actiontech/sqle/sqle/errors" "github.com/actiontech/sqle/sqle/log" "github.com/actiontech/sqle/sqle/model" + "github.com/actiontech/sqle/sqle/server" opt "github.com/actiontech/sqle/sqle/server/optimization/rule" "github.com/actiontech/sqle/sqle/utils" @@ -416,18 +417,20 @@ func GetInstanceTips(c echo.Context) error { return controller.JSONBaseErrorReq(c, fmt.Errorf("current project doesn't has workflow template")) } instanceTipsResV1 := make([]InstanceTipResV1, 0, len(instances)) + svc := server.BackupService{} for _, inst := range instances { if operationType == v1.OpPermissionTypeCreateOptimization && !opt.CanOptimizeDbType(inst.DbType) { continue } instanceTipRes := InstanceTipResV1{ - ID: inst.GetIDStr(), - Name: inst.Name, - Type: inst.DbType, - Host: inst.Host, - Port: inst.Port, - WorkflowTemplateId: uint32(template.ID), - EnableBackup: inst.EnableBackup, + ID: inst.GetIDStr(), + Name: inst.Name, + Type: inst.DbType, + Host: inst.Host, + Port: inst.Port, + WorkflowTemplateId: uint32(template.ID), + EnableBackup: inst.EnableBackup, + SupportedBackupStrategy: svc.SupportedBackupStrategy(inst.DbType), } instanceTipsResV1 = append(instanceTipsResV1, instanceTipRes) } diff --git a/sqle/server/backup_ce.go b/sqle/server/backup_ce.go index 4d767a7e5..4f7708a06 100644 --- a/sqle/server/backup_ce.go +++ b/sqle/server/backup_ce.go @@ -47,3 +47,8 @@ func (BackupService) IsBackupConflictWithInstance(taskEnableBackup, instanceEnab func (BackupService) CheckCanTaskBackup(task *model.Task) bool { return false } + + +func (BackupService) SupportedBackupStrategy(dbType string) []string { + return []string{} +} \ No newline at end of file