From patchwork Wed Aug 7 12:15:36 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stevan Radakovic X-Patchwork-Id: 18830 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qe0-f69.google.com (mail-qe0-f69.google.com [209.85.128.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D00A6246A4 for ; Wed, 7 Aug 2013 12:15:38 +0000 (UTC) Received: by mail-qe0-f69.google.com with SMTP id 1sf1891107qec.0 for ; Wed, 07 Aug 2013 05:15:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-gm-message-state:delivered-to:mime-version:to:from:subject :message-id:date:reply-to:sender:errors-to:precedence :x-original-sender:x-original-authentication-results:mailing-list :list-id:list-post:list-help:list-archive:list-unsubscribe :content-type; bh=t5JHaxTWVTZvwXhG1Bvt6zlUn9/b5MavBFgHA/Pb5Zc=; b=kvQ+PlpwBKaHvzZJqpQ84ufMTaoZiwmLrERbubREtIGt3zs483ECzH2v7SBPuqgrmE Mau2dab387c8sknCUTJEJ7sHgwtF+2tqZX3IQF89M4JIQS/2NN1f13wxeXMalvrUQgF+ Yr9w5ufH9dwhSmtzQVNHgb7HA38jEAUN8to2M9zfEwfN99NywGO4xUV7OHCKuBfbnjIb cIMWyAbVNH74ijKfPyLQ3zfd2wwNE4zZPcsiKp6IT9u+7OrR7+xd3WgVdtkbiUtmkPGr rjHhH9fnttS1YP8JlmjGWud2Aq3gFL7U/C7FVVlVVfUxMcaZnUzyKh/01uOPe0woT+EW 4Idg== X-Received: by 10.224.103.68 with SMTP id j4mr319816qao.8.1375877738348; Wed, 07 Aug 2013 05:15:38 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.99.10 with SMTP id em10ls595570qeb.82.gmail; Wed, 07 Aug 2013 05:15:38 -0700 (PDT) X-Received: by 10.220.182.69 with SMTP id cb5mr1003022vcb.41.1375877738212; Wed, 07 Aug 2013 05:15:38 -0700 (PDT) Received: from mail-vb0-f53.google.com (mail-vb0-f53.google.com [209.85.212.53]) by mx.google.com with ESMTPS id vf5si1462081vdc.18.2013.08.07.05.15.38 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 07 Aug 2013 05:15:38 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.53 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.53; Received: by mail-vb0-f53.google.com with SMTP id i3so1673374vbh.26 for ; Wed, 07 Aug 2013 05:15:38 -0700 (PDT) X-Gm-Message-State: ALoCoQkwC5G+lR+h0lvnqv1BovShG+mpbVmQKXEs5eumiqW5YjtAM49+PQykx3D7sIh94JgHvBe+ X-Received: by 10.220.198.133 with SMTP id eo5mr1048346vcb.24.1375877737959; Wed, 07 Aug 2013 05:15:37 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.221.11.8 with SMTP id pc8csp197644vcb; Wed, 7 Aug 2013 05:15:37 -0700 (PDT) X-Received: by 10.15.76.71 with SMTP id m47mr2803382eey.70.1375877737005; Wed, 07 Aug 2013 05:15:37 -0700 (PDT) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id u9si5699143eeg.231.2013.08.07.05.15.36 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 07 Aug 2013 05:15:36 -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; Received: from ackee.canonical.com ([91.189.89.26]) by indium.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1V72eO-0000Aa-9i for ; Wed, 07 Aug 2013 12:15:36 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id 3B2E0E078B for ; Wed, 7 Aug 2013 12:15:36 +0000 (UTC) MIME-Version: 1.0 X-Launchpad-Project: lava-server X-Launchpad-Branch: ~linaro-validation/lava-server/trunk X-Launchpad-Message-Rationale: Subscriber X-Launchpad-Branch-Revision-Number: 419 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-validation/lava-server/trunk] Rev 419: Add instance name information on the top panel next to the user indicator. Reviewed by terceiro. Message-Id: <20130807121536.26383.61890.launchpad@ackee.canonical.com> Date: Wed, 07 Aug 2013 12:15:36 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: list X-Generated-By: Launchpad (canonical.com); Revision="16721"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: 20235f8c57c1d33223244a8af69ee02043224b1b X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: noreply@launchpad.net X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.53 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Merge authors: Stevan Radaković (stevanr) Related merge proposals: https://code.launchpad.net/~stevanr/lava-server/instance-name/+merge/178939 proposed by: Stevan Radaković (stevanr) review: Approve - Antonio Terceiro (terceiro) ------------------------------------------------------------ revno: 419 [merge] committer: Stevan Radakovic branch nick: trunk timestamp: Wed 2013-08-07 14:15:10 +0200 message: Add instance name information on the top panel next to the user indicator. Reviewed by terceiro. modified: lava_server/context_processors.py lava_server/htdocs/css/default.css lava_server/templates/layouts/content.html --- lp:lava-server https://code.launchpad.net/~linaro-validation/lava-server/trunk You are subscribed to branch lp:lava-server. To unsubscribe from this branch go to https://code.launchpad.net/~linaro-validation/lava-server/trunk/+edit-subscription === modified file 'lava_server/context_processors.py' --- lava_server/context_processors.py 2013-07-30 15:28:17 +0000 +++ lava_server/context_processors.py 2013-08-07 11:35:41 +0000 @@ -16,6 +16,7 @@ # You should have received a copy of the GNU Affero General Public License # along with LAVA Server. If not, see . +import os import versiontools import lava_server @@ -39,10 +40,20 @@ ]), Menu("Documentation", "http://lava.rtfd.org/"), ]) + + try: + instance_name = os.environ["LAVA_INSTANCE"] + except KeyError: + try: + instance_name = os.path.basename(os.environ["VIRTUAL_ENV"]) + except KeyError: + instance_name = None + return { 'lava': { 'menu_list': menu_list, 'extension_list': loader.extensions, + 'instance_name': instance_name, 'version': versiontools.format_version( lava_server.__version__, hint=lava_server)}} === modified file 'lava_server/htdocs/css/default.css' --- lava_server/htdocs/css/default.css 2012-06-04 05:10:13 +0000 +++ lava_server/htdocs/css/default.css 2013-08-07 11:35:41 +0000 @@ -219,6 +219,14 @@ vertical-align: middle; } +/* Instance name indicator */ + +#lava-instance-name-indicator { + text-align: center; + padding-right: 20px; + vertical-align: middle; +} + /* Logo */ #lava-logo { === modified file 'lava_server/templates/layouts/content.html' --- lava_server/templates/layouts/content.html 2012-11-09 22:40:16 +0000 +++ lava_server/templates/layouts/content.html 2013-08-07 12:06:55 +0000 @@ -58,6 +58,13 @@ + + + {% if lava.instance_name %} +
Instance: {{ lava.instance_name }}
+ {% endif %} + +