From e5109e87ce57f4e02bae295cf3fb032a04e40081 Mon Sep 17 00:00:00 2001 From: kyg516 Date: Mon, 3 Oct 2016 15:14:35 +0900 Subject: [PATCH] Update home --- app/views/home/index.html.erb | 81 ++++++++--------------------------- 1 file changed, 19 insertions(+), 62 deletions(-) diff --git a/app/views/home/index.html.erb b/app/views/home/index.html.erb index 5ee5a21..a0a313e 100644 --- a/app/views/home/index.html.erb +++ b/app/views/home/index.html.erb @@ -132,6 +132,7 @@ + <% nodes = ssh_nodes %>
@@ -155,83 +156,53 @@
+ <% ping = ((nodes.select{ |node| node["ping"].eql? "true" }.length.to_f / nodes.length.to_f) * 100).to_i %>
- Ping Connections / Total Node + ping
-
- 60% Complete +
- 123k -
-
-
- -
-
- 0.1.5.3 -
-
-
-
- 60% Complete -
-
-
-
- 53k + <%= nodes.select{ |node| node["ping"].eql? "true" }.length %> / <%= nodes.length %>
+ <% ssh = ((nodes.select{ |node| node["ssh"].eql? "on" }.length.to_f / nodes.length.to_f) * 100).to_i %>
- 0.1.5.4 + ssh
-
- 60% Complete +
- 23k + <%= nodes.select{ |node| node["ssh"].eql? "on" }.length %> / <%= nodes.length %>
+ <% gluster = ((nodes.select{ |node| node["gluster"].eql? "on" }.length.to_f / nodes.length.to_f) * 100).to_i %>
- 0.1.5.5 + gluster operation
-
- 60% Complete +
- 3k -
-
-
-
-
- 0.1.5.6 -
-
-
-
- 60% Complete -
-
-
-
- 1k + <%= nodes.select{ |node| node["gluster"].eql? "on" }.length %> / <%= nodes.length %>
@@ -240,7 +211,7 @@
- +
@@ -262,8 +233,6 @@
    - - <% nodes = ssh_nodes %> <% nodes.each do |node| %>
  • <% if node["ping"].eql? "true" %> @@ -288,6 +257,7 @@
+
@@ -320,26 +290,13 @@ $(document).ready(function() { }); <% end %> draw_datatable(); - draw_chart(du); + draw_chart(du); })