Commit Graph

62 Commits

Author SHA1 Message Date
Paul Eggleton
e071ebab29 rrs: add flag to MaintenancePlan to specify layer-wide maintainers
Most layers do not track maintenance on a per-recipe basis, and for
those layers we will hide some of the per-recipe maintainer features
and on the recipe detail show the layer maintainer(s) as the
maintainer(s) of the recipe.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-05-04 23:57:53 +12:00
Paul Eggleton
7606664eeb rrs: link maintenance/upstream history to layerbranch
RecipeUpstreamHistory was not linked to the layer it was produced from,
which meant that it wasn't easy to query for a different maintenance
plan (i.e. a different layer) and thus the maintenance plan selection
on the recipe list didn't really work. Add a link field, populate it in
a migration and then make it required.

We had added a link earlier from RecipeMaintainerHistory to LayerBranch
but it was optional; for the same reasons we now populate it and make it
required.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-05-04 23:57:53 +12:00
Paul Eggleton
da3bfff3a1 rrs: drop a couple of unused functions from Raw class
These two functions aren't being used anywhere. In the interest of
having as little code directly reading the database using SQL as
possible, drop them.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-05-04 23:57:53 +12:00
Paul Eggleton
183ba0f7eb rrs: add charts page
Add some basic charts to show recipe upstream / patch status.

Implements [YOCTO #7909].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-05-04 23:57:53 +12:00
Paul Eggleton
130ff8e803 rrs: add patch listing to recipe list and detail
Expose the newly added patch information in the RRS:

* Add a table to the recipe detail listing the patches for the recipe
* Add pending / total counts to the recipe list page

Implements [YOCTO #7909].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-05-04 23:57:53 +12:00
Paul Eggleton
a6aaa5c8ef Implement layer web repo commit URL
The Recipe Reporting System needs to be able to provide links to commits
in the web interface for the repository, but we can only do this if we
have a custom template URL just like we do for file/tree links, since
it's different for different git web interfaces. Add support in all the
various places for such a URL and make use of it in the RRS.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-05-04 23:57:53 +12:00
Paul Eggleton
0d112b1d97 rrs/views: replace mimetype with content_type
Adapt to this change that happened sometime in Django 1.7.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-05-04 23:57:53 +12:00
Paul Eggleton
8a2839b870 rrs: add breadcrumb to recipe detail page
Make it possible to get back to the maintenance plan from the recipe
detail page.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-05-04 23:57:53 +12:00
Paul Eggleton
ea6270f386 rrs: handle dependency field differences
The old RRS branch had its own addition of dependency support, but in the
mean time we added that to the layer index in the master branch using a
different structure. Adapt the RRS recipe detail page to that structure.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-05-04 23:57:53 +12:00
Paul Eggleton
b2a67d718c Add link to maintenance plan in layer detail
If the RRS is enabled, then add a way to get from the layer detail page
to any maintenance plans in which the layer is included.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-05-04 23:57:53 +12:00
Paul Eggleton
1733170583 rrs: add maintenance plan selection
Add a drop-down for selecting the maintenance plan from the recipes
page.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-05-04 23:57:53 +12:00
Paul Eggleton
e77b652192 rrs/views: fix SQL parameter in get_reup_by_last_updated()
We were passing in a parameter value but not using that in the query.
Add a WHERE clause to fix that.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-05-04 23:57:53 +12:00
Paul Eggleton
8517822d43 rrs/views: fix case in table names
Table names should be lowercase. I'm unsure if the collation settings
have an effect on this, but with the mariadb database I set up here I
needed to make this change or else I got errors about missing tables.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-05-04 23:57:53 +12:00
Paul Eggleton
b8f51c7f9e rrs: handle maintenance plans in views
Insert maintenance plan into views, their corresponding URLs and
templates.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-05-04 23:57:53 +12:00
Paul Eggleton
6ca3d6649e Use this layer index's URL for layer branch
If we're integrating the layer index and the RRS, no need to jump off to
the OE index if for example this is an internal index.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-05-04 23:57:52 +12:00
Paul Eggleton
e50c2e6841 Rename RRS URLs to have rrs_ prefix
Make these distinct from the layerindex ones.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-05-04 23:57:52 +12:00
Paul Eggleton
f58754c998 rrs/models: move Raw class to views.py
This is something that really belongs in with the views, so move it
there.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-05-04 23:57:52 +12:00
Aníbal Limón
66193c153b rrs/views.py: When export to csv use release_milestone.csv
To be more descriptive about what report is.

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2018-05-04 23:57:52 +12:00
Aníbal Limón
48375d481c rrs: Frontend update to work with Python3 and django
[YOCTO #9746]

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2018-05-04 23:57:52 +12:00
Aníbal Limón
86d77504f2 rrs: Fix frontpage redirect
We was experimenting fixed redirects due to urls are
cached at init of rrs.

Move the redirect Release, Milestone selection to a view
called FrontPageRedirect.

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2018-05-04 23:57:52 +12:00
Aníbal Limón
3ccb422aeb rrs/recipes: Add support for persist search and filters.
Now when search something the URL is modified and you can
share the URL for access to the data.

[YOCTO #7809]

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2018-05-04 23:57:52 +12:00
Mariano Lopez
ef32d52b29 rrs/views: Fix mismatch in summary and recipe list
This fixes the issue with the mismatch in the
statistics bar and the recipe list. The mismatch
is caused by the gcc-source recipe, because every
version of the recipe is counted in Upstream History
but not in Recipe Upgrade.

Also added the TODO.rrs to track bugs and issues with
rrs.

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
6aa369757c rrs/views.py: Added percentages for navbar
This adds the percentage for all the recipes types
(up-to-date, not updated, unknown, can't be updated)
so it can be displayed in the navbar.

This also adds the number of the recipes not updated
at the begining of the period and number of recipes
updated in the period.

The changes in the frontend are still missing, this
just adds the functionality.

[YOCTO #8020]

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
b08004f778 views.py: Show last updated date for all recipes
This changes the behavior of the last update column
and show the date for all the recipes, including the
up to date recipes.

[YOCTO #8018]

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
2018-05-04 23:57:52 +12:00
Aníbal Limón
b2e04c0a9e rrs: Fix last updated.
Don't conditional last updated to upstream status.

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2018-05-04 23:57:52 +12:00
Aníbal Limón
6added950f rrs/views.py: RecipeListView always use recipes from history.
If recipe don't exist in history means that don't need to be displayed.

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2018-05-04 23:57:52 +12:00
Mariano Lopez
45ba3a280d views.py: Changed date format to iso
Changed the day format to iso. Also, the outdated
field in the recipes views was changed from days
to the date the recipe was last updated.

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
7f24895f6e views.py: Changed the behavior of percentage done
This changes the percetage done from recipes up to date
in the period to percentage of not updated recipes that
were updated in the period.

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
58ea26418e views.py: Fix current up to date percentage
There was an issue where the current up to date was always
using the latest upstream version to get the percentage.
This uses the upstream version in the period displayed.

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
2018-05-04 23:57:52 +12:00
Mariano Lopez
034bf57f71 views.py: Fix version in current milestone
Fixed the version displayed in current milestone.
Before the data was obtained from recipe upgrad table
and this allows to fetch the data from the recipe table.

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
2018-05-04 23:57:52 +12:00
Mariano Lopez
faafae13fa views.py: Add how long a recipe hasn't been updated
This add a tooltip in the upstream status field that
show how long the recipe hasn't been updated.

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
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