Skip to content

Commit

Permalink
Added show_networks route to frontend.
Browse files Browse the repository at this point in the history
  • Loading branch information
rakshasa committed Jun 14, 2012
1 parent 536bfc4 commit 50cfef0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions frontend/dcmgr_gui/app/controllers/networks_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@ def detach
# render :json => res
end

def show_networks
@network = Hijiki::DcmgrResource::Network.list
respond_with(@network[0],:to => [:json])
end

def total
all_resource_count = Hijiki::DcmgrResource::Network.total_resource
all_resources = Hijiki::DcmgrResource::Network.find(:all,:params => {:start => 0, :limit => all_resource_count})
Expand Down
1 change: 1 addition & 0 deletions frontend/dcmgr_gui/config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@
#networks
get 'networks' ,:to => 'networks#index'
get 'networks/list/:id' ,:to => 'networks#list'
get 'networks/all' ,:to => 'networks#show_networks'
get 'networks/total' ,:to => 'networks#total'
get 'networks/show/:id' ,:to => 'networks#show'

Expand Down

0 comments on commit 50cfef0

Please sign in to comment.