-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(THEEDGE-3585): Allow immutable systems selection in group detail…
…s view empty state In the context of edgeParity, when creating a new group and selecting that group, we enter the group details view, because it has no systems added yet an empty state is displayed and Add systems button is displayed also to systems, this PR allow to add conventional and immutable systems in that view. - This should not affect the main add systems button when systems exists in group that's why edgeParityIsAllowed key is added. - Two feature flags has be taken into considerations 'edgeParity.inventory-list' and 'edgeParity.inventory-groups-enabled'. - If there is no immutable systems the immutable tab is not shown. - Label is added in the header when edgeParity is enabled to show the overall number of the selected systems. - The constraint is also taken into account also, when the immutable system has a group to disable adding system and show the warning message. FIXES: https://issues.redhat.com/browse/THEEDGE-3585
- Loading branch information
Showing
4 changed files
with
176 additions
and
20 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
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
30 changes: 30 additions & 0 deletions
30
src/components/InventoryTabs/ImmutableDevices/EdgeDevicesView.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,30 @@ | ||
import React from 'react'; | ||
import AsyncComponent from '@redhat-cloud-services/frontend-components/AsyncComponent'; | ||
import ErrorState from '@redhat-cloud-services/frontend-components/ErrorState'; | ||
import { resolveRelPath } from '../../../Utilities/path'; | ||
import { | ||
getNotificationProp, | ||
manageEdgeInventoryUrlName, | ||
} from '../../../Utilities/edge'; | ||
import { useLocation, useNavigate } from 'react-router-dom'; | ||
import { useDispatch } from 'react-redux'; | ||
|
||
const ImmutableDevicesView = (props) => { | ||
const dispatch = useDispatch(); | ||
const notificationProp = getNotificationProp(dispatch); | ||
return ( | ||
<AsyncComponent | ||
appName="edge" | ||
module="./DevicesView" | ||
ErrorComponent={<ErrorState />} | ||
navigateProp={useNavigate} | ||
locationProp={useLocation} | ||
notificationProp={notificationProp} | ||
pathPrefix={resolveRelPath('')} | ||
urlName={manageEdgeInventoryUrlName} | ||
{...props} | ||
/> | ||
); | ||
}; | ||
|
||
export default ImmutableDevicesView; |