[16234][fleet] better determine target clusters#16365
Conversation
…n fleet. Fix WorkspaceSwitch to get information from the workspace instead of always resetting.
torchiaf
left a comment
There was a problem hiding this comment.
LGTM - see the comment below
| // in fleet standard user with just the project owner and global git repo permissions | ||
| // returns 'default' | ||
| const initValue = !this.workspace ? this.$store.getters['prefs/get'](LAST_NAMESPACE) : ''; | ||
| const initValue = this.workspace || this.$store.getters['prefs/get'](LAST_NAMESPACE) || ''; |
There was a problem hiding this comment.
We should double-check if this is changing the workspace switch logic.
There was a problem hiding this comment.
Let me do a full report of this case here.
It just prioritizes if the workspace exists in the data.
If it is the default or empty, it should return to the first element.
The LAST_NAMESPACE is used to remember the previous one select and used after creation. It is set only in one place. So the default is only changed when there is a edit of a resounrce.
I thought about using the LAST_NAMESPACE which means I would need to keep setting it.
this.workspace remembers the previous option and select the correct one in case of navigation as well. I thought about removing the LAST_NAMESPACE completely but I was not so sure if there is a specific use case for that one, so I kept as an alternative.
In the end, if the this.workspace is not there, it will be the option selected anyway, and if it is there it would go to empty and than to the first option on the array, now, instead it will go to this.workspace. Which means the usual case of this.workspace empty is still the same.
If you can let me know if there is any case I am not aware of. Or if there were recents problems on this feature.
Summary
Fixes #16234
Occurred changes and/or fixed issues
Files changed:
shell/assets/translations/en-us.yaml - Added new translation for the tabs
shell/components/Drawer/Chrome.vue - Remove footer option and some alignment (small changes)
shell/components/Drawer/DrawerCard.vue - New file for the DrawerCard from the other usage
shell/components/Drawer/ResourceDetailDrawer/ConfigTab.vue - Change to use DrawerCard
shell/components/Drawer/ResourceDetailDrawer/tests/ConfigTab.test.ts - Fixed the test since changed reference
shell/components/Drawer/ResourceDetailDrawer/index.vue - Option to remove the borders added
shell/components/Drawer/types.ts - Added removeFooter option
shell/components/Tabbed/index.vue - Added removeBorder option
shell/components/fleet/FleetClusters.vue - Remove subRows added to remove errors, removeReadyColumns as well to remove those options
shell/components/fleet/FleetResources.vue - Added groupOptions for the FleetResource for the Clusters
shell/components/fleet/dashboard/ResourceDetails.vue - Biggest change, change the entire UI adding the Drawer and the Tabs
shell/components/formatter/FleetSummaryGraph.vue - Added the option to filter the data on the cluster table
shell/models/fleet-application.js - Changed the model to pass the data filtered on the targetClusters
shell/pages/c/_cluster/fleet/index.vue - Added the new options to make the Drawer similar to the other one
Technical notes summary
Areas or cases that should be tested
Areas which could experience regressions
Screenshot/Video
Issue 16234 UI_220f18162ce34150acb4a14b707f35cc-130126-1550-8.pdf



Checklist
Admin,Standard UserandUser Base