Update home index
This commit is contained in:
parent
73209faf54
commit
ea3d034885
@ -36,8 +36,8 @@
|
|||||||
|
|
||||||
<!-- top tiles -->
|
<!-- top tiles -->
|
||||||
<% users = User.all %>
|
<% users = User.all %>
|
||||||
<% nodes = Node.all %>
|
<% nodes = ssh_nodes %>
|
||||||
<% vols = ssh_volume_info %>
|
<% volumes = 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">
|
||||||
@ -83,10 +83,10 @@
|
|||||||
<div class="left"></div>
|
<div class="left"></div>
|
||||||
<div class="right">
|
<div class="right">
|
||||||
<span class="count_top"><i class="fa fa-database"></i> Total volumes</span>
|
<span class="count_top"><i class="fa fa-database"></i> Total volumes</span>
|
||||||
<div class="count"><%= vols.nil? ? 0 : vols.length %></div>
|
<div class="count"><%= volumes.nil? ? 0 : volumes.length %></div>
|
||||||
<span class="count_bottom">
|
<span class="count_bottom">
|
||||||
<i class="blue"><%= vols.count{|x| x['Status'].eql? " Started"} %></i> started /
|
<i class="blue"><%= volumes.count{|x| x['Status'].eql? " Started"} %></i> started /
|
||||||
<i class="green"><%= vols.count{|x| x['Mount State'].eql? "mounted"} %></i> mounted
|
<i class="green"><%= volumes.count{|x| x['Mount State'].eql? "mounted"} %></i> mounted
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -101,8 +101,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- /top tiles -->
|
<!-- /top tiles -->
|
||||||
|
|
||||||
|
<!-- first row -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
<!-- file manager -->
|
<!-- file manager -->
|
||||||
<div class="col-md-8 col-sm-8 col-xs-12">
|
<div class="col-md-8 col-sm-8 col-xs-12">
|
||||||
<div id="pagecontent" class="panel panel-body">
|
<div id="pagecontent" class="panel panel-body">
|
||||||
@ -131,9 +131,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- /disk usage -->
|
<!-- /disk usage -->
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /first row -->
|
||||||
|
|
||||||
<% nodes = ssh_nodes %>
|
<!-- second row -->
|
||||||
<% volumes = ssh_volume_info %>
|
|
||||||
<div class ="row">
|
<div class ="row">
|
||||||
<!-- node status -->
|
<!-- node status -->
|
||||||
<div class="col-md-4 col-sm-4 col-xs-12">
|
<div class="col-md-4 col-sm-4 col-xs-12">
|
||||||
@ -156,7 +156,7 @@
|
|||||||
<div class="clearfix"></div>
|
<div class="clearfix"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="x_content tile fixed_height_160" style="overflow-y:auto;">
|
<div class="x_content tile fixed_height_160" style="overflow-y:auto;">
|
||||||
<% if nodes.nil? %>
|
<% if !nodes.nil? %>
|
||||||
<div class="widget_summary">
|
<div class="widget_summary">
|
||||||
<% ping = ((nodes.select{ |node| node["ping"].eql? "true" }.length.to_f / nodes.length.to_f) * 100).to_i %>
|
<% ping = ((nodes.select{ |node| node["ping"].eql? "true" }.length.to_f / nodes.length.to_f) * 100).to_i %>
|
||||||
<div class="w_left w_25">
|
<div class="w_left w_25">
|
||||||
@ -218,7 +218,6 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="x_panel">
|
<div class="x_panel">
|
||||||
<div class="x_title">
|
<div class="x_title">
|
||||||
<h2>Volumes Status</h2>
|
<h2>Volumes Status</h2>
|
||||||
@ -238,7 +237,7 @@
|
|||||||
<div class="clearfix"></div>
|
<div class="clearfix"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="x_content tile fixed_height_160" style="overflow-y:auto;">
|
<div class="x_content tile fixed_height_160" style="overflow-y:auto;">
|
||||||
<% if volumes.nil? %>
|
<% if !volumes.nil? %>
|
||||||
<div class="widget_summary">
|
<div class="widget_summary">
|
||||||
<% start = ((volumes.select{ |volume| volume["Status"].eql? " Started" }.length.to_f / volumes.length.to_f) * 100).to_i %>
|
<% start = ((volumes.select{ |volume| volume["Status"].eql? " Started" }.length.to_f / volumes.length.to_f) * 100).to_i %>
|
||||||
<div class="w_left w_25">
|
<div class="w_left w_25">
|
||||||
@ -288,7 +287,7 @@
|
|||||||
|
|
||||||
<!-- node list -->
|
<!-- node list -->
|
||||||
<div class="col-md-4 col-sm-4 col-xs-12">
|
<div class="col-md-4 col-sm-4 col-xs-12">
|
||||||
<div class="x_panel tile">
|
<div class="x_panel">
|
||||||
<div class="x_title">
|
<div class="x_title">
|
||||||
<h2>Nodes List</h2>
|
<h2>Nodes List</h2>
|
||||||
<ul class="nav navbar-right panel_toolbox">
|
<ul class="nav navbar-right panel_toolbox">
|
||||||
@ -308,7 +307,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="x_content fixed_height_320" style="overflow-y:auto;">
|
<div class="x_content fixed_height_320" style="overflow-y:auto;">
|
||||||
<ul class="list-unstyled top_profiles">
|
<ul class="list-unstyled top_profiles">
|
||||||
<% if nodes.nil? %>
|
<% if !nodes.nil? %>
|
||||||
<% nodes.each do |node| %>
|
<% nodes.each do |node| %>
|
||||||
<li class="media event">
|
<li class="media event">
|
||||||
<% if node["ping"].eql? "true" %>
|
<% if node["ping"].eql? "true" %>
|
||||||
@ -363,8 +362,7 @@
|
|||||||
</ul>
|
</ul>
|
||||||
<div class="clearfix"></div>
|
<div class="clearfix"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="x_content tile" id="disk_file_div">
|
<div class="x_content fixed_height_320" style="overflow-y:auto;" id="disk_file_div">
|
||||||
|
|
||||||
<% if volumes.nil? or ( (volumes.select{ |volume| volume["Mount State"].eql? "mounted" }.length) == 0) %>
|
<% if volumes.nil? or ( (volumes.select{ |volume| volume["Mount State"].eql? "mounted" }.length) == 0) %>
|
||||||
<div class="row animated flipInX col-md-8 col-sm-8 col-xs-8">
|
<div class="row animated flipInX col-md-8 col-sm-8 col-xs-8">
|
||||||
<div class="alert alert-error" role="alert">
|
<div class="alert alert-error" role="alert">
|
||||||
@ -383,11 +381,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- /disk usage -->
|
<!-- /disk usage -->
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /second row -->
|
||||||
|
|
||||||
<div class ="row">
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<!-- /page content -->
|
<!-- /page content -->
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user