Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RESTful conversion potential leftovers/bugs #6307

Open
miq-bot opened this issue Oct 16, 2019 · 6 comments
Open

RESTful conversion potential leftovers/bugs #6307

miq-bot opened this issue Oct 16, 2019 · 6 comments

Comments

@miq-bot
Copy link
Member

miq-bot commented Oct 16, 2019

These places redirect to show w/o checking if the target controller is restful. See ManageIQ/manageiq#10020

devil - [~/Projects/manageiq] (json_more)$ ack javascript_redirect.*show app/ | grep -v show_list | grep show
app/controllers/cloud_volume_controller.rb:208:      javascript_redirect :action => "show", :id => @volume.id.to_s
app/controllers/cloud_volume_controller.rb:246:      javascript_redirect :action => "show", :id => @volume.id.to_s
app/controllers/cloud_volume_controller.rb:357:      javascript_redirect :action => "show", :id => @volume.id
app/controllers/storage_manager_controller.rb:175:        javascript_redirect :action => 'show', :id => @sm.id.to_s, :flash_msg => _("%{model} \"%{name}\" was saved") % {:model => ui_lookup(:model => "StorageManager"), :name => update_sm.name}
app/controllers/orchestration_stack_controller.rb:258:    javascript_redirect :controller => 'catalog', :action => 'ot_show', :id => template.id
app/controllers/host_controller.rb:365:          javascript_redirect :action => "show", :id => @host.id.to_s
app/controllers/dashboard_controller.rb:220:    javascript_redirect :action => 'show'
app/controllers/dashboard_controller.rb:302:      javascript_redirect :action => 'show'
app/controllers/dashboard_controller.rb:326:        javascript_redirect :action => 'show'
app/controllers/ems_common.rb:275:      javascript_redirect :action => 'show', :id => @ems.id.to_s, :flash_msg => flash
app/controllers/vm_common.rb:427:    javascript_redirect :action => "show", :id => base[1], :vm_tree => "vmtree_info"
app/controllers/vm_common.rb:736:        javascript_redirect :action => 'show', :id => @record.id, :flash_msg => msg
app/controllers/vm_common.rb:748:        javascript_redirect :action => 'show', :id => @record.id, :flash_msg => msg

Each of these places needs to be revisited and checked to see if the target controller might be restfull. In such case a restful route needs to be used.


This issue was moved to this repository from ManageIQ/manageiq#10021, originally opened by @martinpovolny

@miq-bot
Copy link
Member Author

miq-bot commented Jun 11, 2020

This issue has been automatically marked as stale because it has not been updated for at least 3 months.

If you can still reproduce this issue on the current release or on master, please reply with all of the information you have about it in order to keep the issue open.

Thank you for all your contributions! More information about the ManageIQ triage process can be found in the traige process documentation.

@miq-bot miq-bot added the stale label Jun 11, 2020
@Fryguy Fryguy removed the stale label Jul 6, 2020
@Fryguy
Copy link
Member

Fryguy commented Jul 6, 2020

@himdel Are these still issues?

@himdel
Copy link
Contributor

himdel commented Jul 7, 2020

Potentially, yes.

As long as we have restful and non-restful controllers, this can be a problem.

We should convert ems_cloud, ems_infra, ems_physical_infra, ems_container and ems_network to use the same routing logic as the rest of the app.

(use url_for_only_path, not ems_path, new_ems_path or any other magic _path; drop restful_routed?; drop resouces lines from config/routes.rb and fix any toolbar buttons trying to generate the restful paths magically, including miqToolbarOnClick)

@himdel himdel added the pinned label Jul 7, 2020
@gtanzillo gtanzillo removed the pinned label Aug 31, 2020
@chessbyte
Copy link
Member

@kavyanekkalapu do you know if we made any progress on these?

@kavyanekkalapu
Copy link
Member

@chessbyte I don't think so. I can see restful_routed? for sure in code. need to search remaining paths.

@miq-bot
Copy link
Member Author

miq-bot commented Feb 27, 2023

This issue has been automatically marked as stale because it has not been updated for at least 3 months.

If you can still reproduce this issue on the current release or on master, please reply with all of the information you have about it in order to keep the issue open.

Thank you for all your contributions! More information about the ManageIQ triage process can be found in the triage process documentation.

@miq-bot miq-bot added the stale label Feb 27, 2023
@Fryguy Fryguy removed the stale label Mar 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants