Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added show_networks route to frontend.

  • Loading branch information...
commit 50cfef05e8c59ffbe306b4dda82fcf9a7f31eff3 1 parent 536bfc4
@rakshasa rakshasa authored
View
5 frontend/dcmgr_gui/app/controllers/networks_controller.rb
@@ -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})
View
1  frontend/dcmgr_gui/config/routes.rb
@@ -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'
Please sign in to comment.
Something went wrong with that request. Please try again.