Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fit: 修复概览数据库数量显示错误问题 #5598

Merged
merged 2 commits into from
Jun 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions backend/app/service/dashboard.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,15 @@ func (u *DashboardService) LoadBaseInfo(ioOption string, netOption string) (*dto
return nil, err
}
baseInfo.AppInstalledNumber = len(appInstall)
dbs, err := mysqlRepo.List()
postgresqlDbs, err := postgresqlRepo.List()
if err != nil {
return nil, err
}
baseInfo.DatabaseNumber = len(dbs)
mysqlDbs, err := mysqlRepo.List()
if err != nil {
return nil, err
}
baseInfo.DatabaseNumber = len(mysqlDbs) + len(postgresqlDbs)
website, err := websiteRepo.GetBy()
if err != nil {
return nil, err
Expand Down
1 change: 1 addition & 0 deletions frontend/src/lang/modules/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,7 @@ const message = {
logout: 'Logout',
},
database: {
all: 'All',
manage: 'Management',
database: 'database',
deleteBackupHelper: 'Delete database backups simultaneously',
Expand Down
1 change: 1 addition & 0 deletions frontend/src/lang/modules/tw.ts
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,7 @@ const message = {
logout: '退出登錄',
},
database: {
all: '全部',
manage: '管理',
database: '數據庫',
deleteBackupHelper: '同時刪除數據庫備份',
Expand Down
1 change: 1 addition & 0 deletions frontend/src/lang/modules/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,7 @@ const message = {
logout: '退出登录',
},
database: {
all: '全部',
manage: '管理',
database: '数据库',
deleteBackupHelper: '同时删除数据库备份',
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/views/home/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
</div>
</el-col>
<el-col :span="6">
<span>{{ $t('menu.database') }}</span>
<span>{{ $t('menu.database') }} - {{ $t('database.all') }}</span>
<div class="count">
<span @click="goRouter('/databases')">{{ baseInfo?.databaseNumber }}</span>
</div>
Expand Down
Loading