Skip to contentSkip to conversation

toasterui: set a default order for the software recipes table

PATCH In review Belen Barros Pena 2 participants 2 messages Dec 14, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 toasterui: set a default order for the software recipes table

From: Belen Barros Pena <[email protected]>

Add default order by recipe name, so that the table content is sorted when the page loads.

[YOCTO #8791]

---
 bitbake/lib/toaster/toastergui/tables.py | 1 +
 1 file changed, 1 insertion(+)
bitbake/lib/toaster/toastergui/tables.py +1 -0
index 74af507..3808820 100644
@@ -561,6 +561,7 @@ class SoftwareRecipesTable(RecipesTable):
     def __init__(self, *args, **kwargs):
         super(SoftwareRecipesTable, self).__init__(*args, **kwargs)
         self.title = "Compatible software recipes"
+        self.default_orderby = "name"
 
     def setup_queryset(self, *args, **kwargs):
         super(SoftwareRecipesTable, self).setup_queryset(*args, **kwargs)
Signature · 1 line
2.4.9 (Apple Git-60)
#1 lore raw

Thanks, sent upstream & committed to toaster-next

Quoted 24 lines · Belen Barros Pena

From: Belen Barros Pena <[email protected]>

Add default order by recipe name, so that the table content is sorted when the page loads.

[YOCTO #8791]

---
  bitbake/lib/toaster/toastergui/tables.py | 1 +
  1 file changed, 1 insertion(+)
bitbake/lib/toaster/toastergui/tables.py +1 -0
index 74af507..3808820 100644
@@ -561,6 +561,7 @@ class SoftwareRecipesTable(RecipesTable):
      def __init__(self, *args, **kwargs):
          super(SoftwareRecipesTable, self).__init__(*args, **kwargs)
          self.title = "Compatible software recipes"
+        self.default_orderby = "name"
 
      def setup_queryset(self, *args, **kwargs):
          super(SoftwareRecipesTable, self).setup_queryset(*args, **kwargs)