deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject git commit: Adds XML for metrics - resolves JIRA DTACLOUD_235
Date Thu, 14 Jun 2012 10:51:08 GMT
Updated Branches:
  refs/heads/master c799a2458 -> 64148f35c


Adds XML for metrics - resolves JIRA DTACLOUD_235

https://issues.apache.org/jira/browse/DTACLOUD-235


Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/64148f35
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/64148f35
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/64148f35

Branch: refs/heads/master
Commit: 64148f35c6d53f6a8f69ccaa59c331bd8aa046e0
Parents: c799a24
Author: marios <marios@redhat.com>
Authored: Thu Jun 14 12:40:13 2012 +0300
Committer: marios <marios@redhat.com>
Committed: Thu Jun 14 12:41:23 2012 +0300

----------------------------------------------------------------------
 server/views/metrics/index.xml.haml |    5 +++--
 server/views/metrics/show.xml.haml  |    9 +++++++++
 2 files changed, 12 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/64148f35/server/views/metrics/index.xml.haml
----------------------------------------------------------------------
diff --git a/server/views/metrics/index.xml.haml b/server/views/metrics/index.xml.haml
index d2c5b2d..bd5c184 100644
--- a/server/views/metrics/index.xml.haml
+++ b/server/views/metrics/index.xml.haml
@@ -1,4 +1,5 @@
-!!!XML
+- unless defined?(partial)
+  !!!XML
 %metrics
   - @elements.each do |c|
-    = h
+    = haml :'metrics/show', :locals => { :@metric => c, :partial => true}

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/64148f35/server/views/metrics/show.xml.haml
----------------------------------------------------------------------
diff --git a/server/views/metrics/show.xml.haml b/server/views/metrics/show.xml.haml
new file mode 100644
index 0000000..9867134
--- /dev/null
+++ b/server/views/metrics/show.xml.haml
@@ -0,0 +1,9 @@
+- unless defined?(partial)
+  !!! XML
+%metric{:href => metric_url(@metric.id), :id => @metric.id}
+  -haml_tag(:entity, :<) do
+    -haml_concat @metric.send(:id)
+  %properties
+    -@metric.properties.each do |prop|
+      -haml_tag(prop.name, :<) do
+        - haml_concat prop.values


Mime
View raw message