-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(RHINENG-8561): Mark CentOS systems and provide more details (#2160)
* feat(RHINENG-8561): Show conversion label for CentOS systems Implements https://issues.redhat.com/browse/RHINENG-8561. This adds a conversion label for CentOS systems in Inventory table page. * feat(RHINENG-8561): Show CentOS label for appropriate systems Implements https://issues.redhat.com/browse/RHINENG-8561. This make the CentOS label appear at the host details page when viewing a CentOS system.
- Loading branch information
Showing
7 changed files
with
180 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import '@testing-library/jest-dom'; | ||
import { render, screen } from '@testing-library/react'; | ||
import React from 'react'; | ||
import FactsInfo from './FactsInfo'; | ||
|
||
describe('FactsInfo', () => { | ||
it('should render extra label for CentOS system', () => { | ||
render( | ||
<FactsInfo | ||
loaded | ||
entity={{ | ||
system_profile: { | ||
operating_system: { | ||
name: 'CentOS Linux', | ||
}, | ||
}, | ||
}} | ||
/> | ||
); | ||
|
||
expect(screen.getByText(/centos linux system/i)).toBeVisible(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
src/components/InventoryTable/ConversionPopover/ConversionPopover.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import { | ||
Button, | ||
Label, | ||
Popover, | ||
Text, | ||
TextContent, | ||
} from '@patternfly/react-core'; | ||
import useInsightsNavigate from '@redhat-cloud-services/frontend-components-utilities/useInsightsNavigate'; | ||
import React from 'react'; | ||
|
||
const ConversionPopover = () => { | ||
const navigate = useInsightsNavigate('tasks'); | ||
|
||
return ( | ||
<Popover | ||
hasAutoWidth | ||
aria-label="CentOS conversion alert popover" | ||
headerContent={'Convert this system to RHEL'} | ||
bodyContent={ | ||
<TextContent> | ||
<Text style={{ maxWidth: '380px' }}> | ||
On June 30, 2024, CentOS Linux 7 will reach End of Life (EOL). | ||
</Text> | ||
<Text style={{ maxWidth: '380px' }}> | ||
Red Hat can help migrate CentOS Linux 7 users to maintain continuity | ||
in their environment after the EOL date, whether they’re on premise | ||
or in the cloud. | ||
</Text> | ||
<Text> | ||
<a | ||
href="https://www.redhat.com/en/technologies/linux-platforms/enterprise-linux/centos-migration" | ||
target="_blank" | ||
rel="noreferrer" | ||
> | ||
Learn more about CentOS Migration | ||
</a> | ||
</Text> | ||
</TextContent> | ||
} | ||
footerContent={ | ||
<Button | ||
variant="secondary" | ||
onClick={() => navigate('/available#pre-conversion-analysis')} | ||
> | ||
Run a pre-conversion analysis of this system | ||
</Button> | ||
} | ||
> | ||
<Label isCompact color="cyan"> | ||
Convert system to RHEL | ||
</Label> | ||
</Popover> | ||
); | ||
}; | ||
|
||
export { ConversionPopover }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters