This commit is contained in:
Youngkyun Kim 2016-09-01 07:39:44 -04:00
parent 101fd59a69
commit f424337c8f
3 changed files with 5 additions and 6 deletions

View File

@ -94,6 +94,9 @@ class VolumeController < ApplicationController
mount_point = params[:mount_point] mount_point = params[:mount_point]
volume_name = volume_name.delete(' ') volume_name = volume_name.delete(' ')
puts "mount -t glusterfs " + @config["host_ip"] + ":/" + volume_name + " " + mount_point 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' redirect_to '/volume/index'
end end

View File

@ -71,15 +71,11 @@
<label class="control-label col-md-3 col-sm-3 col-xs-3" for="mount_point">Mount Point</label> <label class="control-label col-md-3 col-sm-3 col-xs-3" for="mount_point">Mount Point</label>
<div class="col-md-6 col-sm-6 col-xs-12"><input type="text" name="mount_point" required="required" class="form-control"></div> <div class="col-md-6 col-sm-6 col-xs-12"><input type="text" name="mount_point" required="required" class="form-control"></div>
</div> </div>
<input type="hidden" name="volume_name" ><%=t['Volume Name']%></input> <input type="hidden" name="volume_name" value="<%=t['Volume Name']%>" />
<button class="btn btn-app" type="submit"> <button class="btn btn-app" type="submit">
<i class="fa fa-upload"></i> Mount <i class="fa fa-upload"></i> Mount
</button> </button>
</form> </form>
<a class="btn btn-app" href="/volume/mount/<%=t['Volume Name']%>">
<i class="fa fa-upload"></i> Mount
</a>
<% end %> <% end %>
</div> </div>

View File

@ -10,7 +10,7 @@ Rails.application.routes.draw do
# See how all your routes lay out with "rake routes". # See how all your routes lay out with "rake routes".
# You can have the root of your site routed with "root" # You can have the root of your site routed with "root"
root 'plainpage#index' root 'home#index'
get 'index' => 'plainpage#index' get 'index' => 'plainpage#index'