diff --git a/app/controllers/volume_controller.rb b/app/controllers/volume_controller.rb index 9915798..dbb0cb2 100644 --- a/app/controllers/volume_controller.rb +++ b/app/controllers/volume_controller.rb @@ -94,6 +94,9 @@ class VolumeController < ApplicationController mount_point = params[:mount_point] volume_name = volume_name.delete(' ') puts "mount -t glusterfs " + @config["host_ip"] + ":/" + volume_name + " " + mount_point + + `mount -t glusterfs #{@config["host_ip"]}:/#{volume_name} #{mount_point}` + redirect_to '/volume/index' end diff --git a/app/views/volume/index.html.erb b/app/views/volume/index.html.erb index 616eebf..f4dd7c9 100644 --- a/app/views/volume/index.html.erb +++ b/app/views/volume/index.html.erb @@ -71,15 +71,11 @@
- <%=t['Volume Name']%> + - - - Mount - <% end %> diff --git a/config/routes.rb b/config/routes.rb index a0361ed..3af3c30 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -10,7 +10,7 @@ Rails.application.routes.draw do # See how all your routes lay out with "rake routes". # You can have the root of your site routed with "root" - root 'plainpage#index' + root 'home#index' get 'index' => 'plainpage#index'