From patchwork Fri Aug 19 04:16:13 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zygmunt Krynicki X-Patchwork-Id: 3526 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 62E6F23E54 for ; Fri, 19 Aug 2011 04:16:15 +0000 (UTC) Received: from mail-ey0-f170.google.com (mail-ey0-f170.google.com [209.85.215.170]) by fiordland.canonical.com (Postfix) with ESMTP id 58A91A183CE for ; Fri, 19 Aug 2011 04:16:15 +0000 (UTC) Received: by eyd10 with SMTP id 10so2100639eyd.29 for ; Thu, 18 Aug 2011 21:16:15 -0700 (PDT) Received: by 10.213.27.27 with SMTP id g27mr25355ebc.18.1313727374726; Thu, 18 Aug 2011 21:16:14 -0700 (PDT) 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.213.102.5 with SMTP id e5cs112768ebo; Thu, 18 Aug 2011 21:16:14 -0700 (PDT) Received: by 10.216.160.3 with SMTP id t3mr1283595wek.81.1313727373667; Thu, 18 Aug 2011 21:16:13 -0700 (PDT) Received: from indium.canonical.com (indium.canonical.com [91.189.90.7]) by mx.google.com with ESMTPS id b52si7330953wed.121.2011.08.18.21.16.13 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 18 Aug 2011 21:16:13 -0700 (PDT) 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 1QuGVB-0008NE-1m for ; Fri, 19 Aug 2011 04:16:13 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id 017AFE03D1 for ; Fri, 19 Aug 2011 04:16:13 +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: 253 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-validation/lava-dashboard/trunk] Rev 253: Add dashboard_globals to context processor Message-Id: <20110819041613.15284.78412.launchpad@ackee.canonical.com> Date: Fri, 19 Aug 2011 04:16:13 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="13697"; Instance="initZopeless config overlay" X-Launchpad-Hash: c754cf764ea8d12c2f3c3d7bb8c027886f2c1d10 ------------------------------------------------------------ revno: 253 committer: Zygmunt Krynicki branch nick: pristine timestamp: Thu 2011-08-18 17:03:44 +0200 message: Add dashboard_globals to context processor modified: dashboard_app/context_processors.py dashboard_app/extension.py --- 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 === modified file 'dashboard_app/context_processors.py' --- dashboard_app/context_processors.py 2010-12-20 12:31:26 +0000 +++ dashboard_app/context_processors.py 2011-08-18 15:03:44 +0000 @@ -1,3 +1,24 @@ -def project_version(request): - from dashboard_app import __version__ - return {'project_version': __version__} +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-07-12 03:06:00 +0000 +++ dashboard_app/extension.py 2011-08-18 15:03:44 +0000 @@ -65,6 +65,9 @@ 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(