mirror of
git://git.yoctoproject.org/layerindex-web.git
synced 2025-07-19 20:59:01 +02:00
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>
This commit is contained in:
parent
2da4f5d99b
commit
130ff8e803
|
@ -10,7 +10,7 @@ from django.views.generic import ListView, DetailView, RedirectView
|
||||||
from django.core.urlresolvers import resolve, reverse, reverse_lazy
|
from django.core.urlresolvers import resolve, reverse, reverse_lazy
|
||||||
from django.db import connection
|
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, \
|
from rrs.models import Release, Milestone, Maintainer, RecipeMaintainerHistory, \
|
||||||
RecipeMaintainer, RecipeUpstreamHistory, RecipeUpstream, \
|
RecipeMaintainer, RecipeUpstreamHistory, RecipeUpstream, \
|
||||||
RecipeDistro, RecipeUpgrade, MaintenancePlan
|
RecipeDistro, RecipeUpgrade, MaintenancePlan
|
||||||
|
@ -468,6 +468,9 @@ def _get_recipe_list(milestone):
|
||||||
recipe_list_item.upstream_status = upstream_status
|
recipe_list_item.upstream_status = upstream_status
|
||||||
recipe_list_item.upstream_version = upstream_version
|
recipe_list_item.upstream_version = upstream_version
|
||||||
recipe_list_item.outdated = outdated
|
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.maintainer_name = maintainer_name
|
||||||
recipe_list_item.no_update_reason = no_update_reason
|
recipe_list_item.no_update_reason = no_update_reason
|
||||||
recipe_list.append(recipe_list_item)
|
recipe_list.append(recipe_list_item)
|
||||||
|
|
|
@ -116,6 +116,28 @@
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
<h2>Patches</h2>
|
||||||
|
{% if recipe.patch_set.exists %}
|
||||||
|
<table class="table table-striped table-bordered">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th class="span6">Patch</th>
|
||||||
|
<th>Status</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{% for patch in recipe.patch_set.all %}
|
||||||
|
<tr>
|
||||||
|
<td><a href="{{ patch.vcs_web_url }}">{{ patch.src_path }}</a></td>
|
||||||
|
<td>{{ patch.get_status_display }} {{ patch.status_extra | urlize }}</td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
{% else %}
|
||||||
|
<p>None</p>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="span4">
|
<div class="span4">
|
||||||
|
|
|
@ -79,6 +79,7 @@
|
||||||
<th class="upstream_version_column muted">Upstream version</th>
|
<th class="upstream_version_column muted">Upstream version</th>
|
||||||
<th class="upstream_status_column span2">Upstream status</th>
|
<th class="upstream_status_column span2">Upstream status</th>
|
||||||
<th class="last_updated_column">Last Updated</th>
|
<th class="last_updated_column">Last Updated</th>
|
||||||
|
<th class="patches_column">Patches</th>
|
||||||
<th class="maintainer_column">Maintainer</th>
|
<th class="maintainer_column">Maintainer</th>
|
||||||
<th class="summary_column muted span5">Summary</th>
|
<th class="summary_column muted span5">Summary</th>
|
||||||
<th class="no_update_reason_column muted span5" style="display:none">No update reason</th>
|
<th class="no_update_reason_column muted span5" style="display:none">No update reason</th>
|
||||||
|
@ -102,6 +103,7 @@
|
||||||
{{ r.upstream_status }}
|
{{ r.upstream_status }}
|
||||||
</td>
|
</td>
|
||||||
<td class="last_updated_column">{{r.outdated}}</td>
|
<td class="last_updated_column">{{r.outdated}}</td>
|
||||||
|
<td class="patches_column">{% if r.patches_total %}<span {% if not r.patches_pending %}class="muted"{% endif %}>{{ r.patches_pending }}<span class="muted"> / {{ r.patches_total }}</span>{% endif %}</td>
|
||||||
<td class="maintainer_column">{{ r.maintainer_name }}</td>
|
<td class="maintainer_column">{{ r.maintainer_name }}</td>
|
||||||
<td class="summary_column">{{ r.summary }}</td>
|
<td class="summary_column">{{ r.summary }}</td>
|
||||||
<td class="no_update_reason_column" style="display:none">{{ r.no_update_reason }}</td>
|
<td class="no_update_reason_column" style="display:none">{{ r.no_update_reason }}</td>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user