Class: MachineImagesController
Instance Method Summary
collapse
#dispatch, #get_locales, #is_dcmgr?, #set_application, #set_locale
Instance Method Details
#index ⇒ Object
4
5
|
# File 'app/controllers/machine_images_controller.rb', line 4
def index
end
|
#list ⇒ Object
14
15
16
17
18
19
20
21
|
# File 'app/controllers/machine_images_controller.rb', line 14
def list
data = {
:start => params[:start].to_i - 1,
:limit => params[:limit]
}
image = DcmgrResource::Image.list(data)
respond_with(image[0],:to => [:json])
end
|
#show ⇒ Object
7
8
9
10
11
|
# File 'app/controllers/machine_images_controller.rb', line 7
def show
image_id = params[:id]
detail = DcmgrResource::Image.show(image_id)
respond_with(detail,:to => [:json])
end
|
#total ⇒ Object
23
24
25
26
|
# File 'app/controllers/machine_images_controller.rb', line 23
def total
total_resource = DcmgrResource::Image.total_resource
render :json => total_resource
end
|