Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RDISCROWD-5739 Admin Usage Dashboard #824

Merged
merged 2 commits into from
Mar 15, 2023

Conversation

n00rsy
Copy link

@n00rsy n00rsy commented Mar 8, 2023

Issue number of the reported bug or feature request: RDISCROWD-5739

Describe your changes

Adds a new admin usage dashboard that displays totals for following fields:

  1. Total projects
  2. Total tasks
  3. Total taskruns
  4. Total projects using NLP component (text-tag)
  5. Total projects using annex
  6. Total projects using DocX

image

Usage
Takes url parameter 'months' to specify how many previous months to include in the stats. Examples: http://localhost:5000/admin/usage_dashboard/?months=12
http://localhost:5000/admin/usage_dashboard/?months=24
http://localhost:5000/admin/usage_dashboard/?months=123
etc...

settings_local Config example:

USAGE_DASHBOARD_COMPONENTS = {
    'Annex' : 'annex-shell',
    'DocX' : 'loadDocument',
    'NLP Component' : 'text-tagging'
}

Testing performed

Tested Locally

Additional context

bloomberg/pybossa-default-theme#405

@coveralls
Copy link

coveralls commented Mar 8, 2023

Pull Request Test Coverage Report for Build 4428380118

  • 51 of 52 (98.08%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.004%) to 94.041%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pybossa/view/admin.py 11 12 91.67%
Totals Coverage Status
Change from base Build 4416584718: 0.004%
Covered Lines: 16664
Relevant Lines: 17720

💛 - Coveralls

Copy link

@kbecker42 kbecker42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you.

pybossa/jobs.py Outdated Show resolved Hide resolved
pybossa/cache/site_stats.py Outdated Show resolved Hide resolved
pybossa/view/admin.py Outdated Show resolved Hide resolved
@kbecker42
Copy link

Could we include an example of the json configuration? Thank you.

pybossa/cache/site_stats.py Outdated Show resolved Hide resolved
pybossa/cache/site_stats.py Outdated Show resolved Hide resolved
pybossa/cache/site_stats.py Outdated Show resolved Hide resolved
pybossa/cache/site_stats.py Outdated Show resolved Hide resolved
pybossa/cache/site_stats.py Outdated Show resolved Hide resolved
pybossa/view/admin.py Outdated Show resolved Hide resolved
@n00rsy n00rsy force-pushed the RDISCROWD-5739-admin-metrics-dashboard branch from d1b653d to 88fd9e6 Compare March 13, 2023 16:40
pybossa/cache/site_stats.py Outdated Show resolved Hide resolved
pybossa/cache/site_stats.py Outdated Show resolved Hide resolved
pybossa/cache/site_stats.py Outdated Show resolved Hide resolved
Copy link

@XiChenn XiChenn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feel free to merge as well.

@n00rsy n00rsy force-pushed the RDISCROWD-5739-admin-metrics-dashboard branch from 56115a3 to 4e7d1b5 Compare March 15, 2023 16:05
Copy link

@XiChenn XiChenn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great code coverage. feel free to merge.

@n00rsy n00rsy merged commit 7362ba3 into main Mar 15, 2023
@n00rsy
Copy link
Author

n00rsy commented Mar 15, 2023

great code coverage. feel free to merge.

Thanks Xi!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants