1
0
mirror of https://github.com/1Panel-dev/1Panel.git synced 2025-01-19 08:19:15 +08:00

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 return nil, err
} }
baseInfo.AppInstalledNumber = len(appInstall) baseInfo.AppInstalledNumber = len(appInstall)
dbs, err := mysqlRepo.List() postgresqlDbs, err := postgresqlRepo.List()
if err != nil { if err != nil {
return nil, err 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() website, err := websiteRepo.GetBy()
if err != nil { if err != nil {
return nil, err return nil, err

View File

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

View File

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

View File

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

View File

@ -53,7 +53,7 @@
</div> </div>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<span>{{ $t('menu.database') }}</span> <span>{{ $t('menu.database') }} - {{ $t('database.all') }}</span>
<div class="count"> <div class="count">
<span @click="goRouter('/databases')">{{ baseInfo?.databaseNumber }}</span> <span @click="goRouter('/databases')">{{ baseInfo?.databaseNumber }}</span>
</div> </div>