incubator-bloodhound-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g..@apache.org
Subject svn commit: r1307990 - in /incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard: web_ui.py widgets/containers.py widgets/query.py
Date Sun, 01 Apr 2012 01:41:56 GMT
Author: gjm
Date: Sun Apr  1 01:41:56 2012
New Revision: 1307990

URL: http://svn.apache.org/viewvc?rev=1307990&view=rev
Log:
Dashboard code import: BH_Dashboard: Default dashboard contents ... little bug to be fixed
yet

Modified:
    incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/web_ui.py
    incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/containers.py
    incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/query.py

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=1307990&r1=1307989&r2=1307990&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:41:56
2012
@@ -121,9 +121,13 @@ class DashboardModule(Component):
         from bhdashboard.widgets.ticket import TicketFieldCloudWidget
         from bhdashboard.widgets.timeline import TimelineWidget
 
-        dashboard_query = 'status=accepted&status=assigned&status=new' \
+        all_query = 'status=accepted&status=assigned&status=new' \
                 '&status=reopened&group=time&col=id&col=summary&col=owner'
\
                 '&col=status&col=priority&order=priority&groupdesc=1&desc=1'
+        mine_query = 'status=accepted&status=assigned&status=new' \
+                '&status=reopened&owner=murphy&group=time&col=id&col=summary'
\
+                '&col=owner&col=status&col=priority&order=priority' \
+                '&groupdesc=1&desc=1'
         layout = BootstrapLayout(self.env)
         schema = {
                 'div' : [
@@ -132,7 +136,7 @@ class DashboardModule(Component):
                             'div' : [
                                     {
                                         '_class' : 'span8',
-                                        'widgets' : [0,2]
+                                        'widgets' : [0]
                                     },
                                     {
                                         '_class' : 'span4',
@@ -143,25 +147,14 @@ class DashboardModule(Component):
                     ],
                 'widgets' : [
                         {
-                            'args' : ['TicketQuery', None, 
-                                    {'args' : {'max' : 10,
-                                            'query' : dashboard_query,
-                                            'title' : 'Dashboard'}
-                                    }],
-                            'altlinks' : False
-                        },
-                        {
-                            'args' : ['Timeline', None, {'args' : {}}]
-                        },
-                        {
                             'args' : ['Container', None, 
                                     {'args' : {'layout' : 'bootstrap_btnbar',
-                                            'schema' : """
+                                            'schema' : '''
                                             {
                                               "toolbar" : [
                                                   ["Products", null],
-                                                  ["My Tickets", 1],
-                                                  ["All tickets", 2],
+                                                  ["My Tickets", 2],
+                                                  ["All tickets", 1],
                                                   ["|", null],
                                                   ["Projects", null],
                                                   ["Components", 0]
@@ -177,26 +170,38 @@ class DashboardModule(Component):
                                                 },
                                                 {
                                                   "args" : [
-                                                      "TicketFieldCloud", 
-                                                      null, 
+                                                      "TicketQuery", null, 
                                                       {"args" : {
-                                                          "field" : "milestone",
-                                                          "verbose" : false}}]
+                                                          "max" : 10,
+                                                          "query" : "''' + 
+                                                              all_query + 
+                                                          '''",
+                                                          "title" : "All Tickets"}
+                                                      }],
+                                                  "altlinks" : false
                                                 },
                                                 {
                                                   "args" : [
-                                                      "TicketFieldCloud", 
-                                                      null, 
+                                                      "TicketQuery", null, 
                                                       {"args" : {
-                                                          "field" : "type",
-                                                          "verbose" : true}}]
+                                                          "max" : 10,
+                                                          "query" : "''' + 
+                                                              mine_query + 
+                                                          '''",
+                                                          "title" : "My Tickets"}
+                                                      }],
+                                                  "altlinks" : false
                                                 }
                                               ]
                                             }
-                                            """
+                                            ''',
+                                            'title' : _("Dashboard")
                                             }
                                     }]
                         },
+                        {
+                            'args' : ['Timeline', None, {'args' : {}}]
+                        },
                     ]
             }
 

Modified: incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/containers.py
URL: http://svn.apache.org/viewvc/incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/containers.py?rev=1307990&r1=1307989&r2=1307990&view=diff
==============================================================================
--- incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/containers.py (original)
+++ incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/containers.py Sun
Apr  1 01:41:56 2012
@@ -76,7 +76,7 @@ class ContainerWidget(WidgetBase):
 
         return layout_data['template'], \
                 {
-                    'title' : '',
+                    'title' : title,
                     'data' : dict(
                             context=context,
                             layout=schema,

Modified: incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/query.py
URL: http://svn.apache.org/viewvc/incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/query.py?rev=1307990&r1=1307989&r2=1307990&view=diff
==============================================================================
--- incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/query.py (original)
+++ incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/query.py Sun Apr 
1 01:41:56 2012
@@ -86,6 +86,7 @@ class TicketQueryWidget(WidgetBase):
                 except TypeError:
                     pass
             args.update({'page' : page, 'max': maxrows})
+            self.log.debug("Ticket query for widget %s", args)
 
             qrymdl = self.env[QueryModule]
             if qrymdl is None :



Mime
View raw message