Browse Source

fix: 解决 PostgreSQL 页面切换的样式问题 (#5332)

pull/5335/head
ssongliu 6 months ago committed by GitHub
parent
commit
c394efa2ec
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      backend/app/service/database_mysql.go
  2. 2
      backend/app/service/database_postgresql.go
  3. 3
      frontend/src/views/database/mysql/index.vue
  4. 3
      frontend/src/views/database/postgresql/index.vue

2
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 {

2
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 {

3
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;

3
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;

Loading…
Cancel
Save