[bitbake-devel] [PATCH 07/10] toaster: Remove Layer source from machines, layers and targets

Alex DAMIAN alexandru.damian at intel.com
Mon Feb 16 17:53:23 UTC 2015


From: Michael Wood <michael.g.wood at intel.com>

>From the bug: The layer source reveals too much of the implementation model,
without explaining what is going on behind the scenes. It will confuse more
than inform, so let's get rid of it.

[YOCTO #7302]

Signed-off-by: Michael Wood <michael.g.wood at intel.com>
---
 lib/toaster/toastergui/templates/layers.html   |  1 -
 lib/toaster/toastergui/templates/machines.html |  1 -
 lib/toaster/toastergui/templates/targets.html  |  1 -
 lib/toaster/toastergui/views.py                | 37 --------------------------
 4 files changed, 40 deletions(-)

diff --git a/lib/toaster/toastergui/templates/layers.html b/lib/toaster/toastergui/templates/layers.html
index 0943c39..5cfda5b 100644
--- a/lib/toaster/toastergui/templates/layers.html
+++ b/lib/toaster/toastergui/templates/layers.html
@@ -41,7 +41,6 @@
     <tr class="data">
             <td class="layer"><a href="{% url 'layerdetails' o.id %}">{{o.layer.name}}</a></td>
             <td class="description">{% if o.layer.summary %}{{o.layer.summary}}{%endif%}</td>
-            <td class="source"><a href="{% url 'layerdetails' o.pk %}">{{o.layer_source.name}}</a></td>
             <td class="git-repo"><a href="{% url 'layerdetails' o.pk %}"><code>{{o.layer.vcs_url}}</code></a>
             {% if o.get_vcs_link_url %}
             <a target="_blank" href="{{ o.get_vcs_link_url }}"><i class="icon-share get-info"></i></a>
diff --git a/lib/toaster/toastergui/templates/machines.html b/lib/toaster/toastergui/templates/machines.html
index 2089c26..9b2a540 100644
--- a/lib/toaster/toastergui/templates/machines.html
+++ b/lib/toaster/toastergui/templates/machines.html
@@ -64,7 +64,6 @@
     <td class="machine">{{o.name}}</td>
     <td class="description">{{o.description}}</td>
     <td class="layer"><a href="{%url "layerdetails" o.layer_version.id %}">{{o.layer_version.layer.name}}</a></td>
-    <td class="source">{{o.layer_source.name}}</td>
     <td class="branch">{{o.layer_version.get_vcs_reference}}</td>
     <td class="machinefile"><code>/machine/conf/{{o.name}}.conf</code><a href="{{o.get_vcs_machine_file_link_url}}" target="_blank"><i class="icon-share get-info"></i></a></td>
     <td class="select-or-add">
diff --git a/lib/toaster/toastergui/templates/targets.html b/lib/toaster/toastergui/templates/targets.html
index 32c67ea..6cd9391 100644
--- a/lib/toaster/toastergui/templates/targets.html
+++ b/lib/toaster/toastergui/templates/targets.html
@@ -53,7 +53,6 @@
         <td class="target-section">{{o.section}}</td>
         <td class="license">{{o.license}}</td>
         <td class="layer"><a href="{% url 'layerdetails' o.preffered_layerversion.id%}">{{o.preffered_layerversion.layer.name}}</a></td>
-        <td class="source">{{o.preffered_layerversion.layer_source.name}}</td>
         <td class="branch">
         {% if o.preffered_layerversion.up_branch %}
             {{o.preffered_layerversion.up_branch.name}}
diff --git a/lib/toaster/toastergui/views.py b/lib/toaster/toastergui/views.py
index 4a1cdec..7bfedb4 100755
--- a/lib/toaster/toastergui/views.py
+++ b/lib/toaster/toastergui/views.py
@@ -2565,18 +2565,6 @@ if toastermain.settings.MANAGED:
                     'dclass': 'span4',
                     'clclass': 'description',
                 },
-                {   'name': 'Layer source',
-                    'clclass': 'source',
-                    'qhelp': "Where the layer is coming from, for example, if it's part of the OpenEmbedded collection of layers or if it's a layer you have imported",
-                    'orderfield': _get_toggle_order(request, "layer_source__name"),
-                    'ordericon': _get_toggle_order_icon(request, "layer_source__name"),
-                    'orderkey' : "layer_source__name",
-                    'filter': {
-                        'class': 'layer',
-                        'label': 'Show:',
-                        'options': map(lambda x: (x.name + " layers", 'layer_source__pk:' + str(x.id), queryset_all.filter(layer_source__pk = x.id).count() ), LayerSource.objects.all()),
-                    }
-                },
                 {   'name': 'Git repository URL',
                     'dclass': 'span6',
                     'clclass': 'git-repo', 'hidden': 1,
@@ -2741,18 +2729,6 @@ if toastermain.settings.MANAGED:
                     'ordericon': _get_toggle_order_icon(request, "layer_version__layer__name"),
                     'orderkey': "layer_version__layer__name",
                 },
-                {   'name': 'Layer source',
-                    'clclass': 'source',
-                    'qhelp': "Where the target is coming from, for example, if it's part of the OpenEmbedded collection of targets or if it's a target you have imported",
-                    'orderfield': _get_toggle_order(request, "layer_source__name"),
-                    'ordericon': _get_toggle_order_icon(request, "layer_source__name"),
-                    'orderkey': "layer_source__name",
-                    'filter': {
-                        'class': 'target',
-                        'label': 'Show:',
-                        'options': map(lambda x: ("Targets provided by " + x.name + " layers", 'layer_source__pk:' + str(x.id), queryset_with_search.filter(layer_source__pk = x.id).count() ), LayerSource.objects.all()),
-                    }
-                },
                 {   'name': 'Revision',
                     'clclass': 'branch',
                     'qhelp': "The Git branch, tag or commit. For the layers from the OpenEmbedded layer source, the revision is always the branch compatible with the Yocto Project version you selected for this project.",
@@ -2802,7 +2778,6 @@ if toastermain.settings.MANAGED:
 
         queryset_all = Machine.objects.all()
         queryset_all = queryset_all.prefetch_related('layer_version')
-        queryset_all = queryset_all.prefetch_related('layer_source')
 
         prj = Project.objects.get(pk = request.session['project_id'])
         compatible_layers = prj.compatible_layerversions()
@@ -2870,18 +2845,6 @@ if toastermain.settings.MANAGED:
                     'ordericon' : _get_toggle_order_icon(request, "layer_version__layer__name"),
                     'orderkey' : "layer_version__layer__name",
                 },
-                {   'name': 'Layer source',
-                    'clclass': 'source',
-                    'qhelp': "Where the machine is coming from, for example, if it's part of the OpenEmbedded collection of machines or if it's a machine you have imported",
-                    'orderfield': _get_toggle_order(request, "layer_source__name"),
-                    'ordericon': _get_toggle_order_icon(request, "layer_source__name"),
-                    'orderkey': "layer_source__name",
-                    'filter': {
-                        'class': 'machine',
-                        'label': 'Show:',
-                        'options': map(lambda x: (x.name, 'layer_source__pk:' + str(x.id), queryset.filter(layer_source__pk = x.id).count() ), LayerSource.objects.all()),
-                    }
-                },
                 {   'name': 'Revision',
                     'clclass': 'branch',
                     'qhelp' : "The Git branch, tag or commit. For the layers from the OpenEmbedded layer source, the revision is always the branch compatible with the Yocto Project version you selected for this project",
-- 
1.9.1




More information about the bitbake-devel mailing list