Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(THEEDGE-3585): Allow immutable systems selection in group details empty state #2057

Conversation

ldjebran
Copy link
Contributor

@ldjebran ldjebran commented Oct 12, 2023

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.

Note: The group details view has no immutable tab for the moment that will be added in another task.

FIXES: https://issues.redhat.com/browse/THEEDGE-3585

inventory-group-details-add-systems-empty-state-2023-10-12 15-18

@ldjebran ldjebran requested a review from a team as a code owner October 12, 2023 13:49
@ldjebran ldjebran force-pushed the group-details-empty-add-edge-systems-tab branch from 5b4af72 to d70baa0 Compare October 12, 2023 17:12
@ldjebran ldjebran changed the title inventory-group: Allow immutable systems selection in group details empty state. feet(THEEDGE-3585): Allow immutable systems selection in group details empty state. Oct 12, 2023
@ldjebran ldjebran force-pushed the group-details-empty-add-edge-systems-tab branch from d70baa0 to 013ae05 Compare October 12, 2023 17:19
@ldjebran ldjebran changed the title feet(THEEDGE-3585): Allow immutable systems selection in group details empty state. feat(THEEDGE-3585): Allow immutable systems selection in group details empty state. Oct 12, 2023
@ldjebran ldjebran changed the title feat(THEEDGE-3585): Allow immutable systems selection in group details empty state. feat(THEEDGE-3585): Allow immutable systems selection in group details empty state Oct 12, 2023
@ldjebran ldjebran force-pushed the group-details-empty-add-edge-systems-tab branch 4 times, most recently from 28c28b4 to 20dd3dd Compare October 13, 2023 08:41
@codecov-commenter
Copy link

codecov-commenter commented Oct 13, 2023

Codecov Report

Attention: 16 lines in your changes are missing coverage. Please review.

Files Coverage Δ
...onents/InventoryGroupDetail/NoSystemsEmptyState.js 80.00% <ø> (ø)
src/Utilities/edge.js 18.75% <33.33%> (+18.75%) ⬆️
.../InventoryTabs/ImmutableDevices/EdgeDevicesView.js 25.00% <25.00%> (ø)
...s/InventoryGroups/Modals/AddSystemsToGroupModal.js 75.55% <68.57%> (-4.45%) ⬇️

📢 Thoughts on this report? Let us know!.

@ldjebran ldjebran force-pushed the group-details-empty-add-edge-systems-tab branch 2 times, most recently from c0ea5e3 to b214de0 Compare October 13, 2023 10:15
@ldjebran
Copy link
Contributor Author

@mkholjuraev @bastilian updated and responded to comments, please revisit.

@ldjebran ldjebran force-pushed the group-details-empty-add-edge-systems-tab branch from b214de0 to 9468c66 Compare October 13, 2023 13:39
@ldjebran
Copy link
Contributor Author

resolved conflicts

Copy link
Contributor

@mkholjuraev mkholjuraev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Did not face issues while testing

@ldjebran ldjebran force-pushed the group-details-empty-add-edge-systems-tab branch from 9468c66 to 84ae50c Compare October 16, 2023 17:27
@ldjebran
Copy link
Contributor Author

rebased

@mkholjuraev
Copy link
Contributor

/retest

1 similar comment
@ldjebran
Copy link
Contributor Author

/retest

@ldjebran ldjebran force-pushed the group-details-empty-add-edge-systems-tab branch from 84ae50c to 2ebece9 Compare October 17, 2023 12:21
@bastilian
Copy link
Member

/retest

@ldjebran ldjebran force-pushed the group-details-empty-add-edge-systems-tab branch from 2ebece9 to 7a238cf Compare October 18, 2023 10:23
@ldjebran
Copy link
Contributor Author

Seems the automation was broken, as was not able to find npm.
Updated commit message, to force automation to restart, as see a newer PR succeeded.

…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 modal 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, when the immutable system has a group to disable adding system and show the warning message.

FIXES: https://issues.redhat.com/browse/THEEDGE-3585
@ldjebran ldjebran force-pushed the group-details-empty-add-edge-systems-tab branch from 7a238cf to 1216d94 Compare October 18, 2023 11:42
@adonispuente
Copy link
Contributor

/retest

@mkholjuraev mkholjuraev merged commit b5299c0 into RedHatInsights:master Oct 18, 2023
1 check passed
@gkarat
Copy link
Contributor

gkarat commented Oct 18, 2023

🎉 This PR is included in version 1.53.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

acosferreira pushed a commit to acosferreira/insights-inventory-frontend that referenced this pull request Oct 24, 2023
…s view empty state (RedHatInsights#2057)

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 modal 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, when the immutable system has a group to disable adding system and show the warning message.

FIXES: https://issues.redhat.com/browse/THEEDGE-3585
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants