Class: MachineImagesController

Inherits:
ApplicationController show all
Defined in:
app/controllers/machine_images_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#dispatch, #get_locales, #is_dcmgr?, #set_application, #set_locale

Instance Method Details

#indexObject



4
5
# File 'app/controllers/machine_images_controller.rb', line 4

def index
end

#listObject



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

#showObject



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

#totalObject



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