-
Notifications
You must be signed in to change notification settings - Fork 295
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 #36610 - Add system purpose to activation key details #10697
Fixes #36610 - Add system purpose to activation key details #10697
Conversation
Issues: #36610 |
0082ac5
to
ef6d959
Compare
ef6d959
to
2dc04d9
Compare
2dc04d9
to
e551f9d
Compare
webpack/components/extensions/HostDetails/Cards/SystemPurposeCard/SystemPurposeCard.js
Outdated
Show resolved
Hide resolved
Tests worked well. |
I realized that available release versions are not getting properly retrieved. will update soon |
e551f9d
to
ed3fa0b
Compare
@lfu Addressed comments and fixed release versions, also added tests for it. |
Seems this API call always returns the same result no mattter the host's release version: Other than that, it worked well. |
# host_subscriptions_controller.rb:
def available_release_versions
releases = @host.content_facet.try(:available_releases) || []
# content_facet.rb:
def available_releases
self.content_view_environments.flat_map do |cve|
cve.content_view.version(cve.lifecycle_environment).available_releases
end
end
# content_view_version.rb
def available_releases
Katello::RootRepository.where(:id => self.repositories.select(:root_id)).pluck(:minor).compact.uniq.sort
end I think because it's based on what RootRepositories you have, this is expected. |
[test katello] |
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.
APJ
Thanks @lfu and @trev-allison03! Merged |
What are the changes introduced in this pull request?
Adds the System Purpose card to the new activation key details page, as per the mockup. This means the System Purpose card now works on both this page and the new host details page.
Also added the page section which adds the grey background.
Considerations taken when implementing this change?
The mockup has a slightly different layout on the AK details page vs. the host details page. On AK details, it's a 2-column layout, while it's 1 column on host details. The same component handles both situations, using a few ternaries and such.
Patternfly has some super-weird CSS that misaligns the card expansion carat. I had to fix it.
What are the testing steps for this pull request?
Turn on the 'Show Experimental Labs' setting and go look at your activation keys.
Make sure viewing and editing of System Purpose attributes works as expected on both pages.