dashboard icon indicating copy to clipboard operation
dashboard copied to clipboard

Check if Harvester cluster import/edit uses Ember

Open nwmac opened this issue 10 months ago • 2 comments

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

nwmac avatar May 07 '25 09:05 nwmac

https://github.com/user-attachments/assets/76f465fd-e724-455f-80a1-3c4366d6338b

eva-vashkevich avatar May 13 '25 16:05 eva-vashkevich

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

IsaSih avatar May 20 '25 21:05 IsaSih

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

IsaSih avatar Jul 29 '25 21:07 IsaSih

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)

richard-cox avatar Jul 30 '25 09:07 richard-cox

This can be pushed to 2.13 with a backport to 2.12.1

nwmac avatar Jul 30 '25 09:07 nwmac

/backport 2.12.1

nwmac avatar Jul 30 '25 09:07 nwmac

Not creating port issue, milestone 2.12.1 does not exist or is not an open milestone

github-actions[bot] avatar Jul 30 '25 09:07 github-actions[bot]

/backport v2.12.1

nwmac avatar Jul 30 '25 09:07 nwmac

  • ~gambling that the Edit Config option 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 Configuration Config tab 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

richard-cox avatar Jul 30 '25 14:07 richard-cox

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. Image

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

eva-vashkevich avatar Jul 30 '25 21:07 eva-vashkevich

@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

eva-vashkevich avatar Jul 30 '25 21:07 eva-vashkevich

  • gambling that the Edit Config option in three dot action menu in list and detail pages works correctly (takes user to virtualisation management)

    • the issue here is that the Show Configuration Config tab 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 disableResourceDetailDrawer and we won't show the CTA button or the menu item.
  • The resource can define disableResourceDetailDrawerConfigTab and 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.

codyrancher avatar Jul 30 '25 22:07 codyrancher

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

richard-cox avatar Jul 31 '25 07:07 richard-cox

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

Image

IsaSih avatar Oct 24 '25 20:10 IsaSih