Learn more about these different git repos.
Other Git URLs
f8f4e1e
@@ -57,7 +57,7 @@
'hubs.widgets.contact:Contact',
'hubs.widgets.dummy:Dummy',
'hubs.widgets.library:Library',
- 'hubs.widgets.linechart:Linechart',
+ 'hubs.widgets.weeklyactivity:WeeklyActivity',
'hubs.widgets.feed:Feed',
'hubs.widgets.github_pr:GitHubPRs',
'hubs.widgets.githubissues:GitHubIssues',
@@ -5,24 +5,21 @@
from hubs.widgets.view import RootWidgetView
- class Linechart(Widget):
+ class WeeklyActivity(Widget):
- name = "linechart"
+ name = "weeklyactivity"
label = "Weekly Activity"
position = "left"
- parameters = [dict(
- name="username",
- label="Username",
- default=None,
- validator=validators.Username,
- help="A FAS username.",
- )]
+ hub_types = ['user']
class BaseView(RootWidgetView):
def get_context(self, instance, *args, **kwargs):
- username = instance.config["username"]
+ # since this widget only shows on user hubs, we assume
+ # hub.name == the username
+ username = instance.hub.name
+
categories = [
'git', 'Wiki', 'Copr', 'anitya', 'mirrormanager', 'ansible',
'fedoratagger', 'summershum', 'nuancier', 'Mailman',
renames the linechart widget in the code to weekly activity
also, makes it only show on the user hub, and removes the config to just show the activity for the user that the user hub belongs to.
LGTM
Commit a1f5924 fixes this pull-request
Pull-Request has been merged by abompard
renames the linechart widget in the code to weekly activity
also, makes it only show on the user hub, and removes the config
to just show the activity for the user that the user hub belongs
to.