@@ -43,6 +43,8 @@ import { AngleDownIcon, AngleRightIcon, BuildIcon, CheckCircleIcon, CodeBranchIc
4343import { type ImageItem , UseBaseImageModal } from './UseBaseImageModal' ;
4444import BuildImageModal from './BuildImageModal' ;
4545import { ImportPipelineModal } from './ImportPipelineModal' ;
46+ import { NamingModeProvider , useNamingMode , getDisplayName } from '../contexts/NamingModeContext' ;
47+ import { NamingModeToggle } from '../components/NamingModeToggle' ;
4648
4749interface ImageTableRow {
4850 id : string ;
@@ -61,7 +63,8 @@ interface ImageTableRow {
6163 fileExtension : string ;
6264}
6365
64- const Test : React . FunctionComponent = ( ) => {
66+ const TestContent : React . FunctionComponent = ( ) => {
67+ const { namingMode } = useNamingMode ( ) ;
6568 const [ isModalOpen , setIsModalOpen ] = React . useState ( false ) ;
6669 const [ isLaunchModalOpen , setIsLaunchModalOpen ] = React . useState ( false ) ;
6770 const [ isUseBaseImageModalOpen , setIsUseBaseImageModalOpen ] = React . useState ( false ) ;
@@ -817,11 +820,30 @@ const Test: React.FunctionComponent = () => {
817820 < PageSection hasBodyWrapper = { false } style = { { height : '100vh' , display : 'flex' , flexDirection : 'column' , overflow : 'hidden' } } >
818821
819822
820- { /* Header */ }
821- < div style = { {
822- marginBottom : '1.5rem' ,
823- flexShrink : 0
824- } } >
823+ { /* Naming Mode Control Toolbar */ }
824+ < Toolbar style = { {
825+ backgroundColor : '#f8f9fa' ,
826+ border : '1px solid #d2d2d2' ,
827+ borderBottom : 'none' ,
828+ padding : '0.5rem 1.5rem' ,
829+ marginBottom : '0px'
830+ } } >
831+ < ToolbarContent >
832+ < ToolbarItem >
833+ < NamingModeToggle />
834+ </ ToolbarItem >
835+ </ ToolbarContent >
836+ </ Toolbar >
837+
838+ { /* Header */ }
839+ < div style = { {
840+ marginBottom : '1.5rem' ,
841+ flexShrink : 0 ,
842+ border : '1px solid #d2d2d2' ,
843+ borderTop : 'none' ,
844+ backgroundColor : 'white' ,
845+ padding : '2rem 1.5rem'
846+ } } >
825847 < Flex justifyContent = { { default : 'justifyContentSpaceBetween' } } alignItems = { { default : 'alignItemsCenter' } } >
826848 < FlexItem >
827849 < Title headingLevel = "h1" size = "lg" >
@@ -849,7 +871,7 @@ const Test: React.FunctionComponent = () => {
849871 console . log ( 'Build Image button clicked - modal disabled' ) ;
850872 } }
851873 >
852- Button
874+ { getDisplayName ( "Create New Image" , " Button" , namingMode ) }
853875 </ Button >
854876 </ FlexItem >
855877 < FlexItem >
@@ -861,7 +883,7 @@ const Test: React.FunctionComponent = () => {
861883 console . log ( 'Download RHEL button clicked - modal disabled' ) ;
862884 } }
863885 >
864- Button
886+ { getDisplayName ( "Get RHEL Image" , " Button" , namingMode ) }
865887 </ Button >
866888 </ FlexItem >
867889 < FlexItem >
@@ -873,7 +895,7 @@ const Test: React.FunctionComponent = () => {
873895 console . log ( 'Import button clicked - modal disabled' ) ;
874896 } }
875897 >
876- Button
898+ { getDisplayName ( "Load Configuration" , " Button" , namingMode ) }
877899 </ Button >
878900 </ FlexItem >
879901 </ Flex >
@@ -1011,6 +1033,7 @@ const Test: React.FunctionComponent = () => {
10111033 < >
10121034 < ToolbarItem >
10131035 < Button
1036+ semanticName = "Edit Selected Image"
10141037 variant = "primary"
10151038 icon = { < EditIcon /> }
10161039 onClick = { ( ) => {
@@ -1024,28 +1047,30 @@ const Test: React.FunctionComponent = () => {
10241047 } }
10251048 isDisabled = { selectedRows . size !== 1 || hasNonReadySelected }
10261049 >
1027- Edit
1050+ { getDisplayName ( " Edit Selected Image" , "Edit" , namingMode ) }
10281051 </ Button >
10291052 </ ToolbarItem >
10301053
10311054 < ToolbarItem >
10321055 < Button
1056+ semanticName = "Duplicate Selected Images"
10331057 variant = "secondary"
10341058 icon = { < CopyIcon /> }
10351059 onClick = { handleBulkDuplicate }
10361060 isDisabled = { selectedRows . size === 0 || hasNonReadySelected }
10371061 >
1038- Duplicate ({ selectedRows . size } )
1062+ { getDisplayName ( " Duplicate Selected Images" , "Duplicate" , namingMode ) } ({ selectedRows . size } )
10391063 </ Button >
10401064 </ ToolbarItem >
10411065 < ToolbarItem >
10421066 < Button
1067+ semanticName = "Rebuild Selected Images"
10431068 variant = "secondary"
10441069 icon = { < BuildIcon /> }
10451070 onClick = { handleBulkRebuild }
10461071 isDisabled = { selectedRows . size === 0 }
10471072 >
1048- Rebuild ({ selectedRows . size } )
1073+ { getDisplayName ( " Rebuild Selected Images" , "Rebuild" , namingMode ) } ({ selectedRows . size } )
10491074 </ Button >
10501075 </ ToolbarItem >
10511076 </ >
@@ -1098,10 +1123,10 @@ const Test: React.FunctionComponent = () => {
10981123 >
10991124 { sortField === 'image' ? (
11001125 < Tooltip content = { getSortTooltipText ( 'image' , sortDirection ) } >
1101- < span > Header{ getSortIcon ( 'image' ) } </ span >
1126+ < span > { getDisplayName ( "Image Name" , " Header" , namingMode ) } { getSortIcon ( 'image' ) } </ span >
11021127 </ Tooltip >
11031128 ) : (
1104- < > Header{ getSortIcon ( 'image' ) } </ >
1129+ < > { getDisplayName ( "Image Name" , " Header" , namingMode ) } { getSortIcon ( 'image' ) } </ >
11051130 ) }
11061131 </ Th >
11071132 < Th
@@ -1111,10 +1136,10 @@ const Test: React.FunctionComponent = () => {
11111136 >
11121137 { sortField === 'dateUpdated' ? (
11131138 < Tooltip content = { getSortTooltipText ( 'dateUpdated' , sortDirection ) } >
1114- < span > Header{ getSortIcon ( 'dateUpdated' ) } </ span >
1139+ < span > { getDisplayName ( "Last Modified" , " Header" , namingMode ) } { getSortIcon ( 'dateUpdated' ) } </ span >
11151140 </ Tooltip >
11161141 ) : (
1117- < > Header{ getSortIcon ( 'dateUpdated' ) } </ >
1142+ < > { getDisplayName ( "Last Modified" , " Header" , namingMode ) } { getSortIcon ( 'dateUpdated' ) } </ >
11181143 ) }
11191144 </ Th >
11201145 < Th
@@ -1124,10 +1149,10 @@ const Test: React.FunctionComponent = () => {
11241149 >
11251150 { sortField === 'os' ? (
11261151 < Tooltip content = { getSortTooltipText ( 'os' , sortDirection ) } >
1127- < span > Header{ getSortIcon ( 'os' ) } </ span >
1152+ < span > { getDisplayName ( "Operating System" , " Header" , namingMode ) } { getSortIcon ( 'os' ) } </ span >
11281153 </ Tooltip >
11291154 ) : (
1130- < > Header{ getSortIcon ( 'os' ) } </ >
1155+ < > { getDisplayName ( "Operating System" , " Header" , namingMode ) } { getSortIcon ( 'os' ) } </ >
11311156 ) }
11321157 </ Th >
11331158 < Th
@@ -1137,10 +1162,10 @@ const Test: React.FunctionComponent = () => {
11371162 >
11381163 { sortField === 'targetEnvironment' ? (
11391164 < Tooltip content = { getSortTooltipText ( 'targetEnvironment' , sortDirection ) } >
1140- < span > Header{ getSortIcon ( 'targetEnvironment' ) } </ span >
1165+ < span > { getDisplayName ( "Deployment Target" , " Header" , namingMode ) } { getSortIcon ( 'targetEnvironment' ) } </ span >
11411166 </ Tooltip >
11421167 ) : (
1143- < > Header{ getSortIcon ( 'targetEnvironment' ) } </ >
1168+ < > { getDisplayName ( "Deployment Target" , " Header" , namingMode ) } { getSortIcon ( 'targetEnvironment' ) } </ >
11441169 ) }
11451170 </ Th >
11461171
@@ -1151,16 +1176,16 @@ const Test: React.FunctionComponent = () => {
11511176 >
11521177 { sortField === 'status' ? (
11531178 < Tooltip content = { getSortTooltipText ( 'status' , sortDirection ) } >
1154- < span > Header{ getSortIcon ( 'status' ) } </ span >
1179+ < span > { getDisplayName ( "Build Status" , " Header" , namingMode ) } { getSortIcon ( 'status' ) } </ span >
11551180 </ Tooltip >
11561181 ) : (
1157- < > Header{ getSortIcon ( 'status' ) } </ >
1182+ < > { getDisplayName ( "Build Status" , " Header" , namingMode ) } { getSortIcon ( 'status' ) } </ >
11581183 ) }
11591184 </ Th >
11601185 < th
11611186 style = { { padding : '1rem 1.5rem' , textAlign : 'left' , fontWeight : 600 } }
11621187 >
1163- Header
1188+ { getDisplayName ( "Instance" , " Header" , namingMode ) }
11641189 </ th >
11651190 < th style = { { padding : '1rem 1.5rem' , textAlign : 'left' , fontWeight : 600 } } > </ th >
11661191 </ tr >
@@ -1300,7 +1325,7 @@ const Test: React.FunctionComponent = () => {
13001325 handleEditImage ( image ) ;
13011326 } }
13021327 >
1303- Edit
1328+ { getDisplayName ( " Edit Image" , "Edit" , namingMode ) }
13041329 </ DropdownItem >
13051330 < Divider />
13061331
@@ -1310,30 +1335,30 @@ const Test: React.FunctionComponent = () => {
13101335 setOpenDropdowns ( new Set ( ) ) ;
13111336 } }
13121337 >
1313- Duplicate
1338+ { getDisplayName ( " Duplicate Image" , "Duplicate" , namingMode ) }
13141339 </ DropdownItem >
13151340 < DropdownItem
13161341 onClick = { ( ) => {
13171342 console . log ( `Rebuilding ${ image . name } ` ) ;
13181343 setOpenDropdowns ( new Set ( ) ) ;
13191344 } }
13201345 >
1321- Rebuild
1346+ { getDisplayName ( " Rebuild Image" , "Rebuild" , namingMode ) }
13221347 </ DropdownItem >
13231348 < DropdownItem
13241349 onClick = { ( ) => {
13251350 console . log ( `Downloading ${ image . name } ` ) ;
13261351 setOpenDropdowns ( new Set ( ) ) ;
13271352 } }
13281353 >
1329- Download blueprint (.json)
1354+ { getDisplayName ( " Download Blueprint" , "Download blueprint (.json)" , namingMode ) }
13301355 </ DropdownItem >
13311356 < Divider />
13321357 < DropdownItem
13331358 isDanger
13341359 onClick = { ( ) => handleDeleteConfirmation ( image ) }
13351360 >
1336- Delete
1361+ { getDisplayName ( " Delete Image" , "Delete" , namingMode ) }
13371362 </ DropdownItem >
13381363 </ DropdownList >
13391364 </ Dropdown >
@@ -1494,10 +1519,10 @@ const Test: React.FunctionComponent = () => {
14941519 marginRight : '-8px' // Align with X button position
14951520 } } >
14961521 < Button variant = "danger" onClick = { handleDeleteConfirm } >
1497- Delete
1522+ { getDisplayName ( " Delete Image" , "Delete" , namingMode ) }
14981523 </ Button >
14991524 < Button variant = "link" onClick = { handleDeleteCancel } >
1500- Cancel
1525+ { getDisplayName ( " Cancel Action" , "Cancel" , namingMode ) }
15011526 </ Button >
15021527 </ div >
15031528 </ ModalBody >
@@ -1531,7 +1556,7 @@ const Test: React.FunctionComponent = () => {
15311556 padding : '0.25rem 0.5rem'
15321557 } }
15331558 >
1534- Watch Demo
1559+ { getDisplayName ( " Watch Demo Video" , "Watch Demo" , namingMode ) }
15351560 </ Button >
15361561 </ FlexItem >
15371562 < FlexItem >
@@ -1572,4 +1597,12 @@ const Test: React.FunctionComponent = () => {
15721597 ) ;
15731598} ;
15741599
1600+ const Test : React . FunctionComponent = ( ) => {
1601+ return (
1602+ < NamingModeProvider >
1603+ < TestContent />
1604+ </ NamingModeProvider >
1605+ ) ;
1606+ } ;
1607+
15751608export { Test } ;
0 commit comments