add mount button

This commit is contained in:
bee0005 2016-08-31 12:29:16 +00:00
parent d5e65393f7
commit 199f2c0c91
3 changed files with 20 additions and 4 deletions

View File

@ -92,4 +92,11 @@ class VolumeController < ApplicationController
files = file_directory(params[:path]) files = file_directory(params[:path])
render :json => {:file => files , :current => @current_dir} render :json => {:file => files , :current => @current_dir}
end end
def mount
puts "@@@@@@@@@@"
puts params[:volume_id]
puts "##########"
redirect_to '/volume/info'
end
end end

View File

@ -53,6 +53,9 @@
Bricks1 : <%=t["Brick1"]%> <br> Bricks1 : <%=t["Brick1"]%> <br>
Options Reconfigured : <%=t["Options Reconfigured"]%> <br> Options Reconfigured : <%=t["Options Reconfigured"]%> <br>
performance.readdir-ahead : <%=t["performance.readdir-ahead"]%> <br> performance.readdir-ahead : <%=t["performance.readdir-ahead"]%> <br>
<a class="btn btn-app" href="/volume/mount/<%=t["Volume ID"]%>">
<i class="fa fa-upload"></i> Mount
</a>
</div> </div>
<div class="col-md-8 col-sm-8 col-xs-8"> <div class="col-md-8 col-sm-8 col-xs-8">

View File

@ -14,13 +14,19 @@ Rails.application.routes.draw do
get 'index' => 'plainpage#index' get 'index' => 'plainpage#index'
#Volume
get 'volume/index' => 'volume#index' get 'volume/index' => 'volume#index'
get 'peer/index' => 'peer#index'
post 'file_upload' => 'volume#file_upload' post 'file_upload' => 'volume#file_upload'
post 'volume/changeDir' => 'volume#checkDir' post 'volume/changeDir' => 'volume#checkDir'
get 'volume/mount/:volume_id' => "volume#mount"
get 'peer/index' => 'peer#index'
# Example of regular route: # Example of regular route:
# get 'products/:id' => 'catalog#view' # get 'products/:id' => 'catalog#view'