11import React , { useEffect } from 'react' ;
22import { useSelector , useDispatch } from 'react-redux' ;
33
4- import { DropdownItem , DropdownGroup } from '@patternfly/react-core/deprecated' ;
4+ import {
5+ DropdownItem ,
6+ DropdownGroup ,
7+ DropdownList ,
8+ Divider ,
9+ } from '@patternfly/react-core' ;
510import {
611 BanIcon ,
712 BuildIcon ,
@@ -22,6 +27,7 @@ import {
2227 selectIsLoading ,
2328 selectBootdiskOptions ,
2429} from './HostBootdiskButtonsSelectors' ;
30+ import './HostBootdiskButtons.scss' ;
2531
2632const HostBootdiskButtons = ( ) => {
2733 const dispatch = useDispatch ( ) ;
@@ -56,7 +62,7 @@ const HostBootdiskButtons = () => {
5662 content = options . actions . map ( ( action , i ) => (
5763 < DropdownItem
5864 key = { `bootdisk-${ i } ` }
59- href = { foremanUrl ( action . link ) }
65+ to = { foremanUrl ( action . link ) }
6066 isDisabled = { action . disabled }
6167 description = { action . description }
6268 icon = { iconComponent ( action . icon ) }
@@ -71,12 +77,15 @@ const HostBootdiskButtons = () => {
7177 key = "bootdisk-unavailable"
7278 ouiaId = "bootdisk button unavailable"
7379 component = "button"
74- href = "#"
75- tooltip = { sprintf (
76- __ ( 'Boot disk download not available for %s architecture' ) ,
77- options . architectureName
78- ) }
79- tooltipProps = { { entryDelay : 0 , exitDelay : 0 } }
80+ to = "#"
81+ tooltipProps = { {
82+ content : sprintf (
83+ __ ( 'Boot disk download not available for %s architecture' ) ,
84+ options . architectureName
85+ ) ,
86+ entryDelay : 0 ,
87+ exitDelay : 0 ,
88+ } }
8089 icon = { < BanIcon /> }
8190 >
8291 { __ ( 'Not available' ) }
@@ -85,9 +94,19 @@ const HostBootdiskButtons = () => {
8594 }
8695
8796 return (
88- < DropdownGroup label = { __ ( 'Boot disk' ) } key = "bootdisk-group" >
89- { isLoading ? < Loading showText = { false } /> : content }
90- </ DropdownGroup >
97+ < >
98+ < Divider component = "li" />
99+ < DropdownGroup
100+ className = "bootdisk-group-group"
101+ label = { __ ( 'Boot disk' ) }
102+ key = "bootdisk-group"
103+ >
104+ < DropdownList >
105+ { isLoading ? < Loading showText = { false } /> : content }
106+ </ DropdownList >
107+ </ DropdownGroup >
108+ < Divider key = "separator" />
109+ </ >
91110 ) ;
92111} ;
93112
0 commit comments