Update
This commit is contained in:
parent
73cb353d4a
commit
89986f9f47
@ -31,8 +31,8 @@ class HomeController < ApplicationController
|
|||||||
puts "current_dir : " + @current_dir
|
puts "current_dir : " + @current_dir
|
||||||
render :json => {
|
render :json => {
|
||||||
:dir => @current_dir,
|
:dir => @current_dir,
|
||||||
:file_manager_table => file_manager_table(@current_dir),
|
:file_manager_table => html_file_manager_table(@current_dir),
|
||||||
:disk_usage_table => disk_usage_table(@current_dir),
|
:disk_usage_table => html_disk_usage_table(@current_dir),
|
||||||
:du => get_du(@current_dir),
|
:du => get_du(@current_dir),
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
class NodeController < ApplicationController
|
class NodeController < ApplicationController
|
||||||
before_action :require_login
|
before_action :require_login
|
||||||
def index
|
def index
|
||||||
@hosts = Array.new
|
|
||||||
@nodes = Node.all.order("id asc")
|
@nodes = Node.all.order("id asc")
|
||||||
@node_connects = Array.new
|
@node_connects = Array.new
|
||||||
node_info = Hash.new
|
node_info = Hash.new
|
||||||
@ -32,12 +31,6 @@ class NodeController < ApplicationController
|
|||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if get_hosts.blank?
|
|
||||||
flash[:danger] = "Check Server"
|
|
||||||
else
|
|
||||||
@hosts = get_hosts
|
|
||||||
end
|
|
||||||
rescue => ex
|
rescue => ex
|
||||||
puts ex
|
puts ex
|
||||||
end
|
end
|
||||||
@ -59,7 +52,7 @@ class NodeController < ApplicationController
|
|||||||
redirect_to '/node/index'
|
redirect_to '/node/index'
|
||||||
end
|
end
|
||||||
|
|
||||||
def node_prove
|
def node_probe
|
||||||
one_node = Node.find(params[:node_id])
|
one_node = Node.find(params[:node_id])
|
||||||
puts "gluster peer probe #{one_node.host_name}"
|
puts "gluster peer probe #{one_node.host_name}"
|
||||||
redirect_to '/node/index'
|
redirect_to '/node/index'
|
||||||
|
@ -10,7 +10,7 @@ class VolumeController < ApplicationController
|
|||||||
puts "current_dir : " + @current_dir
|
puts "current_dir : " + @current_dir
|
||||||
render :json => {
|
render :json => {
|
||||||
:dir => @current_dir,
|
:dir => @current_dir,
|
||||||
:mount_table => mount_table(@current_dir),
|
:mount_table => html_mount_table(@current_dir),
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -49,7 +49,7 @@ class VolumeController < ApplicationController
|
|||||||
#redirect_to '/volume/index'
|
#redirect_to '/volume/index'
|
||||||
|
|
||||||
render :json => {
|
render :json => {
|
||||||
:volume_info => volume_info(volume_name, index),
|
:volume_info => html_volume_info(volume_name, index),
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -61,9 +61,9 @@ class VolumeController < ApplicationController
|
|||||||
command << "sudo umount #{node.host_ip}:/#{volume_name}"
|
command << "sudo umount #{node.host_ip}:/#{volume_name}"
|
||||||
puts command
|
puts command
|
||||||
`#{command}`
|
`#{command}`
|
||||||
volume = volumes.find{ |v| v['Volume Name'].delete(' ') == volume_name}
|
volume = ssh_volume_info.find{ |v| v['Volume Name'].delete(' ') == volume_name}
|
||||||
render :json => {
|
render :json => {
|
||||||
:volume_info => volume_info(volume, 0),
|
:volume_info => html_volume_info(volume, 0),
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -107,9 +107,9 @@ class VolumeController < ApplicationController
|
|||||||
command << "yes | sshpass -p#{node.user_password} ssh #{node.user_name}@#{node.host_ip} gluster volume stop #{volume_name}"
|
command << "yes | sshpass -p#{node.user_password} ssh #{node.user_name}@#{node.host_ip} gluster volume stop #{volume_name}"
|
||||||
puts command
|
puts command
|
||||||
`#{command}`
|
`#{command}`
|
||||||
volume = volumes.find{ |v| v['Volume Name'].delete(' ') == volume_name}
|
volume = ssh_volume_info.find{ |v| v['Volume Name'].delete(' ') == volume_name}
|
||||||
render :json => {
|
render :json => {
|
||||||
:volume_info => volume_info(volume, 0),
|
:volume_info => html_volume_info(volume, 0),
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -121,9 +121,9 @@ class VolumeController < ApplicationController
|
|||||||
command << "sshpass -p#{node.user_password} ssh #{node.user_name}@#{node.host_ip} gluster volume start #{volume_name}"
|
command << "sshpass -p#{node.user_password} ssh #{node.user_name}@#{node.host_ip} gluster volume start #{volume_name}"
|
||||||
puts command
|
puts command
|
||||||
`#{command}`
|
`#{command}`
|
||||||
volume = volumes.find{ |v| v['Volume Name'].delete(' ') == volume_name}
|
volume = ssh_volume_info.find{ |v| v['Volume Name'].delete(' ') == volume_name}
|
||||||
render :json => {
|
render :json => {
|
||||||
:volume_info => volume_info(volume, 0),
|
:volume_info => html_volume_info(volume, 0),
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ module ApplicationHelper
|
|||||||
return du
|
return du
|
||||||
end
|
end
|
||||||
|
|
||||||
def volumes
|
def ssh_volume_info
|
||||||
volumes = Array.new
|
volumes = Array.new
|
||||||
volume = Hash.new
|
volume = Hash.new
|
||||||
node = Node.take
|
node = Node.take
|
||||||
@ -113,6 +113,15 @@ module ApplicationHelper
|
|||||||
return volumes
|
return volumes
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def ssh_peer_status
|
||||||
|
end
|
||||||
|
|
||||||
|
def ssh_peer_probe
|
||||||
|
end
|
||||||
|
|
||||||
|
def ssh_peer_detach
|
||||||
|
end
|
||||||
|
|
||||||
def files(dir)
|
def files(dir)
|
||||||
files = Array.new
|
files = Array.new
|
||||||
file = Hash.new
|
file = Hash.new
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
module HomeHelper
|
module HomeHelper
|
||||||
|
|
||||||
def file_manager_table(dir = @current_dir, id = "file_manager_table", class_option = "table table-striped table-bordered jambo_table")
|
def html_file_manager_table(dir = @current_dir, id = "file_manager_table", class_option = "table table-striped table-bordered jambo_table")
|
||||||
html = String.new
|
html = String.new
|
||||||
html << "<table id='#{id}' class='#{class_option}'>"
|
html << "<table id='#{id}' class='#{class_option}'>"
|
||||||
html << "<thead>"
|
html << "<thead>"
|
||||||
@ -48,7 +48,7 @@ module HomeHelper
|
|||||||
return html
|
return html
|
||||||
end
|
end
|
||||||
|
|
||||||
def disk_usage_table(dir = @current_dir, id = "disk_usage_table")
|
def html_disk_usage_table(dir = @current_dir, id = "disk_usage_table")
|
||||||
html = String.new
|
html = String.new
|
||||||
html << "<table id='#{id}' class='' style='width:100%'>"
|
html << "<table id='#{id}' class='' style='width:100%'>"
|
||||||
html << "<tr>"
|
html << "<tr>"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
module VolumeHelper
|
module VolumeHelper
|
||||||
|
|
||||||
def volume_info(volume, index)
|
def html_volume_info(volume, index)
|
||||||
params = ['Type', 'Volume ID', 'Status', 'Number of Bricks', 'Transport-type', 'Bricks', 'Options Reconfigured', 'Mount State', 'Mount Point']
|
params = ['Type', 'Volume ID', 'Status', 'Number of Bricks', 'Transport-type', 'Bricks', 'Options Reconfigured', 'Mount State', 'Mount Point']
|
||||||
arrow = ((index == 0) ? "up" : "down")
|
arrow = ((index == 0) ? "up" : "down")
|
||||||
display = ((index != 0) ? "style='display: none;'" : "")
|
display = ((index != 0) ? "style='display: none;'" : "")
|
||||||
@ -96,7 +96,7 @@ module VolumeHelper
|
|||||||
return html
|
return html
|
||||||
end
|
end
|
||||||
|
|
||||||
def mount_table(dir = @current_dir, id = "mount_table", class_option = "table table-striped table-bordered jambo_table")
|
def html_mount_table(dir = @current_dir, id = "mount_table", class_option = "table table-striped table-bordered jambo_table")
|
||||||
html = String.new
|
html = String.new
|
||||||
html << "<table id='#{id}' class='#{class_option}'>"
|
html << "<table id='#{id}' class='#{class_option}'>"
|
||||||
html << "<thead>"
|
html << "<thead>"
|
||||||
@ -109,7 +109,7 @@ module VolumeHelper
|
|||||||
html << "<tbody id='#{id}_body'>"
|
html << "<tbody id='#{id}_body'>"
|
||||||
html << "<tr>"
|
html << "<tr>"
|
||||||
html << "<td>"
|
html << "<td>"
|
||||||
html << "<a class='chupper' style='cursor: pointer'><i class='fa fa-reply'></i></a> #{@current_dir}"
|
html << "<a class='chupper' style='cursor: pointer'><i class='fa fa-reply'></i></a> <span>#{@current_dir}</span>"
|
||||||
html << "</td>"
|
html << "</td>"
|
||||||
html << "<td></td>"
|
html << "<td></td>"
|
||||||
html << "<td></td>"
|
html << "<td></td>"
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
<!-- top tiles -->
|
<!-- top tiles -->
|
||||||
<% users = User.all %>
|
<% users = User.all %>
|
||||||
<% nodes = Node.all %>
|
<% nodes = Node.all %>
|
||||||
<% vols = volumes %>
|
<% vols = ssh_volume_info %>
|
||||||
<% today_user = User.where(:last_sign_in_at => Date.today..Date.tomorrow) %>
|
<% today_user = User.where(:last_sign_in_at => Date.today..Date.tomorrow) %>
|
||||||
<% today_node = Node.where(:created_at => Date.today..Date.tomorrow) %>
|
<% today_node = Node.where(:created_at => Date.today..Date.tomorrow) %>
|
||||||
<div class="row tile_count">
|
<div class="row tile_count">
|
||||||
@ -111,7 +111,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12 col-sm-12 col-xs-12" id="file_manager_div">
|
<div class="col-md-12 col-sm-12 col-xs-12" id="file_manager_div">
|
||||||
<%= raw file_manager_table %>
|
<%= raw html_file_manager_table %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -125,7 +125,7 @@
|
|||||||
<h2 style="width:130px">Disk usage</h2>
|
<h2 style="width:130px">Disk usage</h2>
|
||||||
</div>
|
</div>
|
||||||
<div class="row" id="disk_usage_div">
|
<div class="row" id="disk_usage_div">
|
||||||
<%= raw disk_usage_table %>
|
<%= raw html_disk_usage_table %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,12 +1,10 @@
|
|||||||
<!-- page content -->
|
<!-- page content -->
|
||||||
<div class="right_col" role="main">
|
<div class="right_col" role="main">
|
||||||
|
|
||||||
<div class="page-title">
|
<div class="page-title">
|
||||||
<div class="title_left"><h3>Peer</h3></div>
|
<div class="title_left"><h3>Node</h3></div>
|
||||||
<div class="title_right">
|
<div class="title_right">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="clearfix"></div>
|
<div class="clearfix"></div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12 col-sm-12 col-xs-12">
|
<div class="col-md-12 col-sm-12 col-xs-12">
|
||||||
@ -29,7 +27,6 @@
|
|||||||
<div class="clearfix"></div>
|
<div class="clearfix"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="x_content">
|
<div class="x_content">
|
||||||
|
|
||||||
<form class="form-horizontal form-label-left" action="/node/add" method="post" novalidate>
|
<form class="form-horizontal form-label-left" action="/node/add" method="post" novalidate>
|
||||||
<div class="item form-group">
|
<div class="item form-group">
|
||||||
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="name">Host Name <span class="required">*</span>
|
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="name">Host Name <span class="required">*</span>
|
||||||
@ -39,7 +36,6 @@
|
|||||||
data-toggle="tooltip" data-placement="top" title="Put node's representative name">
|
data-toggle="tooltip" data-placement="top" title="Put node's representative name">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="item form-group">
|
<div class="item form-group">
|
||||||
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="ip">Host IP <span class="required">*</span>
|
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="ip">Host IP <span class="required">*</span>
|
||||||
</label>
|
</label>
|
||||||
@ -48,7 +44,6 @@
|
|||||||
data-toggle="tooltip" data-placement="top" title="Put node's ip">
|
data-toggle="tooltip" data-placement="top" title="Put node's ip">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="item form-group">
|
<div class="item form-group">
|
||||||
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="name">User Name <span class="required">*</span>
|
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="name">User Name <span class="required">*</span>
|
||||||
</label>
|
</label>
|
||||||
@ -68,7 +63,7 @@
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="col-md-6 col-md-offset-3">
|
<div class="col-md-6 col-md-offset-3">
|
||||||
<button type="submit" class="btn btn-primary">Cancel</button>
|
<button type="submit" class="btn btn-primary">Cancel</button>
|
||||||
<button id="send" type="submit" class="btn btn-success">Add</button>
|
<button type="submit" class="btn btn-success">Add</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
@ -78,7 +73,7 @@
|
|||||||
<div class="col-md-12 col-sm-12 col-xs-12">
|
<div class="col-md-12 col-sm-12 col-xs-12">
|
||||||
<div class="x_panel">
|
<div class="x_panel">
|
||||||
<div class="x_title">
|
<div class="x_title">
|
||||||
<h2><i class="fa fa-align-left"></i> Node List <small>Try hovering over the rows</small></h2>
|
<h2><i class="fa fa-align-left"></i> Node List</h2>
|
||||||
<ul class="nav navbar-right panel_toolbox">
|
<ul class="nav navbar-right panel_toolbox">
|
||||||
<li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
|
<li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
|
||||||
</li>
|
</li>
|
||||||
@ -98,13 +93,13 @@
|
|||||||
<table class="table table-hover">
|
<table class="table table-hover">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Ping</th> <!-- Ping-->
|
<th>Ping</th>
|
||||||
<th>Status</th>
|
<th>Status</th>
|
||||||
<th>Host Name</th>
|
<th>Host Name</th>
|
||||||
<th>Host IP</th>
|
<th>Host IP</th>
|
||||||
<th>User Name</th>
|
<th>User Name</th>
|
||||||
<th>Date</th>
|
<th>Date</th>
|
||||||
<th></th> <!-- Delete-->
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@ -112,7 +107,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<%if ping_test?(t.host_ip)%>
|
<%if ping_test?(t.host_ip)%>
|
||||||
<td><i class="fa fa-circle-o green"></i></a></td>
|
<td><i class="fa fa-circle-o green"></i></a></td>
|
||||||
<td><input type="checkbox" class="js-switch prove" value="<%=t.id%>" checked/>Attached</td>
|
<td><input type="checkbox" class="js-switch probe" value="<%=t.id%>" checked/>Attached</td>
|
||||||
<%else%>
|
<%else%>
|
||||||
<td><i class="fa fa-close red"></i></a></td>
|
<td><i class="fa fa-close red"></i></a></td>
|
||||||
<td><input type="checkbox" class="js-switch" disabled/></td>
|
<td><input type="checkbox" class="js-switch" disabled/></td>
|
||||||
@ -126,9 +121,6 @@
|
|||||||
<%end%>
|
<%end%>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -136,12 +128,12 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- /page content -->
|
<!-- /page content -->
|
||||||
<script>
|
<script>
|
||||||
$('.prove').change(function() {
|
$('.probe').change(function() {
|
||||||
$(location).attr('href',"#loading");
|
$(location).attr('href',"#loading");
|
||||||
if($(this).is(":checked")) {
|
if($(this).is(":checked")) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
method: "POST",
|
method: "POST",
|
||||||
url: "/node/prove",
|
url: "/node/probe",
|
||||||
data: { node_id : this.value },
|
data: { node_id : this.value },
|
||||||
success : function(result){
|
success : function(result){
|
||||||
$(location).attr('href',"#");
|
$(location).attr('href',"#");
|
||||||
@ -173,9 +165,6 @@ $('.multi.required')
|
|||||||
validator.checkField.apply($(this).siblings().last()[0]);
|
validator.checkField.apply($(this).siblings().last()[0]);
|
||||||
});
|
});
|
||||||
|
|
||||||
// bind the validation to the form submit event
|
|
||||||
//$('#send').click('submit');//.prop('disabled', true);
|
|
||||||
|
|
||||||
$('form').submit(function(e) {
|
$('form').submit(function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var submit = true;
|
var submit = true;
|
||||||
|
@ -70,7 +70,7 @@
|
|||||||
<h2> Choose mount point </h2>
|
<h2> Choose mount point </h2>
|
||||||
<a class="close" href="#">×</a>
|
<a class="close" href="#">×</a>
|
||||||
<div id="mount_table_div">
|
<div id="mount_table_div">
|
||||||
<%= raw mount_table %>
|
<%= raw html_mount_table %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -97,8 +97,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<% else %>
|
<% else %>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<% volumes.each_with_index do |volume, index| %>
|
<% ssh_volume_info.each_with_index do |volume, index| %>
|
||||||
<%= raw volume_info(volume, index) %>
|
<%= raw html_volume_info(volume, index) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
@ -116,7 +116,7 @@ $(document).ready(function(){
|
|||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'post',
|
type: 'post',
|
||||||
url: '/volume/mount',
|
url: '/volume/mount',
|
||||||
before: function(){
|
beforeSend: function(){
|
||||||
$(location).attr('href',"#loading");
|
$(location).attr('href',"#loading");
|
||||||
},
|
},
|
||||||
data: {mount_point: mnt_point, volume_name: vol_name},
|
data: {mount_point: mnt_point, volume_name: vol_name},
|
||||||
@ -135,7 +135,7 @@ $(document).ready(function(){
|
|||||||
alert("Volume name can't contains white spaces");
|
alert("Volume name can't contains white spaces");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
<% volumes.each do |t| %>
|
<% ssh_volume_info.each do |t| %>
|
||||||
if(volume_name == "<%=t["Volume Name"].delete(' ')%>"){
|
if(volume_name == "<%=t["Volume Name"].delete(' ')%>"){
|
||||||
alert("Already has a volume which name is same");
|
alert("Already has a volume which name is same");
|
||||||
return;
|
return;
|
||||||
@ -159,7 +159,7 @@ $(document).ready(function(){
|
|||||||
$.ajax({
|
$.ajax({
|
||||||
method: "POST",
|
method: "POST",
|
||||||
url: "/volume/create",
|
url: "/volume/create",
|
||||||
before: function(){
|
beforeSend: function(){
|
||||||
$(location).attr('href',"#loading");
|
$(location).attr('href',"#loading");
|
||||||
},
|
},
|
||||||
data: { volume_name : volume_name, volume_type : volume_type, num_of_brick : num_of_brick, bricks : bricks },
|
data: { volume_name : volume_name, volume_type : volume_type, num_of_brick : num_of_brick, bricks : bricks },
|
||||||
@ -231,13 +231,9 @@ $(document).on("click", "#mount_table_div .chdir", function(){
|
|||||||
method: "post",
|
method: "post",
|
||||||
url: "/volume/chdir",
|
url: "/volume/chdir",
|
||||||
data: { next_dir : next_dir },
|
data: { next_dir : next_dir },
|
||||||
before: function(){
|
|
||||||
$(location).attr('href',"#loading");
|
|
||||||
},
|
|
||||||
success : function(result){
|
success : function(result){
|
||||||
$("#mount_table_div").empty();
|
$("#mount_table_div").empty();
|
||||||
$("#mount_table_div").append(result.mount_table);
|
$("#mount_table_div").append(result.mount_table);
|
||||||
$(location).attr('href',"#");
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@ -255,13 +251,9 @@ $(document).on("click", "#mount_table_div .chupper", function(){
|
|||||||
method: "POST",
|
method: "POST",
|
||||||
url: "/volume/chdir",
|
url: "/volume/chdir",
|
||||||
data: { next_dir : next_dir },
|
data: { next_dir : next_dir },
|
||||||
before: function(){
|
|
||||||
$(location).attr('href',"#loading");
|
|
||||||
},
|
|
||||||
success : function(result){
|
success : function(result){
|
||||||
$("#mount_table_div").empty();
|
$("#mount_table_div").empty();
|
||||||
$("#mount_table_div").append(result.mount_table);
|
$("#mount_table_div").append(result.mount_table);
|
||||||
$(location).attr('href',"#");
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@ -273,7 +265,6 @@ $(document).on("click", "#mount_table_div .chupper", function(){
|
|||||||
// volume mount
|
// volume mount
|
||||||
$(document).on("click", ".btn-volume-mount", function(){
|
$(document).on("click", ".btn-volume-mount", function(){
|
||||||
});
|
});
|
||||||
|
|
||||||
// volume unmount
|
// volume unmount
|
||||||
$(document).on("click", ".btn-volume-unmount", function(){
|
$(document).on("click", ".btn-volume-unmount", function(){
|
||||||
var $this = $(this);
|
var $this = $(this);
|
||||||
@ -284,8 +275,7 @@ $(document).on("click", ".btn-volume-unmount", function(){
|
|||||||
method: "POST",
|
method: "POST",
|
||||||
url: "/volume/unmount",
|
url: "/volume/unmount",
|
||||||
data: { volume_name : volume_name },
|
data: { volume_name : volume_name },
|
||||||
before: function(){
|
beforeSend: function(){
|
||||||
console.log("zzz");
|
|
||||||
$(location).attr('href',"#loading");
|
$(location).attr('href',"#loading");
|
||||||
},
|
},
|
||||||
success: function(result){
|
success: function(result){
|
||||||
@ -322,8 +312,7 @@ $(document).on("click", ".btn-volume-start", function(){
|
|||||||
method: "POST",
|
method: "POST",
|
||||||
url: "/volume/start",
|
url: "/volume/start",
|
||||||
data: { volume_name : volume_name },
|
data: { volume_name : volume_name },
|
||||||
before: function(){
|
beforeSend: function(){
|
||||||
console.log("zzz");
|
|
||||||
$(location).attr('href',"#loading");
|
$(location).attr('href',"#loading");
|
||||||
},
|
},
|
||||||
success: function(result){
|
success: function(result){
|
||||||
@ -360,8 +349,7 @@ $(document).on("click", ".btn-volume-stop", function(){
|
|||||||
method: "POST",
|
method: "POST",
|
||||||
url: "/volume/stop",
|
url: "/volume/stop",
|
||||||
data: { volume_name : volume_name },
|
data: { volume_name : volume_name },
|
||||||
before: function(){
|
beforeSend: function(){
|
||||||
console.log("zzz");
|
|
||||||
$(location).attr('href',"#loading");
|
$(location).attr('href',"#loading");
|
||||||
},
|
},
|
||||||
success: function(result){
|
success: function(result){
|
||||||
@ -398,8 +386,7 @@ $(document).on("click", ".btn-volume-delete", function(){
|
|||||||
method: "POST",
|
method: "POST",
|
||||||
url: "/volume/delete",
|
url: "/volume/delete",
|
||||||
data: { volume_name : volume_name },
|
data: { volume_name : volume_name },
|
||||||
before: function(){
|
beforeSend: function(){
|
||||||
console.log("zzz");
|
|
||||||
$(location).attr('href',"#loading");
|
$(location).attr('href',"#loading");
|
||||||
},
|
},
|
||||||
success: function(result){
|
success: function(result){
|
||||||
|
@ -30,7 +30,7 @@ Rails.application.routes.draw do
|
|||||||
get 'node/index' => 'node#index'
|
get 'node/index' => 'node#index'
|
||||||
post 'node/add' => "node#node_add"
|
post 'node/add' => "node#node_add"
|
||||||
get 'node/delete/:node_id' => "node#node_delete"
|
get 'node/delete/:node_id' => "node#node_delete"
|
||||||
post 'node/prove' => "node#node_prove"
|
post 'node/probe' => "node#node_probe"
|
||||||
post 'node/detach' => "node#node_detach"
|
post 'node/detach' => "node#node_detach"
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user