Commit Graph

31 Commits

Author SHA1 Message Date
Mariano Lopez
a9aff3cae6 rrs/views.py: Changed ORM to raw SQL calls
Allow to use the new raw SQL call to get better performance in the
web page. Also removed SQL queries inside loops.
This is only for two views: recipes and maintainers

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2018-05-04 23:57:52 +12:00
Aníbal Limón
c64ec37699 rrs/views.py: RecipeList always use recipe from Recipe upgrades.
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2018-05-04 23:57:52 +12:00
Mariano Lopez
887737027c views.py: Added validation in recipe detail
Added the validation for the maintainer in the
recipe detail view. Also added a check if the
recipe exists.

[YOCTO #7904]

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2018-05-04 23:57:52 +12:00
Mariano Lopez
ab7f6443ac rrs/views.py: Fix exception in Maintainer view
When try to get Maintainer view with empty database a exception
is raised due to don't have intervals.

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2018-05-04 23:57:52 +12:00
Aníbal Limón
0f6c74b68b rrs/views.py: Recipes remove unnedded extra_url_params
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2018-05-04 23:57:51 +12:00
Aníbal Limón
665dfae577 rrs: Release/Milestone improvments
rrs/models.py: Milestone now have unique in Release and Name fields
instead of only field. When try to get current milestone give priority
to Mn instead of All.

templates/rrs/base_toplevel.html: Display only release name when
milestone is All.

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2018-05-04 23:57:51 +12:00
Aníbal Limón
d61f95164b rrs: Maintainers statistics fixed sorting of weeks
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2018-05-04 23:57:51 +12:00
Aníbal Limón
1db030b70d rrs: Add support to display no update reason
Display no update reason when upstream status filter is Can't be updated
this helps to review the reason.

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2018-05-04 23:57:51 +12:00
Belen Barros Pena
84120c0fa6 rrs: Set of UI improvments
Give some space to the tabs,
	Add some top margin to the nav-pills class so we
	create some breathing space between the milestone
	overview and the tabs.

Change 'No Maintainer' to 'No maintainer'
	Just to keep the capitalisation style consistent
	across the interface.

Apply the muted class to all not-sortable table headings
	The class was missing from the Recipe and Maintainer
	columns in the recipes table; and from the Not updated
	and % done column in the maintainers table.

Remove the strong tag from the recipe status information
	This is just to match the presentation of the milestone
	overview information in the base_toplevel.html template.

Separate the footer from the bottom of the viewport,
	It's hard to see the footer on click on its links when
	they are so close to the bottom of the veiwport, so
	add some margin at the bottom of the footer <div>.

Change the label of the recipes tab,
	From 'Recipes status' to 'Recipes upstream status' to
	match the label of the 'Upstream status' filter in the
	recipes table.

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2018-05-04 23:57:51 +12:00
Aníbal Limón
44592ac732 rrs: Frontend improvments
Maintainer statistics use '' instead of zeros.
RecipeDetail don't display internal Downgrade status use Unknown instead.

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2018-05-04 23:57:51 +12:00
Aníbal Limón
f0620e440b rrs/views.py: Now if a recipe have history but not upstream info set to Unknown state.
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2018-05-04 23:57:51 +12:00
Aníbal Limón
cec364510f rrs: Maintainers add support for display Milestone intervals
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2018-05-04 23:57:51 +12:00
Aníbal Limón
e1e3b37243 rrs: Add support for export Recipes reports by Release/Milestone
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2018-05-04 23:57:51 +12:00
Aníbal Limón
73a90437c3 rrs: Add support for Release
Now Recipes and Maintainers page can be access by Release and Milestone,
to support this a url namespace was add also update views/templates
handle new URL's.

rrs/models.py: Add support model for store Release also foregin key in
Milestone.
rrs/admin.py: Add admin site for Release model.
rrs/fixtures/initial_data.json: Add initial data with Release/Milestone
relation.
rrs/{views, urls}.py: Add support for handle Release/Milestone.
templates/rrs: Update to handle new URL's.

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2018-05-04 23:57:51 +12:00
Aníbal Limón
c0a62bf06f rrs: Recipes don't display if don't exit in Milestone
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2018-05-04 23:57:51 +12:00
Aníbal Limón
446220e8c9 rrs: Add support to display version by Milestone based on RecipeUpgrade's
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2018-05-04 23:57:51 +12:00
Aníbal Limón
3aeff47e85 rrs: Maintainer statistics frontend improvments
Show percentage sign for every item in percentage column.

Don't display zero's in week columns instead use blank '' to
avoid noisy.

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2018-05-04 23:57:51 +12:00
Aníbal Limón
831464466c rrs: Improve recipes filtering
Now filter recipes are done by JS this avoid to made request for every
change in the filters also add support for share filters between pages.

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2018-05-04 23:57:51 +12:00
Aníbal Limón
0013db9bc7 rrs: Add support for display Can't be updated recipe upstream status.
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2018-05-04 23:57:51 +12:00
Aníbal Limón
a3ec4ff11d rrs: Frontend improvments
templates/rrs/base_toplevel.html: Disable top functions.

templates/rrs/recipedetail.html: Fix class type for different
upstream status and better display of recipe info don't display
element if no have content.

rrs/views.py: Don't display percentages with two decimals and
separate filters for set and elements.

templates/rrs/recipes.html: Add support for display filters with
set and element separation.

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2018-05-04 23:57:51 +12:00
Aníbal Limón
f3f70210af rrs: Now display recipes when not found upstream info.
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2018-05-04 23:57:51 +12:00
Aníbal Limón
5534515a8a rrs: Maintainers add support for display statistics of recipe upgrades by week in Milestone.
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2018-05-04 23:57:51 +12:00
Aníbal Limón
53e28101be rrs: Recipes when upstream_status is Downgrade display as Unknown
In order to provide only one status when recipe upstream backend
script fails display display Unknown as Unknown + Downgrade.

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2018-05-04 23:57:51 +12:00
Aníbal Limón
dc38557582 rrs: Add Maintainer statistics page.
Maintainer statistics page gives information by Milestone and
Maintainers assigned recipes, status of recipes (up-to-date,
not-update, unknown) and percertange of work done.

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2018-05-04 23:57:51 +12:00
Aníbal Limón
6dfc369f29 rrs/views.py: Recipes modularize improve milestone statistics
Modularize get milestone statistics not at private function in order
to use in Manitainers view.

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2018-05-04 23:57:51 +12:00
Aníbal Limón
632d9be459 rrs: RecipeDetail view fix
rrs/views.py: Now is necessary to test if a RecipeMaintainer exists by
milestone to avoid errors for undefined variables.

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2018-05-04 23:57:51 +12:00
Aníbal Limón
ac485c0cc4 rrs: Add support for Recipe maintainership history
Now can you get maintainers based on Milestones.

Feature changes,

	rrs/models.py: Add RecipeMaintainerHistory to store maintainer updates.
	rrs/admin.py: Add admin site for RecipeMaintainerHistory.

Adapt changes,

Now you need to specify RecipeMaintainerHistory to get RecipeMaintainer,
changes into rrs/view.py.

These set of changes are incompatible with the previous version you need
to do initial setup described in README.rrs.

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2018-05-04 23:57:51 +12:00
Aníbal Limón
4e00337d93 rrs: Add support for Recipe detail page
Recipe detail page gives information about Recipe like summary,
section, license, file, etc. also display's upgrade history.

rrs/models.py: Milestone add get_by_date and rewrite get_current
for use get_by_date and RecipeDistro add get_distros_by_recipe.

rrs/urls.py: Add url for recipe_detail with pk.
rrs/views.py: Add RecipeUpgradeDetail view.
templates/rrs/recipedetail.html: Add recipedetail template.

templates/rrs/recipes.html: Add link to Recipe detail by row.

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2018-05-04 23:57:51 +12:00
Aníbal Limón
a021f8d441 rrs: Recipes add url validation
Add url validation for Milestone and Upstream status and maintainer name
params if isn't valid raise HTTP 404.

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2018-05-04 23:57:51 +12:00
Aníbal Limón
a7ede0d126 rrs: Add initial support of recipes page
templates/rrs/base_toplevel.html: Add support for display statistics by
Milestone.
templates/rrs/recipes.html: Add initial page that display Recipe
status by Milestone also details of every recipe.
rrs/views.py: Add RecipeLitView for support recipes page.
rrs/models.py: Add helper functions.
rrs/static/*: Add css and js resources.

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2018-05-04 23:57:51 +12:00
Aníbal Limón
eb460ea90c rrs: Add milestone selection bar for recipes and milestone.
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2018-05-04 23:57:51 +12:00