-
Notifications
You must be signed in to change notification settings - Fork 296
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
Fixes #36736 - Correct memory fact on HW properties card #10737
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -10,6 +10,7 @@ | |||||
Text, | ||||||
TextVariants, | ||||||
} from '@patternfly/react-core'; | ||||||
import { number_to_human_size as NumberToHumanSize } from 'number_helpers'; | ||||||
import CardTemplate from 'foremanReact/components/HostDetails/Templates/CardItem/CardTemplate'; | ||||||
import { TranslatedPlural } from '../../../Table/components/TranslatedPlural'; | ||||||
import { hostIsNotRegistered } from '../hostDetailsHelpers'; | ||||||
|
@@ -43,7 +44,7 @@ | |||||
const coreSocket = facts?.['cpu::core(s)_per_socket']; | ||||||
const reportedFacts = propsToCamelCase(hostDetails?.reported_data || {}); | ||||||
const totalDisks = reportedFacts?.disksTotal; | ||||||
const memory = facts?.['dmi::memory::maximum_capacity']; | ||||||
const memory = facts?.['memory::memtotal']; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We have this as a reported fact called ram.
Suggested change
|
||||||
|
||||||
return ( | ||||||
<CardTemplate | ||||||
|
@@ -71,7 +72,9 @@ | |||||
</DescriptionListGroup> | ||||||
<DescriptionListGroup> | ||||||
<DescriptionListTerm>{__('RAM')}</DescriptionListTerm> | ||||||
<DescriptionListDescription>{memory}</DescriptionListDescription> | ||||||
<DescriptionListDescription>{NumberToHumanSize(memory*1024, { | ||||||
strip_insignificant_zeros: true, precision: 2 | ||||||
Check failure on line 76 in webpack/components/extensions/HostDetails/DetailsTabCards/HwPropertiesCard.js GitHub Actions / build
|
||||||
})}</DescriptionListDescription> | ||||||
Check failure on line 77 in webpack/components/extensions/HostDetails/DetailsTabCards/HwPropertiesCard.js GitHub Actions / build
|
||||||
</DescriptionListGroup> | ||||||
<DescriptionListGroup> | ||||||
<HostDisks totalDisks={totalDisks} /> | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I just noticed this on the screenshot. This value is the total number of bytes of all disks combined, not the number of disks. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have that fixed in a separate pr |
||||||
|
@@ -89,7 +92,7 @@ | |||||
cpuCount: PropTypes.number, | ||||||
cpuSockets: PropTypes.number, | ||||||
coreSocket: PropTypes.number, | ||||||
memory: PropTypes.string, | ||||||
memory: PropTypes.number, | ||||||
}), | ||||||
reported_data: PropTypes.shape({ | ||||||
totalDisks: PropTypes.number, | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is
reportedFacts?.cores
. I can't comment on it, but above there's alsoreportedFacts?.sockets