incubator-bloodhound-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g..@apache.org
Subject svn commit: r1351302 - in /incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard: api.py web_ui.py widgets/templates/widget_cloud.html widgets/ticket.py
Date Mon, 18 Jun 2012 11:38:53 GMT
Author: gjm
Date: Mon Jun 18 11:38:51 2012
New Revision: 1351302

URL: http://svn.apache.org/viewvc?rev=1351302&view=rev
Log:
dashboard: changes name of cloud widget to values widget; default to list view for unknown
display request. Note that this will break the milestone view temporarily - towards #93 (from
olemis)

Modified:
    incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/api.py
    incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/web_ui.py
    incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/templates/widget_cloud.html
    incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/ticket.py

Modified: incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/api.py
URL: http://svn.apache.org/viewvc/incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/api.py?rev=1351302&r1=1351301&r2=1351302&view=diff
==============================================================================
--- incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/api.py (original)
+++ incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/api.py Mon Jun 18 11:38:51
2012
@@ -253,7 +253,7 @@ class EnumField:
         """Perform the actual conversion
         """
         if value not in self.choices:
-            raise InvalidWidgetArgument(
+            raise InvalidWidgetArgument('',
                 _('Expected one of `%s` but got `%s`') % (self.choices, value),
                 title=_('Enum conversion error'))
         return value

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=1351302&r1=1351301&r2=1351302&view=diff
==============================================================================
--- incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/web_ui.py (original)
+++ incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/web_ui.py Mon Jun 18 11:38:51
2012
@@ -165,7 +165,7 @@ class DashboardModule(Component):
                                           "widgets" : {
                                             "w1" : {
                                               "args" : [
-                                                  "TicketFieldCloud", 
+                                                  "TicketFieldValues", 
                                                   null, 
                                                   {"args" : {
                                                       "field" : "component",

Modified: incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/templates/widget_cloud.html
URL: http://svn.apache.org/viewvc/incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/templates/widget_cloud.html?rev=1351302&r1=1351301&r2=1351302&view=diff
==============================================================================
--- incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/templates/widget_cloud.html
(original)
+++ incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/templates/widget_cloud.html
Mon Jun 18 11:38:51 2012
@@ -2,7 +2,8 @@
 <div id="content" class="${'well' if view == 'cloud' else None}"
   xmlns="http://www.w3.org/1999/xhtml"
   xmlns:py="http://genshi.edgewall.org/"
-  xmlns:xi="http://www.w3.org/2001/XInclude">
+  xmlns:xi="http://www.w3.org/2001/XInclude"
+  py:with="_view = view if view in ('list', 'cloud', 'compact', 'table') else 'list'">
 
   <py:def function="display_value(value)">
     <py:choose test="value">
@@ -26,7 +27,11 @@
 
   <h3 style="display: inline;">$heading</h3>
   <br/>
-  <py:choose test="view">
+  <py:if test="_view != view">
+    <xi:include href="widget_alert.html"
+        py:with="msglabel = 'Warning'; msgbody = 'Unknown view ' + view" />
+  </py:if>
+  <py:choose test="_view">
     <py:when test="'cloud'">
       <p style="font-size: medium; line-height: 150%;">
         <py:for each="item in items"

Modified: incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/ticket.py
URL: http://svn.apache.org/viewvc/incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/ticket.py?rev=1351302&r1=1351301&r2=1351302&view=diff
==============================================================================
--- incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/ticket.py (original)
+++ incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/ticket.py Mon Jun
18 11:38:51 2012
@@ -45,7 +45,7 @@ from bhdashboard.util import WidgetBase,
                             pretty_wrapper, resolve_ep_class, \
                             trac_version, trac_tags
 
-class TicketFieldCloudWidget(WidgetBase):
+class TicketFieldValuesWidget(WidgetBase):
     """Display a tag cloud representing frequency of values assigned to 
     ticket fields.
     """



Mime
View raw message