You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bloodhound.apache.org by rj...@apache.org on 2013/06/02 19:43:34 UTC
svn commit: r1488750 -
/bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/timeline.py
Author: rjollos
Date: Sun Jun 2 17:43:34 2013
New Revision: 1488750
URL: http://svn.apache.org/r1488750
Log:
Refs #540: Show a warning rather than an error when attempting to display the `TimelineWidget` when the Timeline component is disabled.
Modified:
bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/timeline.py
Modified: bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/timeline.py
URL: http://svn.apache.org/viewvc/bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/timeline.py?rev=1488750&r1=1488749&r2=1488750&view=diff
==============================================================================
--- bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/timeline.py (original)
+++ bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/timeline.py Sun Jun 2 17:43:34 2013
@@ -141,7 +141,16 @@ class TimelineWidget(WidgetBase):
try:
timemdl = self.env[TimelineModule]
if timemdl is None :
- raise TracError('Timeline module not available (disabled?)')
+ return 'widget_alert.html', {
+ 'title': _("Activity"),
+ 'data': {
+ 'msglabel': "Warning",
+ 'msgbody': _("TimelineWidget is disabled because the "
+ "Timeline component is not available. "
+ "Is the component disabled?"),
+ 'dismiss': False,
+ }
+ }, context
params = ('from', 'daysback', 'doneby', 'precision', 'filters', \
'max', 'realm', 'id')