Skip to contentSkip to conversation

toaster: cummulative 03092017 patch

PATCH New David Reyna 1 participant 4 messages Sep 4, 2017

lore
Share & tools
lore
#0 lore raw

cover toaster: cummulative 03092017 patch

From: David Reyna <[email protected]>

The patch "toaster: missing ToasterSetting import" is High priority and restores Toaster start up.

There are no new files.

The following changes since commit ee5bce2d11e783c0921df47b629025a6b67c44bf:

kernel-dev: Removed bad reference for creating patches. (2017-09-02 00:52:49 +0100)

are available in the git repository at:

git://git.yoctoproject.org/poky-contrib dreyna/submit/dreyna/toaster/cummulative_020917_patch
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=dreyna/submit/dreyna/toaster/cummulative_020917_patch

David Reyna (3):
toaster: missing ToasterSetting import
toaster: recipe links broken for default layers
toaster: edit column list not sorted

 lib/toaster/orm/fixtures/oe-core.xml             |  3 +++
 lib/toaster/orm/fixtures/poky.xml                |  9 +++++++++
 lib/toaster/orm/management/commands/lsupdates.py |  3 +++
 lib/toaster/toastergui/static/js/table.js        | 11 ++++++++++-
 4 files changed, 25 insertions(+), 1 deletion(-)
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/3 toaster: missing ToasterSetting import

From: David Reyna <[email protected]>

The file "lsupdates.py" is missing the import of 'ToasterSetting', and that breaks setting up and updating Toaster and its database.

[YOCTO #12036]

---
 lib/toaster/orm/management/commands/lsupdates.py | 1 +
 1 file changed, 1 insertion(+)
lib/toaster/orm/management/commands/lsupdates.py +1 -0
index fac5733..54b4fab 100644
@@ -24,6 +24,7 @@ from django.core.management.base import BaseCommand
 from orm.models import LayerSource, Layer, Release, Layer_Version
 from orm.models import LayerVersionDependency, Machine, Recipe
 from orm.models import Distro
+from orm.models import ToasterSetting
 
 import os
 import sys
Signature · 1 line
1.9.1
#2 lore raw

PATCH 2/3 toaster: recipe links broken for default layers

In reply to David Reyna

From: David Reyna <[email protected]>

The default layers are missing the recipe link definitions in the fixture files, and because they are predefined they do not get the updated information from the Layer Index.

[YOCTO #12006]

---
 lib/toaster/orm/fixtures/oe-core.xml             | 3 +++
 lib/toaster/orm/fixtures/poky.xml                | 9 +++++++++
 lib/toaster/orm/management/commands/lsupdates.py | 2 ++
 3 files changed, 14 insertions(+)
lib/toaster/orm/fixtures/oe-core.xml +3 -0
index e285ec6..66c3595 100644
@@ -65,6 +65,9 @@
   <object model="orm.layer" pk="1">
     <field type="CharField" name="name">openembedded-core</field>
     <field type="CharField" name="vcs_url">git://git.openembedded.org/openembedded-core</field>
+    <field type="CharField" name="vcs_web_url">http://cgit.openembedded.org/openembedded-core</field>
+    <field type="CharField" name="vcs_web_tree_base_url">http://cgit.openembedded.org/openembedded-core/tree/%path%?h=%branch%</field>
+    <field type="CharField" name="vcs_web_file_base_url">http://cgit.openembedded.org/openembedded-core/tree/%path%?h=%branch%</field>
   </object>
   <object model="orm.layer_version" pk="1">
     <field rel="ManyToOneRel" to="orm.layer" name="layer">1</field>
lib/toaster/orm/fixtures/poky.xml +9 -0
index b3f6c96..7827aac 100644
@@ -97,6 +97,9 @@
     <field type="CharField" name="name">openembedded-core</field>
     <field type="CharField" name="layer_index_url"></field>
     <field type="CharField" name="vcs_url">git://git.yoctoproject.org/poky</field>
+    <field type="CharField" name="vcs_web_url">http://git.yoctoproject.org/cgit/cgit.cgi/poky</field>
+    <field type="CharField" name="vcs_web_tree_base_url">http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/%path%?h=%branch%</field>
+    <field type="CharField" name="vcs_web_file_base_url">http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/%path%?h=%branch%</field>
   </object>
   <object model="orm.layer_version" pk="1">
     <field rel="ManyToOneRel" to="orm.layer" name="layer">1</field>
@@ -125,6 +128,9 @@
     <field type="CharField" name="name">meta-poky</field>
     <field type="CharField" name="layer_index_url"></field>
     <field type="CharField" name="vcs_url">git://git.yoctoproject.org/poky</field>
+    <field type="CharField" name="vcs_web_url">http://git.yoctoproject.org/cgit/cgit.cgi/poky</field>
+    <field type="CharField" name="vcs_web_tree_base_url">http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/%path%?h=%branch%</field>
+    <field type="CharField" name="vcs_web_file_base_url">http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/%path%?h=%branch%</field>
   </object>
   <object model="orm.layer_version" pk="4">
     <field rel="ManyToOneRel" to="orm.layer" name="layer">2</field>
@@ -153,6 +159,9 @@
     <field type="CharField" name="name">meta-yocto-bsp</field>
     <field type="CharField" name="layer_index_url"></field>
     <field type="CharField" name="vcs_url">git://git.yoctoproject.org/poky</field>
+    <field type="CharField" name="vcs_web_url">http://git.yoctoproject.org/cgit/cgit.cgi/poky</field>
+    <field type="CharField" name="vcs_web_tree_base_url">http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/%path%?h=%branch%</field>
+    <field type="CharField" name="vcs_web_file_base_url">http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/%path%?h=%branch%</field>
   </object>
   <object model="orm.layer_version" pk="7">
     <field rel="ManyToOneRel" to="orm.layer" name="layer">3</field>
lib/toaster/orm/management/commands/lsupdates.py +2 -0
index 54b4fab..efc6b3a 100644
@@ -166,6 +166,8 @@ class Command(BaseCommand):
                 l.description = li['description']
 
                 if created:
+                    # predefined layers in the fixtures (for example poky.xml)
+                    # always preempt the Layer Index for these values
                     l.vcs_url = li['vcs_url']
                     l.vcs_web_url = li['vcs_web_url']
                     l.vcs_web_tree_base_url = li['vcs_web_tree_base_url']
Signature · 1 line
1.9.1
#3 lore raw

PATCH 3/3 toaster: edit column list not sorted

In reply to David Reyna

From: David Reyna <[email protected]>

The list of columns in the many 'Edit Columns' pop-ups became unsorted with the 'Toaster Table' implementation. These entries need to be gathered and sorted in the column processing.

[YOCTO #12004]

---
 lib/toaster/toastergui/static/js/table.js | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
lib/toaster/toastergui/static/js/table.js +10 -1
index 1bbc8d1..abcb5ca 100644
@@ -202,6 +202,7 @@ function tableInit(ctx){
     }
 
     /* Add table header and column toggle menu */
+    var column_edit_entries = [];
     for (var i in tableData.columns){
       var col = tableData.columns[i];
       if (col.displayable === false) {
@@ -293,9 +294,17 @@ function tableInit(ctx){
         defaultHiddenCols.push(col.field_name);
       }
 
-      editColMenu.append(toggler);
+      /* Gather the Edit Column entries */
+      column_edit_entries.push({'title':col.title,'html':toggler});
+
     } /* End for each column */
 
+    /* Append the sorted Edit Column toggler entries */
+    column_edit_entries.sort(function(a,b) {return (a.title > b.title) ? 1 : ((b.title > a.title) ? -1 : 0);} );
+    for (var col in column_edit_entries){
+      editColMenu.append(column_edit_entries[col].html);
+    }
+
     tableChromeDone = true;
   }
 
Signature · 1 line
1.9.1