mirror of
git://git.yoctoproject.org/layerindex-web.git
synced 2025-07-19 20:59:01 +02:00
rrs: Add support to display version by Milestone based on RecipeUpgrade's
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
This commit is contained in:
parent
af9c2fdc39
commit
190bab9f45
|
@ -255,6 +255,16 @@ class RecipeUpgrade(models.Model):
|
||||||
author_date = models.DateTimeField()
|
author_date = models.DateTimeField()
|
||||||
commit_date = models.DateTimeField()
|
commit_date = models.DateTimeField()
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def get_by_recipe_and_date(recipe, current_date):
|
||||||
|
rup_qry = RecipeUpgrade.objects.filter(recipe = recipe,
|
||||||
|
commit_date__lte = current_date).order_by('commit_date')
|
||||||
|
|
||||||
|
if rup_qry:
|
||||||
|
return rup_qry[0]
|
||||||
|
else:
|
||||||
|
return None
|
||||||
|
|
||||||
def short_sha1(self):
|
def short_sha1(self):
|
||||||
return self.sha1[0:6]
|
return self.sha1[0:6]
|
||||||
|
|
||||||
|
|
|
@ -137,7 +137,13 @@ class RecipeListView(ListView):
|
||||||
current_date <= milestone.end_date:
|
current_date <= milestone.end_date:
|
||||||
version = recipe.pv
|
version = recipe.pv
|
||||||
else:
|
else:
|
||||||
version = '' # Implement recipe version history
|
version = ''
|
||||||
|
|
||||||
|
rup = RecipeUpgrade.get_by_recipe_and_date(recipe,
|
||||||
|
milestone.end_date)
|
||||||
|
|
||||||
|
if not rup is None:
|
||||||
|
version = rup.version
|
||||||
|
|
||||||
recipe_upstream = RecipeUpstream.get_by_recipe_and_history(
|
recipe_upstream = RecipeUpstream.get_by_recipe_and_history(
|
||||||
recipe, recipe_upstream_history)
|
recipe, recipe_upstream_history)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user