mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-19 06:32:59 +08:00
feat: 解决首页获取不到芯片型号导致显示错误的BUG
This commit is contained in:
parent
2d3fce1d3e
commit
03f2d0e352
@ -82,10 +82,10 @@ func (u *DashboardService) LoadBaseInfo(ioOption string, netOption string) (*dto
|
|||||||
baseInfo.CronjobNumber = len(cornjobs)
|
baseInfo.CronjobNumber = len(cornjobs)
|
||||||
|
|
||||||
cpuInfo, err := cpu.Info()
|
cpuInfo, err := cpu.Info()
|
||||||
if err != nil {
|
if err == nil {
|
||||||
return nil, err
|
baseInfo.CPUModelName = cpuInfo[0].ModelName
|
||||||
}
|
}
|
||||||
baseInfo.CPUModelName = cpuInfo[0].ModelName
|
|
||||||
baseInfo.CPUCores, _ = cpu.Counts(false)
|
baseInfo.CPUCores, _ = cpu.Counts(false)
|
||||||
baseInfo.CPULogicalCores, _ = cpu.Counts(true)
|
baseInfo.CPULogicalCores, _ = cpu.Counts(true)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user