Skip to content

Fix vm explorer url - #10244

Open
GilbertCherrie wants to merge 7 commits into
ManageIQ:masterfrom
GilbertCherrie:fix-vm-explorer-url
Open

Fix vm explorer url#10244
GilbertCherrie wants to merge 7 commits into
ManageIQ:masterfrom
GilbertCherrie:fix-vm-explorer-url

Conversation

@GilbertCherrie

@GilbertCherrie GilbertCherrie commented Aug 20, 2026

Copy link
Copy Markdown
Member

Fixes: #6696

Fixes an issue where trying to access URLs related to the VMs:

/vm_or_template/explorer/:id
/vm_cloud/explorer/:id
/vm_infra/explorer/:id

throws an error. This PR fixes this issue and now the page correctly redirects to the correct record.

This PR also fixes the redirect for the storage explorer and catalog explorer with example URLS:

/storage/explorer/:id
/catalog/explorer/:id or /catalog/ot_show/:id (Orchestration templates only, this path already exists on master)

Other explorer fixes:
/miq_ae_class/show/:id (This path already exists on master, this PR just fixes the page)
/miq_ae_customization/editor/:id (This path already exists on master, this PR just fixes the error handling of a bad URL)

Note: The catalog controller only supports the catalog item and orchestration item templates. You can not use raw IDs to direct to service catalogs or catalogs.

Before:
Screenshot 2026-08-20 at 2 32 49 PM

After:
Screenshot 2026-08-20 at 2 33 18 PM

@Fryguy

Fryguy commented Aug 21, 2026

Copy link
Copy Markdown
Member

What happens if someone passes garbarge, for example /explorer/abc

@GilbertCherrie

Copy link
Copy Markdown
Member Author

What happens if someone passes garbarge, for example /explorer/abc

@Fryguy it errors out like this
Screenshot 2026-08-21 at 9 28 01 AM

@GilbertCherrie

Copy link
Copy Markdown
Member Author

@Fryguy I pushed a fix so that bad urls are handled better:
Screenshot 2026-08-21 at 10 23 06 AM

@Fryguy

Fryguy commented Aug 21, 2026

Copy link
Copy Markdown
Member

A few things -

  1. If we want to introduce this in one explorer, let's just introduce them in all of them.
  2. The duplication tells me we can extract this to a single method somewhere, use it in a base explorer class, and get it everywhere

@GilbertCherrie
GilbertCherrie force-pushed the fix-vm-explorer-url branch 3 times, most recently from 88aa546 to 0e154cf Compare August 24, 2026 17:28
@miq-bot

miq-bot commented Aug 25, 2026

Copy link
Copy Markdown
Member

Checked commits GilbertCherrie/manageiq-ui-classic@791787d~...a1a229c with ruby 3.3.10, rubocop 1.88.2, haml-lint 0.76.0, and yamllint 1.37.1
5 files checked, 2 offenses detected

app/controllers/storage_controller.rb

app/controllers/vm_common.rb

@GilbertCherrie

GilbertCherrie commented Aug 25, 2026

Copy link
Copy Markdown
Member Author

@Fryguy I fixed the explorers that needed fixing in this PR. The other explorers can't seem to be fixed as they work inherently differently. I asked AI to come up with an explanation on why they can't be fixed and a summary is:

The common thread: the explorers that can be deep-linked (VMs, Storage, Catalog, Automate) share these traits:

A single dominant model type per controller
:full_ids => false trees where node ids are just prefix-id
An existing external trigger (dashboard widget links, exp_parms, cross-controller redirects) that actually generates those URLs
The others have none of those traits — adding deep-link support would require a non-trivial ancestry reconstruction or model disambiguation layer, and there's no external source generating those URLs anyway.

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.

Visiting /vm_or_template/explorer/:id yields an error

3 participants