update
This commit is contained in:
parent
7eff0efa68
commit
28d38e23a1
@ -44,6 +44,9 @@ class ApplicationController < ActionController::Base
|
|||||||
puts @files
|
puts @files
|
||||||
return @files
|
return @files
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def checkDir
|
||||||
|
files = file_directory(params[:path])
|
||||||
|
render :json => {:file => files , :current => @current_dir}
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
@ -38,13 +38,6 @@ class VolumeController < ApplicationController
|
|||||||
redirect_to '/volume/info'
|
redirect_to '/volume/info'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def checkDir
|
|
||||||
files = file_directory(params[:path])
|
|
||||||
render :json => {:file => files , :current => @current_dir}
|
|
||||||
end
|
|
||||||
|
|
||||||
def volume_mount
|
def volume_mount
|
||||||
@config = get_conf
|
@config = get_conf
|
||||||
volume_name = params[:volume_name]
|
volume_name = params[:volume_name]
|
||||||
|
@ -207,7 +207,7 @@
|
|||||||
function change_directory(directory){
|
function change_directory(directory){
|
||||||
$.ajax({
|
$.ajax({
|
||||||
method: "POST",
|
method: "POST",
|
||||||
url: "/volume/changeDir",
|
url: "/application/changeDir",
|
||||||
data: { path: directory },
|
data: { path: directory },
|
||||||
success : function(result){
|
success : function(result){
|
||||||
$("#table_div").empty();
|
$("#table_div").empty();
|
||||||
|
@ -6,6 +6,8 @@ Rails.application.routes.draw do
|
|||||||
# You can have the root of your site routed with "root"
|
# You can have the root of your site routed with "root"
|
||||||
root 'home#index'
|
root 'home#index'
|
||||||
|
|
||||||
|
post 'application/changeDir' => 'application#checkDir'
|
||||||
|
|
||||||
get 'index' => 'plainpage#index'
|
get 'index' => 'plainpage#index'
|
||||||
|
|
||||||
#Home
|
#Home
|
||||||
@ -15,7 +17,6 @@ Rails.application.routes.draw do
|
|||||||
#Volume
|
#Volume
|
||||||
get 'volume/index' => 'volume#index'
|
get 'volume/index' => 'volume#index'
|
||||||
post 'file_upload' => 'volume#file_upload'
|
post 'file_upload' => 'volume#file_upload'
|
||||||
post 'volume/changeDir' => 'volume#checkDir'
|
|
||||||
post 'volume/mount' => "volume#volume_mount"
|
post 'volume/mount' => "volume#volume_mount"
|
||||||
get 'volume/start/:volume_name' => "volume#volume_start"
|
get 'volume/start/:volume_name' => "volume#volume_start"
|
||||||
get 'volume/stop/:volume_name' => "volume#volume_stop"
|
get 'volume/stop/:volume_name' => "volume#volume_stop"
|
||||||
|
Loading…
Reference in New Issue
Block a user