15765 fleet re introduce cluster groups selector for target clusters #16259
+632
−35
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #15765
Occurred changes and/or fixed issues
Added previous option of having cluster group to the App Bundles on Fleet.
shell/assets/translations/en-us.yaml Changed some structure and added new labels for the cluster group
shell/components/fleet/FleetClusterTargets/index.vue Main file to be changed, added the Cluster Group options. Grouped the Label and Name together into Clusters.
shell/components/fleet/tests/FleetClusterTargets.test.ts Test file created
shell/utils/tests/fleet.test.ts Changed test to allow ClusterGroup as "clusters" instead of "advanced"
shell/utils/fleet.ts Changed to remove clusterGroup from the "advanced" option and added to "clusters"
Bug found: There is a bug going back and forth on the page resets the Target part. It resets after the second back and forth.
Technical notes summary
Previously ClusterGroup and Name were not added together. On this implementation it is added together and seems to be working.
ClusterGroupSelector still considered as an "advanced" case.
The control of the Cluster in the list is done by the utils/fleet.ts so that has not changed.
Most of the logic has been copied from the old code to avoid any problems and added to the current code.
Areas or cases that should be tested
Areas which could experience regressions
Screenshot/Video
View:
Edit:

Empty State:
Selected:

Checklist
Admin,Standard UserandUser Base