Check if Harvester cluster import/edit uses Ember
As title says - we want to reduce Ember pages - need to check if Ember is still used for Harvester clusters After discussion with Harvester team, we decided that editing Harvester cluster should not be allowed from Cluster management page
https://github.com/user-attachments/assets/76f465fd-e724-455f-80a1-3c4366d6338b
Ember UI is being rendered in the Edit Config page via Clusters Management for Harvester imported clusters. Please, see https://github.com/rancher/dashboard/issues/14171#issuecomment-2823124914
I'm reopening the issue:
There's still a way to both see the config file and edit the harvester cluster via cluster management that loads the Ember UI.
Repro steps:
1- In global settings, enable feature flag harvester-baremetal-container-workload
2- Import a harvester cluster via the harvester UI extension
3- Via clusters management, select the harvester cluster
4- Select Show Configuration
5- Observe that the side tab does not load and the Ember UI with the config form loads in the background
6- Click the Edit Configuration button in the tab
7- See the Ember page load and the user is still able to edit a harvester cluster via cluster management
Validated in
Rancher v2.12.0-rc2 Dashboard v2.12.0-rc2 Rancher Prime CLI v2.12.0-rc.1
https://github.com/user-attachments/assets/cc85d47c-741b-41a6-a806-81077dd678ae
I think this can be bumped
- The bug is only exposed when the experimental harvester baremetal feature is enabled
- The bug only happens from the detail page and not the main cluster management list (TBD)
- The user can continue to manage the cluster from the Virtualization Management cluster list (as before, which when this change works is where the user is taken to when editing the cluster from cluster management)
This can be pushed to 2.13 with a backport to 2.12.1
/backport 2.12.1
Not creating port issue, milestone 2.12.1 does not exist or is not an open milestone
/backport v2.12.1
- ~gambling that the
Edit Configoption in three dot action menu in list and detail pages works correctly (takes user to virtualisation management)~ This is wrong. We don't allow edits of that cluster type - the issue here is that the
Show ConfigurationConfigtab handles it the old way by trying to embed ember, which takes over the core background.- we need a way to disable the show config button (cc @codyrancher) OR disable reaching the detail page for this specific type of cluster
- this could be spun out to a different issue
Hi @richard-cox what do you mean by "gambling that the Edit Config option in three dot action menu in list and detail pages works correctly"? I don't think we have that option in the list page.
Currently, we allow users to view yaml from Cluster Management but not edit it. Should we do the same for detail page? ie only allow users to view yaml when clicked on 'Show Configuration'? Or should we just remove 'Show Configuration' completely?
Here is what it would look like if we only supported showing YAML: https://github.com/user-attachments/assets/99b39e48-765c-42d9-97da-a44264f6acf7
@richard-cox @a110605 do you know why here https://github.com/rancher/dashboard/blob/master/pkg/harvester-manager/models/harvesterhci.io.management.cluster.js#L41 canEdit is set to false for Harvester?
Additionally, do we want to hide 'Show Configuration' from Cluster Manager as well?
https://github.com/user-attachments/assets/82fbd2ee-3546-4fd9-92c6-8c2ed6956c44
gambling that the
Edit Configoption in three dot action menu in list and detail pages works correctly (takes user to virtualisation management)
the issue here is that the
Show ConfigurationConfigtab handles it the old way by trying to embed ember, which takes over the core background.
- we need a way to disable the show config button (cc @codyrancher) OR disable reaching the detail page for this specific type of cluster
- this could be spun out to a different issue
We already support both options:
- The resource can define
disableResourceDetailDrawerand we won't show the CTA button or the menu item. - The resource can define
disableResourceDetailDrawerConfigTaband we won't show the Config tab in the Resource Detail Drawer.
Edit: Looks like @eva-vashkevich already found those based on the opened pr.
what do you mean by "gambling that the Edit Config option in three dot action menu in list and detail pages works correctly"? I don't think we have that option in the list page.
sorry, got this wrong and updated my comment. bottom line that the functionality already added is fine, and it's just this new edge case we need to cater for.
Here is what it would look like if we only supported showing YAML: https://github.com/user-attachments/assets/99b39e48-765c-42d9-97da-a44264f6acf7
that looks good
do you know why here https://github.com/rancher/dashboard/blob/master/pkg/harvester-manager/models/harvesterhci.io.management.cluster.js#L41 canEdit is set to false for Harvester?
not sure, is that the type that powers the virtualisation management (harvester) cluster list? looks like it's super old code
Additionally, do we want to hide 'Show Configuration' from Cluster Manager as well? The behaviour should be the same when show config is clicked from the cluster management cluster lit and cluster management cluster detail page, which i think should happen automatically if applied in one place
Works as expected. Ember UI is not rendered anymore for harvester clusters. Validated in Rancher v2.13.0-alpha3 Dashboard v2.13.0-alpha2 Rancher CLI v2.12.0-rc.1
https://github.com/user-attachments/assets/55ebbac6-45aa-4b34-afad-9ef37c6319ce