deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@redhat.com
Subject [PATCH core 2/2] EC2: Added HTML views for metrics
Date Wed, 18 Jan 2012 14:26:50 GMT
From: Michal Fojtik <mfojtik@redhat.com>


Signed-off-by: Michal fojtik <mfojtik@redhat.com>
---
 server/lib/deltacloud/drivers/ec2/ec2_driver.rb |    2 +-
 server/public/images/metric.png                 |  Bin 0 -> 14576 bytes
 server/views/metrics/index.html.haml            |   13 +++++++++++++
 server/views/metrics/show.html.haml             |   23 +++++++++++++++++++++++
 4 files changed, 37 insertions(+), 1 deletions(-)
 create mode 100644 server/public/images/metric.png
 create mode 100644 server/views/metrics/index.html.haml
 create mode 100644 server/views/metrics/show.html.haml

diff --git a/server/lib/deltacloud/drivers/ec2/ec2_driver.rb b/server/lib/deltacloud/drivers/ec2/ec2_driver.rb
index 1ff79dd..78f757e 100644
--- a/server/lib/deltacloud/drivers/ec2/ec2_driver.rb
+++ b/server/lib/deltacloud/drivers/ec2/ec2_driver.rb
@@ -990,7 +990,7 @@ module Deltacloud
         def convert_metric(metric)
           Metric.new(
             :id => metric[:value],
-            :entity => metric[:name] || :unknown,
+            :entity => metric[:name] || :unknown
           ).add_property(metric[:measure_name])
         end
 
diff --git a/server/public/images/metric.png b/server/public/images/metric.png
new file mode 100644
index 0000000000000000000000000000000000000000..98b7f76069f12504086c017dd218a31cddaf3907
GIT binary patch
literal 14576
zcmWlfbx>PP7sdkw4-h=KYbjpb-6c@$g%&AZ+zJ$ThXTdj-HN-r6=-mG3KVzv^8In|
z&LlHCvwP2;^V{b+5gKapSQw-j0000>Q9%X@AN~LTprOFu{bDBL@B!UXLEi-cz{LOm
zg8)d+ga7~->ekZI8X8s(t`06%4vy4{($dt9&JGsVU(Er4Z_8O)mfBiJM51@=*HX&i
z{z=LXP(n0ns8p0cK>{Ny4LVpUoF;FHP_q|TRu)J$k{gZ`8|xoUsL2M3#8^b#rOA&C
zDhQ7pd)o3Y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 0000000..53635ae
--- /dev/null
+++ b/server/views/metrics/index.html.haml
@@ -0,0 +1,13 @@
+=header "Metrics"
+=subheader "#{Thread::current[:provider] || ENV['API_PROVIDER'] || 'default'}"
+
+%div{ :'data-role' => :content, :'data-theme' => 'c'}
+  %ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' =>
'a'}
+    %li{ :'data-role' => 'list-divider'}=driver_symbol
+    - @metrics.each do |metric|
+      %li
+        %a{ :href => metric_url(metric.id), :'data-ajax' => 'false'}
+          %img{ :class => 'ui-link-thumb', :src => '/images/metric.png'}
+          %h3= metric.id
+          %p
+            = metric.properties.map { |p| p.name }.join(', ')
diff --git a/server/views/metrics/show.html.haml b/server/views/metrics/show.html.haml
new file mode 100644
index 0000000..c1d88fc
--- /dev/null
+++ b/server/views/metrics/show.html.haml
@@ -0,0 +1,23 @@
+=header Metric
+=subheader @metric.id
+
+%div{ :'data-role' => :content, :'data-theme' => 'c'}
+  %div{ :'data-role' => :'collapsible-set'}
+    - @metric.properties.each do |p|
+      %div{ :'data-role' => :'collapsible', :'data-collapse' => 'true'}
+        %h3=p.name
+        %table{ :summary => "#{p.name} values"}
+          %caption Statistics for last 60 minutes
+          %tr
+            %th Time
+            %th Minumum
+            %th Maximum
+            %th Average
+            %th Units
+          - p.values.each do |v|
+            %tr
+              %td=v[:timestamp]
+              %td=v[:minimum]
+              %td=v[:maximum]
+              %td=v[:average]
+              %td=v[:unit]
-- 
1.7.4.4


Mime
View raw message