From f24d38c313feab16a50b645cd83851b049d59e87 Mon Sep 17 00:00:00 2001 From: Lucy Fu Date: Tue, 17 Dec 2024 12:07:35 -0500 Subject: [PATCH] Fixes #38113 - Add link to REX job templates for bootc action --- lib/katello/plugin.rb | 1 + .../HostDetails/DetailsTabCards/ImageModeCard.js | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/lib/katello/plugin.rb b/lib/katello/plugin.rb index d1354d19bd8..15001859612 100644 --- a/lib/katello/plugin.rb +++ b/lib/katello/plugin.rb @@ -698,6 +698,7 @@ def katello_template_setting_values(name) RemoteExecutionFeature.register(:katello_module_stream_action, N_("Katello: Module Stream Actions"), :description => N_("Perform a module stream action via Katello interface"), :provided_inputs => ['action', 'module_spec', 'options']) + RemoteExecutionFeature.register(:katello_bootc_action, N_("Katello: Bootc Action"), :description => N_("Katello Bootc interface")) RemoteExecutionFeature.register(:katello_bootc_upgrade, N_("Katello: Bootc Upgrade"), :description => N_("Bootc upgrade via Bootc interface")) RemoteExecutionFeature.register(:katello_bootc_switch, N_("Katello: Bootc Switch"), :description => N_("Bootc switch via Bootc interface")) RemoteExecutionFeature.register(:katello_bootc_rollback, N_("Katello: Bootc Rollback"), :description => N_("Bootc rollback via Bootc interface")) diff --git a/webpack/components/extensions/HostDetails/DetailsTabCards/ImageModeCard.js b/webpack/components/extensions/HostDetails/DetailsTabCards/ImageModeCard.js index d6333d515b7..6827c8a328d 100644 --- a/webpack/components/extensions/HostDetails/DetailsTabCards/ImageModeCard.js +++ b/webpack/components/extensions/HostDetails/DetailsTabCards/ImageModeCard.js @@ -9,6 +9,7 @@ import { } from '@patternfly/react-core'; import CardTemplate from 'foremanReact/components/HostDetails/Templates/CardItem/CardTemplate'; import FontAwesomeImageModeIcon from '../../../../components/extensions/Hosts/FontAwesomeImageModeIcon'; +import { createJob } from '../Tabs/customizedRexUrlHelpers'; const cardHeader = ( <> @@ -16,6 +17,11 @@ const cardHeader = ( ); +const actionUrl = hostname => createJob({ + hostname, + feature: 'katello_bootc_action', + inputs: {}, +}); const ImageModeCard = ({ isExpandedGlobal, hostDetails }) => { const imageMode = hostDetails?.content_facet_attributes?.bootc_booted_image; @@ -28,6 +34,7 @@ const ImageModeCard = ({ isExpandedGlobal, hostDetails }) => { masonryLayout isExpandedGlobal={isExpandedGlobal} > + {__('Bootc action template')}
{__('Running image')}
@@ -58,6 +65,7 @@ const ImageModeCard = ({ isExpandedGlobal, hostDetails }) => { ImageModeCard.propTypes = { isExpandedGlobal: PropTypes.bool, hostDetails: PropTypes.shape({ + name: PropTypes.string, content_facet_attributes: PropTypes.shape({ bootc_booted_image: PropTypes.string, bootc_booted_digest: PropTypes.string,