Skip to contentSkip to conversation

Changed behavior of last updated column

PATCH New [email protected] 1 participant 4 messages Jul 28, 2015

lore
Share & tools
lore
#0 lore raw

cover Changed behavior of last updated column

From: Mariano Lopez <[email protected]>

Changed the last updated column behavior and color. Now it display the dates for all the recipes, including the up to date column. Also changed the color of the text to the default used in other columns.

[YOCTOC #8018]

Mariano Lopez (3):
views.py: Show last updated date for all recipes rrs-additional.css: Added min-width to last update column recipes.html: Format change for last updated column

 rrs/static/css/rrs-additional.css |  4 ++++
 rrs/views.py                      | 13 ++++++-------
 templates/rrs/recipes.html        |  9 +--------
 3 files changed, 11 insertions(+), 15 deletions(-)
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/3 views.py: Show last updated date for all recipes

From: Mariano Lopez <[email protected]>

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]

---
 rrs/views.py | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)
rrs/views.py +6 -7
index ee68254..e446c0d 100644
@@ -196,14 +196,13 @@ def _get_recipe_list(milestone):
             no_update_reason = recipe_upstream['no_update_reason']
 
             #Get how long the recipe hasn't been updated
-            if recipe_upstream['status'] != 'Y':
-                recipe_last_updated = \
-                    recipe_last_updated_dict_all.get(recipe['id'])
-                if recipe_last_updated:
-                    recipe_date = recipe_last_updated['date']
-                    outdated = recipe_date.date().isoformat()
+            recipe_last_updated = \
+                recipe_last_updated_dict_all.get(recipe['id'])
+            if recipe_last_updated:
+                recipe_date = recipe_last_updated['date']
+                outdated = recipe_date.date().isoformat()
             else:
-                outdated = 'Up-to-date'
+                outdated = ""
 
         maintainer_name =  maintainers_dict_all.get(recipe['id'], '')
         recipe_list_item = RecipeList(recipe['id'], recipe['pn'], recipe['summary'])
Signature · 1 line
1.9.1
#2 lore raw

PATCH 2/3 rrs-additional.css: Added min-width to last update column

In reply to [email protected]

From: Mariano Lopez <[email protected]>

This adds the min-width for the last updated column to the css.

[YOCTO #8018]

---
 rrs/static/css/rrs-additional.css | 4 ++++
 1 file changed, 4 insertions(+)
rrs/static/css/rrs-additional.css +4 -0
index 15a2059..bdfa151 100644
@@ -17,6 +17,10 @@
     min-width: 60px;
 }
 
+.last_updated_column {
+    min-width: 60px;
+}
+
 .maintainer_column {
     min-width: 110px;
 }
Signature · 1 line
1.9.1
#3 lore raw

PATCH 3/3 recipes.html: Format change for last updated column

In reply to [email protected]

From: Mariano Lopez <[email protected]>

This changes the format of the last updated column. Now the column text is set to the default text color.

[YOCTO #8018]

---
 templates/rrs/recipes.html | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)
templates/rrs/recipes.html +1 -8
index a69ff0f..5d2ee5f 100644
@@ -99,14 +99,7 @@
     {% 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="last_updated_column">{{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