reviewboard.admin.widgets¶
- 
class Widget[source]¶
- Bases: - object- The base class for an Administration Dashboard widget. - Widgets appear in the Administration Dashboard and can display useful information on the system, links to other pages, or even fetch data from external sites. - There are a number of built-in widgets, but extensions can provide their own. - 
render(request)[source]¶
- Render the widget. - This will render the HTML for a widget. It takes care of generating and caching the data, depending on the widget’s needs. 
 
- 
- 
get_sync_num()[source]¶
- Get the sync_num, which is number to sync. - sync_num is number of update and initialized to 1 every day. 
- 
class UserActivityWidget[source]¶
- Bases: - reviewboard.admin.widgets.Widget- User activity widget. - Displays a pie chart of the active application users based on their last login dates. 
- 
class ReviewRequestStatusesWidget[source]¶
- Bases: - reviewboard.admin.widgets.Widget- Review request statuses widget. - Displays a pie chart showing review request by status. 
- 
class RepositoriesWidget[source]¶
- Bases: - reviewboard.admin.widgets.Widget- Shows a list of repositories in the system. - This widget displays a table with the most recent repositories, their types, and visibility. 
- 
class ReviewGroupsWidget[source]¶
- Bases: - reviewboard.admin.widgets.Widget- Review groups widget. - Shows a list of recently created groups. 
- 
class ServerCacheWidget[source]¶
- Bases: - reviewboard.admin.widgets.Widget- Cache statistics widget. - Displays a list of memcached statistics, if available. 
- 
class NewsWidget[source]¶
- Bases: - reviewboard.admin.widgets.Widget- News widget. - Displays the latest news headlines from reviewboard.org. 
- 
class DatabaseStatsWidget[source]¶
- Bases: - reviewboard.admin.widgets.Widget- Database statistics widget. - Displays a list of totals for several important database tables. 
- 
class RecentActionsWidget[source]¶
- Bases: - reviewboard.admin.widgets.Widget- Recent actions widget. - Displays a list of recent admin actions to the user. 
- 
dynamic_activity_data(request)[source]¶
- Large database acitivity widget helper. - This method serves as a helper for the activity widget, it’s used with for AJAX requests based on date ranges passed to it. 
- 
class ActivityGraphWidget[source]¶
- Bases: - reviewboard.admin.widgets.Widget- Detailed database statistics graph widget. - Shows the latest database activity for multiple models in the form of a graph that can be navigated by date. - This widget shows a daily view of creation activity for a list of models. All displayed widget data is computed on demand, rather than up-front during creation of the widget. - 
actions= [{u'id': u'db-stats-graph-prev', u'rel': u'prev', u'label': u'<'}, {u'id': u'db-stats-graph-next', u'rel': u'next', u'label': u'>'}, {u'classes': u'btn-s btn-s-checked', u'rel': u'reviews', u'label': _(u'Reviews')}, {u'classes': u'btn-s btn-s-checked', u'rel': u'comments', u'label': _(u'Comments')}, {u'classes': u'btn-s btn-s-checked', u'rel': u'review_requests', u'label': _(u'Review Requests')}, {u'classes': u'btn-s btn-s-checked', u'rel': u'change_descriptions', u'label': _(u'Changes')}][source]¶
 
- 
- 
init_widgets()[source]¶
- Initialize the widgets subsystem. - This will listen for events in order to manage the widget caches. 
- 
register_admin_widget(widget_cls, primary=False)[source]¶
- Register an administration widget. - This widget will appear in the list of primary or secondary widgets. - The widget class must have a widget_id attribute set, and can only be registerd once in a single list. A KeyError will be thrown if attempting to register a second time. 
