Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 52177E00B8D; Tue, 27 Jun 2017 15:15:56 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, * medium trust * [147.11.146.13 listed in list.dnswl.org] Received: from mail1.windriver.com (mail1.windriver.com [147.11.146.13]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id DC4F1E00B8D for ; Tue, 27 Jun 2017 15:15:53 -0700 (PDT) Received: from ALA-HCB.corp.ad.wrs.com (ala-hcb.corp.ad.wrs.com [147.11.189.41]) by mail1.windriver.com (8.15.2/8.15.1) with ESMTPS id v5RMFnV0008111 (version=TLSv1 cipher=AES128-SHA bits=128 verify=FAIL) for ; Tue, 27 Jun 2017 15:15:49 -0700 (PDT) Received: from ala-dreyna-lx3.corp.ad.wrs.com (147.11.157.209) by ALA-HCB.corp.ad.wrs.com (147.11.189.41) with Microsoft SMTP Server (TLS) id 14.3.294.0; Tue, 27 Jun 2017 15:15:48 -0700 From: David Reyna To: Date: Tue, 27 Jun 2017 15:07:12 -0700 Message-ID: <1498601232-10008-1-git-send-email-david.reyna@windriver.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-Originating-IP: [147.11.157.209] Subject: [PATCH] toaster: trim build target input X-BeenThere: toaster@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Web based interface for BitBake List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jun 2017 22:15:56 -0000 Content-Type: text/plain From: David Reyna Trim the entered built target value so that Toaster is not confused with no real targets nor a ghost second target. [YOCTO #11727] Signed-off-by: David Reyna --- bitbake/lib/toaster/toastergui/static/js/projecttopbar.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bitbake/lib/toaster/toastergui/static/js/projecttopbar.js b/bitbake/lib/toaster/toastergui/static/js/projecttopbar.js index 92ab2d6..69220aa 100644 --- a/bitbake/lib/toaster/toastergui/static/js/projecttopbar.js +++ b/bitbake/lib/toaster/toastergui/static/js/projecttopbar.js @@ -73,14 +73,14 @@ function projectTopBarInit(ctx) { newBuildTargetBuildBtn.click(function (e) { e.preventDefault(); - if (!newBuildTargetInput.val()) { + if (!newBuildTargetInput.val().trim()) { return; } /* We use the value of the input field so as to maintain any command also * added e.g. core-image-minimal:clean and because we can build targets * that toaster doesn't yet know about */ - selectedTarget = { name: newBuildTargetInput.val() }; + selectedTarget = { name: newBuildTargetInput.val().trim() }; /* Fire off the build */ libtoaster.startABuild(null, selectedTarget.name, -- 1.9.1