Merge branch 'master' of https://github.com/sagidayan/SE-Hub into UI

This commit is contained in:
Matan Bar Yosef 2015-06-29 16:48:33 +03:00
commit e2eb22d0d4

View file

@ -27,7 +27,7 @@ def get_repo_weekly_commits(repo_url):
return req.json()['all'] return req.json()['all']
def make_macro(stats, info): def make_macro(stats, info):
macro = {'labels': [], 'data': [0]} macro = {'labels': [], 'data': [[0]]}
macro['labels'].append('Commits') macro['labels'].append('Commits')
macro['labels'].append('Open Issues') macro['labels'].append('Open Issues')
for stat in stats: for stat in stats:
@ -37,11 +37,11 @@ def make_macro(stats, info):
return macro return macro
def make_micro(stats, info): def make_micro(stats, info):
micro = {'labels': [], 'data': [0], 'series': []} micro = {'labels': [], 'data': [[]], 'series': []}
micro['labels'].append('Commits') micro['labels'].append('Commits')
micro['labels'].append('Open Issues') micro['labels'].append('Open Issues')
for stat in stats: for stat in stats:
micro['data'][0] += stat['total'] micro['data'][0][0] += stat['total']
micro['data'].append(info['open_issues']) micro['data'].append(info['open_issues'])
return micro return micro