From 062d6094e017cb438e4125d27c930e279bffb5f4 Mon Sep 17 00:00:00 2001 From: Karolina Malyjurkova Date: Tue, 19 Sep 2023 11:55:01 +0200 Subject: [PATCH] Fixes #36734 - Hide double title on Register Host page --- .../RegistrationCommandsPage/index.js | 39 +++--- .../routes/common/PageLayout/PageLayout.js | 115 ++++++++++-------- 2 files changed, 84 insertions(+), 70 deletions(-) diff --git a/webpack/assets/javascripts/react_app/routes/RegistrationCommands/RegistrationCommandsPage/index.js b/webpack/assets/javascripts/react_app/routes/RegistrationCommands/RegistrationCommandsPage/index.js index 3fd94feb132..b6eeb4d758c 100644 --- a/webpack/assets/javascripts/react_app/routes/RegistrationCommands/RegistrationCommandsPage/index.js +++ b/webpack/assets/javascripts/react_app/routes/RegistrationCommands/RegistrationCommandsPage/index.js @@ -4,6 +4,7 @@ import { useSelector, useDispatch } from 'react-redux'; import { Alert, + Button, Form, Grid, GridItem, @@ -11,9 +12,7 @@ import { Tabs, TabContent, TabTitleText, - Title, } from '@patternfly/react-core'; -import { HelpIcon } from '@patternfly/react-icons'; import { translate as __ } from '../../../common/I18n'; import { @@ -173,30 +172,29 @@ const RegistrationCommandsPage = () => { }, [dispatch, hostGroupId, operatingSystemId]); return ( - + + {__(' Documentation')} + + } + >
handleSubmit(e)} className="registration_commands_form" isHorizontal > - - - - {__('Register Host')} - - - - - {__('Documentation')} - - - { tabContentId="generalTab" tabContentRef={generalTabRef} /> - ( - <> - - {header} - - - - +}) => { + const title = ( + + + {header} + + + ); - {(searchable || beforeToolbarComponent || isLoading || toolbarButtons) && ( - - {beforeToolbarComponent} -
- - {searchable && ( - - )} - - -
- {isLoading && ( -
- -
+ return ( + <> + + {header} + + + {(customBreadcrumbs || breadcrumbOptions) && ( + + + + )} + + {(searchable || !toolbarButtons) && ( + + + + )} + + {(searchable || + beforeToolbarComponent || + isLoading || + toolbarButtons) && ( + + {beforeToolbarComponent} +
+ + {!searchable && title} + {searchable && ( + )} - {toolbarButtons} -
- -
+ + +
+ {isLoading && ( +
+ +
+ )} + {toolbarButtons} +
+ +
+
+ )} + + {children} - )} - - {children} - - -); + + ); +}; PageLayout.propTypes = { children: PropTypes.node.isRequired,