From patchwork Wed Nov 9 00:11:12 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zygmunt Krynicki X-Patchwork-Id: 4956 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 9406723FCF for ; Wed, 9 Nov 2011 00:11:17 +0000 (UTC) Received: from mail-fx0-f52.google.com (mail-fx0-f52.google.com [209.85.161.52]) by fiordland.canonical.com (Postfix) with ESMTP id 77016A1802C for ; Wed, 9 Nov 2011 00:11:17 +0000 (UTC) Received: by faan26 with SMTP id n26so1612533faa.11 for ; Tue, 08 Nov 2011 16:11:17 -0800 (PST) Received: by 10.152.104.20 with SMTP id ga20mr60293lab.13.1320797477271; Tue, 08 Nov 2011 16:11:17 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.152.14.103 with SMTP id o7cs110464lac; Tue, 8 Nov 2011 16:11:17 -0800 (PST) Received: by 10.180.0.14 with SMTP id 14mr15559428wia.65.1320797473312; Tue, 08 Nov 2011 16:11:13 -0800 (PST) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id 8si1716175wel.107.2011.11.08.16.11.13 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 08 Nov 2011 16:11:13 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.7 as permitted sender) client-ip=91.189.90.7; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.7 as permitted sender) smtp.mail=bounces@canonical.com Received: from ackee.canonical.com ([91.189.89.26]) by indium.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1RNvl2-0003Kl-O8 for ; Wed, 09 Nov 2011 00:11:12 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id ACFE8E04DF for ; Wed, 9 Nov 2011 00:11:12 +0000 (UTC) MIME-Version: 1.0 X-Launchpad-Project: lava-dashboard X-Launchpad-Branch: ~linaro-validation/lava-dashboard/trunk X-Launchpad-Message-Rationale: Subscriber X-Launchpad-Branch-Revision-Number: 278 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-validation/lava-dashboard/trunk] Rev 278: Remove the context processor, use front page data feeder and start using application menu (yuck, ... Message-Id: <20111109001112.12397.96715.launchpad@ackee.canonical.com> Date: Wed, 09 Nov 2011 00:11:12 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="14263"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: 21b94c7d2ddf45e820d6c989354080286c65304f ------------------------------------------------------------ revno: 278 committer: Zygmunt Krynicki branch nick: lava-dashboard timestamp: Wed 2011-11-09 00:59:49 +0100 message: Remove the context processor, use front page data feeder and start using application menu (yuck, bzr has no patch splitter) removed: dashboard_app/context_processors.py dashboard_app/templates/dashboard_app/_extension_navigation.html modified: dashboard_app/extension.py dashboard_app/templates/dashboard_app/_content.html dashboard_app/templates/dashboard_app/_content_with_sidebar.html --- lp:lava-dashboard https://code.launchpad.net/~linaro-validation/lava-dashboard/trunk You are subscribed to branch lp:lava-dashboard. To unsubscribe from this branch go to https://code.launchpad.net/~linaro-validation/lava-dashboard/trunk/+edit-subscription === removed file 'dashboard_app/context_processors.py' --- dashboard_app/context_processors.py 2011-08-18 15:03:44 +0000 +++ dashboard_app/context_processors.py 1970-01-01 00:00:00 +0000 @@ -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' --- dashboard_app/extension.py 2011-10-13 11:56:10 +0000 +++ dashboard_app/extension.py 2011-11-08 23:59:49 +0000 @@ -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' --- dashboard_app/templates/dashboard_app/_content.html 2011-07-25 23:19:44 +0000 +++ dashboard_app/templates/dashboard_app/_content.html 2011-11-08 23:59:49 +0000 @@ -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' --- dashboard_app/templates/dashboard_app/_content_with_sidebar.html 2011-07-25 23:19:44 +0000 +++ dashboard_app/templates/dashboard_app/_content_with_sidebar.html 2011-11-08 23:59:49 +0000 @@ -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' --- dashboard_app/templates/dashboard_app/_extension_navigation.html 2011-09-28 00:35:41 +0000 +++ dashboard_app/templates/dashboard_app/_extension_navigation.html 1970-01-01 00:00:00 +0000 @@ -1,19 +0,0 @@ -{% load i18n %} -