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

Refs #5280
This commit is contained in:
John Bro 2024-06-28 13:44:58 +08:00 committed by GitHub
parent e3d87c542d
commit 4504a8b188
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 10 additions and 3 deletions

View File

@ -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

View File

@ -377,6 +377,7 @@ const message = {
logout: 'Logout',
},
database: {
all: 'All',
manage: 'Management',
database: 'database',
deleteBackupHelper: 'Delete database backups simultaneously',

View File

@ -370,6 +370,7 @@ const message = {
logout: '退出登錄',
},
database: {
all: '全部',
manage: '管理',
database: '數據庫',
deleteBackupHelper: '同時刪除數據庫備份',

View File

@ -371,6 +371,7 @@ const message = {
logout: '退出登录',
},
database: {
all: '全部',
manage: '管理',
database: '数据库',
deleteBackupHelper: '同时删除数据库备份',

View File

@ -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>