summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/toastergui/static
diff options
context:
space:
mode:
authorElliot Smith <elliot.smith@intel.com>2015-10-05 16:39:36 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-10-16 14:59:59 +0100
commit2517987f8db37d50df03e690be2501447b7eeeb8 (patch)
treea4f5001de4f7e30d77a86ce2bf8135a3789407a6 /bitbake/lib/toaster/toastergui/static
parent56d4c84cec911a9cf44848b0de6e04617fe7d82d (diff)
downloadpoky-2517987f8db37d50df03e690be2501447b7eeeb8.tar.gz
bitbake: toaster: Modify "New build" button behaviour for cli builds project
The "New build" button should only be displayed if there are user-generated projects, not if there is only the command-line builds project. (Toaster can't run builds on behalf of the command-line builds project.) The "New build" form should also display as if no project has been set (i.e. show the project and recipe text entries). Add a variable which tracks the number of non-command-line projects, then use this to hide the button when appropriate. Also track whether the current project is the default one, and use this to add extra conditions to when the "New build" text entries are shown. [YOCTO #8231] (Bitbake rev: 07e7bc29a7d976941eeae997f78a25ed6edddfc8) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/toastergui/static')
-rw-r--r--bitbake/lib/toaster/toastergui/static/js/base.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/bitbake/lib/toaster/toastergui/static/js/base.js b/bitbake/lib/toaster/toastergui/static/js/base.js
index 6042a96ee4..ed22a4ebc1 100644
--- a/bitbake/lib/toaster/toastergui/static/js/base.js
+++ b/bitbake/lib/toaster/toastergui/static/js/base.js
@@ -121,14 +121,14 @@ function basePageInit(ctx) {
121 }); 121 });
122 122
123 function _checkProjectBuildable() { 123 function _checkProjectBuildable() {
124 if (selectedProject.projectId === undefined) { 124 if (selectedProject.projectId === undefined || selectedProject.projectIsDefault) {
125 return; 125 return;
126 } 126 }
127 127
128 libtoaster.getProjectInfo(selectedProject.projectPageUrl, 128 libtoaster.getProjectInfo(selectedProject.projectPageUrl,
129 function (data) { 129 function (data) {
130 if (data.machine === null || data.machine.name === undefined || data.layers.length === 0) { 130 if (data.machine === null || data.machine.name === undefined || data.layers.length === 0) {
131 /* we can't build anything with out a machine and some layers */ 131 /* we can't build anything without a machine and some layers */
132 $("#new-build-button #targets-form").hide(); 132 $("#new-build-button #targets-form").hide();
133 $("#new-build-button .alert").show(); 133 $("#new-build-button .alert").show();
134 } else { 134 } else {
@@ -147,7 +147,7 @@ function basePageInit(ctx) {
147 /* If we don't have a current project then present the set project 147 /* If we don't have a current project then present the set project
148 * form. 148 * form.
149 */ 149 */
150 if (selectedProject.projectId === undefined) { 150 if (selectedProject.projectId === undefined || selectedProject.projectIsDefault) {
151 $('#change-project-form').show(); 151 $('#change-project-form').show();
152 $('#project .icon-pencil').hide(); 152 $('#project .icon-pencil').hide();
153 } 153 }