Skip to content

Commit

Permalink
Merge pull request #4 from LibCrowds/fix-issues
Browse files Browse the repository at this point in the history
Fix issues
  • Loading branch information
alexandermendes authored Jun 16, 2016
2 parents 92f3a20 + 9bfcf22 commit 7bcdae1
Show file tree
Hide file tree
Showing 19 changed files with 9,667 additions and 123 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,6 @@ target/

#Mac OSX
.DS_STORE

# Local
pybossa/
6 changes: 3 additions & 3 deletions libcrowds_statistics/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@
"""

import os
import json
from flask import current_app as app
from flask.ext.plugins import Plugin

__plugin__ = "LibCrowdsStatistics"
__version__ = "0.1.3"
__version__ = json.load(open(os.path.join(os.path.dirname(__file__),
'info.json')))['version']


class LibCrowdsStatistics(Plugin):
Expand All @@ -22,14 +24,12 @@ def setup(self):
self.setup_blueprint()
from . import event_listeners


def setup_blueprint(self):
"""Setup blueprint."""
from .blueprint import StatisticsBlueprint
here = os.path.dirname(os.path.abspath(__file__))
template_folder = os.path.join(here, 'templates')
static_folder = os.path.join(here, 'static')

blueprint = StatisticsBlueprint(template_folder=template_folder,
static_folder=static_folder)
app.register_blueprint(blueprint, url_prefix="/statistics")
2 changes: 0 additions & 2 deletions libcrowds_statistics/blueprint.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,5 @@ class StatisticsBlueprint(Blueprint):
def __init__(self, **kwargs):
defaults = {'name': 'statistics', 'import_name': __name__}
defaults.update(kwargs)

super(StatisticsBlueprint, self).__init__(**defaults)

self.add_url_rule("/", view_func=index)
2 changes: 1 addition & 1 deletion libcrowds_statistics/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
"website": "https://github.com/LibCrowds/libcrowds-statistics",
"license": "BSD",
"description": "Global statistics page for LibCrowds.",
"version": "0.1.3"
"version": "0.1.4"
}
2 changes: 1 addition & 1 deletion libcrowds_statistics/static/js/charts.js
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ function populateTop10PercentChart(stats, id) {
var top10 = stats.n_tr_top_10_percent
var bottom90 = stats.n_task_runs - top10
var top10Label = "Most Active 10%: " + pluralise(top10, "contribution")
var bottom90Label = "Remaining 10%: " + pluralise(bottom90, "contribution")
var bottom90Label = "Remaining 90%: " + pluralise(bottom90, "contribution")
var data = getDonutDataset(top10Label, top10, bottom90Label, bottom90);
drawDonutChart(canvas, con, data, lCon);
}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 7bcdae1

Please sign in to comment.