=== removed file 'dashboard_app/context_processors.py'
@@ -1,24 +0,0 @@
-from dashboard_app.models import ImageHealth
-
-
-def dashboard_globals(request):
- return {
- "dashboard": {
- "interesting_images": [
- ImageHealth('nano', 'panda'),
- ImageHealth('nano', 'omap3'),
- ImageHealth('nano', 'lt-panda'),
- ImageHealth('developer', 'panda'),
- ImageHealth('developer', 'omap3'),
- ImageHealth('developer', 'lt-panda'),
- ImageHealth('alip', 'panda'),
- ImageHealth('alip', 'omap3'),
- ImageHealth('alip', 'lt-panda'),
- ImageHealth('alip', 'lt-panda-x11-base-natty'),
- ImageHealth('ubuntu-desktop', 'panda'),
- ImageHealth('ubuntu-desktop', 'omap3'),
- ImageHealth('ubuntu-desktop', 'lt-panda'),
- ImageHealth('ubuntu-desktop', 'lt-panda-x11-base-natty'),
- ]
- }
- }
=== modified file 'dashboard_app/extension.py'
@@ -18,7 +18,7 @@
import os
-from lava_server.extension import LavaServerExtension
+from lava_server.extension import LavaServerExtension, Menu
class DashboardExtension(LavaServerExtension):
@@ -35,14 +35,43 @@
def main_view_name(self):
return "dashboard_app.views.index"
+ def get_menu(self):
+ from django.core.urlresolvers import reverse
+ menu = super(DashboardExtension, self).get_menu()
+ menu.sub_menu = [
+ Menu("About", reverse(self.main_view_name)),
+ Menu("Image Status", reverse("dashboard_app.views.image_status_list")),
+ Menu("Testing Efforts", reverse("dashboard_app.views.testing_effort_list")),
+ Menu("Bundle Streams", reverse("dashboard_app.views.bundle_stream_list")),
+ Menu("Tests", reverse("dashboard_app.views.test_list")),
+ Menu("Data Views", reverse("dashboard_app.views.data_view_list")),
+ Menu("Reports", reverse("dashboard_app.views.report_list"))]
+ return menu
+
@property
def front_page_template(self):
return "dashboard_app/front_page_snippet.html"
def get_front_page_context(self):
- from dashboard_app.models import DataReport
+ from dashboard_app.models import (DataReport, ImageHealth)
return {
- 'report_list': DataReport.repository.filter(front_page=True)
+ 'report_list': DataReport.repository.filter(front_page=True),
+ 'interesting_images': [
+ ImageHealth('nano', 'panda'),
+ ImageHealth('nano', 'omap3'),
+ ImageHealth('nano', 'lt-panda'),
+ ImageHealth('developer', 'panda'),
+ ImageHealth('developer', 'omap3'),
+ ImageHealth('developer', 'lt-panda'),
+ ImageHealth('alip', 'panda'),
+ ImageHealth('alip', 'omap3'),
+ ImageHealth('alip', 'lt-panda'),
+ ImageHealth('alip', 'lt-panda-x11-base-natty'),
+ ImageHealth('ubuntu-desktop', 'panda'),
+ ImageHealth('ubuntu-desktop', 'omap3'),
+ ImageHealth('ubuntu-desktop', 'lt-panda'),
+ ImageHealth('ubuntu-desktop', 'lt-panda-x11-base-natty'),
+ ]
}
@property
@@ -72,9 +101,6 @@
settings_module['DATAREPORT_DIRS'] = [
os.path.join(root_dir, 'examples/reports'),
os.path.join(root_dir, 'production/reports')]
- settings_module['TEMPLATE_CONTEXT_PROCESSORS'].append(
- 'dashboard_app.context_processors.dashboard_globals'
- )
def contribute_to_settings_ex(self, settings_module, settings_object):
settings_module['DATAVIEW_DIRS'] = settings_object._settings.get(
=== modified file 'dashboard_app/templates/dashboard_app/_content.html'
@@ -15,8 +15,3 @@
{% block breadcrumbs %}
{% include "dashboard_app/_breadcrumbs.html" %}
{% endblock %}
-
-
-{% block navigation %}
-{% include "dashboard_app/_extension_navigation.html" %}
-{% endblock %}
=== modified file 'dashboard_app/templates/dashboard_app/_content_with_sidebar.html'
@@ -15,8 +15,3 @@
{% block breadcrumbs %}
{% include "dashboard_app/_breadcrumbs.html" %}
{% endblock %}
-
-
-{% block navigation %}
-{% include "dashboard_app/_extension_navigation.html" %}
-{% endblock %}
=== removed file 'dashboard_app/templates/dashboard_app/_extension_navigation.html'
@@ -1,19 +0,0 @@
-{% load i18n %}
-<div id="lava-server-extension-navigation">
- <ul>
- <li><a class="lava-back" href="{% url lava.home %}"
- >{% trans "Back to LAVA" %}</a></li>
- <li><a href="{% url dashboard_app.views.image_status_list %}"
- >{% trans "Image Status" %}</a></li>
- <li><a href="{% url dashboard_app.views.testing_effort_list %}"
- >{% trans "Testing efforts" %}</a></li>
- <li><a href="{% url dashboard_app.views.bundle_stream_list %}"
- >{% trans "Bundle Streams" %}</a></li>
- <li><a href="{% url dashboard_app.views.test_list %}"
- >{% trans "Tests" %}</a></li>
- <li><a href="{% url dashboard_app.views.data_view_list %}"
- >{% trans "Data Views" %}</a></li>
- <li><a href="{% url dashboard_app.views.report_list %}"
- >{% trans "Reports" %}</a></li>
- </ul>
-</div>