From 134861bd0d0e9f01fc72c53579df721d6d3fd521 Mon Sep 17 00:00:00 2001 From: Ryan Lerch Date: Feb 15 2018 11:53:42 +0000 Subject: set defaults for hub widgets fixes #390 --- diff --git a/hubs/defaults.py b/hubs/defaults.py index 1865abd..039dc53 100644 --- a/hubs/defaults.py +++ b/hubs/defaults.py @@ -24,9 +24,14 @@ def add_user_widgets(hub): hub.widgets.append(widget) widget = hubs.models.Widget( - plugin='badges', index=1, + plugin='meetings', index=1, + _config=json.dumps({ + })) + hub.widgets.append(widget) + + widget = hubs.models.Widget( + plugin='badges', index=2, _config=json.dumps({ - 'username': hub.name, })) hub.widgets.append(widget) @@ -45,15 +50,44 @@ def add_group_widgets(hub): hub.widgets.append( hubs.models.Widget( - plugin='irc', index=0, + plugin='meetings', index=0, _config=json.dumps({ - 'height': 450, }) ) ) - # TODO - set up feed with aggregate of users stuff unless we have some - # other preset. + hub.widgets.append( + hubs.models.Widget( + plugin='repositories', index=1, + _config=json.dumps({ + }) + ) + ) + + hub.widgets.append( + hubs.models.Widget( + plugin='pullrequests', index=2, + _config=json.dumps({ + }) + ) + ) + + hub.widgets.append( + hubs.models.Widget( + plugin='newestissues', index=2, + _config=json.dumps({ + }) + ) + ) + + hub.widgets.append( + hubs.models.Widget( + plugin='irc', index=3, + _config=json.dumps({ + 'height': 450, + }) + ) + ) return hub @@ -66,14 +100,25 @@ def add_stream_widgets(hub): _config=json.dumps({ 'message_limit': 20 }))) - # Library + + # Meetings + hub.widgets.append(hubs.models.Widget( + plugin='meetings', index=1, + _config=json.dumps({}))) + + # Issues i filed hub.widgets.append(hubs.models.Widget( - plugin='library', index=0, + plugin='issues', index=2, _config=json.dumps({}))) - # Help requests + + # Issues assigned to me + hub.widgets.append(hubs.models.Widget( + plugin='issues', index=3, + _config=json.dumps({ + 'mode': 'assignee' + }))) + + # Library hub.widgets.append(hubs.models.Widget( - plugin='halp', index=1, + plugin='library', index=4, _config=json.dumps({}))) - # TODO: "my assigned issues" widget - # TODO: "Newest Opened Pull Requests" widget - # TODO: "Newest Opened Issues" widget