All of lore.kernel.org
 help / color / mirror / Atom feed
* [review-request][PATCH 00/10][v2] Implement UI changes for "command line builds" project
@ 2015-10-06 11:21 Elliot Smith
  2015-10-06 11:21 ` [review-request][PATCH 1/2] toaster: Manually retrieve log file location from filesystem Elliot Smith
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: Elliot Smith @ 2015-10-06 11:21 UTC (permalink / raw)
  To: toaster

This implements changes across the UI to hide irrelevant options
for command-line builds, and show additional help icons explaining
why those options are hidden.

It also modifies the behaviour of the "New build" button to take
account of the special status of the command-line builds project.

For UI details, see the document attached to bug 8231
at https://bugzilla.yoctoproject.org/attachment.cgi?id=2760.

v2 (in response to Belen's review):

* Modify how the form for changing the project name is shown, so
that the edit buttons aren't lost after saving the new project name.
Also verify that project name changes take without requiring a page refresh.

* Never select the command-line builds project in the "New build"
drop-down form.

* Only show the "New build" button if there are one or more user-created
projects (i.e. not if there is only the command-line builds project).

v1:

* One of the changes in the design document has not been implemented:
it's not possible to hide the "customise image recipe" links and
buttons (page 9) as these are not in the templates yet.

* The visual design differs slightly from the design document, as it
incorporates a new layout for the build dashboard which is not
implemented yet.

* The "New build" button is displayed on the command line
builds project page, as we came to the conclusion that the logic
in the JavaScript (i.e. show the new build button if there is no
build input form on the page) should apply in the case of the
builds page for the "command line builds" project.

Changes since 66ab34a41658e2f275a83853bb19cf49bf7cc74d (toaster-next) are in
git://git.yoctoproject.org/poky-contrib, elliot/toaster/cli_builds_ui-8231
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=elliot/toaster/cli_builds_ui-8231

Related bug: https://bugzilla.yoctoproject.org/show_bug.cgi?id=8231

Elliot Smith (10):
  toaster: Reorganise and lint tests
  toaster: Replace "Run again" button with help text for cli builds
  toaster: Show 'not applicable' for default project machine and release
  toaster: Make the builds view the project page for "command line
    builds"
  toaster: Hide tabs and add info popups for command line builds
  toaster: Show tooltip next to cli builds project name in all builds
  toaster: More linting of tests
  toaster: Clean up template code
  toaster: Exclude "command line builds" project from projects typeahead
  toaster: Modify "New build" button behaviour for cli builds project

 .../lib/toaster/toastergui/static/css/default.css  |   5 +
 bitbake/lib/toaster/toastergui/static/js/base.js   |  18 +-
 bitbake/lib/toaster/toastergui/templates/base.html |  98 ++++---
 .../lib/toaster/toastergui/templates/builds.html   |  19 +-
 .../toaster/toastergui/templates/mrb_section.html  |  66 +++--
 .../lib/toaster/toastergui/templates/projects.html |  23 +-
 .../toastergui/templates/projecttopbar.html        |  80 ++---
 .../toastergui/templatetags/project_url_tag.py     |  34 +++
 bitbake/lib/toaster/toastergui/tests.py            | 322 ++++++++++++++++++---
 bitbake/lib/toaster/toastergui/typeaheads.py       |   4 +-
 bitbake/lib/toaster/toastergui/views.py            |   9 +-
 11 files changed, 494 insertions(+), 184 deletions(-)
 create mode 100644 bitbake/lib/toaster/toastergui/templatetags/project_url_tag.py

--
Elliot Smith
Software Engineer
Intel OTC

---------------------------------------------------------------------
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ
VAT No: 860 2173 47

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.



^ permalink raw reply	[flat|nested] 15+ messages in thread

* [review-request][PATCH 1/2] toaster: Manually retrieve log file location from filesystem
  2015-10-06 11:21 [review-request][PATCH 00/10][v2] Implement UI changes for "command line builds" project Elliot Smith
@ 2015-10-06 11:21 ` Elliot Smith
  2015-10-06 11:21 ` [review-request][PATCH 01/10] toaster: Reorganise and lint tests Elliot Smith
                   ` (12 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Elliot Smith @ 2015-10-06 11:21 UTC (permalink / raw)
  To: toaster

The log file location reported by the BB_CONSOLELOG variable
does not point to the log location for the current build at
the time when the BuildStarted event is fired. It
actually points to the location where the next build will
log to. This means that the log file paths associated with
a build in the cooker_log_path field are incorrect, with
the result that the "Download build log" button doesn't work.

Instead, when a build starts, get the latest-dated log file
and associate it with the build.

An issue explaining why this is a problem, plus steps to
demonstrate it:
https://bugzilla.yoctoproject.org/show_bug.cgi?id=8411

This patch is a temporary workaround for issue 8411,
as discussed in
https://bugzilla.yoctoproject.org/show_bug.cgi?id=8373#c2
It fixes 8373 for now, but should be properly fixed if
bitbake can provide the correct log location at the point
when BuildStarted is fired.

[YOCTO #8373]

Signed-off-by: Elliot Smith <elliot.smith@intel.com>
---
 bitbake/lib/bb/ui/toasterui.py | 31 ++++++++++++++++++++++++++++++-
 1 file changed, 30 insertions(+), 1 deletion(-)

diff --git a/bitbake/lib/bb/ui/toasterui.py b/bitbake/lib/bb/ui/toasterui.py
index dbe0d09..e3d3b8f 100644
--- a/bitbake/lib/bb/ui/toasterui.py
+++ b/bitbake/lib/bb/ui/toasterui.py
@@ -33,6 +33,7 @@ from bb.ui.buildinfohelper import BuildInfoHelper
 import bb.msg
 import logging
 import os
+import glob
 
 # pylint: disable=invalid-name
 # module properties for UI modules are read by bitbake and the contract should not be broken
@@ -61,6 +62,33 @@ def _log_settings_from_server(server):
         raise BaseException(error)
     return includelogs, loglines, consolelogfile
 
+# TODO this is a work-around for the bug mentioned in
+# https://bugzilla.yoctoproject.org/show_bug.cgi?id=8373#c2
+# - the log file location reported by BB_CONSOLELOG at the point
+# when the BuildStarted event occurs does not correspond to the
+# actual log file location;
+# as a work-around, we get the latest-dated log file in the same
+# directory as is in the path stored in BB_CONSOLELOG
+#
+# consolelogfile: log file location reported by BB_CONSOLELOG
+# at the point when a build starts, which isn't the actual log location;
+# the assumption is that the real log file will be in the same
+# directory as the reported log file
+#
+# returns the latest-dated *.log file in the same directory
+# as consolelogfile; if there are no *.log files, this returns
+# consolelogfile
+def _get_real_log_file(consolelogfile):
+    log_file_dir = os.path.dirname(consolelogfile)
+    log_file_pattern = os.path.join(log_file_dir, "*.log")
+    log_files = glob.glob(log_file_pattern)
+    log_files = filter(os.path.isfile, log_files)
+    log_files.sort(key=os.path.getmtime)
+
+    if len(log_files) > 0:
+        return log_files[-1]
+    else:
+        return consolelogfile
 
 def main(server, eventHandler, params ):
     helper = uihelper.BBUIHelper()
@@ -126,7 +154,8 @@ def main(server, eventHandler, params ):
             # the code will look into the protected variables of the event; no easy way around this
 
             if isinstance(event, bb.event.BuildStarted):
-                buildinfohelper.store_started_build(event, consolelogfile)
+                real_consolelogfile = _get_real_log_file(consolelogfile)
+                buildinfohelper.store_started_build(event, real_consolelogfile)
 
             if isinstance(event, (bb.build.TaskStarted, bb.build.TaskSucceeded, bb.build.TaskFailedSilent)):
                 buildinfohelper.update_and_store_task(event)
-- 
Elliot Smith
Software Engineer
Intel OTC

---------------------------------------------------------------------
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ
VAT No: 860 2173 47

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [review-request][PATCH 01/10] toaster: Reorganise and lint tests
  2015-10-06 11:21 [review-request][PATCH 00/10][v2] Implement UI changes for "command line builds" project Elliot Smith
  2015-10-06 11:21 ` [review-request][PATCH 1/2] toaster: Manually retrieve log file location from filesystem Elliot Smith
@ 2015-10-06 11:21 ` Elliot Smith
  2015-10-06 11:21 ` [review-request][PATCH 2/2] toaster: Hide "Download build log" button if log doesn't exist Elliot Smith
                   ` (11 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Elliot Smith @ 2015-10-06 11:21 UTC (permalink / raw)
  To: toaster

Get test suite ready to accommodate new tests for how command line
builds are shown on various pages.

Signed-off-by: Elliot Smith <elliot.smith@intel.com>
---
 bitbake/lib/toaster/toastergui/tests.py | 83 +++++++++++++++++++--------------
 1 file changed, 49 insertions(+), 34 deletions(-)

diff --git a/bitbake/lib/toaster/toastergui/tests.py b/bitbake/lib/toaster/toastergui/tests.py
index 95790a2..7b1f9b5 100644
--- a/bitbake/lib/toaster/toastergui/tests.py
+++ b/bitbake/lib/toaster/toastergui/tests.py
@@ -21,23 +21,20 @@
 
 """Test cases for Toaster GUI and ReST."""
 
-import re
-
 from django.test import TestCase
 from django.test.client import RequestFactory
 from django.core.urlresolvers import reverse
 from django.utils import timezone
 
-from orm.models import Project, Release, BitbakeVersion, Build, Package
+from orm.models import Project, Release, BitbakeVersion, Package
 from orm.models import ReleaseLayerSourcePriority, LayerSource, Layer, Build
 from orm.models import Layer_Version, Recipe, Machine, ProjectLayer, Target
 from orm.models import CustomImageRecipe
 from orm.models import Branch
 
 from toastergui.tables import SoftwareRecipesTable
-from django.utils import timezone
-import json
 from bs4 import BeautifulSoup
+import json
 import re
 
 PROJECT_NAME = "test project"
@@ -72,11 +69,11 @@ class ViewTests(TestCase):
                                             up_branch=branch)
 
         self.recipe1 = Recipe.objects.create(layer_source=layersrc,
-                                       name="base-recipe",
-                                       version="1.2",
-                                       summary="one recipe",
-                                       description="recipe",
-                                       layer_version=lver)
+                                             name="base-recipe",
+                                             version="1.2",
+                                             summary="one recipe",
+                                             description="recipe",
+                                             layer_version=lver)
 
         Machine.objects.create(layer_version=lver, name="wisk",
                                description="wisking machine")
@@ -337,11 +334,7 @@ class ViewTests(TestCase):
 
         rows = data['rows']
         row1 = next(x for x in rows if x['name'] == self.recipe1.name)
-        row1_btns = row1['static:add-del-layers']
-        row1_btns_data = row1['add-del-layers']
         row2 = next(x for x in rows if x['name'] == self.recipe2.name)
-        row2_btns = row2['static:add-del-layers']
-        row2_btns_data = row2['add-del-layers']
 
         self.assertEqual(response.status_code, 200, 'should be 200 OK status')
         self.assertEqual(len(rows), 2, 'should be 2 recipes')
@@ -472,7 +465,7 @@ class ProjectsPageTests(TestCase):
         self.assertTrue(self.PROJECT_NAME in response.content,
                         'default project "cli builds" should be in page')
 
-class ProjectBuildsDisplayTest(TestCase):
+class ProjectBuildsPageTests(TestCase):
     """ Test data at /project/X/builds is displayed correctly """
 
     def setUp(self):
@@ -517,6 +510,7 @@ class ProjectBuildsDisplayTest(TestCase):
         }
 
     def _get_rows_for_project(self, project_id):
+        """ Helper to retrieve HTML rows for a project """
         url = reverse("projectbuilds", args=(project_id,))
         response = self.client.get(url, follow=True)
         soup = BeautifulSoup(response.content)
@@ -524,52 +518,73 @@ class ProjectBuildsDisplayTest(TestCase):
 
     def test_show_builds_for_project(self):
         """ Builds for a project should be displayed """
-        build1a = Build.objects.create(**self.project1_build_success)
-        build1b = Build.objects.create(**self.project1_build_success)
+        Build.objects.create(**self.project1_build_success)
+        Build.objects.create(**self.project1_build_success)
         build_rows = self._get_rows_for_project(self.project1.id)
         self.assertEqual(len(build_rows), 2)
 
-    def test_show_builds_for_project_only(self):
+    def test_show_builds_project_only(self):
         """ Builds for other projects should be excluded """
-        build1a = Build.objects.create(**self.project1_build_success)
-        build1b = Build.objects.create(**self.project1_build_success)
-        build1c = Build.objects.create(**self.project1_build_success)
+        Build.objects.create(**self.project1_build_success)
+        Build.objects.create(**self.project1_build_success)
+        Build.objects.create(**self.project1_build_success)
 
         # shouldn't see these two
-        build2a = Build.objects.create(**self.project2_build_success)
-        build2b = Build.objects.create(**self.project2_build_in_progress)
+        Build.objects.create(**self.project2_build_success)
+        Build.objects.create(**self.project2_build_in_progress)
 
         build_rows = self._get_rows_for_project(self.project1.id)
         self.assertEqual(len(build_rows), 3)
 
-    def test_show_builds_exclude_in_progress(self):
+    def test_builds_exclude_in_progress(self):
         """ "in progress" builds should not be shown """
-        build1a = Build.objects.create(**self.project1_build_success)
-        build1b = Build.objects.create(**self.project1_build_success)
+        Build.objects.create(**self.project1_build_success)
+        Build.objects.create(**self.project1_build_success)
 
         # shouldn't see this one
-        build1c = Build.objects.create(**self.project1_build_in_progress)
+        Build.objects.create(**self.project1_build_in_progress)
 
         # shouldn't see these two either, as they belong to a different project
-        build2a = Build.objects.create(**self.project2_build_success)
-        build2b = Build.objects.create(**self.project2_build_in_progress)
+        Build.objects.create(**self.project2_build_success)
+        Build.objects.create(**self.project2_build_in_progress)
 
         build_rows = self._get_rows_for_project(self.project1.id)
         self.assertEqual(len(build_rows), 2)
 
-    def test_show_tasks_in_projectbuilds(self):
+    def test_tasks_in_projectbuilds(self):
+        """ Task should be shown as suffix on build name """
         build = Build.objects.create(**self.project1_build_success)
-        target = Target.objects.create(build=build, target='bash',
-                                       task='clean')
+        Target.objects.create(build=build, target='bash', task='clean')
         url = reverse("projectbuilds", args=(self.project1.id,))
         response = self.client.get(url, follow=True)
         result = re.findall('^ +bash:clean$', response.content, re.MULTILINE)
         self.assertEqual(len(result), 2)
 
+class AllBuildsPageTests(TestCase):
+    """ Tests for all builds page """
+
+    def setUp(self):
+        bbv = BitbakeVersion.objects.create(name="bbv1", giturl="/tmp/",
+                                            branch="master", dirpath="")
+        release = Release.objects.create(name="release1",
+                                         bitbake_version=bbv)
+        self.project1 = Project.objects.create_project(name=PROJECT_NAME,
+                                                       release=release)
+
+        # parameters for builds to associate with the projects
+        now = timezone.now()
+
+        self.project1_build_success = {
+            "project": self.project1,
+            "started_on": now,
+            "completed_on": now,
+            "outcome": Build.SUCCEEDED
+        }
+
     def test_show_tasks_in_allbuilds(self):
+        """ Task should be shown as suffix on build name """
         build = Build.objects.create(**self.project1_build_success)
-        target = Target.objects.create(build=build, target='bash',
-                                       task='clean')
+        Target.objects.create(build=build, target='bash', task='clean')
         url = reverse("all-builds")
         response = self.client.get(url, follow=True)
         result = re.findall('bash:clean', response.content, re.MULTILINE)
-- 
Elliot Smith
Software Engineer
Intel OTC

---------------------------------------------------------------------
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ
VAT No: 860 2173 47

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [review-request][PATCH 2/2] toaster: Hide "Download build log" button if log doesn't exist
  2015-10-06 11:21 [review-request][PATCH 00/10][v2] Implement UI changes for "command line builds" project Elliot Smith
  2015-10-06 11:21 ` [review-request][PATCH 1/2] toaster: Manually retrieve log file location from filesystem Elliot Smith
  2015-10-06 11:21 ` [review-request][PATCH 01/10] toaster: Reorganise and lint tests Elliot Smith
@ 2015-10-06 11:21 ` Elliot Smith
  2015-10-06 11:21 ` [review-request][PATCH 02/10] toaster: Replace "Run again" button with help text for cli builds Elliot Smith
                   ` (10 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Elliot Smith @ 2015-10-06 11:21 UTC (permalink / raw)
  To: toaster

Our builds pages show all builds, but also include build requests
which may have resulted in a build failure, before the build
started (e.g. at the recipe parsing stage).

In such cases, the BuildStarted event is not captured by Toaster,
so we have no idea where the log file for the failed build is.

The result is that a build is shown by the Toaster UI /builds/ pages,
but it is really a pretend build which never went beyond being a
build request, and which has no associated log file. In turn, this
breaks the "Download build log" button on the build dashboard,
as there's no log file associated with the build.

Fix this by hiding the "Download build log" button for builds
which don't have a cooker_log_path.

[YOCTO #8373]

Signed-off-by: Elliot Smith <elliot.smith@intel.com>
---
 bitbake/lib/toaster/toastergui/templates/builddashboard.html | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/bitbake/lib/toaster/toastergui/templates/builddashboard.html b/bitbake/lib/toaster/toastergui/templates/builddashboard.html
index bab8e38..aa99134 100644
--- a/bitbake/lib/toaster/toastergui/templates/builddashboard.html
+++ b/bitbake/lib/toaster/toastergui/templates/builddashboard.html
@@ -37,7 +37,9 @@
     <span > <i class="icon-warning-sign yellow"></i><strong><a href="#warnings" class="warning show-warnings"> {{build.warnings.count}} warning{{build.warnings.count|pluralize}}</a></strong></span>
 {% endif %}
             <span class="pull-right">Build time: <a href="{% url 'buildtime' build.pk %}">{{ build.timespent_seconds|sectohms }}</a>
-            <a class="btn {%if build.outcome == build.SUCCEEDED%}btn-success{%else%}btn-danger{%endif%} pull-right log" href="{% url 'build_artifact' build.id "cookerlog" build.id %}">Download build log</a>
+            {% if build.cooker_log_path %}
+                <a class="btn {%if build.outcome == build.SUCCEEDED%}btn-success{%else%}btn-danger{%endif%} pull-right log" href="{% url 'build_artifact' build.id "cookerlog" build.id %}">Download build log</a>
+            {% endif %}
             </span>
 
 {%endif%}
-- 
Elliot Smith
Software Engineer
Intel OTC

---------------------------------------------------------------------
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ
VAT No: 860 2173 47

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [review-request][PATCH 02/10] toaster: Replace "Run again" button with help text for cli builds
  2015-10-06 11:21 [review-request][PATCH 00/10][v2] Implement UI changes for "command line builds" project Elliot Smith
                   ` (2 preceding siblings ...)
  2015-10-06 11:21 ` [review-request][PATCH 2/2] toaster: Hide "Download build log" button if log doesn't exist Elliot Smith
@ 2015-10-06 11:21 ` Elliot Smith
  2015-10-06 11:21 ` [review-request][PATCH 03/10] toaster: Show 'not applicable' for default project machine and release Elliot Smith
                   ` (9 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Elliot Smith @ 2015-10-06 11:21 UTC (permalink / raw)
  To: toaster

It's not possible to run a command-line build again, as Toaster
doesn't have access to the data used for that build.

Replace the "Run again" button with an icon which pops up some
help text to that effect.

Add test to check that the run again button is hidden and the
help icon displayed instead for command-line builds.

[YOCTO #8231]

Signed-off-by: Elliot Smith <elliot.smith@intel.com>
---
 .../lib/toaster/toastergui/static/css/default.css  |  5 +++
 .../toaster/toastergui/templates/mrb_section.html  | 41 ++++++++++++++--------
 bitbake/lib/toaster/toastergui/tests.py            | 32 +++++++++++++++++
 3 files changed, 64 insertions(+), 14 deletions(-)

diff --git a/bitbake/lib/toaster/toastergui/static/css/default.css b/bitbake/lib/toaster/toastergui/static/css/default.css
index cce3e31..336a407 100644
--- a/bitbake/lib/toaster/toastergui/static/css/default.css
+++ b/bitbake/lib/toaster/toastergui/static/css/default.css
@@ -15,6 +15,8 @@
 /* Styles for the help information */
 .get-help { color: #CCCCCC; }
 .get-help:hover, .icon-plus-sign:hover { color: #999999; cursor: pointer; }
+.get-help-green { color: #468847; }
+.get-help-green:hover { color: #347132; cursor: pointer; }
 .get-help-blue { color: #3A87AD; }
 .get-help-blue:hover { color: #005580; cursor: pointer; }
 .get-help-yellow { color: #C09853; }
@@ -161,6 +163,9 @@ table { table-layout: fixed; word-wrap: break-word; }
 .project-name .label { font-weight: normal; margin-bottom: 5px; margin-left: -15px; padding: 5px; }
 .project-name .label > a { color: #fff; font-weight: normal; }
 
+/* styles for showing help icons next to command-line builds */
+.build-result .get-help-green, .build-result .get-help-red, .build-result .get-help-blue { margin-right: 35px; margin-top: 8px; font-size: 16px; }
+
 /* Remove bottom margin for forms inside modal dialogs */
 #dependencies-modal-form { margin-bottom: 0px; }
 
diff --git a/bitbake/lib/toaster/toastergui/templates/mrb_section.html b/bitbake/lib/toaster/toastergui/templates/mrb_section.html
index ad90e82..5e96b39 100644
--- a/bitbake/lib/toaster/toastergui/templates/mrb_section.html
+++ b/bitbake/lib/toaster/toastergui/templates/mrb_section.html
@@ -18,7 +18,7 @@
   {% endif %}
   <div id="latest-builds">
   {% for build in mru %}
-  <div class="alert {%if build.outcome == build.SUCCEEDED%}alert-success{%elif build.outcome == build.FAILED%}alert-error{%else%}alert-info{%endif%}
+  <div id="build-result-{{ build.id }}" class="alert build-result {%if build.outcome == build.SUCCEEDED%}alert-success{%elif build.outcome == build.FAILED%}alert-error{%else%}alert-info{%endif%}
     {% if mrb_type != 'project' %}
     project-name">
        <span class="label {%if build.outcome == build.SUCCEEDED%}label-success{%elif build.outcome == build.FAILED%}label-important{%else%}label-info{%endif%}">
@@ -81,24 +81,37 @@
             </div>
             <div class="lead ">
               <span class="lead">
-                Build time: <a href="{% url 'buildtime' build.pk %}">{{ build.timespent_seconds|sectohms }}</a>
+                  Build time: <a href="{% url 'buildtime' build.pk %}">{{ build.timespent_seconds|sectohms }}</a>
               </span>
-              <button class="btn
+              {% if build.project.is_default %}
+                  <i class="pull-right icon-question-sign get-help
                   {% if build.outcome == build.SUCCEEDED %}
-                      btn-success
+                      get-help-green
                   {% elif build.outcome == build.FAILED %}
-                      btn-danger
+                      get-help-red
                   {% else %}
-                      btn-info
-                  {%endif%}
-                  pull-right"
-                  onclick='scheduleBuild({% url 'projectbuilds' build.project.id as bpi %}{{bpi|json}},
-                    {{build.project.name|json}},
-                    {% url 'project' build.project.id as bpurl %}{{bpurl|json}},
-                    {{build.target_set.all|get_tasks|json}})'>
+                      get-help-blue
+                  {% endif %}
+                  " title="Builds in this project cannot be started from Toaster: they are started from the command line">
+                  </i>
+              {% else %}
+                  <button class="btn
+                      {% if build.outcome == build.SUCCEEDED %}
+                          btn-success
+                      {% elif build.outcome == build.FAILED %}
+                          btn-danger
+                      {% else %}
+                          btn-info
+                      {%endif%}
+                      pull-right"
+                      onclick='scheduleBuild({% url 'projectbuilds' build.project.id as bpi %}{{bpi|json}},
+                        {{build.project.name|json}},
+                        {% url 'project' build.project.id as bpurl %}{{bpurl|json}},
+                        {{build.target_set.all|get_tasks|json}})'>
 
-                    Run again
-              </button>
+                        Run again
+                  </button>
+              {% endif %}
             </div>
     {%endif%}
     {%if build.outcome == build.IN_PROGRESS %}
diff --git a/bitbake/lib/toaster/toastergui/tests.py b/bitbake/lib/toaster/toastergui/tests.py
index 7b1f9b5..00ae9d4 100644
--- a/bitbake/lib/toaster/toastergui/tests.py
+++ b/bitbake/lib/toaster/toastergui/tests.py
@@ -38,6 +38,7 @@ import json
 import re
 
 PROJECT_NAME = "test project"
+CLI_BUILDS_PROJECT_NAME = 'Command line builds'
 
 class ViewTests(TestCase):
     """Tests to verify view APIs."""
@@ -570,6 +571,12 @@ class AllBuildsPageTests(TestCase):
                                          bitbake_version=bbv)
         self.project1 = Project.objects.create_project(name=PROJECT_NAME,
                                                        release=release)
+        self.default_project = Project.objects.create_project(
+            name=CLI_BUILDS_PROJECT_NAME,
+            release=release
+        )
+        self.default_project.is_default = True
+        self.default_project.save()
 
         # parameters for builds to associate with the projects
         now = timezone.now()
@@ -581,6 +588,13 @@ class AllBuildsPageTests(TestCase):
             "outcome": Build.SUCCEEDED
         }
 
+        self.default_project_build_success = {
+            "project": self.default_project,
+            "started_on": now,
+            "completed_on": now,
+            "outcome": Build.SUCCEEDED
+        }
+
     def test_show_tasks_in_allbuilds(self):
         """ Task should be shown as suffix on build name """
         build = Build.objects.create(**self.project1_build_success)
@@ -589,3 +603,21 @@ class AllBuildsPageTests(TestCase):
         response = self.client.get(url, follow=True)
         result = re.findall('bash:clean', response.content, re.MULTILINE)
         self.assertEqual(len(result), 3)
+
+    def test_no_run_again_for_cli_build(self):
+        """ "Run again" button should not be shown for command-line builds """
+        build = Build.objects.create(**self.default_project_build_success)
+        url = reverse("all-builds")
+        response = self.client.get(url, follow=True)
+        soup = BeautifulSoup(response.content)
+
+        element_id = 'build-result-%d' % build.id
+
+        # shouldn't see a run again button for command-line builds
+        run_again_button = soup.select('#%s button' % element_id)
+        self.assertEqual(len(run_again_button), 0)
+
+        # should see a help icon for command-line builds
+        help_icon = soup.select('#%s i.get-help-green' % element_id)
+        self.assertEqual(len(help_icon), 1)
+
-- 
Elliot Smith
Software Engineer
Intel OTC

---------------------------------------------------------------------
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ
VAT No: 860 2173 47

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [review-request][PATCH 03/10] toaster: Show 'not applicable' for default project machine and release
  2015-10-06 11:21 [review-request][PATCH 00/10][v2] Implement UI changes for "command line builds" project Elliot Smith
                   ` (3 preceding siblings ...)
  2015-10-06 11:21 ` [review-request][PATCH 02/10] toaster: Replace "Run again" button with help text for cli builds Elliot Smith
@ 2015-10-06 11:21 ` Elliot Smith
  2015-10-06 11:21 ` [review-request][PATCH 04/10] toaster: Make the builds view the project page for "command line builds" Elliot Smith
                   ` (8 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Elliot Smith @ 2015-10-06 11:21 UTC (permalink / raw)
  To: toaster

The machine and release for the default project should show as
'not applicable' on the all projects page, as that information
isn't available for command-line builds.

Modify the templates with some conditionals to check for the
default project row, plus some data-* attributes to mark
where that data is to make testing possible.

Add some tests for the all projects page to ensure that
the correct machine/release are still shown for non-default projects,
and 'not applicable' for the default project.

[YOCTO #8231]

Signed-off-by: Elliot Smith <elliot.smith@intel.com>
---
 .../lib/toaster/toastergui/templates/projects.html |  16 ++-
 bitbake/lib/toaster/toastergui/tests.py            | 108 +++++++++++++++++++--
 2 files changed, 111 insertions(+), 13 deletions(-)

diff --git a/bitbake/lib/toaster/toastergui/templates/projects.html b/bitbake/lib/toaster/toastergui/templates/projects.html
index c2d77b5..a7192c2 100644
--- a/bitbake/lib/toaster/toastergui/templates/projects.html
+++ b/bitbake/lib/toaster/toastergui/templates/projects.html
@@ -36,17 +36,27 @@
   {% else %} {# We have builds to display #}
   {% include "basetable_top.html" %}
   {% for o in objects %}
-    <tr class="data">
+    <tr class="data" data-project="{{ o.id }}">
       <td><a href="{% url 'project' o.id %}">{{o.name}}</a></td>
       <td class="updated"><a href="{% url 'project' o.id %}">{{o.updated|date:"d/m/y H:i"}}</a></td>
-      <td>
+      <td data-project-field="release">
         {% if o.release %}
             <a href="{% url 'project' o.id %}#project-details">{{o.release.name}}</a>
+        {% elif o.is_default %}
+            <span class="muted">Not applicable</span>
+            <i class="icon-question-sign get-help hover-help" title="" data-original-title="This project does not have a release set. It simply collects information about the builds you start from the command line while Toaster is running" style="visibility: hidden;"></i>
         {% else %}
             No release available
         {% endif %}
       </td>
-      <td><a href="{% url 'project' o.id %}#machine-distro">{{o.get_current_machine_name}}</a></td>
+      <td data-project-field="machine">
+        {% if o.is_default %}
+            <span class="muted">Not applicable</span>
+            <i class="icon-question-sign get-help hover-help" title="" data-original-title="This project does not have a machine set. It simply collects information about the builds you start from the command line while Toaster is running" style="visibility: hidden;"></i>
+        {% else %}
+            <a href="{% url 'project' o.id %}#machine-distro">{{o.get_current_machine_name}}</a>
+        {% endif %}
+      </td>
       {% if o.get_number_of_builds == 0 %}
       <td class="muted">{{o.get_number_of_builds}}</td>
       <td class="loutcome"></td>
diff --git a/bitbake/lib/toaster/toastergui/tests.py b/bitbake/lib/toaster/toastergui/tests.py
index 00ae9d4..0b85d4f 100644
--- a/bitbake/lib/toaster/toastergui/tests.py
+++ b/bitbake/lib/toaster/toastergui/tests.py
@@ -29,7 +29,7 @@ from django.utils import timezone
 from orm.models import Project, Release, BitbakeVersion, Package
 from orm.models import ReleaseLayerSourcePriority, LayerSource, Layer, Build
 from orm.models import Layer_Version, Recipe, Machine, ProjectLayer, Target
-from orm.models import CustomImageRecipe
+from orm.models import CustomImageRecipe, ProjectVariable
 from orm.models import Branch
 
 from toastergui.tables import SoftwareRecipesTable
@@ -431,15 +431,43 @@ class LandingPageTests(TestCase):
 class ProjectsPageTests(TestCase):
     """ Tests for projects page """
 
-    PROJECT_NAME = 'cli builds'
+    MACHINE_NAME = 'delorean'
+
+    def _add_build_to_default_project(self):
+        """ Add a build to the default project (not used in all tests) """
+        now = timezone.now()
+        build = Build.objects.create(project=self.default_project,
+                                     started_on=now,
+                                     completed_on=now)
+        build.save()
+
+    def _add_non_default_project(self):
+        """ Add another project """
+        bbv = BitbakeVersion.objects.create(name="test bbv", giturl="/tmp/",
+                                            branch="master", dirpath="")
+        self.release = Release.objects.create(name="test release",
+                                              branch_name="master",
+                                              bitbake_version=bbv)
+        self.project = Project.objects.create_project(PROJECT_NAME, self.release)
+        self.project.is_default = False
+        self.project.save()
+
+        # fake the MACHINE variable
+        project_var = ProjectVariable.objects.create(project=self.project,
+                                                     name='MACHINE',
+                                                     value=self.MACHINE_NAME)
+        project_var.save()
 
     def setUp(self):
         """ Add default project manually """
-        project = Project.objects.create_project(self.PROJECT_NAME, None)
+        project = Project.objects.create_project(CLI_BUILDS_PROJECT_NAME, None)
         self.default_project = project
         self.default_project.is_default = True
         self.default_project.save()
 
+        # this project is only set for some of the tests
+        self.project = None
+
     def test_default_project_hidden(self):
         """ The default project should be hidden if it has no builds """
         params = {"count": 10, "orderby": "updated:-", "page": 1}
@@ -447,25 +475,85 @@ class ProjectsPageTests(TestCase):
 
         self.assertTrue(not('tr class="data"' in response.content),
                         'should be no project rows in the page')
-        self.assertTrue(not(self.PROJECT_NAME in response.content),
+        self.assertTrue(not(CLI_BUILDS_PROJECT_NAME in response.content),
                         'default project "cli builds" should not be in page')
 
     def test_default_project_has_build(self):
         """ The default project should be shown if it has builds """
-        now = timezone.now()
-        build = Build.objects.create(project=self.default_project,
-                                     started_on=now,
-                                     completed_on=now)
-        build.save()
+        self._add_build_to_default_project()
 
         params = {"count": 10, "orderby": "updated:-", "page": 1}
         response = self.client.get(reverse('all-projects'), params)
 
         self.assertTrue('tr class="data"' in response.content,
                         'should be a project row in the page')
-        self.assertTrue(self.PROJECT_NAME in response.content,
+        self.assertTrue(CLI_BUILDS_PROJECT_NAME in response.content,
                         'default project "cli builds" should be in page')
 
+    def test_default_project_release(self):
+        """
+        The release for the default project should display as
+        'Not applicable'
+        """
+        # need a build, otherwise project doesn't display at all
+        self._add_build_to_default_project()
+
+        # another project to test, which should show release
+        self._add_non_default_project()
+
+        response = self.client.get(reverse('all-projects'), follow=True)
+        soup = BeautifulSoup(response.content)
+
+        # check the release cell for the default project
+        attrs = {'data-project': str(self.default_project.id)}
+        rows = soup.find_all('tr', attrs=attrs)
+        self.assertEqual(len(rows), 1, 'should be one row for default project')
+        cells = rows[0].find_all('td', attrs={'data-project-field': 'release'})
+        self.assertEqual(len(cells), 1, 'should be one release cell')
+        text = cells[0].select('span.muted')[0].text
+        self.assertEqual(text, 'Not applicable',
+                         'release should be not applicable for default project')
+
+        # check the link in the release cell for the other project
+        attrs = {'data-project': str(self.project.id)}
+        rows = soup.find_all('tr', attrs=attrs)
+        cells = rows[0].find_all('td', attrs={'data-project-field': 'release'})
+        text = cells[0].select('a')[0].text
+        self.assertEqual(text, self.release.name,
+                         'release name should be shown for non-default project')
+
+    def test_default_project_machine(self):
+        """
+        The machine for the default project should display as
+        'Not applicable'
+        """
+        # need a build, otherwise project doesn't display at all
+        self._add_build_to_default_project()
+
+        # another project to test, which should show machine
+        self._add_non_default_project()
+
+        response = self.client.get(reverse('all-projects'), follow=True)
+        soup = BeautifulSoup(response.content)
+
+        # check the machine cell for the default project
+        attrs = {'data-project': str(self.default_project.id)}
+        rows = soup.find_all('tr', attrs=attrs)
+        self.assertEqual(len(rows), 1, 'should be one row for default project')
+        cells = rows[0].find_all('td', attrs={'data-project-field': 'machine'})
+        self.assertEqual(len(cells), 1, 'should be one machine cell')
+        text = cells[0].select('span.muted')[0].text
+        self.assertEqual(text, 'Not applicable',
+                         'machine should be not applicable for default project')
+
+        # check the link in the machine cell for the other project
+        attrs = {'data-project': str(self.project.id)}
+        rows = soup.find_all('tr', attrs=attrs)
+        cells = rows[0].find_all('td', attrs={'data-project-field': 'machine'})
+        text = cells[0].select('a')[0].text
+        self.assertEqual(text, self.MACHINE_NAME,
+                         'machine name should be shown for non-default project')
+
 class ProjectBuildsPageTests(TestCase):
     """ Test data at /project/X/builds is displayed correctly """
 
-- 
Elliot Smith
Software Engineer
Intel OTC

---------------------------------------------------------------------
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ
VAT No: 860 2173 47

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [review-request][PATCH 04/10] toaster: Make the builds view the project page for "command line builds"
  2015-10-06 11:21 [review-request][PATCH 00/10][v2] Implement UI changes for "command line builds" project Elliot Smith
                   ` (4 preceding siblings ...)
  2015-10-06 11:21 ` [review-request][PATCH 03/10] toaster: Show 'not applicable' for default project machine and release Elliot Smith
@ 2015-10-06 11:21 ` Elliot Smith
  2015-10-06 11:21 ` [review-request][PATCH 05/10] toaster: Hide tabs and add info popups for command line builds Elliot Smith
                   ` (7 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Elliot Smith @ 2015-10-06 11:21 UTC (permalink / raw)
  To: toaster

Command line builds don't have configuration or layers which can
be manipulated in Toaster, so these pages shouldn't be visible.
However, the configuration page is the default page for the
project view (/project/X/), which isn't correct for the
command line builds project.

Modify all project page links across the application so that
the command line builds project (aka the "default" project)
always displays the builds tab.

Add a project_url tag for templates which contains the logic
determining where the URL for a project links to, based on
whether it is the default project or not.

[YOCTO #8231]

Signed-off-by: Elliot Smith <elliot.smith@intel.com>
---
 bitbake/lib/toaster/toastergui/templates/base.html |  5 +--
 .../lib/toaster/toastergui/templates/builds.html   |  3 +-
 .../toaster/toastergui/templates/mrb_section.html  |  6 ++--
 .../lib/toaster/toastergui/templates/projects.html |  7 ++--
 .../toastergui/templatetags/project_url_tag.py     | 34 +++++++++++++++++++
 bitbake/lib/toaster/toastergui/tests.py            | 38 ++++++++++++++++++++--
 6 files changed, 82 insertions(+), 11 deletions(-)
 create mode 100644 bitbake/lib/toaster/toastergui/templatetags/project_url_tag.py

diff --git a/bitbake/lib/toaster/toastergui/templates/base.html b/bitbake/lib/toaster/toastergui/templates/base.html
index 640bc47..3f27790 100644
--- a/bitbake/lib/toaster/toastergui/templates/base.html
+++ b/bitbake/lib/toaster/toastergui/templates/base.html
@@ -1,6 +1,7 @@
 <!DOCTYPE html>
 {% load static %}
 {% load projecttags %}
+{% load project_url_tag %}
 <html lang="en">
     <head>
         <title>{% if objectname %} {{objectname|title}} - {% endif %}Toaster</title>
@@ -35,7 +36,7 @@
         projectsTypeAheadUrl: {% url 'xhr_projectstypeahead' as prjurl%}{{prjurl|json}},
         {% if project.id %}
         projectId : {{project.id}},
-        projectPageUrl : {% url 'project' project.id as purl%}{{purl|json}},
+        projectPageUrl : {% url 'project' project.id as purl %}{{purl|json}},
         projectName : {{project.name|json}},
         recipesTypeAheadUrl: {% url 'xhr_recipestypeahead' project.id as paturl%}{{paturl|json}},
         layersTypeAheadUrl: {% url 'xhr_layerstypeahead' project.id as paturl%}{{paturl|json}},
@@ -133,7 +134,7 @@
                 <h6>Project:</h6>
                 <span id="project">
                   {% if project.id %}
-                  <a class="lead" href="{% url 'project' project.id %}">{{project.name}}</a>
+                  <a class="lead" href="{% project_url project %}">{{project.name}}</a>
                   {% else %}
                   <a class="lead" href="#"></a>
                   {% endif %}
diff --git a/bitbake/lib/toaster/toastergui/templates/builds.html b/bitbake/lib/toaster/toastergui/templates/builds.html
index 2b35b01..6fbaf98 100644
--- a/bitbake/lib/toaster/toastergui/templates/builds.html
+++ b/bitbake/lib/toaster/toastergui/templates/builds.html
@@ -2,6 +2,7 @@
 
 {% load static %}
 {% load projecttags %}
+{% load project_url_tag %}
 {% load humanize %}
 
 {% block extraheadcontent %}
@@ -104,7 +105,7 @@
               {% endif %}
             </td>
         <td>
-                <a href="{% url 'project' build.project.id %}">{{build.project.name}}</a>
+                <a href="{% project_url build.project %}">{{build.project.name}}</a>
             </td>
         </tr>
 
diff --git a/bitbake/lib/toaster/toastergui/templates/mrb_section.html b/bitbake/lib/toaster/toastergui/templates/mrb_section.html
index 5e96b39..b29f650 100644
--- a/bitbake/lib/toaster/toastergui/templates/mrb_section.html
+++ b/bitbake/lib/toaster/toastergui/templates/mrb_section.html
@@ -1,8 +1,8 @@
 {% load static %}
 {% load projecttags %}
+{% load project_url_tag %}
 {% load humanize %}
 
-
 {%if mru and mru.count > 0%}
 
   {%if mrb_type == 'project' %}
@@ -22,7 +22,7 @@
     {% if mrb_type != 'project' %}
     project-name">
        <span class="label {%if build.outcome == build.SUCCEEDED%}label-success{%elif build.outcome == build.FAILED%}label-important{%else%}label-info{%endif%}">
-         <a href={% url 'project' build.project.pk %}>
+         <a href={% project_url build.project %}>
            {{build.project.name}}
          </a>
        </span>
@@ -106,7 +106,7 @@
                       pull-right"
                       onclick='scheduleBuild({% url 'projectbuilds' build.project.id as bpi %}{{bpi|json}},
                         {{build.project.name|json}},
-                        {% url 'project' build.project.id as bpurl %}{{bpurl|json}},
+                        {% url 'project' build.project.id as purl %}{{purl|json}},
                         {{build.target_set.all|get_tasks|json}})'>
 
                         Run again
diff --git a/bitbake/lib/toaster/toastergui/templates/projects.html b/bitbake/lib/toaster/toastergui/templates/projects.html
index a7192c2..7c612e8 100644
--- a/bitbake/lib/toaster/toastergui/templates/projects.html
+++ b/bitbake/lib/toaster/toastergui/templates/projects.html
@@ -2,6 +2,7 @@
 
 {% load static %}
 {% load projecttags %}
+{% load project_url_tag %}
 {% load humanize %}
 
 {% block pagecontent %}
@@ -37,8 +38,10 @@
   {% include "basetable_top.html" %}
   {% for o in objects %}
     <tr class="data" data-project="{{ o.id }}">
-      <td><a href="{% url 'project' o.id %}">{{o.name}}</a></td>
-      <td class="updated"><a href="{% url 'project' o.id %}">{{o.updated|date:"d/m/y H:i"}}</a></td>
+      <td data-project-field="name">
+          <a href="{% project_url o %}">{{o.name}}</a>
+      </td>
+      <td class="updated"><a href="{% project_url o %}">{{o.updated|date:"d/m/y H:i"}}</a></td>
       <td data-project-field="release">
         {% if o.release %}
             <a href="{% url 'project' o.id %}#project-details">{{o.release.name}}</a>
diff --git a/bitbake/lib/toaster/toastergui/templatetags/project_url_tag.py b/bitbake/lib/toaster/toastergui/templatetags/project_url_tag.py
new file mode 100644
index 0000000..04770ac
--- /dev/null
+++ b/bitbake/lib/toaster/toastergui/templatetags/project_url_tag.py
@@ -0,0 +1,34 @@
+from django import template
+from django.core.urlresolvers import reverse
+
+register = template.Library()
+
+def project_url(parser, token):
+    """
+    Create a URL for a project's main page;
+    for non-default projects, this is the configuration page;
+    for the default project, this is the project builds page
+    """
+    try:
+        tag_name, project = token.split_contents()
+    except ValueError:
+        raise template.TemplateSyntaxError(
+            "%s tag requires exactly one argument" % tag_name
+        )
+    return ProjectUrlNode(project)
+
+class ProjectUrlNode(template.Node):
+    def __init__(self, project):
+        self.project = template.Variable(project)
+
+    def render(self, context):
+        try:
+            project = self.project.resolve(context)
+            if project.is_default:
+                return reverse('projectbuilds', args=(project.id,))
+            else:
+                return reverse('project', args=(project.id,))
+        except template.VariableDoesNotExist:
+            return ''
+
+register.tag('project_url', project_url)
diff --git a/bitbake/lib/toaster/toastergui/tests.py b/bitbake/lib/toaster/toastergui/tests.py
index 0b85d4f..12a91c3 100644
--- a/bitbake/lib/toaster/toastergui/tests.py
+++ b/bitbake/lib/toaster/toastergui/tests.py
@@ -428,8 +428,8 @@ class LandingPageTests(TestCase):
         self.assertTrue('/builds' in response.url,
                         'should redirect to builds')
 
-class ProjectsPageTests(TestCase):
-    """ Tests for projects page """
+class AllProjectsPageTests(TestCase):
+    """ Tests for projects page /projects/ """
 
     MACHINE_NAME = 'delorean'
 
@@ -554,6 +554,38 @@ class ProjectsPageTests(TestCase):
         self.assertEqual(text, self.MACHINE_NAME,
                          'machine name should be shown for non-default project')
 
+    def test_project_page_links(self):
+        """
+        Test that links for the default project point to the builds
+        page /projects/X/builds for that project, and that links for
+        other projects point to their configuration pages /projects/X/
+        """
+
+        # need a build, otherwise project doesn't display at all
+        self._add_build_to_default_project()
+
+        # another project to test, which should show machine
+        self._add_non_default_project()
+
+        response = self.client.get(reverse('all-projects'), follow=True)
+        soup = BeautifulSoup(response.content)
+
+        # link for default project
+        row = soup.find('tr', attrs={'data-project': self.default_project.id})
+        cell = row.find('td', attrs={'data-project-field': 'name'})
+        url = cell.find('a')['href']
+        expected_url = reverse('projectbuilds', args=(self.default_project.id,))
+        self.assertEqual(url, expected_url,
+                         'link on default project name should point to builds')
+
+        # link for other project
+        row = soup.find('tr', attrs={'data-project': self.project.id})
+        cell = row.find('td', attrs={'data-project-field': 'name'})
+        url = cell.find('a')['href']
+        expected_url = reverse('project', args=(self.project.id,))
+        self.assertEqual(url, expected_url,
+                         'link on project name should point to configuration')
+
 class ProjectBuildsPageTests(TestCase):
     """ Test data at /project/X/builds is displayed correctly """
 
@@ -650,7 +682,7 @@ class ProjectBuildsPageTests(TestCase):
         self.assertEqual(len(result), 2)
 
 class AllBuildsPageTests(TestCase):
-    """ Tests for all builds page """
+    """ Tests for all builds page /builds/ """
 
     def setUp(self):
         bbv = BitbakeVersion.objects.create(name="bbv1", giturl="/tmp/",
-- 
Elliot Smith
Software Engineer
Intel OTC

---------------------------------------------------------------------
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ
VAT No: 860 2173 47

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [review-request][PATCH 05/10] toaster: Hide tabs and add info popups for command line builds
  2015-10-06 11:21 [review-request][PATCH 00/10][v2] Implement UI changes for "command line builds" project Elliot Smith
                   ` (5 preceding siblings ...)
  2015-10-06 11:21 ` [review-request][PATCH 04/10] toaster: Make the builds view the project page for "command line builds" Elliot Smith
@ 2015-10-06 11:21 ` Elliot Smith
  2015-10-06 11:21 ` [review-request][PATCH 06/10] toaster: Show tooltip next to cli builds project name in all builds Elliot Smith
                   ` (6 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Elliot Smith @ 2015-10-06 11:21 UTC (permalink / raw)
  To: toaster

Command line builds don't have a configuration or
layers which can be modified through Toaster.

Change the project builds page for the command line builds project,
to hide the tabs and add some info popups in appropriate places on
that page.

[YOCTO #8231]

Signed-off-by: Elliot Smith <elliot.smith@intel.com>
---
 bitbake/lib/toaster/toastergui/static/js/base.js   | 12 ++--
 .../toaster/toastergui/templates/mrb_section.html  |  4 ++
 .../toastergui/templates/projecttopbar.html        | 80 ++++++++++++----------
 bitbake/lib/toaster/toastergui/tests.py            | 41 +++++++++++
 4 files changed, 94 insertions(+), 43 deletions(-)

diff --git a/bitbake/lib/toaster/toastergui/static/js/base.js b/bitbake/lib/toaster/toastergui/static/js/base.js
index 895e61b..6042a96 100644
--- a/bitbake/lib/toaster/toastergui/static/js/base.js
+++ b/bitbake/lib/toaster/toastergui/static/js/base.js
@@ -6,6 +6,7 @@ function basePageInit(ctx) {
   var newBuildTargetInput;
   var newBuildTargetBuildBtn;
   var projectNameForm = $("#project-name-change-form");
+  var projectNameContainer = $("#project-name-container");
   var projectName = $("#project-name");
   var projectNameFormToggle = $("#project-change-form-toggle");
   var projectNameChangeCancel = $("#project-name-change-cancel");
@@ -23,24 +24,21 @@ function basePageInit(ctx) {
   /* Project name change functionality */
   projectNameFormToggle.click(function(e){
     e.preventDefault();
-
-    $(this).add(projectName).hide();
+    projectNameContainer.hide();
     projectNameForm.fadeIn();
   });
 
   projectNameChangeCancel.click(function(e){
     e.preventDefault();
-
     projectNameForm.hide();
-    projectName.add(projectNameFormToggle).fadeIn();
+    projectNameContainer.fadeIn();
   });
 
   $("#project-name-change-btn").click(function(e){
     var newProjectName = $("#project-name-change-input").val();
 
-    libtoaster.editCurrentProject({ projectName: newProjectName },function (){
-
-      projectName.text(newProjectName);
+    libtoaster.editCurrentProject({ projectName: newProjectName }, function (){
+      projectName.html(newProjectName);
       libtoaster.ctx.projectName = newProjectName;
       projectNameChangeCancel.click();
     });
diff --git a/bitbake/lib/toaster/toastergui/templates/mrb_section.html b/bitbake/lib/toaster/toastergui/templates/mrb_section.html
index b29f650..53f40d0 100644
--- a/bitbake/lib/toaster/toastergui/templates/mrb_section.html
+++ b/bitbake/lib/toaster/toastergui/templates/mrb_section.html
@@ -8,6 +8,10 @@
   {%if mrb_type == 'project' %}
       <h2>
       Latest project builds
+
+      {% if project.is_default %}
+          <i class="icon-question-sign get-help heading-help" title="" data-original-title="Builds in this project cannot be started from Toaster: they are started from the command line"></i>
+      {% endif %}
       </h2>
   {% else %}
     <div class="page-header">
diff --git a/bitbake/lib/toaster/toastergui/templates/projecttopbar.html b/bitbake/lib/toaster/toastergui/templates/projecttopbar.html
index a3d1b88..ee86b54 100644
--- a/bitbake/lib/toaster/toastergui/templates/projecttopbar.html
+++ b/bitbake/lib/toaster/toastergui/templates/projecttopbar.html
@@ -5,8 +5,14 @@
 
 <!-- project name -->
 <div class="page-header">
-  <h1><span id="project-name">{{project.name}}</span>
+  <h1 id="project-name-container">
+    <span id="project-name">{{project.name}}</span>
+
     <i class="icon-pencil" data-original-title="" id="project-change-form-toggle" title=""></i>
+
+    {% if project.is_default %}
+        <i class="icon-question-sign get-help heading-help" title="" data-original-title="This project shows information about the builds you start from the command line while Toaster is running"></i>
+    {% endif %}
   </h1>
   <form id="project-name-change-form" style="margin-bottom: 0px; display: none;">
     <div class="input-append">
@@ -17,38 +23,40 @@
   </form>
 </div>
 
-<div id="project-topbar">
-  <ul class="nav nav-pills">
-    <li>
-      <a href="{% url 'projectbuilds' project.id %}">
-        Builds (<span class="total-builds">0</span>)
-      </a>
-    </li>
-    <li id="topbar-configuration-tab">
-      <a href="{% url 'project' project.id %}">
-        Configuration
-      </a>
-    </li>
-    <li>
-      <a href="{% url 'importlayer' project.id %}">
-        Import layer
-      </a>
-    </li>
-    {% if CUSTOM_IMAGE %}
-    <li>
-      <a href="{% url 'newcustomimage' project.id %}">
-        New custom image
-      </a>
-    </li>
-    {% endif %}
-    <li class="pull-right">
-      <form class="form-inline" style="margin-bottom:0px;">
-        <i class="icon-question-sign get-help heading-help" data-placement="left" title="" data-original-title="Type the name of one or more recipes you want to build, separated by a space. You can also specify a task by appending a semicolon and a task name to the recipe name, like so: <code>busybox:clean</code>"></i>
-        <div class="input-append">
-          <input id="build-input" type="text" class="input-xlarge input-lg build-target-input" placeholder="Type the recipe you want to build" autocomplete="off" disabled>
-          <button id="build-button" class="btn btn-primary btn-large build-button" data-project-id="{{project.id}}" disabled>Build</button>
-        </div>
-      </form>
-    </li>
-  </ul>
-</div>
+{% if not project.is_default %}
+  <div id="project-topbar">
+    <ul class="nav nav-pills">
+      <li>
+        <a href="{% url 'projectbuilds' project.id %}">
+          Builds (<span class="total-builds">0</span>)
+        </a>
+      </li>
+      <li id="topbar-configuration-tab">
+        <a href="{% url 'project' project.id %}">
+          Configuration
+        </a>
+      </li>
+      <li>
+        <a href="{% url 'importlayer' project.id %}">
+          Import layer
+        </a>
+      </li>
+      {% if CUSTOM_IMAGE %}
+      <li>
+        <a href="{% url 'newcustomimage' project.id %}">
+          New custom image
+        </a>
+      </li>
+      {% endif %}
+      <li class="pull-right">
+        <form class="form-inline" style="margin-bottom:0px;">
+          <i class="icon-question-sign get-help heading-help" data-placement="left" title="" data-original-title="Type the name of one or more recipes you want to build, separated by a space. You can also specify a task by appending a semicolon and a task name to the recipe name, like so: <code>busybox:clean</code>"></i>
+          <div class="input-append">
+            <input id="build-input" type="text" class="input-xlarge input-lg build-target-input" placeholder="Type the recipe you want to build" autocomplete="off" disabled>
+            <button id="build-button" class="btn btn-primary btn-large build-button" data-project-id="{{project.id}}" disabled>Build</button>
+          </div>
+        </form>
+      </li>
+    </ul>
+  </div>
+{% endif %}
diff --git a/bitbake/lib/toaster/toastergui/tests.py b/bitbake/lib/toaster/toastergui/tests.py
index 12a91c3..0d56ab2 100644
--- a/bitbake/lib/toaster/toastergui/tests.py
+++ b/bitbake/lib/toaster/toastergui/tests.py
@@ -596,8 +596,18 @@ class ProjectBuildsPageTests(TestCase):
                                          bitbake_version=bbv)
         self.project1 = Project.objects.create_project(name=PROJECT_NAME,
                                                        release=release)
+        self.project1.save()
+
         self.project2 = Project.objects.create_project(name=PROJECT_NAME,
                                                        release=release)
+        self.project2.save()
+
+        self.default_project = Project.objects.create_project(
+            name=CLI_BUILDS_PROJECT_NAME,
+            release=release
+        )
+        self.default_project.is_default = True
+        self.default_project.save()
 
         # parameters for builds to associate with the projects
         now = timezone.now()
@@ -630,6 +640,13 @@ class ProjectBuildsPageTests(TestCase):
             "outcome": Build.IN_PROGRESS
         }
 
+        self.default_project_build_success = {
+            "project": self.default_project,
+            "started_on": now,
+            "completed_on": now,
+            "outcome": Build.SUCCEEDED
+        }
+
     def _get_rows_for_project(self, project_id):
         """ Helper to retrieve HTML rows for a project """
         url = reverse("projectbuilds", args=(project_id,))
@@ -681,6 +698,30 @@ class ProjectBuildsPageTests(TestCase):
         result = re.findall('^ +bash:clean$', response.content, re.MULTILINE)
         self.assertEqual(len(result), 2)
 
+    def test_cli_builds_hides_tabs(self):
+        """
+        Display for command line builds should hide tabs;
+        note that the latest builds section is already tested in
+        AllBuildsPageTests, as the template is the same
+        """
+        url = reverse("projectbuilds", args=(self.default_project.id,))
+        response = self.client.get(url, follow=True)
+        soup = BeautifulSoup(response.content)
+        tabs = soup.select('#project-topbar')
+        self.assertEqual(len(tabs), 0,
+                         'should be no top bar shown for command line builds')
+
+    def test_non_cli_builds_has_tabs(self):
+        """
+        Non-command-line builds projects should show the tabs
+        """
+        url = reverse("projectbuilds", args=(self.project1.id,))
+        response = self.client.get(url, follow=True)
+        soup = BeautifulSoup(response.content)
+        tabs = soup.select('#project-topbar')
+        self.assertEqual(len(tabs), 1,
+                         'should be a top bar shown for non-command-line builds')
+
 class AllBuildsPageTests(TestCase):
     """ Tests for all builds page /builds/ """
 
-- 
Elliot Smith
Software Engineer
Intel OTC

---------------------------------------------------------------------
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ
VAT No: 860 2173 47

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [review-request][PATCH 06/10] toaster: Show tooltip next to cli builds project name in all builds
  2015-10-06 11:21 [review-request][PATCH 00/10][v2] Implement UI changes for "command line builds" project Elliot Smith
                   ` (6 preceding siblings ...)
  2015-10-06 11:21 ` [review-request][PATCH 05/10] toaster: Hide tabs and add info popups for command line builds Elliot Smith
@ 2015-10-06 11:21 ` Elliot Smith
  2015-10-06 11:21 ` [review-request][PATCH 07/10] toaster: More linting of tests Elliot Smith
                   ` (5 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Elliot Smith @ 2015-10-06 11:21 UTC (permalink / raw)
  To: toaster

In the all builds page, show an icon with tooltip next to the
command line builds project name.

[YOCTO #8231]

Signed-off-by: Elliot Smith <elliot.smith@intel.com>
---
 .../lib/toaster/toastergui/templates/builds.html   | 11 ++++---
 .../toaster/toastergui/templates/mrb_section.html  |  2 +-
 bitbake/lib/toaster/toastergui/tests.py            | 37 +++++++++++++++++++---
 3 files changed, 40 insertions(+), 10 deletions(-)

diff --git a/bitbake/lib/toaster/toastergui/templates/builds.html b/bitbake/lib/toaster/toastergui/templates/builds.html
index 6fbaf98..566c279 100644
--- a/bitbake/lib/toaster/toastergui/templates/builds.html
+++ b/bitbake/lib/toaster/toastergui/templates/builds.html
@@ -63,10 +63,10 @@
   {% include "basetable_top.html" %}
         <!-- Table data rows; the order needs to match the order of "tablecols" definitions; and the <td class value needs to match the tablecols clclass value for show/hide buttons to work -->
         {% for build in objects %}
-        <tr class="data">
+        <tr class="data" data-table-build-result="{{ build.id }}">
             <td class="outcome">
-        <a href="{% url "builddashboard" build.id %}">{%if build.outcome == build.SUCCEEDED%}<i class="icon-ok-sign success"></i>{%elif build.outcome == build.FAILED%}<i class="icon-minus-sign error"></i>{%else%}{%endif%}</a> &nbsp;
-        </td>
+                <a href="{% url "builddashboard" build.id %}">{%if build.outcome == build.SUCCEEDED%}<i class="icon-ok-sign success"></i>{%elif build.outcome == build.FAILED%}<i class="icon-minus-sign error"></i>{%else%}{%endif%}</a> &nbsp;
+            </td>
             <td class="target">
                 {% for t in build.target_set.all %}
                     <a href="{% url "builddashboard" build.id %}">
@@ -104,8 +104,11 @@
               <a href="{%url "builddashboard" build.id%}#images">{{fstypes|get_dict_value:build.id}}</a>
               {% endif %}
             </td>
-        <td>
+            <td class="project-name">
                 <a href="{% project_url build.project %}">{{build.project.name}}</a>
+                {% if build.project.is_default %}
+                    <i class="icon-question-sign get-help hover-help" title="" data-original-title="This project shows information about the builds you start from the command line while Toaster is running" style="visibility: hidden;"></i>
+                {% endif %}
             </td>
         </tr>
 
diff --git a/bitbake/lib/toaster/toastergui/templates/mrb_section.html b/bitbake/lib/toaster/toastergui/templates/mrb_section.html
index 53f40d0..55687a1 100644
--- a/bitbake/lib/toaster/toastergui/templates/mrb_section.html
+++ b/bitbake/lib/toaster/toastergui/templates/mrb_section.html
@@ -22,7 +22,7 @@
   {% endif %}
   <div id="latest-builds">
   {% for build in mru %}
-  <div id="build-result-{{ build.id }}" class="alert build-result {%if build.outcome == build.SUCCEEDED%}alert-success{%elif build.outcome == build.FAILED%}alert-error{%else%}alert-info{%endif%}
+  <div data-latest-build-result="{{ build.id }}" class="alert build-result {%if build.outcome == build.SUCCEEDED%}alert-success{%elif build.outcome == build.FAILED%}alert-error{%else%}alert-info{%endif%}
     {% if mrb_type != 'project' %}
     project-name">
        <span class="label {%if build.outcome == build.SUCCEEDED%}label-success{%elif build.outcome == build.FAILED%}label-important{%else%}label-info{%endif%}">
diff --git a/bitbake/lib/toaster/toastergui/tests.py b/bitbake/lib/toaster/toastergui/tests.py
index 0d56ab2..1e67d1a 100644
--- a/bitbake/lib/toaster/toastergui/tests.py
+++ b/bitbake/lib/toaster/toastergui/tests.py
@@ -760,7 +760,7 @@ class AllBuildsPageTests(TestCase):
         """ Task should be shown as suffix on build name """
         build = Build.objects.create(**self.project1_build_success)
         Target.objects.create(build=build, target='bash', task='clean')
-        url = reverse("all-builds")
+        url = reverse('all-builds')
         response = self.client.get(url, follow=True)
         result = re.findall('bash:clean', response.content, re.MULTILINE)
         self.assertEqual(len(result), 3)
@@ -768,17 +768,44 @@ class AllBuildsPageTests(TestCase):
     def test_no_run_again_for_cli_build(self):
         """ "Run again" button should not be shown for command-line builds """
         build = Build.objects.create(**self.default_project_build_success)
-        url = reverse("all-builds")
+        url = reverse('all-builds')
         response = self.client.get(url, follow=True)
         soup = BeautifulSoup(response.content)
 
-        element_id = 'build-result-%d' % build.id
+        attrs = {'data-latest-build-result': build.id}
+        result = soup.find('div', attrs=attrs)
 
         # shouldn't see a run again button for command-line builds
-        run_again_button = soup.select('#%s button' % element_id)
+        run_again_button = result.select('button')
         self.assertEqual(len(run_again_button), 0)
 
         # should see a help icon for command-line builds
-        help_icon = soup.select('#%s i.get-help-green' % element_id)
+        help_icon = result.select('i.get-help-green')
         self.assertEqual(len(help_icon), 1)
 
+    def test_tooltips_on_project_name(self):
+        """
+        A tooltip should be present next to the command line
+        builds project name in the all builds page, but not for
+        other projects
+        """
+        build1 = Build.objects.create(**self.project1_build_success)
+        default_build = Build.objects.create(**self.default_project_build_success)
+
+        url = reverse('all-builds')
+        response = self.client.get(url, follow=True)
+        soup = BeautifulSoup(response.content)
+
+        # no help icon on non-default project name
+        result = soup.find('tr', attrs={'data-table-build-result': build1.id})
+        name = result.select('td.project-name')[0]
+        icons = name.select('i.get-help')
+        self.assertEqual(len(icons), 0,
+                         'should not be a help icon for non-cli builds name')
+
+        # help icon on default project name
+        result = soup.find('tr', attrs={'data-table-build-result': default_build.id})
+        name = result.select('td.project-name')[0]
+        icons = name.select('i.get-help')
+        self.assertEqual(len(icons), 1,
+                         'should be a help icon for cli builds name')
-- 
Elliot Smith
Software Engineer
Intel OTC

---------------------------------------------------------------------
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ
VAT No: 860 2173 47

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [review-request][PATCH 07/10] toaster: More linting of tests
  2015-10-06 11:21 [review-request][PATCH 00/10][v2] Implement UI changes for "command line builds" project Elliot Smith
                   ` (7 preceding siblings ...)
  2015-10-06 11:21 ` [review-request][PATCH 06/10] toaster: Show tooltip next to cli builds project name in all builds Elliot Smith
@ 2015-10-06 11:21 ` Elliot Smith
  2015-10-06 11:21 ` [review-request][PATCH 08/10] toaster: Clean up template code Elliot Smith
                   ` (4 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Elliot Smith @ 2015-10-06 11:21 UTC (permalink / raw)
  To: toaster

Fix some more lint errors on the tests for toastergui.

Signed-off-by: Elliot Smith <elliot.smith@intel.com>
---
 bitbake/lib/toaster/toastergui/tests.py | 35 +++++++++++++--------------------
 1 file changed, 14 insertions(+), 21 deletions(-)

diff --git a/bitbake/lib/toaster/toastergui/tests.py b/bitbake/lib/toaster/toastergui/tests.py
index 1e67d1a..7078c9a 100644
--- a/bitbake/lib/toaster/toastergui/tests.py
+++ b/bitbake/lib/toaster/toastergui/tests.py
@@ -433,6 +433,18 @@ class AllProjectsPageTests(TestCase):
 
     MACHINE_NAME = 'delorean'
 
+    def setUp(self):
+        """ Add default project manually """
+        project = Project.objects.create_project(CLI_BUILDS_PROJECT_NAME, None)
+        self.default_project = project
+        self.default_project.is_default = True
+        self.default_project.save()
+
+        # this project is only set for some of the tests
+        self.project = None
+
+        self.release = None
+
     def _add_build_to_default_project(self):
         """ Add a build to the default project (not used in all tests) """
         now = timezone.now()
@@ -458,16 +470,6 @@ class AllProjectsPageTests(TestCase):
                                                      value=self.MACHINE_NAME)
         project_var.save()
 
-    def setUp(self):
-        """ Add default project manually """
-        project = Project.objects.create_project(CLI_BUILDS_PROJECT_NAME, None)
-        self.default_project = project
-        self.default_project.is_default = True
-        self.default_project.save()
-
-        # this project is only set for some of the tests
-        self.project = None
-
     def test_default_project_hidden(self):
         """ The default project should be hidden if it has no builds """
         params = {"count": 10, "orderby": "updated:-", "page": 1}
@@ -573,17 +575,15 @@ class AllProjectsPageTests(TestCase):
         # link for default project
         row = soup.find('tr', attrs={'data-project': self.default_project.id})
         cell = row.find('td', attrs={'data-project-field': 'name'})
-        url = cell.find('a')['href']
         expected_url = reverse('projectbuilds', args=(self.default_project.id,))
-        self.assertEqual(url, expected_url,
+        self.assertEqual(cell.find('a')['href'], expected_url,
                          'link on default project name should point to builds')
 
         # link for other project
         row = soup.find('tr', attrs={'data-project': self.project.id})
         cell = row.find('td', attrs={'data-project-field': 'name'})
-        url = cell.find('a')['href']
         expected_url = reverse('project', args=(self.project.id,))
-        self.assertEqual(url, expected_url,
+        self.assertEqual(cell.find('a')['href'], expected_url,
                          'link on project name should point to configuration')
 
 class ProjectBuildsPageTests(TestCase):
@@ -640,13 +640,6 @@ class ProjectBuildsPageTests(TestCase):
             "outcome": Build.IN_PROGRESS
         }
 
-        self.default_project_build_success = {
-            "project": self.default_project,
-            "started_on": now,
-            "completed_on": now,
-            "outcome": Build.SUCCEEDED
-        }
-
     def _get_rows_for_project(self, project_id):
         """ Helper to retrieve HTML rows for a project """
         url = reverse("projectbuilds", args=(project_id,))
-- 
Elliot Smith
Software Engineer
Intel OTC

---------------------------------------------------------------------
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ
VAT No: 860 2173 47

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [review-request][PATCH 08/10] toaster: Clean up template code
  2015-10-06 11:21 [review-request][PATCH 00/10][v2] Implement UI changes for "command line builds" project Elliot Smith
                   ` (8 preceding siblings ...)
  2015-10-06 11:21 ` [review-request][PATCH 07/10] toaster: More linting of tests Elliot Smith
@ 2015-10-06 11:21 ` Elliot Smith
  2015-10-06 11:21 ` [review-request][PATCH 09/10] toaster: Exclude "command line builds" project from projects typeahead Elliot Smith
                   ` (3 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Elliot Smith @ 2015-10-06 11:21 UTC (permalink / raw)
  To: toaster

Some errors in the HTML template didn't show up until
they were rendering command line builds.

One useless conditional was lingering in another template.

Clean up these issues to display the latest builds section
correctly.

Signed-off-by: Elliot Smith <elliot.smith@intel.com>
---
 .../lib/toaster/toastergui/templates/builds.html    |  5 -----
 .../toaster/toastergui/templates/mrb_section.html   | 21 ++++++++++-----------
 2 files changed, 10 insertions(+), 16 deletions(-)

diff --git a/bitbake/lib/toaster/toastergui/templates/builds.html b/bitbake/lib/toaster/toastergui/templates/builds.html
index 566c279..459fcb0 100644
--- a/bitbake/lib/toaster/toastergui/templates/builds.html
+++ b/bitbake/lib/toaster/toastergui/templates/builds.html
@@ -29,8 +29,6 @@
 
   {% include "mrb_section.html" %}
 
-
-  {% if 1 %}
   <div class="page-header top-air">
      <h1>
       {% if request.GET.filter and objects.paginator.count > 0 or request.GET.search and objects.paginator.count > 0 %}
@@ -57,8 +55,6 @@
         </form>
       </div>
     </div>
-
-
   {% else %}
   {% include "basetable_top.html" %}
         <!-- Table data rows; the order needs to match the order of "tablecols" definitions; and the <td class value needs to match the tablecols clclass value for show/hide buttons to work -->
@@ -117,7 +113,6 @@
 
   {% include "basetable_bottom.html" %}
   {% endif %} {# objects.paginator.count #}
-{% endif %} {# empty #}
 </div><!-- end row-fluid-->
 
 {% endblock %}
diff --git a/bitbake/lib/toaster/toastergui/templates/mrb_section.html b/bitbake/lib/toaster/toastergui/templates/mrb_section.html
index 55687a1..bd8f991 100644
--- a/bitbake/lib/toaster/toastergui/templates/mrb_section.html
+++ b/bitbake/lib/toaster/toastergui/templates/mrb_section.html
@@ -22,19 +22,18 @@
   {% endif %}
   <div id="latest-builds">
   {% for build in mru %}
-  <div data-latest-build-result="{{ build.id }}" class="alert build-result {%if build.outcome == build.SUCCEEDED%}alert-success{%elif build.outcome == build.FAILED%}alert-error{%else%}alert-info{%endif%}
-    {% if mrb_type != 'project' %}
-    project-name">
-       <span class="label {%if build.outcome == build.SUCCEEDED%}label-success{%elif build.outcome == build.FAILED%}label-important{%else%}label-info{%endif%}">
-         <a href={% project_url build.project %}>
-           {{build.project.name}}
-         </a>
-       </span>
-    {% endif %}
+  <div data-latest-build-result="{{ build.id }}" class="alert build-result {%if build.outcome == build.SUCCEEDED%}alert-success{%elif build.outcome == build.FAILED%}alert-error{%else%}alert-info{%endif%}{% if mrb_type != 'project' %} project-name{% endif %}">
+      {% if mrb_type != 'project' %}
+        <span class="label {%if build.outcome == build.SUCCEEDED%}label-success{%elif build.outcome == build.FAILED%}label-important{%else%}label-info{%endif%}">
+            <a href={% project_url build.project %}>
+                {{build.project.name}}
+            </a>
+        </span>
+      {% endif %}
         <div class="row-fluid">
-            <div class="span3 lead">
+          <div class="span3 lead">
     {%if build.outcome == build.SUCCEEDED or build.outcome == build.FAILED %}
-                <a href="{%url 'builddashboard' build.pk%}" class="{%if build.outcome == build.SUCCEEDED %}success{%else%}error{%endif%}">
+              <a href="{%url 'builddashboard' build.pk%}" class="{%if build.outcome == build.SUCCEEDED %}success{%else%}error{%endif%}">
     {% endif %}
             {% if build.target_set.all.count > 0 %}
                 <span data-toggle="tooltip"
-- 
Elliot Smith
Software Engineer
Intel OTC

---------------------------------------------------------------------
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ
VAT No: 860 2173 47

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [review-request][PATCH 09/10] toaster: Exclude "command line builds" project from projects typeahead
  2015-10-06 11:21 [review-request][PATCH 00/10][v2] Implement UI changes for "command line builds" project Elliot Smith
                   ` (9 preceding siblings ...)
  2015-10-06 11:21 ` [review-request][PATCH 08/10] toaster: Clean up template code Elliot Smith
@ 2015-10-06 11:21 ` Elliot Smith
  2015-10-06 11:21 ` [review-request][PATCH 10/10] toaster: Modify "New build" button behaviour for cli builds project Elliot Smith
                   ` (2 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Elliot Smith @ 2015-10-06 11:21 UTC (permalink / raw)
  To: toaster

The "New build" drop-down provides autocomplete for Toaster projects.

However, it should not include the default project (for command
line builds), as it should not be possible for the user to
select this project as the container for a Toaster build.

[YOCTO #8231]

Signed-off-by: Elliot Smith <elliot.smith@intel.com>
---
 bitbake/lib/toaster/toastergui/typeaheads.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/bitbake/lib/toaster/toastergui/typeaheads.py b/bitbake/lib/toaster/toastergui/typeaheads.py
index 9db3182..dd4b7f5 100644
--- a/bitbake/lib/toaster/toastergui/typeaheads.py
+++ b/bitbake/lib/toaster/toastergui/typeaheads.py
@@ -121,12 +121,12 @@ class RecipesTypeAhead(ToasterTypeAhead):
         return results
 
 class ProjectsTypeAhead(ToasterTypeAhead):
-    """ Typeahead for all the projects """
+    """ Typeahead for all the projects, except for command line builds """
     def __init__(self):
         super(ProjectsTypeAhead, self).__init__()
 
     def apply_search(self, search_term, prj, request):
-        projects = Project.objects.all().order_by("name")
+        projects = Project.objects.exclude(is_default=True).order_by("name")
 
         primary_results = projects.filter(name__istartswith=search_term)
         secondary_results = projects.filter(name__icontains=search_term).exclude(pk__in=primary_results)
-- 
Elliot Smith
Software Engineer
Intel OTC

---------------------------------------------------------------------
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ
VAT No: 860 2173 47

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [review-request][PATCH 10/10] toaster: Modify "New build" button behaviour for cli builds project
  2015-10-06 11:21 [review-request][PATCH 00/10][v2] Implement UI changes for "command line builds" project Elliot Smith
                   ` (10 preceding siblings ...)
  2015-10-06 11:21 ` [review-request][PATCH 09/10] toaster: Exclude "command line builds" project from projects typeahead Elliot Smith
@ 2015-10-06 11:21 ` Elliot Smith
  2015-10-06 13:01 ` [review-request][PATCH 00/10][v2] Implement UI changes for "command line builds" project Barros Pena, Belen
  2015-10-07 13:27 ` Ed Bartosh
  13 siblings, 0 replies; 15+ messages in thread
From: Elliot Smith @ 2015-10-06 11:21 UTC (permalink / raw)
  To: toaster

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]

Signed-off-by: Elliot Smith <elliot.smith@intel.com>
---
 bitbake/lib/toaster/toastergui/static/js/base.js   |  6 +-
 bitbake/lib/toaster/toastergui/templates/base.html | 95 +++++++++++-----------
 bitbake/lib/toaster/toastergui/views.py            |  9 +-
 3 files changed, 59 insertions(+), 51 deletions(-)

diff --git a/bitbake/lib/toaster/toastergui/static/js/base.js b/bitbake/lib/toaster/toastergui/static/js/base.js
index 6042a96..ed22a4e 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) {
   });
 
   function _checkProjectBuildable() {
-    if (selectedProject.projectId === undefined) {
+    if (selectedProject.projectId === undefined || selectedProject.projectIsDefault) {
       return;
     }
 
     libtoaster.getProjectInfo(selectedProject.projectPageUrl,
       function (data) {
         if (data.machine === null || data.machine.name === undefined || data.layers.length === 0) {
-          /* we can't build anything with out a machine and some layers */
+          /* we can't build anything without a machine and some layers */
           $("#new-build-button #targets-form").hide();
           $("#new-build-button .alert").show();
         } else {
@@ -147,7 +147,7 @@ function basePageInit(ctx) {
     /* If we don't have a current project then present the set project
      * form.
      */
-    if (selectedProject.projectId === undefined) {
+    if (selectedProject.projectId === undefined || selectedProject.projectIsDefault) {
       $('#change-project-form').show();
       $('#project .icon-pencil').hide();
     }
diff --git a/bitbake/lib/toaster/toastergui/templates/base.html b/bitbake/lib/toaster/toastergui/templates/base.html
index 3f27790..c1d0693 100644
--- a/bitbake/lib/toaster/toastergui/templates/base.html
+++ b/bitbake/lib/toaster/toastergui/templates/base.html
@@ -38,6 +38,7 @@
         projectId : {{project.id}},
         projectPageUrl : {% url 'project' project.id as purl %}{{purl|json}},
         projectName : {{project.name|json}},
+        projectIsDefault: {% if project.is_default %}true{% else %}false{% endif %},
         recipesTypeAheadUrl: {% url 'xhr_recipestypeahead' project.id as paturl%}{{paturl|json}},
         layersTypeAheadUrl: {% url 'xhr_layerstypeahead' project.id as paturl%}{{paturl|json}},
         machinesTypeAheadUrl: {% url 'xhr_machinestypeahead' project.id as paturl%}{{paturl|json}},
@@ -48,7 +49,7 @@
         projectId : undefined,
         projectPageUrl : undefined,
         projectName : undefined,
-        projectId : undefined,
+        projectIsDefault: false,
         {% endif %}
       };
     </script>
@@ -122,52 +123,54 @@
           <div class="btn-group pull-right">
             <a class="btn" id="new-project-button" href="{% url 'newproject' %}">New project</a>
           </div>
-          <!-- New build popover -->
-          <div class="btn-group pull-right" id="new-build-button" style="display:none">
-            <button class="btn dropdown-toggle" data-toggle="dropdown">
-              New build
-              <i class="icon-caret-down"></i>
-            </button>
-            <ul class="dropdown-menu new-build multi-select">
-              <li>
-                <h3>New build</h3>
-                <h6>Project:</h6>
-                <span id="project">
-                  {% if project.id %}
-                  <a class="lead" href="{% project_url project %}">{{project.name}}</a>
-                  {% else %}
-                  <a class="lead" href="#"></a>
-                  {% endif %}
-                  <i class="icon-pencil"></i>
-                </span>
-                <form id="change-project-form" style="display:none;">
-                  <div class="input-append">
-                    <input type="text" class="input-medium" id="project-name-input" placeholder="Type a project name" autocomplete="off" data-minLength="1" data-autocomplete="off" data-provide="typeahead"/>
-                    <button id="save-project-button" class="btn" type="button">Save</button>
-                    <a href="#" id="cancel-change-project" class="btn btn-link" style="display: none">Cancel</a>
-                  </div>
-                  <p><a id="view-all-projects" href="{% url 'all-projects' %}">View all projects</a></p>
-                </form>
-              </li>
-              <li>
-                <div class="alert" style="display:none;">
-                  <p>This project configuration is incomplete, so you cannot run builds.</p>
-                  <p><a href="{% if project.id %}{% url 'project' project.id %}{% endif %}">View project configuration</a></p>
-                </div>
-              </li>
-              <li id="targets-form">
-                <h6>Recipe(s):</h6>
-                <form>
-                  <input type="text" class="input-xlarge build-target-input" placeholder="Type a recipe name" autocomplete="off" data-minLength="1" data-autocomplete="off" data-provide="typeahead" disabled/>
-                  <div class="row-fluid">
-                    <button class="btn btn-primary build-button" disabled>Build</button>
+          <!-- New build popover; only shown if there is at least one user-created project -->
+          {% if non_cli_projects.count > 0 %}
+            <div class="btn-group pull-right" id="new-build-button" style="display:none">
+              <button class="btn dropdown-toggle" data-toggle="dropdown">
+                New build
+                <i class="icon-caret-down"></i>
+              </button>
+              <ul class="dropdown-menu new-build multi-select">
+                <li>
+                  <h3>New build</h3>
+                  <h6>
+                    Project:
+                    <span id="project">
+                      {% if project.id and not project.is_default %}
+                        <a class="lead" href="{% project_url project %}">{{project.name}}</a>
+                      {% else %}
+                        <a class="lead" href="#"></a>
+                      {% endif %}
+                      <i class="icon-pencil"></i>
+                    </span>
+                  </h6>
+                  <form id="change-project-form" style="display:none;">
+                    <div class="input-append">
+                      <input type="text" class="input-medium" id="project-name-input" placeholder="Type a project name" autocomplete="off" data-minLength="1" data-autocomplete="off" data-provide="typeahead"/>
+                      <button id="save-project-button" class="btn" type="button">Save</button>
+                      <a href="#" id="cancel-change-project" class="btn btn-link" style="display: none">Cancel</a>
+                    </div>
+                    <p><a id="view-all-projects" href="{% url 'all-projects' %}">View all projects</a></p>
+                  </form>
+                </li>
+                <li>
+                  <div class="alert" style="display:none;">
+                    <p>This project configuration is incomplete, so you cannot run builds.</p>
+                    <p><a href="{% if project.id %}{% url 'project' project.id %}{% endif %}">View project configuration</a></p>
                   </div>
-                </form>
-              </li>
-            </ul>
-          </div>
-
-
+                </li>
+                <li id="targets-form">
+                  <h6>Recipe(s):</h6>
+                  <form>
+                    <input type="text" class="input-xlarge build-target-input" placeholder="Type a recipe name" autocomplete="off" data-minLength="1" data-autocomplete="off" data-provide="typeahead" disabled/>
+                    <div class="row-fluid">
+                      <button class="btn btn-primary build-button" disabled>Build</button>
+                    </div>
+                  </form>
+                </li>
+              </ul>
+            </div>
+          {% endif %}
     </div>
  </div>
 </div>
diff --git a/bitbake/lib/toaster/toastergui/views.py b/bitbake/lib/toaster/toastergui/views.py
index 3168cfa..8d70dbe 100755
--- a/bitbake/lib/toaster/toastergui/views.py
+++ b/bitbake/lib/toaster/toastergui/views.py
@@ -1863,10 +1863,15 @@ def image_information_dir(request, build_id, target_id, packagefile_id):
     return redirect(builds)
     # the context processor that supplies data used across all the pages
 
-
+# a context processor which runs on every request; this provides the
+# projects and non_cli_projects (i.e. projects created by the user)
+# variables referred to in templates, which used to determine the
+# visibility of UI elements like the "New build" button
 def managedcontextprocessor(request):
+    projects = Project.objects.all()
     ret = {
-        "projects": Project.objects.all(),
+        "projects": projects,
+        "non_cli_projects": projects.exclude(is_default=True),
         "DEBUG" : toastermain.settings.DEBUG,
         "CUSTOM_IMAGE" : toastermain.settings.CUSTOM_IMAGE,
         "TOASTER_BRANCH": toastermain.settings.TOASTER_BRANCH,
-- 
Elliot Smith
Software Engineer
Intel OTC

---------------------------------------------------------------------
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ
VAT No: 860 2173 47

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: [review-request][PATCH 00/10][v2] Implement UI changes for "command line builds" project
  2015-10-06 11:21 [review-request][PATCH 00/10][v2] Implement UI changes for "command line builds" project Elliot Smith
                   ` (11 preceding siblings ...)
  2015-10-06 11:21 ` [review-request][PATCH 10/10] toaster: Modify "New build" button behaviour for cli builds project Elliot Smith
@ 2015-10-06 13:01 ` Barros Pena, Belen
  2015-10-07 13:27 ` Ed Bartosh
  13 siblings, 0 replies; 15+ messages in thread
From: Barros Pena, Belen @ 2015-10-06 13:01 UTC (permalink / raw)
  To: Smith, Elliot, toaster@yoctoproject.org



On 06/10/2015 12:21, "toaster-bounces@yoctoproject.org on behalf of Elliot
Smith" <toaster-bounces@yoctoproject.org on behalf of
elliot.smith@intel.com> wrote:

>This implements changes across the UI to hide irrelevant options
>for command-line builds, and show additional help icons explaining
>why those options are hidden.
>
>It also modifies the behaviour of the "New build" button to take
>account of the special status of the command-line builds project.
>
>For UI details, see the document attached to bug 8231
>at https://bugzilla.yoctoproject.org/attachment.cgi?id=2760.
>
>v2 (in response to Belen's review):

UI looks great. Thanks!

Belén

>
>* Modify how the form for changing the project name is shown, so
>that the edit buttons aren't lost after saving the new project name.
>Also verify that project name changes take without requiring a page
>refresh.
>
>* Never select the command-line builds project in the "New build"
>drop-down form.
>
>* Only show the "New build" button if there are one or more user-created
>projects (i.e. not if there is only the command-line builds project).
>
>v1:
>
>* One of the changes in the design document has not been implemented:
>it's not possible to hide the "customise image recipe" links and
>buttons (page 9) as these are not in the templates yet.
>
>* The visual design differs slightly from the design document, as it
>incorporates a new layout for the build dashboard which is not
>implemented yet.
>
>* The "New build" button is displayed on the command line
>builds project page, as we came to the conclusion that the logic
>in the JavaScript (i.e. show the new build button if there is no
>build input form on the page) should apply in the case of the
>builds page for the "command line builds" project.
>
>Changes since 66ab34a41658e2f275a83853bb19cf49bf7cc74d (toaster-next) are
>in
>git://git.yoctoproject.org/poky-contrib, elliot/toaster/cli_builds_ui-8231
>http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=elliot/toaster/cl
>i_builds_ui-8231
>
>Related bug: https://bugzilla.yoctoproject.org/show_bug.cgi?id=8231
>
>Elliot Smith (10):
>  toaster: Reorganise and lint tests
>  toaster: Replace "Run again" button with help text for cli builds
>  toaster: Show 'not applicable' for default project machine and release
>  toaster: Make the builds view the project page for "command line
>    builds"
>  toaster: Hide tabs and add info popups for command line builds
>  toaster: Show tooltip next to cli builds project name in all builds
>  toaster: More linting of tests
>  toaster: Clean up template code
>  toaster: Exclude "command line builds" project from projects typeahead
>  toaster: Modify "New build" button behaviour for cli builds project
>
> .../lib/toaster/toastergui/static/css/default.css  |   5 +
> bitbake/lib/toaster/toastergui/static/js/base.js   |  18 +-
> bitbake/lib/toaster/toastergui/templates/base.html |  98 ++++---
> .../lib/toaster/toastergui/templates/builds.html   |  19 +-
> .../toaster/toastergui/templates/mrb_section.html  |  66 +++--
> .../lib/toaster/toastergui/templates/projects.html |  23 +-
> .../toastergui/templates/projecttopbar.html        |  80 ++---
> .../toastergui/templatetags/project_url_tag.py     |  34 +++
> bitbake/lib/toaster/toastergui/tests.py            | 322
>++++++++++++++++++---
> bitbake/lib/toaster/toastergui/typeaheads.py       |   4 +-
> bitbake/lib/toaster/toastergui/views.py            |   9 +-
> 11 files changed, 494 insertions(+), 184 deletions(-)
> create mode 100644
>bitbake/lib/toaster/toastergui/templatetags/project_url_tag.py
>
>--
>Elliot Smith
>Software Engineer
>Intel OTC
>
>---------------------------------------------------------------------
>Intel Corporation (UK) Limited
>Registered No. 1134945 (England)
>Registered Office: Pipers Way, Swindon SN3 1RJ
>VAT No: 860 2173 47
>
>This e-mail and any attachments may contain confidential material for
>the sole use of the intended recipient(s). Any review or distribution
>by others is strictly prohibited. If you are not the intended
>recipient, please contact the sender and delete all copies.
>
>-- 
>_______________________________________________
>toaster mailing list
>toaster@yoctoproject.org
>https://lists.yoctoproject.org/listinfo/toaster



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [review-request][PATCH 00/10][v2] Implement UI changes for "command line builds" project
  2015-10-06 11:21 [review-request][PATCH 00/10][v2] Implement UI changes for "command line builds" project Elliot Smith
                   ` (12 preceding siblings ...)
  2015-10-06 13:01 ` [review-request][PATCH 00/10][v2] Implement UI changes for "command line builds" project Barros Pena, Belen
@ 2015-10-07 13:27 ` Ed Bartosh
  13 siblings, 0 replies; 15+ messages in thread
From: Ed Bartosh @ 2015-10-07 13:27 UTC (permalink / raw)
  To: Elliot Smith; +Cc: toaster

Submitted upstream.

On Tue, Oct 06, 2015 at 12:21:09PM +0100, Elliot Smith wrote:
> This implements changes across the UI to hide irrelevant options
> for command-line builds, and show additional help icons explaining
> why those options are hidden.
> 
> It also modifies the behaviour of the "New build" button to take
> account of the special status of the command-line builds project.
> 
> For UI details, see the document attached to bug 8231
> at https://bugzilla.yoctoproject.org/attachment.cgi?id=2760.
> 
> v2 (in response to Belen's review):
> 
> * Modify how the form for changing the project name is shown, so
> that the edit buttons aren't lost after saving the new project name.
> Also verify that project name changes take without requiring a page refresh.
> 
> * Never select the command-line builds project in the "New build"
> drop-down form.
> 
> * Only show the "New build" button if there are one or more user-created
> projects (i.e. not if there is only the command-line builds project).
> 
> v1:
> 
> * One of the changes in the design document has not been implemented:
> it's not possible to hide the "customise image recipe" links and
> buttons (page 9) as these are not in the templates yet.
> 
> * The visual design differs slightly from the design document, as it
> incorporates a new layout for the build dashboard which is not
> implemented yet.
> 
> * The "New build" button is displayed on the command line
> builds project page, as we came to the conclusion that the logic
> in the JavaScript (i.e. show the new build button if there is no
> build input form on the page) should apply in the case of the
> builds page for the "command line builds" project.
> 
> Changes since 66ab34a41658e2f275a83853bb19cf49bf7cc74d (toaster-next) are in
> git://git.yoctoproject.org/poky-contrib, elliot/toaster/cli_builds_ui-8231
> http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=elliot/toaster/cli_builds_ui-8231
> 
> Related bug: https://bugzilla.yoctoproject.org/show_bug.cgi?id=8231
> 
> Elliot Smith (10):
>   toaster: Reorganise and lint tests
>   toaster: Replace "Run again" button with help text for cli builds
>   toaster: Show 'not applicable' for default project machine and release
>   toaster: Make the builds view the project page for "command line
>     builds"
>   toaster: Hide tabs and add info popups for command line builds
>   toaster: Show tooltip next to cli builds project name in all builds
>   toaster: More linting of tests
>   toaster: Clean up template code
>   toaster: Exclude "command line builds" project from projects typeahead
>   toaster: Modify "New build" button behaviour for cli builds project
> 
>  .../lib/toaster/toastergui/static/css/default.css  |   5 +
>  bitbake/lib/toaster/toastergui/static/js/base.js   |  18 +-
>  bitbake/lib/toaster/toastergui/templates/base.html |  98 ++++---
>  .../lib/toaster/toastergui/templates/builds.html   |  19 +-
>  .../toaster/toastergui/templates/mrb_section.html  |  66 +++--
>  .../lib/toaster/toastergui/templates/projects.html |  23 +-
>  .../toastergui/templates/projecttopbar.html        |  80 ++---
>  .../toastergui/templatetags/project_url_tag.py     |  34 +++
>  bitbake/lib/toaster/toastergui/tests.py            | 322 ++++++++++++++++++---
>  bitbake/lib/toaster/toastergui/typeaheads.py       |   4 +-
>  bitbake/lib/toaster/toastergui/views.py            |   9 +-
>  11 files changed, 494 insertions(+), 184 deletions(-)
>  create mode 100644 bitbake/lib/toaster/toastergui/templatetags/project_url_tag.py
> 
> --
> Elliot Smith
> Software Engineer
> Intel OTC
> 
> ---------------------------------------------------------------------
> Intel Corporation (UK) Limited
> Registered No. 1134945 (England)
> Registered Office: Pipers Way, Swindon SN3 1RJ
> VAT No: 860 2173 47
> 
> This e-mail and any attachments may contain confidential material for
> the sole use of the intended recipient(s). Any review or distribution
> by others is strictly prohibited. If you are not the intended
> recipient, please contact the sender and delete all copies.
> 
> -- 
> _______________________________________________
> toaster mailing list
> toaster@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/toaster

-- 
--
Regards,
Ed


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2015-10-07 13:27 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-06 11:21 [review-request][PATCH 00/10][v2] Implement UI changes for "command line builds" project Elliot Smith
2015-10-06 11:21 ` [review-request][PATCH 1/2] toaster: Manually retrieve log file location from filesystem Elliot Smith
2015-10-06 11:21 ` [review-request][PATCH 01/10] toaster: Reorganise and lint tests Elliot Smith
2015-10-06 11:21 ` [review-request][PATCH 2/2] toaster: Hide "Download build log" button if log doesn't exist Elliot Smith
2015-10-06 11:21 ` [review-request][PATCH 02/10] toaster: Replace "Run again" button with help text for cli builds Elliot Smith
2015-10-06 11:21 ` [review-request][PATCH 03/10] toaster: Show 'not applicable' for default project machine and release Elliot Smith
2015-10-06 11:21 ` [review-request][PATCH 04/10] toaster: Make the builds view the project page for "command line builds" Elliot Smith
2015-10-06 11:21 ` [review-request][PATCH 05/10] toaster: Hide tabs and add info popups for command line builds Elliot Smith
2015-10-06 11:21 ` [review-request][PATCH 06/10] toaster: Show tooltip next to cli builds project name in all builds Elliot Smith
2015-10-06 11:21 ` [review-request][PATCH 07/10] toaster: More linting of tests Elliot Smith
2015-10-06 11:21 ` [review-request][PATCH 08/10] toaster: Clean up template code Elliot Smith
2015-10-06 11:21 ` [review-request][PATCH 09/10] toaster: Exclude "command line builds" project from projects typeahead Elliot Smith
2015-10-06 11:21 ` [review-request][PATCH 10/10] toaster: Modify "New build" button behaviour for cli builds project Elliot Smith
2015-10-06 13:01 ` [review-request][PATCH 00/10][v2] Implement UI changes for "command line builds" project Barros Pena, Belen
2015-10-07 13:27 ` Ed Bartosh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.