UMB-CS682-Team-02 / tracker

0 stars 1 forks source link

Generalize issue.chart.html to work with other classes. #29

Closed rouilj closed 6 months ago

rouilj commented 7 months ago

Currently you can click on a link on the index page and get a chart. The current chart template only works for issues. Generalize this so that only one chart template works for any class in the tracker. Review the discussion on how Roundup selects templates from the March 26 meeting. Also request.classname may be useful.

To demo: create 3 keywords using the admin user. Create 2 keywords using the demo user. Then entering the URL:

http://localhost:8080/demo/keyword?@template=chart&@group=creator

should show a barchart with three keywords for the admin user and 2 for the demo user.

http://localhost:8080/demo/keyword?@template=chart&@group=creator&@charttype=piechart

should show a piechart with the same data.

For this part of the task, just editing the URL directly is fine. You don't have to add links to other pages to activate this. None of the other classes (keywords, users, file, priority, etc.) have a search and index page like issues.

ashrith-UMB commented 6 months ago

Classes other than issue(like tracker) can now use chart template to display charts. commit : https://github.com/UMB-CS682-Team-02/tracker/commit/a62e2fbb7aa1ae652f401082f43c4ca7e49ebcc5