<% users = User.all %> <% nodes = Node.all %> <% vols = ssh_volume_info %> <% today_user = User.where(:last_sign_in_at => Date.today..Date.tomorrow) %> <% today_node = Node.where(:created_at => Date.today..Date.tomorrow) %>
Current signed in
<%= current_user.current_sign_in_at.strftime("%a, %H:%M") %>
From <%= current_user.current_sign_in_ip %>
Last signed in
<%= current_user.last_sign_in_at.strftime("%a, %H:%M") %>
From <%= current_user.last_sign_in_ip %>
Members
<%= users.nil? ? 0 : users.length %>
<%= today_user.nil? ? 0 : today_user.length %> user signed Today
Total Nodes
<%= nodes.nil? ? 0 : nodes.length %>
<%= today_node.nil? ? 0 : today_node.length %> Node added Today
Total volumes
<%= vols.nil? ? 0 : vols.length %>
<%= vols.count{|x| x['Status'].eql? " Started"} %> started / <%= vols.count{|x| x['Mount State'].eql? "mounted"} %> mounted
Total Connections
<%= users.sum("sign_in_count") %>
<%= today_user.sum("sign_in_count") %> connected today

File Manager

<%= raw html_file_manager_table %>

Disk usage

<%= raw html_disk_usage_table %>

Nodes Status

Ping Connections / Total Node
60% Complete
123k
0.1.5.3
60% Complete
53k
0.1.5.4
60% Complete
23k
0.1.5.5
60% Complete
3k
0.1.5.6
60% Complete
1k

Nodes List

    <% nodes = ssh_nodes %> <% nodes.each do |node| %>
  • <% if node["ping"].eql? "true" %> <% else %> <% end %>
    <%= node["host_name"] %>

    <%= node["host_ip"] %> <%= node["user_name"] %>

    <% if node["gluster"].eql? "on" %>

    <%= node["number_of_peers"] %>

    <% end %>
  • <% end %>