incubator-bloodhound-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g..@apache.org
Subject svn commit: r1307982 - in /incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard: layouts/templates/bootstrap.html web_ui.py
Date Sun, 01 Apr 2012 01:28:21 GMT
Author: gjm
Date: Sun Apr  1 01:28:21 2012
New Revision: 1307982

URL: http://svn.apache.org/viewvc?rev=1307982&view=rev
Log:
Dashboard code import: BH_Dashboard: Using schema to position widgets in dashboard (bootstrap
layout)

Modified:
    incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/layouts/templates/bootstrap.html
    incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/web_ui.py

Modified: incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/layouts/templates/bootstrap.html
URL: http://svn.apache.org/viewvc/incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/layouts/templates/bootstrap.html?rev=1307982&r1=1307981&r2=1307982&view=diff
==============================================================================
--- incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/layouts/templates/bootstrap.html
(original)
+++ incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/layouts/templates/bootstrap.html
Sun Apr  1 01:28:21 2012
@@ -33,23 +33,21 @@
     ${w.content}
   </div>
 
-  <body>
-    <div class="row">
-      <div class="span8">
-        <py:for each="(i, w) in enumerate(widgets)">
-          <py:if test="i &amp; 1 == 0">
-            ${widget_container(w)}
-          </py:if>
-        </py:for>
-      </div>
-      <div class="span4">
-        <py:for each="(i, w) in enumerate(widgets)">
-          <py:if test="i &amp; 1 == 1">
-            ${widget_container(w)}
-          </py:if>
+  <div py:def="bsdiv(ui)" class="${ui._class}">
+    <py:choose test="">
+      <py:when test="ui.div">
+        <py:for each="_ui in ui.div">${bsdiv(_ui)}</py:for>
+      </py:when>
+      <py:when test="ui.widgets">
+        <py:for each="widx in ui.widgets">
+          ${widget_container(widgets[widx])}
         </py:for>
-      </div>
-    </div>
+      </py:when>
+    </py:choose>
+  </div>
+
+  <body>
+    <py:for each="ui in layout.div">${bsdiv(ui)}</py:for>
     <div id="ft" class="row">
       <div id="help">
         <strong>Note:</strong> See 

Modified: incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/web_ui.py
URL: http://svn.apache.org/viewvc/incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/web_ui.py?rev=1307982&r1=1307981&r2=1307982&view=diff
==============================================================================
--- incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/web_ui.py (original)
+++ incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/web_ui.py Sun Apr  1 01:28:21
2012
@@ -125,15 +125,15 @@ class DashboardModule(Component):
         schema = {
                 'div' : [
                         {
-                            'class' : 'row',
+                            '_class' : 'row',
                             'div' : [
                                     {
-                                        'class' : 'span8',
-                                        'widgets' : [1,3]
+                                        '_class' : 'span8',
+                                        'widgets' : [0,2]
                                     },
                                     {
-                                        'class' : 'span4',
-                                        'widgets' : [2]
+                                        '_class' : 'span4',
+                                        'widgets' : [1]
                                     }
                                 ]
                         }



Mime
View raw message