|
@@ -1,36 +1,51 @@
|
|
|
-# coding: utf-8
|
|
|
-%h1 rSeed
|
|
|
+%h1= "rSeed <small>#{stats["down"]} / #{stats["up"]}</small>"
|
|
|
%ul{:class => "nav nav-tabs"}
|
|
|
%li.active
|
|
|
%a
|
|
|
Active
|
|
|
- %span.badge 2
|
|
|
+ %span.badge= result.size
|
|
|
%li
|
|
|
%a
|
|
|
Complete
|
|
|
- %span.badge 5
|
|
|
+ %span.badge 0
|
|
|
%li
|
|
|
%a
|
|
|
Inactive
|
|
|
- %span.badge 3
|
|
|
-
|
|
|
-%table{:class => "table table-hover"}
|
|
|
- %thead
|
|
|
- %tr
|
|
|
- %th Name
|
|
|
- %th Progress
|
|
|
- %th Ratio
|
|
|
- %th Up / Down
|
|
|
- %th Share
|
|
|
- %tbody
|
|
|
- - result.each do |t|
|
|
|
- %tr
|
|
|
- %td= t[0]
|
|
|
- %td
|
|
|
- .progress
|
|
|
- %div{:class => "progress-bar progress-bar-success", :style => "width: #{(t[1].to_i/t[2].to_i)*100}%"}
|
|
|
+ %span.badge 0
|
|
|
+
|
|
|
+%br
|
|
|
+/- result.sort.each do |t|
|
|
|
+/ %td= t[0]
|
|
|
+/ %td
|
|
|
+/ .progress{:style => "margin-bottom: 0px;"}
|
|
|
+/ %div{:class => "progress-bar progress-bar-success", :style => "width: #{(t[1].to_i/t[2].to_i)*100}%;"}
|
|
|
+/ %span.sr-only "#{(t[1].to_i/t[2].to_i)*100}%"
|
|
|
+/ %td= "#{t[3].to_f/1000}"
|
|
|
+/ %td= "#{t[4].to_i/1024} ko/s"
|
|
|
+/ %td= "#{t[5].to_i/1024} ko/s"
|
|
|
+/ %td
|
|
|
+/ %span.glyphicon{:class => "glyphicon-globe"}
|
|
|
+
|
|
|
+#accordion.panel-group
|
|
|
+ - result.each do |t|
|
|
|
+ .panel.panel-success
|
|
|
+ .panel-heading
|
|
|
+ %h4.panel-title
|
|
|
+ %a{data: {toggle: "collapse", parent: "#accordion"}, href: "##{t[6][0,5]}"}= t[0]
|
|
|
+ .panel-collapse.collapse{id: "#{t[6][0,5]}"}
|
|
|
+ .panel-body
|
|
|
+ .progress{:style => "margin-bottom: 0px;"}
|
|
|
+ %div{:class => "progress-bar progress-bar-success", :style => "width: #{(t[1].to_i/t[2].to_i)*100}%;"}
|
|
|
%span.sr-only "#{(t[1].to_i/t[2].to_i)*100}%"
|
|
|
- %td= "#{t[3].to_f/1000}"
|
|
|
- %td= "#{t[4].to_i/1024} ko/s"
|
|
|
- %td
|
|
|
- %span.glyphicon{:class => "glyphicon-globe"}
|
|
|
+ %table.table.table-bordered
|
|
|
+ %thead
|
|
|
+ %tr
|
|
|
+ %th Ratio
|
|
|
+ %th Upload Speed
|
|
|
+ %th Download Speed
|
|
|
+ %tbody
|
|
|
+ %tr
|
|
|
+ %td= "#{t[3].to_f/1000}"
|
|
|
+ %td= "#{t[4].to_i/1024} ko/s"
|
|
|
+ %td= "#{t[5].to_i/1024} ko/s"
|