diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2018-04-09 10:23:13 +1200 |
---|---|---|
committer | Paul Eggleton <paul.eggleton@linux.intel.com> | 2018-05-04 23:57:53 +1200 |
commit | 130ff8e8030e038359ad38b379a69d8644096f5e (patch) | |
tree | 87516cfceda17846b12864eda40f87307f2a4fae /rrs/views.py | |
parent | 2da4f5d99beb5d106f9a7f43f75d2486f2928417 (diff) | |
download | openembedded-core-contrib-130ff8e8030e038359ad38b379a69d8644096f5e.tar.gz |
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>
Diffstat (limited to 'rrs/views.py')
-rw-r--r-- | rrs/views.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/rrs/views.py b/rrs/views.py index e98db9bd5c..ed05e8196e 100644 --- a/rrs/views.py +++ b/rrs/views.py @@ -10,7 +10,7 @@ from django.views.generic import ListView, DetailView, RedirectView from django.core.urlresolvers import resolve, reverse, reverse_lazy from django.db import connection -from layerindex.models import Recipe, StaticBuildDep +from layerindex.models import Recipe, StaticBuildDep, Patch from rrs.models import Release, Milestone, Maintainer, RecipeMaintainerHistory, \ RecipeMaintainer, RecipeUpstreamHistory, RecipeUpstream, \ RecipeDistro, RecipeUpgrade, MaintenancePlan @@ -468,6 +468,9 @@ def _get_recipe_list(milestone): recipe_list_item.upstream_status = upstream_status recipe_list_item.upstream_version = upstream_version recipe_list_item.outdated = outdated + patches = Patch.objects.filter(recipe__id=recipe['id']) + recipe_list_item.patches_total = patches.count() + recipe_list_item.patches_pending = patches.filter(status='P').count() recipe_list_item.maintainer_name = maintainer_name recipe_list_item.no_update_reason = no_update_reason recipe_list.append(recipe_list_item) |