Skip to content
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 for operating_system's display issues #1451

Merged
merged 4 commits into from
Nov 19, 2021

Conversation

kruai
Copy link
Contributor

@kruai kruai commented Nov 18, 2021

This addresses two issues:

  • ESSNTL-1725: When the operating_system's minor version is set to 0, it won't display "RHEL 8.0", for instance; it will just say "RHEL". That's because the component does not differentiate between falsy values.
  • ESSNTL-1717: The "Release" field on the host detail page uses the deprecated system_profile.os_version field, instead of system_profile.operating_system.

I was going to make separate PRs for these, but they ended up being too tightly coupled. I refactored a bit so that we could reuse OperatingSystemFormatter; this added a <span> around the Release value, so I had to update the snapshots as well. There isn't isn't a visible change in the formatting, though the Release field now includes the name, e.g. "RHEL 8.0" instead of "8.0". Is that an issue?

@kruai kruai requested a review from karelhala November 18, 2021 20:04
@kruai kruai changed the title Differentiate between null and 0 for operating_system.minor Fixes for operating_system's display issues Nov 18, 2021
@kruai kruai requested a review from Hyperkid123 November 18, 2021 21:27
@codecov-commenter
Copy link

Codecov Report

Merging #1451 (d6df2e2) into master (249bdfc) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1451   +/-   ##
=======================================
  Coverage   76.07%   76.07%           
=======================================
  Files          85       85           
  Lines        1806     1806           
  Branches      699      699           
=======================================
  Hits         1374     1374           
  Misses        379      379           
  Partials       53       53           
Impacted Files Coverage Δ
src/components/GeneralInfo/selectors/selectors.js 75.75% <ø> (ø)
src/Utilities/OperatingSystemFormatter.js 100.00% <100.00%> (ø)
...ralInfo/OperatingSystemCard/OperatingSystemCard.js 90.00% <100.00%> (ø)
src/store/entities.js 31.42% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 249bdfc...d6df2e2. Read the comment docs.

@Hyperkid123 Hyperkid123 merged commit aa81efb into RedHatInsights:master Nov 19, 2021
@kruai kruai deleted the os-display-fix branch December 20, 2021 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants