summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bitbake/lib/toaster/toastergui/tables.py2
-rw-r--r--bitbake/lib/toaster/toastergui/urls.py22
-rw-r--r--bitbake/lib/toaster/toastergui/widgets.py9
3 files changed, 23 insertions, 10 deletions
diff --git a/bitbake/lib/toaster/toastergui/tables.py b/bitbake/lib/toaster/toastergui/tables.py
index 92e3b5c667..70e4b6d782 100644
--- a/bitbake/lib/toaster/toastergui/tables.py
+++ b/bitbake/lib/toaster/toastergui/tables.py
@@ -50,6 +50,7 @@ class LayersTable(ToasterTable):
50 def __init__(self, *args, **kwargs): 50 def __init__(self, *args, **kwargs):
51 super(LayersTable, self).__init__(*args, **kwargs) 51 super(LayersTable, self).__init__(*args, **kwargs)
52 self.default_orderby = "layer__name" 52 self.default_orderby = "layer__name"
53 self.title = "Compatible layers"
53 54
54 def get_context_data(self, **kwargs): 55 def get_context_data(self, **kwargs):
55 context = super(LayersTable, self).get_context_data(**kwargs) 56 context = super(LayersTable, self).get_context_data(**kwargs)
@@ -208,6 +209,7 @@ class MachinesTable(ToasterTable, ProjectFiltersMixin):
208 def __init__(self, *args, **kwargs): 209 def __init__(self, *args, **kwargs):
209 super(MachinesTable, self).__init__(*args, **kwargs) 210 super(MachinesTable, self).__init__(*args, **kwargs)
210 self.empty_state = "No machines maybe you need to do a build?" 211 self.empty_state = "No machines maybe you need to do a build?"
212 self.title = "Compatible machines"
211 self.default_orderby = "name" 213 self.default_orderby = "name"
212 214
213 def get_context_data(self, **kwargs): 215 def get_context_data(self, **kwargs):
diff --git a/bitbake/lib/toaster/toastergui/urls.py b/bitbake/lib/toaster/toastergui/urls.py
index 46e5761443..55f325d0d6 100644
--- a/bitbake/lib/toaster/toastergui/urls.py
+++ b/bitbake/lib/toaster/toastergui/urls.py
@@ -87,15 +87,21 @@ urlpatterns = patterns('toastergui.views',
87 # the table pages that have been converted to ToasterTable widget 87 # the table pages that have been converted to ToasterTable widget
88 url(r'^project/(?P<pid>\d+)/machines/$', 88 url(r'^project/(?P<pid>\d+)/machines/$',
89 tables.MachinesTable.as_view(template_name="generic-toastertable-page.html"), 89 tables.MachinesTable.as_view(template_name="generic-toastertable-page.html"),
90 { 'table_name': tables.MachinesTable.__name__.lower(),
91 'title' : 'Compatible machines' },
92 name="projectmachines"), 90 name="projectmachines"),
93 91
94 url(r'^project/(?P<pid>\d+)/recipes/$', 92 url(r'^project/(?P<pid>\d+)/softwarerecipes/$',
95 tables.RecipesTable.as_view(template_name="generic-toastertable-page.html"), 93 tables.SoftwareRecipesTable.as_view(template_name="generic-toastertable-page.html"),
96 { 'table_name': tables.RecipesTable.__name__.lower(), 94 name="projectsoftwarerecipes"),
97 'title' : 'Compatible recipes' }, 95
98 name="projecttargets"), 96 url(r'^project/(?P<pid>\d+)/images/$',
97 tables.ImageRecipesTable.as_view(template_name="generic-toastertable-page.html"), name="projectimagerecipes"),
98
99 url(r'^project/(?P<pid>\d+)/customimages/$',
100 tables.CustomImagesTable.as_view(template_name="generic-toastertable-page.html"), name="projectcustomimages"),
101
102 url(r'^project/(?P<pid>\d+)/newcustomimage/$',
103 tables.NewCustomImagesTable.as_view(template_name="newcustomimage.html"),
104 name="newcustomimage"),
99 105
100 url(r'^project/(?P<pid>\d+)/availablerecipes/$', 106 url(r'^project/(?P<pid>\d+)/availablerecipes/$',
101 tables.ProjectLayersRecipesTable.as_view(template_name="generic-toastertable-page.html"), 107 tables.ProjectLayersRecipesTable.as_view(template_name="generic-toastertable-page.html"),
@@ -105,8 +111,6 @@ urlpatterns = patterns('toastergui.views',
105 111
106 url(r'^project/(?P<pid>\d+)/layers/$', 112 url(r'^project/(?P<pid>\d+)/layers/$',
107 tables.LayersTable.as_view(template_name="generic-toastertable-page.html"), 113 tables.LayersTable.as_view(template_name="generic-toastertable-page.html"),
108 { 'table_name': tables.LayersTable.__name__.lower(),
109 'title' : 'Compatible layers' },
110 name="projectlayers"), 114 name="projectlayers"),
111 115
112 url(r'^project/(?P<pid>\d+)/layer/(?P<layerid>\d+)$', 116 url(r'^project/(?P<pid>\d+)/layer/(?P<layerid>\d+)$',
diff --git a/bitbake/lib/toaster/toastergui/widgets.py b/bitbake/lib/toaster/toastergui/widgets.py
index eb2914d87c..eb4969214f 100644
--- a/bitbake/lib/toaster/toastergui/widgets.py
+++ b/bitbake/lib/toaster/toastergui/widgets.py
@@ -45,7 +45,7 @@ class ToasterTable(TemplateView):
45 super(ToasterTable, self).__init__() 45 super(ToasterTable, self).__init__()
46 if 'template_name' in kwargs: 46 if 'template_name' in kwargs:
47 self.template_name = kwargs['template_name'] 47 self.template_name = kwargs['template_name']
48 self.title = None 48 self.title = "Table"
49 self.queryset = None 49 self.queryset = None
50 self.columns = [] 50 self.columns = []
51 self.filters = {} 51 self.filters = {}
@@ -61,6 +61,13 @@ class ToasterTable(TemplateView):
61 orderable=True, 61 orderable=True,
62 field_name="id") 62 field_name="id")
63 63
64 def get_context_data(self, **kwargs):
65 context = super(ToasterTable, self).get_context_data(**kwargs)
66 context['title'] = self.title
67 context['table_name'] = type(self).__name__.lower()
68
69 return context
70
64 71
65 def get(self, request, *args, **kwargs): 72 def get(self, request, *args, **kwargs):
66 if request.GET.get('format', None) == 'json': 73 if request.GET.get('format', None) == 'json':