gluster-web-interface/app/controllers/home_controller.rb

18 lines
428 B
Ruby
Raw Normal View History

2016-08-20 06:41:37 +00:00
class HomeController < ApplicationController
def index
2016-09-02 05:47:18 +00:00
config = get_conf
2016-09-02 07:20:14 +00:00
#@current_dir = config["project_path"]
2016-09-04 06:29:32 +00:00
@current_dir = "/mnt"
2016-09-02 05:56:12 +00:00
file_directory(@current_dir)
2016-08-20 06:41:37 +00:00
end
2016-09-02 07:20:14 +00:00
def make_directory
current_dir = params[:current_dir]
directory_name = params[:directory_name]
2016-09-04 06:17:44 +00:00
puts "mkdir #{current_dir}/#{directory_name}"
2016-09-02 07:20:14 +00:00
`mkdir #{current_dir}/#{directory_name}`
2016-09-04 05:37:33 +00:00
redirect_to '/home/index'
2016-09-02 07:20:14 +00:00
end
2016-08-20 06:41:37 +00:00
end