ManageIQ / manageiq-ui-classic

Classic UI of ManageIQ
Apache License 2.0
50 stars 358 forks source link

RESTful conversion potential leftovers/bugs #6307

Open miq-bot opened 5 years ago

miq-bot commented 5 years ago

These places redirect to show w/o checking if the target controller is restful. See https://github.com/ManageIQ/manageiq/issues/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 https://github.com/ManageIQ/manageiq/issues/10021, originally opened by @martinpovolny

miq-bot commented 4 years ago

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.

Fryguy commented 4 years ago

@himdel Are these still issues?

himdel commented 4 years ago

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)

chessbyte commented 3 years ago

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

kavyanekkalapu commented 3 years ago

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

miq-bot commented 1 year ago

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.