File tree 2 files changed +9
-2
lines changed
webpack/assets/javascripts/react_app/components/HostDetails
2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ import { HOST_STATUSES_KEY } from './Constants';
9
9
import { APIActions } from '../../../redux/API' ;
10
10
import { selectAPIResponse } from '../../../redux/API/APISelectors' ;
11
11
12
- const GlobalStatus = ( { hostName } ) => {
12
+ const GlobalStatus = ( { hostName, canForgetStatuses } ) => {
13
13
const [ modalStatus , setModalStatus ] = useState ( false ) ;
14
14
const dispatch = useDispatch ( ) ;
15
15
@@ -41,13 +41,15 @@ const GlobalStatus = ({ hostName }) => {
41
41
onClose = { ( ) => {
42
42
setModalStatus ( false ) ;
43
43
} }
44
+ canForgetStatuses = { canForgetStatuses }
44
45
/>
45
46
</ >
46
47
) ;
47
48
} ;
48
49
49
50
GlobalStatus . propTypes = {
50
51
hostName : PropTypes . string . isRequired ,
52
+ canForgetStatuses : PropTypes . bool . isRequired ,
51
53
} ;
52
54
53
55
export default GlobalStatus ;
Original file line number Diff line number Diff line change @@ -142,7 +142,12 @@ const HostDetails = ({
142
142
</ div >
143
143
< Split style = { { display : 'inline-flex' } } hasGutter >
144
144
< SplitItem >
145
- < HostGlobalStatus hostName = { id } />
145
+ < HostGlobalStatus
146
+ hostName = { id }
147
+ canForgetStatuses = {
148
+ ! ! response ?. permissions ?. forget_status_hosts
149
+ }
150
+ />
146
151
</ SplitItem >
147
152
< SplitItem >
148
153
< Label
You can’t perform that action at this time.
0 commit comments