From f424337c8f4002a445738d921dd01afeb038eb9a Mon Sep 17 00:00:00 2001 From: Youngkyun Kim Date: Thu, 1 Sep 2016 07:39:44 -0400 Subject: [PATCH] update --- app/controllers/volume_controller.rb | 3 +++ app/views/volume/index.html.erb | 6 +----- config/routes.rb | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) 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'