gluster-web-interface/app/views/home/index.html.erb

510 lines
16 KiB
Plaintext
Raw Normal View History

2016-09-04 06:17:44 +00:00
<!-- create overlay page -->
2016-09-19 10:57:10 +00:00
<div id="popup_mkdir" class="overlay">
<div class="popup">
<h2> Make Directory </h2>
<a class="close" href="#">&times;</a>
<form id="form_make_directory" data-parsley-validate class="form-horizontal form-label-left" action="/home/mkdir" method="post">
<div class="form-group">
2016-09-26 16:53:09 +00:00
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="current_dir">Current Directory <span class="required">*</span>
2016-09-19 10:57:10 +00:00
</label>
<div class="col-md-6 col-sm-6 col-xs-12">
2016-09-26 16:53:09 +00:00
<input type="text" id="current_dir" required="required" class="form-control col-md-7 col-xs-12" name="current_dir" value="<%= @current_dir %>" readonly/>
2016-09-19 10:57:10 +00:00
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="directory-name">Directory Name<span class="required">*</span>
</label>
<div class="col-md-6 col-sm-6 col-xs-12">
<input type="text" id="directory-name" required="required" class="form-control col-md-7 col-xs-12" name="directory_name" placeholder="Directory name"/>
</div>
</div>
<div class="ln_solid"></div>
<div class="form-group">
<div class="col-md-6 col-sm-6 col-xs-12 col-md-offset-3">
<button type="submit" class="btn btn-success">Submit</button>
</div>
</div>
</form>
</div>
</div>
2016-09-04 06:17:44 +00:00
2016-08-20 06:41:37 +00:00
<!-- page content -->
<div class="right_col" role="main">
2016-09-23 09:28:53 +00:00
<div class="page-title">
</div>
<div class="clearfix"></div>
2016-09-24 09:00:27 +00:00
<!-- top tiles -->
2016-09-26 08:10:11 +00:00
<% users = User.all %>
<% nodes = Node.all %>
2016-10-02 12:38:57 +00:00
<% vols = ssh_volume_info %>
2016-09-26 08:10:11 +00:00
<% today_user = User.where(:last_sign_in_at => Date.today..Date.tomorrow) %>
<% today_node = Node.where(:created_at => Date.today..Date.tomorrow) %>
2016-09-24 09:00:27 +00:00
<div class="row tile_count">
2016-09-24 10:31:27 +00:00
<div class="animated flipInY col-md-2 col-sm-6 col-xs-6 tile_stats_count">
2016-09-24 09:00:27 +00:00
<div class="left"></div>
<div class="right">
<span class="count_top"><i class="fa fa-clock-o"></i> Current signed in</span>
<div class="count"><%= current_user.current_sign_in_at.strftime("%a, %H:%M") %></div>
2016-09-24 10:31:27 +00:00
<span class="count_bottom"> From <i class="blue"><%= current_user.current_sign_in_ip %></i></span>
2016-09-19 10:57:10 +00:00
</div>
2016-09-24 09:00:27 +00:00
</div>
2016-09-24 10:31:27 +00:00
<div class="animated flipInY col-md-2 col-sm-6 col-xs-6 tile_stats_count">
2016-09-24 09:00:27 +00:00
<div class="left"></div>
<div class="right">
<span class="count_top"><i class="fa fa-clock-o"></i> Last signed in</span>
<div class="count"><%= current_user.last_sign_in_at.strftime("%a, %H:%M") %></div>
<span class="count_bottom"> From <i class="red"><%= current_user.last_sign_in_ip %></i></span>
2016-09-23 09:28:53 +00:00
</div>
2016-09-24 09:00:27 +00:00
</div>
2016-09-24 10:31:27 +00:00
<div class="animated flipInY col-md-2 col-sm-6 col-xs-6 tile_stats_count">
2016-09-24 09:00:27 +00:00
<div class="left"></div>
<div class="right">
<span class="count_top"><i class="fa fa-user"></i> Members</span>
2016-09-26 08:10:11 +00:00
<div class="count"><%= users.nil? ? 0 : users.length %></div>
<span class="count_bottom">
<i class="green"><%= today_user.nil? ? 0 : today_user.length %></i>
2016-09-27 03:14:39 +00:00
user signed Today
</span>
2016-09-23 09:28:53 +00:00
</div>
2016-09-24 09:00:27 +00:00
</div>
2016-09-24 10:31:27 +00:00
<div class="animated flipInY col-md-2 col-sm-6 col-xs-6 tile_stats_count">
2016-09-24 09:00:27 +00:00
<div class="left"></div>
<div class="right">
<span class="count_top"><i class="fa fa-cubes"></i> Total Nodes</span>
2016-09-26 08:10:11 +00:00
<div class="count"><%= nodes.nil? ? 0 : nodes.length %></div>
<span class="count_bottom">
<i class="green"><%= today_node.nil? ? 0 : today_node.length %></i>
2016-09-27 03:14:39 +00:00
Node added Today
</span>
2016-09-23 09:28:53 +00:00
</div>
2016-09-24 09:00:27 +00:00
</div>
2016-09-24 10:31:27 +00:00
<div class="animated flipInY col-md-2 col-sm-6 col-xs-6 tile_stats_count">
2016-09-24 09:00:27 +00:00
<div class="left"></div>
<div class="right">
<span class="count_top"><i class="fa fa-database"></i> Total volumes</span>
2016-09-26 08:10:11 +00:00
<div class="count"><%= vols.nil? ? 0 : vols.length %></div>
2016-09-24 10:31:27 +00:00
<span class="count_bottom">
2016-09-26 08:10:11 +00:00
<i class="blue"><%= vols.count{|x| x['Status'].eql? " Started"} %></i> started /
<i class="green"><%= vols.count{|x| x['Mount State'].eql? "mounted"} %></i> mounted
2016-09-24 10:31:27 +00:00
</span>
2016-09-23 09:28:53 +00:00
</div>
2016-09-24 09:00:27 +00:00
</div>
2016-09-24 10:31:27 +00:00
<div class="animated flipInY col-md-2 col-sm-6 col-xs-6 tile_stats_count">
2016-09-24 09:00:27 +00:00
<div class="left"></div>
<div class="right">
<span class="count_top"><i class="fa fa-user"></i> Total Connections</span>
2016-09-26 08:10:11 +00:00
<div class="count"><%= users.sum("sign_in_count") %></div>
<span class="count_bottom"><i class="green"><%= today_user.sum("sign_in_count") %></i> connected today</span>
2016-09-19 10:57:10 +00:00
</div>
</div>
2016-09-24 09:00:27 +00:00
</div>
<!-- /top tiles -->
2016-09-19 10:57:10 +00:00
2016-09-24 09:00:27 +00:00
<div class="row">
2016-09-26 16:53:09 +00:00
2016-09-23 09:28:53 +00:00
<!-- file manager -->
2016-09-24 09:00:27 +00:00
<div class="col-md-8 col-sm-8 col-xs-12">
2016-10-02 04:19:10 +00:00
<div id="pagecontent" class="panel panel-body">
2016-09-28 16:39:22 +00:00
<div class="x_title" id="file_manager_title_div">
2016-09-28 10:48:54 +00:00
<h2 style="width:130px">File Manager</h2>
2016-09-23 09:28:53 +00:00
</div>
2016-09-28 10:48:54 +00:00
<div class="row">
2016-09-26 16:53:09 +00:00
<div class="col-md-12 col-sm-12 col-xs-12" id="file_manager_div">
2016-10-02 12:38:57 +00:00
<%= raw html_file_manager_table %>
2016-09-23 09:28:53 +00:00
</div>
</div>
</div>
</div>
<!-- /file manager -->
2016-09-19 10:57:10 +00:00
2016-09-23 09:28:53 +00:00
<!-- disk usage -->
2016-09-24 09:00:27 +00:00
<div class="col-md-4 col-sm-4 col-xs-12">
<div class="panel panel-body">
2016-09-28 16:39:22 +00:00
<div class="x_title" id="disk_usage_title_div">
<h2 style="width:130px">Disk usage</h2>
2016-09-24 09:00:27 +00:00
</div>
2016-09-26 16:53:09 +00:00
<div class="row" id="disk_usage_div">
2016-10-02 12:38:57 +00:00
<%= raw html_disk_usage_table %>
2016-09-24 09:00:27 +00:00
</div>
</div>
</div>
<!-- /disk usage -->
</div>
2016-10-03 06:14:35 +00:00
<% nodes = ssh_nodes %>
2016-09-24 09:00:27 +00:00
<div class ="row">
<!-- node status -->
2016-10-03 05:20:56 +00:00
<div class="col-md-4 col-sm-4 col-xs-12">
<div class="x_panel">
2016-09-23 09:28:53 +00:00
<div class="x_title">
2016-10-03 04:24:08 +00:00
<h2>Nodes Status</h2>
2016-09-23 09:28:53 +00:00
<ul class="nav navbar-right panel_toolbox">
<li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><i class="fa fa-wrench"></i></a>
<ul class="dropdown-menu" role="menu">
<li><a href="#">Settings 1</a>
</li>
<li><a href="#">Settings 2</a>
</li>
</ul>
</li>
</ul>
<div class="clearfix"></div>
</div>
2016-10-03 05:20:56 +00:00
<div class="x_content tile fixed_height_200" style="overflow-y:auto;">
2016-09-23 09:28:53 +00:00
<div class="widget_summary">
2016-10-03 06:14:35 +00:00
<% ping = ((nodes.select{ |node| node["ping"].eql? "true" }.length.to_f / nodes.length.to_f) * 100).to_i %>
2016-09-23 09:28:53 +00:00
<div class="w_left w_25">
2016-10-03 06:14:35 +00:00
<span>ping</span>
2016-09-23 09:28:53 +00:00
</div>
<div class="w_center w_55">
<div class="progress">
2016-10-03 06:14:35 +00:00
<div class="progress-bar bg-green" role="progressbar"
aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: <%= ping %>%;">
2016-09-23 09:28:53 +00:00
</div>
</div>
</div>
<div class="w_right w_20">
2016-10-03 06:14:35 +00:00
<span><%= nodes.select{ |node| node["ping"].eql? "true" }.length %> / <%= nodes.length %></span>
2016-09-19 10:57:10 +00:00
</div>
2016-09-23 09:28:53 +00:00
<div class="clearfix"></div>
2016-09-19 10:57:10 +00:00
</div>
2016-09-23 09:28:53 +00:00
<div class="widget_summary">
2016-10-03 06:14:35 +00:00
<% ssh = ((nodes.select{ |node| node["ssh"].eql? "on" }.length.to_f / nodes.length.to_f) * 100).to_i %>
2016-09-23 09:28:53 +00:00
<div class="w_left w_25">
2016-10-03 06:14:35 +00:00
<span>ssh</span>
2016-09-23 09:28:53 +00:00
</div>
<div class="w_center w_55">
<div class="progress">
2016-10-03 06:14:35 +00:00
<div class="progress-bar bg-green" role="progressbar"
aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: <%= ssh %>%;">
2016-09-23 09:28:53 +00:00
</div>
</div>
</div>
<div class="w_right w_20">
2016-10-03 06:14:35 +00:00
<span><%= nodes.select{ |node| node["ssh"].eql? "on" }.length %> / <%= nodes.length %></span>
2016-09-23 09:28:53 +00:00
</div>
2016-09-19 10:57:10 +00:00
<div class="clearfix"></div>
</div>
2016-09-23 09:28:53 +00:00
<div class="widget_summary">
2016-10-03 06:14:35 +00:00
<% gluster = ((nodes.select{ |node| node["gluster"].eql? "on" }.length.to_f / nodes.length.to_f) * 100).to_i %>
2016-09-23 09:28:53 +00:00
<div class="w_left w_25">
2016-10-03 06:14:35 +00:00
<span>gluster operation</span>
2016-09-23 09:28:53 +00:00
</div>
<div class="w_center w_55">
<div class="progress">
2016-10-03 06:14:35 +00:00
<div class="progress-bar bg-green" role="progressbar"
aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: <%= gluster %>%;">
2016-09-23 09:28:53 +00:00
</div>
</div>
</div>
<div class="w_right w_20">
2016-10-03 06:14:35 +00:00
<span><%= nodes.select{ |node| node["gluster"].eql? "on" }.length %> / <%= nodes.length %></span>
2016-09-19 10:57:10 +00:00
</div>
2016-09-23 09:28:53 +00:00
<div class="clearfix"></div>
2016-09-19 10:57:10 +00:00
</div>
</div>
</div>
</div>
2016-09-24 09:00:27 +00:00
<!-- /node status -->
2016-10-03 04:24:08 +00:00
2016-10-03 06:14:35 +00:00
<!-- node list -->
2016-10-03 05:20:56 +00:00
<div class="col-md-4 col-sm-4 col-xs-12">
<div class="x_panel tile">
2016-10-03 04:24:08 +00:00
<div class="x_title">
<h2>Nodes List</h2>
<ul class="nav navbar-right panel_toolbox">
<li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><i class="fa fa-wrench"></i></a>
<ul class="dropdown-menu" role="menu">
<li><a href="#">Settings 1</a>
</li>
<li><a href="#">Settings 2</a>
</li>
</ul>
</li>
</ul>
<div class="clearfix"></div>
</div>
2016-10-03 05:20:56 +00:00
<div class="x_content fixed_height_200" style="overflow-y:auto;">
2016-10-03 04:24:08 +00:00
<ul class="list-unstyled top_profiles" >
2016-10-03 04:35:47 +00:00
<% nodes.each do |node| %>
<li class="media event">
<% if node["ping"].eql? "true" %>
<a class="pull-left border-green profile_thumb">
<i class="fa fa-cube green"></i>
</a>
<% else %>
<a class="pull-left border-red profile_thumb">
<i class="fa fa-cube red"></i>
</a>
<% end %>
<div class="media-body">
<a class="title" href="#"><%= node["host_name"] %></a>
<p><strong><%= node["host_ip"] %> </strong> <%= node["user_name"] %> </p>
<% if node["gluster"].eql? "on" %>
<p> <small> <%= node["number_of_peers"] %></small></p>
<% end %>
</div>
</li>
<% end %>
2016-10-03 04:24:08 +00:00
</ul>
</div>
</div>
</div>
2016-10-03 06:14:35 +00:00
<!-- /node list -->
2016-10-03 05:20:56 +00:00
<!-- disk usage -->
<div class="col-md-4 col-sm-4 col-xs-12">
<div class="panel panel-body">
<div class="x_title" id="disk_file_title_div">
<h2 style="width:130px">Disk usage</h2>
</div>
<div class="row" id="disk_file_div">
<%= raw html_disk_file_table %>
</div>
</div>
</div>
<!-- /disk usage -->
2016-09-19 10:57:10 +00:00
</div>
2016-09-24 09:00:27 +00:00
2016-10-03 04:24:08 +00:00
<div class ="row">
</div>
2016-08-20 06:41:37 +00:00
</div>
<!-- /page content -->
2016-09-19 10:57:10 +00:00
2016-09-28 16:39:22 +00:00
<!-- On ready -->
2016-09-27 03:14:39 +00:00
<script>
2016-09-28 16:39:22 +00:00
$(document).ready(function() {
var du = [];
<% get_du.each_with_index do |du, index| %>
du.push({
'file_name':"<%= du['file_name'] %>",
'usage':"<%= du['usage'] %>"
2016-09-27 03:14:39 +00:00
});
2016-09-28 16:39:22 +00:00
<% end %>
draw_datatable();
draw_chart(du);
2016-10-03 06:14:14 +00:00
var options = {
legend: false,
responsive: false
};
var colors = ["#3498DB", "#26B99A", "#E74C3C", "#9B59B6", "#BDC3C7"];
var labels = [];
var data = [];
var backgroundColor = [];
var hoverBackgroundColor = [];
var df = [];
<% get_df.each_with_index do |df, index| %>
df.push({
'file_name':"<%= df['Filesystem'] %>",
'usage':"<%= (df["Use%"][0..df["Use%"].length - 1]).to_f / 100 %>"
});
<% end %>
2016-10-03 06:14:14 +00:00
for(var i = 0; i < df.length; i++){
labels.push(df[i]['file_name']);
data.push(df[i]['usage']);
backgroundColor.push(colors[i % colors.length]);
hoverBackgroundColor.push(colors[i % colors.length]);
}
new Chart(document.getElementById("disk_file_table_canvas"), {
type: 'doughnut',
tooltipFillColor: "rgba(51, 51, 51, 0.55)",
data: {
labels: labels,
datasets: [{
data: data,
backgroundColor: backgroundColor,
hoverBackgroundColor: hoverBackgroundColor
}]
},
options: options
});
2016-09-28 16:39:22 +00:00
})
</script>
<!-- /On ready -->
2016-09-27 03:14:39 +00:00
2016-09-28 16:39:22 +00:00
<!-- Datatable functions -->
<script>
function draw_datatable(){
$('#file_manager_table').dataTable( {
2016-09-28 10:48:54 +00:00
"bSort": false,
initComplete: function(){
2016-09-28 16:39:22 +00:00
$('#file_manager_table_filter').detach().appendTo("#file_manager_title_div").css({
2016-09-28 10:48:54 +00:00
'width':'250px'
});
2016-09-28 16:39:22 +00:00
$('#file_manager_table_length').detach().appendTo("#file_manager_title_div").css({
2016-09-28 10:48:54 +00:00
'width':'150px',
'float':'right'
});
2016-09-28 16:39:22 +00:00
$('#file_manager_title_div').css({
2016-09-28 10:48:54 +00:00
'width':'100%',
'height':'48px',
});
2016-09-28 16:39:22 +00:00
$('#file_manager_title_div input').css({
2016-09-28 10:48:54 +00:00
'width':'70%',
'height':'70%',
'font-size':'14px',
'padding':'5px'
});
}
2016-09-27 03:36:30 +00:00
});
2016-09-28 16:39:22 +00:00
$('#disk_usage_tile_table').dataTable({
"bSort":false,
"bFilter":false,
"bInfo":false,
2016-09-28 11:27:50 +00:00
initComplete: function(){
2016-09-28 16:39:22 +00:00
$('#disk_usage_tile_table_length').detach().appendTo("#disk_usage_title_div").css({
2016-09-28 11:27:50 +00:00
'width':'150px',
'float':'right'
});
2016-09-28 16:39:22 +00:00
$('#disk_usage_title_div').css({
2016-09-28 11:27:50 +00:00
'width':'100%',
'height':'48px',
});
}
});
2016-09-28 16:39:22 +00:00
}
function draw_chart(du){
2016-09-27 03:14:39 +00:00
var options = {
legend: false,
responsive: false
};
var colors = ["#3498DB", "#26B99A", "#E74C3C", "#9B59B6", "#BDC3C7"];
var labels = [];
var data = [];
var backgroundColor = [];
var hoverBackgroundColor = [];
2016-09-28 16:39:22 +00:00
for(var i = 0; i < du.length; i++){
labels.push(du[i]['file_name']);
data.push(du[i]['usage']);
backgroundColor.push(colors[i % colors.length]);
hoverBackgroundColor.push(colors[i % colors.length]);
}
2016-09-27 03:14:39 +00:00
2016-09-27 03:36:30 +00:00
new Chart(document.getElementById("disk_usage_table_canvas"), {
2016-09-27 03:14:39 +00:00
type: 'doughnut',
tooltipFillColor: "rgba(51, 51, 51, 0.55)",
data: {
labels: labels,
datasets: [{
data: data,
backgroundColor: backgroundColor,
hoverBackgroundColor: hoverBackgroundColor
}]
},
options: options
});
2016-09-28 16:39:22 +00:00
}
2016-09-27 03:14:39 +00:00
</script>
2016-09-28 16:39:22 +00:00
<!-- /Datatable functions -->
2016-09-27 03:14:39 +00:00
2016-09-23 09:28:53 +00:00
<!-- File manager functions -->
2016-09-19 10:57:10 +00:00
<script>
2016-09-27 03:14:39 +00:00
// change directory
2016-09-26 16:53:09 +00:00
$(document).on("click", "#file_manager_div .chdir", function(){
var file_name = $(this).text().trim();
2016-09-27 03:14:39 +00:00
var current_dir = $("#file_manager_div span").text().trim();
if(current_dir == "/") current_dir = "";
2016-09-26 16:53:09 +00:00
var next_dir = current_dir + "/" + file_name;
$.ajax({
2016-10-02 04:19:10 +00:00
method : "post",
url : "/home/chdir",
data : { next_dir : next_dir },
beforeSend : function(){
2016-10-02 04:27:01 +00:00
$(location).attr('href',"#loading");
//Pace.start();
2016-10-02 04:19:10 +00:00
},
success : function(result){
2016-09-26 16:53:09 +00:00
$("#current_dir").val(next_dir);
2016-09-28 16:39:22 +00:00
$("#file_manager_title_div").empty().append("<h2 style='width:130px'>File manager</h2>");
$("#disk_usage_title_div").empty().append("<h2 style='width:130px'>Disk usage</h2>");
$("#file_manager_div").empty().append(result.file_manager_table);
$("#disk_usage_div").empty().append(result.disk_usage_table);
2016-09-26 16:53:09 +00:00
2016-09-28 16:39:22 +00:00
draw_datatable();
2016-09-27 03:14:39 +00:00
draw_chart(result.du);
2016-10-02 04:27:01 +00:00
$(location).attr('href',"#");
2016-10-03 04:24:08 +00:00
//check_divheight();
2016-10-02 04:27:01 +00:00
//Pace.stop();
2016-09-26 16:53:09 +00:00
}
})
})
2016-09-27 03:14:39 +00:00
// change upper
2016-09-26 16:53:09 +00:00
$(document).on("click", "#file_manager_div .chupper", function(){
2016-09-27 03:14:39 +00:00
var current_dir = $("#file_manager_div span").text().trim();
2016-09-26 16:53:09 +00:00
if(current_dir == "/") return;
var lastindex = current_dir.lastIndexOf("/");
2016-09-27 03:14:39 +00:00
console.log("curdir : " + current_dir);
console.log("last idx : " + lastindex);
2016-09-19 10:57:10 +00:00
if(lastindex == 0) lastindex++;
2016-09-26 16:53:09 +00:00
var next_dir = current_dir.substring(0, lastindex);
2016-09-19 10:57:10 +00:00
$.ajax({
2016-10-02 04:19:10 +00:00
method : "POST",
url : "/home/chdir",
data : { next_dir : next_dir },
beforeSend : function(){
2016-10-02 04:27:01 +00:00
//Pace.start();
$(location).attr('href',"#loading");
2016-10-02 04:19:10 +00:00
},
success : function(result){
2016-09-26 16:53:09 +00:00
$("#current_dir").val(next_dir);
2016-09-28 16:39:22 +00:00
$("#file_manager_title_div").empty().append("<h2 style='width:130px'>File manager</h2>");
$("#disk_usage_title_div").empty().append("<h2 style='width:130px'>Disk usage</h2>");
$("#file_manager_div").empty().append(result.file_manager_table);
$("#disk_usage_div").empty().append(result.disk_usage_table);
2016-09-28 16:39:22 +00:00
draw_datatable();
2016-09-27 03:14:39 +00:00
draw_chart(result.du);
2016-10-02 04:27:01 +00:00
//Pace.stop();
2016-10-03 05:20:56 +00:00
2016-10-03 04:24:08 +00:00
//check_divheight();
2016-10-02 04:27:01 +00:00
$(location).attr('href',"#");
2016-09-19 10:57:10 +00:00
}
2016-09-26 16:53:09 +00:00
})
})
2016-09-28 08:41:24 +00:00
// remove directory
2016-09-26 16:53:09 +00:00
$(document).on("click", "#file_manager_div .rmdir", function(){
2016-09-27 03:14:39 +00:00
var file_name = $(this).text().trim();
var current_dir = $("#file_manager_div span").text().trim();
2016-09-26 16:53:09 +00:00
var target = current_dir + "/" + file_name;
if(confirm("Are you sure you want to delete '"+ file_name +"' ?")) {
$.ajax({
method: "POST",
2016-09-28 09:15:06 +00:00
url: "/home/rmdir",
2016-09-26 16:53:09 +00:00
data: { target : target },
2016-10-02 04:47:05 +00:00
beforeSend : function(){
$(location).attr('href',"#loading");
},
2016-09-26 16:53:09 +00:00
success : function(result){
$("#current_dir").val(current_dir);
2016-09-28 16:39:22 +00:00
$("#file_manager_title_div").empty().append("<h2 style='width:130px'>File manager</h2>");
$("#disk_usage_title_div").empty().append("<h2 style='width:130px'>Disk usage</h2>");
$("#file_manager_div").empty().append(result.file_manager_table);
$("#disk_usage_div").empty().append(result.disk_usage_table);
2016-09-26 16:53:09 +00:00
2016-09-28 16:39:22 +00:00
draw_datatable();
2016-09-27 03:14:39 +00:00
draw_chart(result.du);
2016-10-03 04:24:08 +00:00
//check_divheight();
2016-10-02 04:47:05 +00:00
$(location).attr('href',"#");
2016-09-26 16:53:09 +00:00
}
})
}
})
2016-09-19 10:57:10 +00:00
</script>
2016-09-28 08:41:24 +00:00
<!-- /File manager functions -->