diff --git a/backend/app/service/database_mysql.go b/backend/app/service/database_mysql.go index fd00419ec..98b076b80 100644 --- a/backend/app/service/database_mysql.go +++ b/backend/app/service/database_mysql.go @@ -240,7 +240,7 @@ func (u *MysqlService) DeleteCheck(req dto.MysqlDBDeleteCheck) ([]string, error) } } } else { - apps, _ := appInstallResourceRepo.GetBy(appInstallResourceRepo.WithResourceId(db.ID)) + apps, _ := appInstallResourceRepo.GetBy(appInstallResourceRepo.WithResourceId(db.ID), appRepo.WithKey(req.Type)) for _, app := range apps { appInstall, _ := appInstallRepo.GetFirst(commonRepo.WithByID(app.AppInstallId)) if appInstall.ID != 0 { diff --git a/backend/app/service/database_postgresql.go b/backend/app/service/database_postgresql.go index ffea87627..f8439e94c 100644 --- a/backend/app/service/database_postgresql.go +++ b/backend/app/service/database_postgresql.go @@ -266,7 +266,7 @@ func (u *PostgresqlService) DeleteCheck(req dto.PostgresqlDBDeleteCheck) ([]stri } } } else { - apps, _ := appInstallResourceRepo.GetBy(appInstallResourceRepo.WithResourceId(db.ID)) + apps, _ := appInstallResourceRepo.GetBy(appInstallResourceRepo.WithResourceId(db.ID), appRepo.WithKey(req.Type)) for _, app := range apps { appInstall, _ := appInstallRepo.GetFirst(commonRepo.WithByID(app.AppInstallId)) if appInstall.ID != 0 { diff --git a/frontend/src/views/database/mysql/index.vue b/frontend/src/views/database/mysql/index.vue index 44d78e0fd..57fbbf067 100644 --- a/frontend/src/views/database/mysql/index.vue +++ b/frontend/src/views/database/mysql/index.vue @@ -512,6 +512,9 @@ const loadDBOptions = async () => { } } if (currentDB.value) { + if (currentDB.value.from === 'remote') { + maskShow.value = false; + } globalStore.setCurrentDB(''); search(); return; diff --git a/frontend/src/views/database/postgresql/index.vue b/frontend/src/views/database/postgresql/index.vue index edbe33d3b..eb67277cc 100644 --- a/frontend/src/views/database/postgresql/index.vue +++ b/frontend/src/views/database/postgresql/index.vue @@ -469,6 +469,9 @@ const loadDBOptions = async () => { } } if (currentDB.value) { + if (currentDB.value.from === 'remote') { + maskShow.value = false; + } globalStore.setCurrentDB(''); search(); return;