Adds a pie chart that displays the SU usage broken down by user. Hovering over a slice brings up the username, used SUs, and percentage of total used for users with positive SU usage.
Added function in allocation/utils.py to generate the pie chart data.
New context_data attribute for pie_data in allocation/views.py.
New drawPies function in allocation_detail.html draws the pie chart, which is inserted right under the existing "Service Units" gauge graph.
Legend appears to the right of the pie chart in columns.
When there are no users with non-zero usage, displays a message indicating there is no data available.
Testing
Manual testing can be done by navigating to any project's Allocation Detail page and ensuring things look okay. Good examples (BRC) are:
Project with many active users: allocation/450/
Project with average amount of users: allocation/369/
Changes
allocation/utils.py
to generate the pie chart data.context_data
attribute forpie_data
inallocation/views.py
.drawPies
function inallocation_detail.html
draws the pie chart, which is inserted right under the existing "Service Units" gauge graph.Testing
allocation/450/
allocation/369/
allocation/11/
allocation/2/