From 199f2c0c91561e55e4d29a1e99a0b15c18b2d97c Mon Sep 17 00:00:00 2001 From: bee0005 Date: Wed, 31 Aug 2016 12:29:16 +0000 Subject: [PATCH] add mount button --- app/controllers/volume_controller.rb | 7 +++++++ app/views/volume/index.html.erb | 3 +++ config/routes.rb | 14 ++++++++++---- 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/app/controllers/volume_controller.rb b/app/controllers/volume_controller.rb index 3b452c3..9bc98a8 100644 --- a/app/controllers/volume_controller.rb +++ b/app/controllers/volume_controller.rb @@ -92,4 +92,11 @@ class VolumeController < ApplicationController files = file_directory(params[:path]) render :json => {:file => files , :current => @current_dir} end + + def mount + puts "@@@@@@@@@@" + puts params[:volume_id] + puts "##########" + redirect_to '/volume/info' + end end diff --git a/app/views/volume/index.html.erb b/app/views/volume/index.html.erb index b108cc8..efef065 100644 --- a/app/views/volume/index.html.erb +++ b/app/views/volume/index.html.erb @@ -53,6 +53,9 @@ Bricks1 : <%=t["Brick1"]%>
Options Reconfigured : <%=t["Options Reconfigured"]%>
performance.readdir-ahead : <%=t["performance.readdir-ahead"]%>
+ "> + Mount +
diff --git a/config/routes.rb b/config/routes.rb index 3472b99..59e8bf4 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -14,13 +14,19 @@ Rails.application.routes.draw do get 'index' => 'plainpage#index' + #Volume get 'volume/index' => 'volume#index' - - get 'peer/index' => 'peer#index' - + post 'file_upload' => 'volume#file_upload' - + post 'volume/changeDir' => 'volume#checkDir' + + get 'volume/mount/:volume_id' => "volume#mount" + + + get 'peer/index' => 'peer#index' + + # Example of regular route: # get 'products/:id' => 'catalog#view'