Project

General

Profile

« Previous | Next » 

Revision 406b34f1

Added by Tomer Brisker about 8 years ago

Fixes #14341 - List all images for compute resource

Previously, the listing was paginated, but since the table is loaded
via ajax and handled by datatables, the pagination had no effect,
leading to a list limited to the max per page (20 usually).
Also, improved the lookup to only bring the needed data.

View differences:

test/functional/images_controller_test.rb
# This value is tested by the deprecation warning in application_controller
# so we need to set it or the test will crash
request.env['REQUEST_URI']="compute_resources/#{@image.compute_resource_id}/images"
get :index, { :format => :json, :compute_resource_id => @image.compute_resource_id }, set_session_user
get :index, { :format => :json, :compute_resource_id => @image.compute_resource_id, :operatingsystem_id => @image.operatingsystem_id, :architecture_id => @image.architecture_id }, set_session_user
assert_response :success
body = JSON.parse(response.body)
assert_equal 2, body.size

Also available in: Unified diff