From 29fbd3a6a5d8033df44980dbdd9d6f7c92e5757f Mon Sep 17 00:00:00 2001 From: kmalyjur Date: Wed, 27 Sep 2023 11:44:50 +0000 Subject: [PATCH] Fixes #36780 - Hide multiple titles on run job page --- lib/foreman_remote_execution/engine.rb | 2 +- webpack/JobWizard/JobWizardPageRerun.js | 35 +++++++------------------ webpack/JobWizard/index.js | 27 +++++++------------ 3 files changed, 20 insertions(+), 44 deletions(-) diff --git a/lib/foreman_remote_execution/engine.rb b/lib/foreman_remote_execution/engine.rb index b7db148d6..e8bce1fca 100644 --- a/lib/foreman_remote_execution/engine.rb +++ b/lib/foreman_remote_execution/engine.rb @@ -47,7 +47,7 @@ class Engine < ::Rails::Engine initializer 'foreman_remote_execution.register_plugin', before: :finisher_hook do |_app| Foreman::Plugin.register :foreman_remote_execution do - requires_foreman '>= 3.8' + requires_foreman '>= 3.9' register_global_js_file 'global' register_gettext diff --git a/webpack/JobWizard/JobWizardPageRerun.js b/webpack/JobWizard/JobWizardPageRerun.js index fd452b7d2..7d4d1ca3e 100644 --- a/webpack/JobWizard/JobWizardPageRerun.js +++ b/webpack/JobWizard/JobWizardPageRerun.js @@ -1,15 +1,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import URI from 'urijs'; -import { - Alert, - Title, - Divider, - Skeleton, - Flex, - FlexItem, - Button, -} from '@patternfly/react-core'; +import { Alert, Divider, Skeleton, Button } from '@patternfly/react-core'; import { sprintf, translate as __ } from 'foremanReact/common/I18n'; import { useAPI } from 'foremanReact/common/hooks/API/APIHooks'; import PageLayout from 'foremanReact/routes/common/PageLayout/PageLayout'; @@ -54,25 +46,18 @@ const JobWizardPageRerun = ({ header={title} breadcrumbOptions={breadcrumbOptions} searchable={false} + toolbarButtons={ + + } > - - - - {title} - - - - - - {!status || status === STATUS.PENDING ? ( diff --git a/webpack/JobWizard/index.js b/webpack/JobWizard/index.js index 913754cd2..3428f81af 100644 --- a/webpack/JobWizard/index.js +++ b/webpack/JobWizard/index.js @@ -1,6 +1,6 @@ import React from 'react'; import PropTypes from 'prop-types'; -import { Title, Flex, FlexItem, Button } from '@patternfly/react-core'; +import { Button } from '@patternfly/react-core'; import { translate as __ } from 'foremanReact/common/I18n'; import PageLayout from 'foremanReact/routes/common/PageLayout/PageLayout'; import { JobWizard } from './JobWizard'; @@ -18,23 +18,14 @@ const JobWizardPage = ({ location: { search } }) => { header={title} breadcrumbOptions={breadcrumbOptions} searchable={false} - beforeToolbarComponent={ - - - - {title} - - - - - - + toolbarButtons={ + } pageSectionType="wizard" >