Fix volume mount tag

This commit is contained in:
kyg516 2016-10-03 20:34:41 +09:00
parent 3c86832958
commit ac3ab4c48b
2 changed files with 7 additions and 7 deletions

View File

@ -79,7 +79,7 @@ class VolumeController < ApplicationController
command << "ssh #{node.user_name}@#{node.host_ip} " command << "ssh #{node.user_name}@#{node.host_ip} "
command << "gluster volume create #{volume_name} " command << "gluster volume create #{volume_name} "
if !volume_type.include? "Distribute" if !volume_type.include? "Distribute"
command << "#{volume_type.downcase} #{num_of_brick}" command << "#{volume_type.downcase} #{num_of_brick} "
end end
nodes = Node.all nodes = Node.all
bricks.each do |t| bricks.each do |t|
@ -96,7 +96,9 @@ class VolumeController < ApplicationController
command << "force" command << "force"
puts command puts command
`#{command}` `#{command}`
redirect_to '/volume/index' render :json => {
:test => 0,
}
end end
def volume_stop def volume_stop

View File

@ -108,6 +108,7 @@
<!-- On document ready --> <!-- On document ready -->
<script> <script>
$(document).ready(function(){ $(document).ready(function(){
//$(location).attr('href',"#");
// Mount overlay functions // Mount overlay functions
$("#popup_mount #mount_table_body form").submit(function(){ $("#popup_mount #mount_table_body form").submit(function(){
var mnt_point = $(this).find("input").val(); var mnt_point = $(this).find("input").val();
@ -159,11 +160,11 @@ $(document).ready(function(){
$.ajax({ $.ajax({
method: "POST", method: "POST",
url: "/volume/create", url: "/volume/create",
beforeSend: 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 },
success : function(result){ success : function(result){
$(location).attr('href',"/volume/index"); $(location).attr('href',"/volume/index");
} }
}); });
@ -262,9 +263,6 @@ $(document).on("click", "#mount_table_div .chupper", function(){
<!-- Volume info button functions --> <!-- Volume info button functions -->
<script> <script>
// volume mount
$(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);