Update home index
This commit is contained in:
parent
d7320e22b0
commit
f5a11b5485
@ -119,14 +119,17 @@ module HomeHelper
|
||||
html << "</thead>"
|
||||
html << "<tbody>"
|
||||
|
||||
nodes = Node.all
|
||||
get_df.each_with_index do |file, index|
|
||||
# show mounted files only
|
||||
ip = file['Filesystem'].split(":").first
|
||||
next if nodes.select{|node| node["host_ip"].eql? ip}.length == 0
|
||||
|
||||
color = ['blue', 'green', 'red', 'purple', 'grey'][index % 5]
|
||||
html << "<tr><td>"
|
||||
html << "<div class='col-lg-7 col-md-7 col-sm-7 col-xs-7'>"
|
||||
html << "<p><i class='fa fa-square #{color}'></i> "
|
||||
html << file['Filesystem']
|
||||
html << file['Mounted on']
|
||||
html << "</p></div>"
|
||||
html << "</td><td>"
|
||||
html << "<div class='col-lg-7 col-md-7 col-sm-7 col-xs-7'>"
|
||||
|
@ -352,7 +352,6 @@
|
||||
|
||||
<!-- On ready -->
|
||||
<script>
|
||||
|
||||
$(document).ready(function() {
|
||||
var du = [];
|
||||
<% get_du.each_with_index do |du, index| %>
|
||||
@ -375,7 +374,11 @@ $(document).ready(function() {
|
||||
var hoverBackgroundColor = [];
|
||||
|
||||
var df = [];
|
||||
|
||||
<% nodes = Node.all %>
|
||||
<% get_df.each_with_index do |df, index| %>
|
||||
<% ip = df['Filesystem'].split(":").first %>
|
||||
<% next if nodes.select{|node| node["host_ip"].eql? ip}.length == 0 %>
|
||||
df.push({
|
||||
'file_name':"<%= df['Filesystem'] %>",
|
||||
'usage':"<%= (df["Use%"][0..df["Use%"].length - 1]).to_f / 100 %>"
|
||||
|
@ -285,7 +285,6 @@
|
||||
<!-- /page content -->
|
||||
<script>
|
||||
|
||||
|
||||
$('.probe').change(function() {
|
||||
$(location).attr('href',"#loading");
|
||||
if($(this).is(":checked")) {
|
||||
|
Loading…
Reference in New Issue
Block a user