diff options
Diffstat (limited to 'bitbake/lib/toaster/toastergui/tables.py')
-rw-r--r-- | bitbake/lib/toaster/toastergui/tables.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/bitbake/lib/toaster/toastergui/tables.py b/bitbake/lib/toaster/toastergui/tables.py index e540b91499..e03aa768c9 100644 --- a/bitbake/lib/toaster/toastergui/tables.py +++ b/bitbake/lib/toaster/toastergui/tables.py | |||
@@ -19,7 +19,7 @@ | |||
19 | # with this program; if not, write to the Free Software Foundation, Inc., | 19 | # with this program; if not, write to the Free Software Foundation, Inc., |
20 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | 20 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
21 | 21 | ||
22 | from toastergui.widgets import ToasterTable | 22 | from toastergui.widgets import ToasterTable, ToasterTemplateView |
23 | from orm.models import Recipe, ProjectLayer, Layer_Version, Machine, Project | 23 | from orm.models import Recipe, ProjectLayer, Layer_Version, Machine, Project |
24 | from django.db.models import Q, Max | 24 | from django.db.models import Q, Max |
25 | from django.conf.urls import url | 25 | from django.conf.urls import url |
@@ -142,16 +142,24 @@ class LayersTable(ToasterTable): | |||
142 | static_data_name="add-del-layers", | 142 | static_data_name="add-del-layers", |
143 | static_data_template='{% include "layer_btn.html" %}') | 143 | static_data_template='{% include "layer_btn.html" %}') |
144 | 144 | ||
145 | class LayerDetails(TemplateView): | 145 | |
146 | |||
147 | class LayerDetails(ToasterTemplateView): | ||
146 | def get_context_data(self, **kwargs): | 148 | def get_context_data(self, **kwargs): |
147 | context = super(LayerDetails, self).get_context_data(**kwargs) | 149 | context = super(LayerDetails, self).get_context_data(**kwargs) |
150 | from toastergui.views import _lv_to_dict | ||
148 | 151 | ||
149 | context['project'] = Project.objects.get(pk=kwargs['pid']) | 152 | context['project'] = Project.objects.get(pk=kwargs['pid']) |
150 | context['layerversion'] = Layer_Version.objects.get(pk=kwargs['layerid']) | 153 | context['layerversion'] = Layer_Version.objects.get(pk=kwargs['layerid']) |
154 | context['layerdict'] = _lv_to_dict(context['project'], context['layerversion']) | ||
155 | context['layerdeps'] = {"list": [x.depends_on.get_equivalents_wpriority(context['project'])[0] for x in context['layerversion'].dependencies.all()]} | ||
151 | context['projectlayers'] = map(lambda prjlayer: prjlayer.layercommit.id, ProjectLayer.objects.filter(project=context['project'])) | 156 | context['projectlayers'] = map(lambda prjlayer: prjlayer.layercommit.id, ProjectLayer.objects.filter(project=context['project'])) |
152 | 157 | ||
158 | self.context_entries = ['project', 'layerversion', 'projectlayers', 'layerdict', 'layerdeps'] | ||
159 | |||
153 | return context | 160 | return context |
154 | 161 | ||
162 | |||
155 | class MachinesTable(ToasterTable): | 163 | class MachinesTable(ToasterTable): |
156 | """Table of Machines in Toaster""" | 164 | """Table of Machines in Toaster""" |
157 | 165 | ||