@@ -11,6 +11,7 @@ import {
1111 Container ,
1212 Header ,
1313 Hotspot ,
14+ InfoLink ,
1415 Loader ,
1516 Popover ,
1617 SelectCSD ,
@@ -19,7 +20,7 @@ import {
1920} from 'components' ;
2021import { HotspotIds } from 'layouts/AppLayout/TutorialPanel/constants' ;
2122
22- import { useBreadcrumbs , useNotifications } from 'hooks' ;
23+ import { useBreadcrumbs , useHelpPanel , useNotifications } from 'hooks' ;
2324import { riseRouterException } from 'libs' ;
2425import { ROUTES } from 'routes' ;
2526import { useGetProjectQuery , useUpdateProjectMembersMutation } from 'services/project' ;
@@ -33,6 +34,7 @@ import { useBackendsTable } from '../../Backends/hooks';
3334import { BackendsTable } from '../../Backends/Table' ;
3435import { GatewaysTable } from '../../Gateways' ;
3536import { useGatewaysTable } from '../../Gateways/hooks' ;
37+ import { CLI_INFO } from './constants' ;
3638
3739import styles from './styles.module.scss' ;
3840
@@ -41,7 +43,9 @@ export const ProjectSettings: React.FC = () => {
4143 const params = useParams ( ) ;
4244 const navigate = useNavigate ( ) ;
4345 const paramProjectName = params . projectName ?? '' ;
46+ const [ openHelpPanel ] = useHelpPanel ( ) ;
4447 const [ configCliCommand , copyCliCommand ] = useConfigProjectCliCommand ( { projectName : paramProjectName } ) ;
48+
4549 const { isAvailableDeletingPermission, isProjectManager, isProjectAdmin, isAvailableProjectManaging } =
4650 useCheckAvailableProjectPermission ( ) ;
4751
@@ -132,22 +136,7 @@ export const ProjectSettings: React.FC = () => {
132136 < SpaceBetween size = "l" >
133137 < Container
134138 header = {
135- < Header
136- variant = "h2"
137- actions = {
138- < Popover
139- dismissButton = { false }
140- position = "top"
141- size = "small"
142- triggerType = "custom"
143- content = { < StatusIndicator type = "success" > { t ( 'common.copied' ) } </ StatusIndicator > }
144- >
145- < Button formAction = "none" iconName = "copy" variant = "normal" onClick = { copyCliCommand } >
146- { t ( 'common.copy' ) }
147- </ Button >
148- </ Popover >
149- }
150- >
139+ < Header variant = "h2" info = { < InfoLink onFollow = { ( ) => openHelpPanel ( CLI_INFO ) } /> } >
151140 { t ( 'projects.edit.cli' ) }
152141 </ Header >
153142 }
@@ -157,9 +146,28 @@ export const ProjectSettings: React.FC = () => {
157146 Run the following commands to set up the CLI for this project
158147 </ Box >
159148
160- < Hotspot hotspotId = { HotspotIds . CONFIGURE_CLI_COMMAND } >
161- < Code > { configCliCommand } </ Code >
162- </ Hotspot >
149+ < div className = { styles . codeWrapper } >
150+ < Hotspot hotspotId = { HotspotIds . CONFIGURE_CLI_COMMAND } >
151+ < Code className = { styles . code } > { configCliCommand } </ Code >
152+
153+ < div className = { styles . copy } >
154+ < Popover
155+ dismissButton = { false }
156+ position = "top"
157+ size = "small"
158+ triggerType = "custom"
159+ content = { < StatusIndicator type = "success" > { t ( 'common.copied' ) } </ StatusIndicator > }
160+ >
161+ < Button
162+ formAction = "none"
163+ iconName = "copy"
164+ variant = "normal"
165+ onClick = { copyCliCommand }
166+ />
167+ </ Popover >
168+ </ div >
169+ </ Hotspot >
170+ </ div >
163171 </ SpaceBetween >
164172 </ Container >
165173
0 commit comments