-
Notifications
You must be signed in to change notification settings - Fork 293
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 #37994 - Populate bootc fields from facts and associate hosts with manifest entities #11209
base: master
Are you sure you want to change the base?
Changes from all commits
b8377e3
51e5042
64e2b27
777032d
6ef684c
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
class AddManifestEntityToContentFacets < ActiveRecord::Migration[6.1] | ||
def change | ||
add_reference :katello_content_facets, :manifest_entity, polymorphic: true, index: true | ||
change_column_null :katello_content_facets, :manifest_entity_type, true | ||
change_column_null :katello_content_facets, :manifest_entity_id, true | ||
end | ||
end |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,13 +7,64 @@ import { | |
PackageIcon, | ||
} from '@patternfly/react-icons'; | ||
import { Link } from 'react-router-dom'; | ||
import { Flex, FlexItem, Popover, Badge } from '@patternfly/react-core'; | ||
import { | ||
Flex, | ||
FlexItem, | ||
Popover, | ||
Badge, | ||
DescriptionList, | ||
DescriptionListGroup, | ||
DescriptionListDescription as Dd, | ||
DescriptionListTerm as Dt, | ||
} from '@patternfly/react-core'; | ||
import { translate as __ } from 'foremanReact/common/I18n'; | ||
import RelativeDateTime from 'foremanReact/components/common/dates/RelativeDateTime'; | ||
import { ContentViewEnvironmentDisplay } from '../components/extensions/HostDetails/Cards/ContentViewDetailsCard/ContentViewDetailsCard'; | ||
import { truncate } from '../utils/helpers'; | ||
import RepoIcon from '../scenes/ContentViews/Details/Repositories/RepoIcon'; | ||
|
||
const hostsIndexColumnExtensions = [ | ||
{ | ||
columnName: 'bootc_booted_image', | ||
title: <RepoIcon type="docker" customTooltip={__('Image mode / package mode')} />, | ||
wrapper: (hostDetails) => { | ||
const imageMode = hostDetails?.content_facet_attributes?.bootc_booted_image; | ||
const digest = hostDetails?.content_facet_attributes?.bootc_booted_digest; | ||
return ( | ||
<Flex> | ||
{imageMode ? | ||
<Popover | ||
id="image-mode-tooltip" | ||
className="image-mode-tooltip" | ||
maxWidth="74rem" | ||
headerContent={hostDetails.display_name} | ||
bodyContent={ | ||
<Flex direction={{ default: 'column' }}> | ||
<DescriptionList isHorizontal> | ||
<DescriptionListGroup> | ||
<Dt>{__('Booted image')}</Dt> | ||
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. Do we want to be consistent with Insights which calls it Running image? 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. Good idea, I can do that. Should I also add the other info we collect? I can also show available, staged, and rollback so it's just like insights. cc @ianballou 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 could also add any of those as options for additional columns you can add. Maybe just "Running image" would make sense. Thoughts? 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. All these image information will be displayed in the image information card on details tab for each bootc hosts. 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. 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 didn't realize that the hover over text was different from the window that pops up when you click on the icon. I suppose the blurb could go in the hover over part. |
||
<Dd>{hostDetails.content_facet_attributes.bootc_booted_image}</Dd> | ||
</DescriptionListGroup> | ||
<DescriptionListGroup> | ||
<Dt>{__('Digest')}</Dt> | ||
<Dd>{digest}</Dd> | ||
</DescriptionListGroup> | ||
</DescriptionList> | ||
</Flex> | ||
} | ||
> | ||
<FlexItem> | ||
<RepoIcon type="docker" customTooltip={__('Image mode')} /> | ||
</FlexItem> | ||
</Popover> | ||
: <span style={{ color: 'gray' }}><RepoIcon type="yum" customTooltip={__('Package mode')} /></span> | ||
} | ||
</Flex> | ||
); | ||
}, | ||
weight: 35, // between power status (0) and name (50) | ||
isSorted: true, | ||
}, | ||
{ | ||
columnName: 'rhel_lifecycle_status', | ||
title: __('RHEL Lifecycle status'), | ||
|
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 the complete values need to be stringified.