mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-25 06:19:51 +00:00
Merge pull request #2893 from jumpserver/pr@dev@hardware_show
fix: 修复硬件信息undefined
This commit is contained in:
@@ -54,7 +54,14 @@ export default {
|
||||
const memory = this.items['memory']
|
||||
const diskTotal = this.items['disk_total']
|
||||
if (cpuCount) {
|
||||
return `${cpuVcpus || cpuCores * cpuCount} Core ${memory}G ${diskTotal}G`
|
||||
let text = `${cpuVcpus || cpuCores * cpuCount} Core`
|
||||
if (memory) {
|
||||
text += ` ${memory}G`
|
||||
}
|
||||
if (diskTotal) {
|
||||
text += ` ${diskTotal}G`
|
||||
}
|
||||
return text
|
||||
}
|
||||
return '-'
|
||||
}
|
||||
|
Reference in New Issue
Block a user