Add Last Updated column
cover Add Last Updated column
From: Mariano Lopez <[email protected]>
These patches a column in the recipe view that show when a out dated recipes was updated the last time. Also changes the date formats to iso.
views.py: Changed dates to iso recipes.html: Add the Last updated column
Mariano Lopez (2):
views.py: Changed date format to iso recipes.html: Add Last Updated column
rrs/views.py | 7 ++++--- templates/rrs/recipes.html | 17 +++++++++++++---- 2 files changed, 17 insertions(+), 7 deletions(-)
Signature · 1 line
1.9.1
PATCH 1/2 views.py: Changed date format to iso
From: Mariano Lopez <[email protected]>
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.
--- rrs/views.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
rrs/views.py +4 -3
@@ -207,7 +207,7 @@ def _get_recipe_list(milestone): recipe_last_updated_dict_all.get(recipe['id']) if recipe_last_updated: recipe_date = recipe_last_updated['date'] - outdated = (current_date - recipe_date.date()).days + outdated = recipe_date.date().isoformat() else: outdated = 'Unknown' else:
@@ -360,13 +360,14 @@ def _get_recipe_upgrade_detail(recipe_upgrade): .count() > 0: is_recipe_maintainer = True + commit_date = recipe_upgrade.commit_date.date().isoformat() commit = recipe_upgrade.sha1[:10] commit_url = recipe_upgrade.recipe.layerbranch.layer.vcs_web_url + \ '/commit/?id=' + recipe_upgrade.sha1 rud = RecipeUpgradeDetail(recipe_upgrade.title, recipe_upgrade.version, \ - release_name, milestone_name, recipe_upgrade.commit_date, \ - maintainer_name, is_recipe_maintainer, commit, commit_url) + release_name, milestone_name, commit_date, maintainer_name, \ + is_recipe_maintainer, commit, commit_url) return rud
Signature · 1 line
1.9.1
PATCH 2/2 recipes.html: Add Last Updated column
In reply to [email protected]From: Mariano Lopez <[email protected]>
Added a column in the recipes view that show
the last time a recipe was updated when is
not up-to-date
--- templates/rrs/recipes.html | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-)
templates/rrs/recipes.html +13 -4
@@ -76,6 +76,7 @@ <th class="version_column muted">Version</th> <th class="upstream_version_column muted">Upstream version</th> <th class="upstream_status_column span2">Upstream status</th> + <th class="last_updated_column">Last Updated</th> <th class="maintainer_column">Maintainer</th> <th class="summary_column muted span5">Summary</th> <th class="no_update_reason_column muted span5" style="display:none">No update reason</th>
@@ -88,16 +89,24 @@ <td class="version_column">{{ r.version }}</td> <td class="upstream_version_column">{{ r.upstream_version }}</td> {% if r.upstream_status == "Up-to-date" %} - <td class="text-success" data-toggle="tooltip" title="{{r.outdated}}"> + <td class="text-success"> {% elif r.upstream_status == "Not updated" %} - <td class="text-error" data-toggle="tooltip" title="{{r.outdated}}"> + <td class="text-error"> {% elif r.upstream_status == "Can't be updated" %} - <td class="muted" data-toggle="tooltip" title="{{r.outdated}}"> + <td class="muted"> {% else %} - <td class="text-warning" data-toggle="tooltip" title="{{r.outdated}}"> + <td class="text-warning"> {% endif %} {{ r.upstream_status }} </td> + {% if r.outdated == "Up-to-date" %} + <td class="text-success"> + {% elif r.outdated == "Unknown" %} + <td class="text-warning"> + {% else %} + <td class="text-error"> + {% endif %} + {{r.outdated}}</td> <td class="maintainer_column">{{ r.maintainer_name }}</td> <td class="summary_column">{{ r.summary }}</td> <td class="no_update_reason_column" style="display:none">{{ r.no_update_reason }}</td>
Signature · 1 line
1.9.1