Openembedded Bitbake Development
 help / color / mirror / Atom feed
* [PATCH 0/2] add pages for Toaster project views
@ 2014-08-29 15:41 Alex DAMIAN
  2014-08-29 15:41 ` [PATCH 1/2] toaster: add project pages for machines, targets, layers Alex DAMIAN
  2014-08-29 15:42 ` [PATCH 2/2] toastergui: added pages for project details Alex DAMIAN
  0 siblings, 2 replies; 3+ messages in thread
From: Alex DAMIAN @ 2014-08-29 15:41 UTC (permalink / raw)
  To: bitbake-devel, toaster; +Cc: Alexandru DAMIAN

From: Alexandru DAMIAN <alexandru.damian@intel.com>

This patchset adds all the pages needed to display project views in Toaster.

The pages may have bugs, and functionality is read-only, but we need to be able
to validate already existing data in the database.

Can you please merge at your convenience ?

Thanks,
Alex

The following changes since commit c2ced09e7ea4a1762d2788bb12a761734d20fd8e:

  toaster: create Build methods for calculating progress and ETA (2014-08-29 13:56:39 +0100)

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib adamian/20140829-submission-bb
  http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=adamian/20140829-submission-bb

Alexandru DAMIAN (2):
  toaster: add project pages for machines, targets, layers
  toastergui: added pages for project details

 lib/toaster/orm/models.py                          | 131 ++++----
 .../toastergui/templates/basebuilddetailpage.html  |   0
 .../toastergui/templates/baseprojectpage.html      |  43 +++
 lib/toaster/toastergui/templates/importlayer.html  |  68 ++++
 lib/toaster/toastergui/templates/layerdetails.html | 159 +++++++++
 lib/toaster/toastergui/templates/layers.html       |  11 +-
 lib/toaster/toastergui/templates/machines.html     |  63 ++++
 lib/toaster/toastergui/templates/project.html      | 123 +++----
 .../toastergui/templates/projectbuilds.html        |  59 ++++
 lib/toaster/toastergui/templates/projectconf.html  |  62 ++++
 lib/toaster/toastergui/templates/recipes.html      |   0
 lib/toaster/toastergui/templates/targets.html      | 186 +++++++++++
 lib/toaster/toastergui/urls.py                     |   2 +-
 lib/toaster/toastergui/views.py                    | 365 +++++++++++++++++++--
 14 files changed, 1121 insertions(+), 151 deletions(-)
 mode change 100755 => 100644 lib/toaster/toastergui/templates/basebuilddetailpage.html
 create mode 100644 lib/toaster/toastergui/templates/baseprojectpage.html
 create mode 100644 lib/toaster/toastergui/templates/importlayer.html
 create mode 100644 lib/toaster/toastergui/templates/layerdetails.html
 mode change 100755 => 100644 lib/toaster/toastergui/templates/layers.html
 create mode 100644 lib/toaster/toastergui/templates/machines.html
 create mode 100644 lib/toaster/toastergui/templates/projectbuilds.html
 create mode 100644 lib/toaster/toastergui/templates/projectconf.html
 mode change 100755 => 100644 lib/toaster/toastergui/templates/recipes.html
 create mode 100644 lib/toaster/toastergui/templates/targets.html

-- 
1.9.1



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

* [PATCH 1/2] toaster: add project pages for machines, targets, layers
  2014-08-29 15:41 [PATCH 0/2] add pages for Toaster project views Alex DAMIAN
@ 2014-08-29 15:41 ` Alex DAMIAN
  2014-08-29 15:42 ` [PATCH 2/2] toastergui: added pages for project details Alex DAMIAN
  1 sibling, 0 replies; 3+ messages in thread
From: Alex DAMIAN @ 2014-08-29 15:41 UTC (permalink / raw)
  To: bitbake-devel, toaster; +Cc: Alexandru DAMIAN

From: Alexandru DAMIAN <alexandru.damian@intel.com>

We add new pages for the all-machines and all-targets
project-related views.

We update the existing template structure to create
a base project view, similar to a base build view, that includes
a breadcrumb.

Updating existing all layers view to use the new structure.

We update methods in the models to provide corrent
information display.

[YOCTO #6592]
[YOCTO #6593]

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
---
 lib/toaster/orm/models.py                          | 131 +++++++--------
 .../toastergui/templates/basebuilddetailpage.html  |   0
 .../toastergui/templates/baseprojectpage.html      |  43 +++++
 lib/toaster/toastergui/templates/layers.html       |   9 +-
 lib/toaster/toastergui/templates/machines.html     |  63 +++++++
 lib/toaster/toastergui/templates/project.html      |  69 ++++----
 lib/toaster/toastergui/templates/recipes.html      |   0
 lib/toaster/toastergui/templates/targets.html      | 186 +++++++++++++++++++++
 lib/toaster/toastergui/views.py                    | 173 ++++++++++++++++++-
 9 files changed, 559 insertions(+), 115 deletions(-)
 mode change 100755 => 100644 lib/toaster/toastergui/templates/basebuilddetailpage.html
 create mode 100644 lib/toaster/toastergui/templates/baseprojectpage.html
 mode change 100755 => 100644 lib/toaster/toastergui/templates/layers.html
 create mode 100644 lib/toaster/toastergui/templates/machines.html
 mode change 100755 => 100644 lib/toaster/toastergui/templates/recipes.html
 create mode 100644 lib/toaster/toastergui/templates/targets.html

diff --git a/lib/toaster/orm/models.py b/lib/toaster/orm/models.py
index bb921fc..77afe35 100644
--- a/lib/toaster/orm/models.py
+++ b/lib/toaster/orm/models.py
@@ -402,6 +402,18 @@ class Recipe(models.Model):
     bugtracker = models.URLField(blank=True)
     file_path = models.FilePathField(max_length=255)
 
+    def get_vcs_link_url(self):
+        if self.layer_version.layer.vcs_web_file_base_url is None:
+            return ""
+        return self.layer_version.layer.vcs_web_file_base_url.replace('%path%', self.file_path).replace('%branch%', self.layer_version.up_branch.name)
+
+    def get_layersource_view_url(self):
+        if self.layer_source is None:
+            return ""
+
+        url = self.layer_source.get_object_view(self.layer_version.up_branch, "recipes", self.name)
+        return url
+
     def __unicode__(self):
         return "Recipe " + self.name + ":" + self.version
 
@@ -508,6 +520,11 @@ class LayerIndexLayerSource(LayerSource):
         super(LayerIndexLayerSource, self).__init__(args, kwargs)
         self.sourcetype = LayerSource.TYPE_LAYERINDEX
 
+    def get_object_view(self, branch, objectype, upid):
+        if self != branch.layer_source:
+            raise Exception("Invalid branch specification")
+        return self.apiurl + "../branch/" + branch.name + "/" + objectype + "/?q=" + str(upid)
+
     def update(self):
         '''
             Fetches layer, recipe and machine information from remote repository
@@ -538,99 +555,79 @@ class LayerIndexLayerSource(LayerSource):
             return
 
         # update branches; only those that we already have names listed in the database
-        whitelist_branch_names = self.branchnames.split(",")
+        whitelist_branch_names = map(lambda x: x.name, Branch.objects.all())
 
         branches_info = _get_json_response(apilinks['branches']
             + "?filter=name:%s" % "OR".join(whitelist_branch_names))
         for bi in branches_info:
-            try:
-                b = Branch.objects.get(layer_source = self, name = bi['name'])
-                b.up_id = bi['id']
-                b.up_date = bi['updated']
-                b.name = bi['name']
-                b.bitbake_branch = bi['bitbake_branch']
-                b.short_description = bi['short_description']
-                b.save()
-            except Branch.DoesNotExist:
-                b = Branch.objects.create(
-                    layer_source = self,
-                    up_id = bi['id'],
-                    up_date = bi['updated'],
-                    name = bi['name'],
-                    bitbake_branch = bi['bitbake_branch'],
-                    short_description = bi['short_description']
-                )
+            b, created = Branch.objects.get_or_create(layer_source = self, name = bi['name'])
+            b.up_id = bi['id']
+            b.up_date = bi['updated']
+            b.name = bi['name']
+            b.bitbake_branch = bi['bitbake_branch']
+            b.short_description = bi['short_description']
+            b.save()
 
         # update layers
         layers_info = _get_json_response(apilinks['layerItems'])
         for li in layers_info:
-            try:
-                l = Layer.objects.get(layer_source = self,
-                    up_id = li['id'])
-                l.update(
-                    up_date = li['updated'],
-                    name = li['name'],
-                    vcs_url = li['vcs_url'],
-                    vcs_web_file_base_url = li['vcs_url'],
-                    summary = li['summary'],
-                    description = li['description'])
-            except Layer.DoesNotExist:
-                Layer.objects.create(layer_source = self,
-                    up_id = li['id'],
-                    up_date = li['updated'],
-                    name = li['name'],
-                    vcs_url = li['vcs_url'],
-                    vcs_web_file_base_url = li['vcs_url'],
-                    summary = li['summary'],
-                    description = li['description']
-                )
+            l, created = Layer.objects.get_or_create(layer_source = self, up_id = li['id'])
+            l.up_date = li['updated']
+            l.name = li['name']
+            l.vcs_url = li['vcs_url']
+            l.vcs_web_file_base_url = li['vcs_web_file_base_url']
+            l.summary = li['summary']
+            l.description = li['description']
+            l.save()
 
         # update layerbranches/layer_versions
         layerbranches_info = _get_json_response(apilinks['layerBranches']
                 + "?filter=branch:%s" % "OR".join(map(lambda x: str(x.up_id), Branch.objects.filter(layer_source = self)))
             )
         for lbi in layerbranches_info:
-            Layer_Version.objects.get_or_create(layer_source = self,
-                    up_id = lbi['id'],
-                    up_date = lbi['updated'],
-                    layer = Layer.objects.get(layer_source = self, up_id = lbi['layer']),
-                    up_branch = Branch.objects.get(layer_source = self, up_id = lbi['branch']),
-                    branch = lbi['actual_branch'],
-                    commit = lbi['vcs_last_rev'],
-                    dirpath = lbi['vcs_subdir'])
+            lv, created = Layer_Version.objects.get_or_create(layer_source = self, up_id = lbi['id'])
+
+            lv.up_date = lbi['updated']
+            lv.layer = Layer.objects.get(layer_source = self, up_id = lbi['layer'])
+            lv.up_branch = Branch.objects.get(layer_source = self, up_id = lbi['branch'])
+            lv.branch = lbi['actual_branch']
+            lv.commit = lbi['vcs_last_rev']
+            lv.dirpath = lbi['vcs_subdir']
+            lv.save()
+
 
         # update machines
         machines_info = _get_json_response(apilinks['machines']
                 + "?filter=layerbranch:%s" % "OR".join(map(lambda x: str(x.up_id), Layer_Version.objects.filter(layer_source = self)))
             )
         for mi in machines_info:
-            Machine.objects.get_or_create(layer_source = self,
-                    up_id = mi['id'],
-                    up_date = mi['updated'],
-                    layer_version = Layer_Version.objects.get(layer_source = self, up_id = mi['layerbranch']),
-                    name = mi['name'],
-                    description = mi['description'])
+            mo, created = Machine.objects.get_or_create(layer_source = self, up_id = mi['id'])
+            mo.up_date = mi['updated']
+            mo.layer_version = Layer_Version.objects.get(layer_source = self, up_id = mi['layerbranch'])
+            mo.name = mi['name']
+            mo.description = mi['description']
+            mo.save()
 
         # update recipes; paginate by layer version / layer branch
         recipes_info = _get_json_response(apilinks['recipes']
                 + "?filter=layerbranch:%s" % "OR".join(map(lambda x: str(x.up_id), Layer_Version.objects.filter(layer_source = self)))
             )
         for ri in recipes_info:
-            Recipe.objects.get_or_create(layer_source = self,
-                    up_id = ri['id'],
-                    up_date = ri['updated'],
-                    layer_version = Layer_Version.objects.get(layer_source = self, up_id = mi['layerbranch']),
-
-                    name = ri['pn'],
-                    version = ri['pv'],
-                    summary = ri['summary'],
-                    description = ri['description'],
-                    section = ri['section'],
-                    license = ri['license'],
-                    homepage = ri['homepage'],
-                    bugtracker = ri['bugtracker'],
-                    file_path = ri['filepath'] + ri['filename']
-                )
+            ro, created = Recipe.objects.get_or_create(layer_source = self, up_id = ri['id'])
+
+            ro.up_date = ri['updated']
+            ro.layer_version = Layer_Version.objects.get(layer_source = self, up_id = mi['layerbranch'])
+
+            ro.name = ri['pn']
+            ro.version = ri['pv']
+            ro.summary = ri['summary']
+            ro.description = ri['description']
+            ro.section = ri['section']
+            ro.license = ri['license']
+            ro.homepage = ri['homepage']
+            ro.bugtracker = ri['bugtracker']
+            ro.file_path = ri['filepath'] + ri['filename']
+            ro.save()
 
         pass
 
diff --git a/lib/toaster/toastergui/templates/basebuilddetailpage.html b/lib/toaster/toastergui/templates/basebuilddetailpage.html
old mode 100755
new mode 100644
diff --git a/lib/toaster/toastergui/templates/baseprojectpage.html b/lib/toaster/toastergui/templates/baseprojectpage.html
new file mode 100644
index 0000000..54edaaf
--- /dev/null
+++ b/lib/toaster/toastergui/templates/baseprojectpage.html
@@ -0,0 +1,43 @@
+{% extends "base.html" %}
+{% load projecttags %}
+{% load humanize %}
+{% block pagecontent %}
+
+
+ <div class="">
+<!-- Breadcrumbs -->
+    <div class="section">
+        <ul class="breadcrumb" id="breadcrumb">
+            <li><a href="{% url 'all-builds' %}">All builds</a></li>
+            {% block parentbreadcrumb %}
+        {% if project %}
+            <li>
+                <a href="{%url 'project' project.id %}">{{project.name}}
+                </a>
+            </li>
+        {% endif %}
+            {% endblock %}
+            {% block localbreadcrumb %}{% endblock %}
+        </ul>
+        <script>
+        $( function () {
+            $('#breadcrumb > li').append("<span class=\"divider\">→</span>");
+            $('#breadcrumb > li:last').addClass("active");
+            $('#breadcrumb > li:last > span').remove();
+        });
+        </script>
+    </div>
+
+    <div class="row-fluid">
+
+        <!-- Begin right container -->
+        {% block projectinfomain %}{% endblock %}
+        <!-- End right container -->
+
+
+    </div>
+  </div>
+
+
+{% endblock %}
+
diff --git a/lib/toaster/toastergui/templates/layers.html b/lib/toaster/toastergui/templates/layers.html
old mode 100755
new mode 100644
index d7d159e..bc6e5a3
--- a/lib/toaster/toastergui/templates/layers.html
+++ b/lib/toaster/toastergui/templates/layers.html
@@ -1,7 +1,12 @@
-{% extends "base.html" %}
+{% extends "baseprojectpage.html" %}
 {% load projecttags %}
 {% load humanize %}
-{% block pagecontent %}
+
+{% block localbreadcrumb %}
+<li>Layers</li>
+{% endblock %}
+
+{% block projectinfomain %}
                 <div class="page-header">
                     <h1>
                         All layers
diff --git a/lib/toaster/toastergui/templates/machines.html b/lib/toaster/toastergui/templates/machines.html
new file mode 100644
index 0000000..18e7485
--- /dev/null
+++ b/lib/toaster/toastergui/templates/machines.html
@@ -0,0 +1,63 @@
+{% extends "baseprojectpage.html" %}
+{% load projecttags %}
+{% load humanize %}
+
+{% block localbreadcrumb %}
+<li>Machines</li>
+{% endblock %}
+
+{% block projectinfomain %}
+                <div class="page-header">
+                    <h1>
+                        All machines
+                        <i class="icon-question-sign get-help heading-help" title="This page lists all the machines compatible with Yocto Project 1.7 'Dxxxx' that Toaster knows about. They include community-created targets suitable for use on top of OpenEmbedded Core and any targets you have imported"></i>
+                     </h1>
+                </div>
+                <!--div class="alert">
+                    <div class="input-append" style="margin-bottom:0px;">
+                        <input class="input-xxlarge" type="text" placeholder="Search targets" value="browser" />
+                        <a class="add-on btn">
+                            <i class="icon-remove"></i>
+                        </a>
+                        <button class="btn" type="button">Search</button>
+                        <a class="btn btn-link" href="#">Show all targets</a>
+                    </div>
+                </div-->
+                <div id="target-added" class="alert alert-info lead" style="display:none;"></div>
+                <div id="target-removed" class="alert alert-info lead" style="display:none;">
+                    <button type="button" class="close" data-dismiss="alert">&times;</button>
+                    <strong>1</strong> target deleted from <a href="project-with-targets.html">your project</a>: <a href="#">meta-aarch64</a>
+                </div>
+
+
+{% include "basetable_top.html" %}
+    {% for o in objects %}
+    <tr class="data">
+	<td class="machine">
+		{{o.name}}
+		<a machine="_blank" href="http://layers.openembedded.org/layerindex/branch/master/machines/?q=3g-router-image"><i class="icon-share get-info"></i></a>
+	</td>
+	<td class="description">{{o.description}}</td>
+	<td class="machine-file">
+		<code>{{o.file_path}}</code>
+		<a href="http://github.com/embeddedgeeks/meta-embeddedgeeks/blob/master/machines-core/images/3g-router-image.bb" machine="_blank"><i class="icon-share get-info"></i></a>
+	</td>
+	<td class="layer"><a href="#">{{o.layer_version.layer.name}}</a></td>
+	<td class="source">{{o.layer_source.name}}</td>
+	<td class="branch">{{o.layer_version.commit}}</td>
+	<td class="build">
+		<a id="build-machine" href="project-with-machines.html?machine=3g-router-image" class="btn btn-block" style="display:none;">
+			Build machine
+		</a>
+		<a id="add-layer" href="#" class="btn btn-block nopop" title="1 layer added">
+			<i class="icon-plus"></i>
+			Add layer
+			<i class="icon-question-sign get-help" title="To build this machine, you must first add the meta-embeddedgeeks layer to your project"></i>
+		</a>
+	</td>
+    </tr>
+    {% endfor %}
+
+{% include "basetable_bottom.html" %}
+
+{% endblock %}
diff --git a/lib/toaster/toastergui/templates/project.html b/lib/toaster/toastergui/templates/project.html
index 3c59fcf..d7bfa2b 100644
--- a/lib/toaster/toastergui/templates/project.html
+++ b/lib/toaster/toastergui/templates/project.html
@@ -224,36 +224,14 @@ $(document).ready(function () {
                         <div id="dependency-alert" class="alert alert-info" style="display:none;">
                             <p><strong>meta-tizen</strong> depends on the layers below. Check the ones you want to add: </p>
                             <ul class="unstyled">
-                                <li>
-                                    <label class="checkbox">
-                                        <input checked="checked" type="checkbox">
-                                        meta-efl
-                                    </label>
-                                </li>
-                                <li>
-                                    <label class="checkbox">
-                                        <input checked="checked" type="checkbox">
-                                        meta-intel
-                                    </label>
-                                </li>
-                                <li>
-                                    <label class="checkbox">
-                                        <input checked="checked" type="checkbox">
-                                        meta-multimedia
-                                    </label>
-                                </li>
-                                <li>
-                                    <label class="checkbox">
-                                        <input checked="checked" type="checkbox">
-                                        meta-oe
-                                    </label>
-                                </li>
+	{% for f in layer_dependency %}
                                 <li>
                                     <label class="checkbox">
                                         <input checked="checked" type="checkbox">
                                         meta-ruby
                                     </label>
                                 </li>
+	{% endfor %}
                             </ul>
                             <button id="add-layer-dependencies" class="btn btn-info add-layer">Add layers</button>
                         </div>
@@ -315,27 +293,38 @@ $(document).ready(function () {
                 </div>
 
                 <div class="well well-transparent span4">
+
                     <h3>
-                        Set machine
-                        <i data-original-title="The machine is the hardware for which you want to build. You can only set one machine per project" class="icon-question-sign get-help heading-help" title=""></i>
+                        Project machine
+                        <i class="icon-question-sign get-help heading-help" title="The machine is the hardware for which you want to build. You can only set one machine per project"></i>
                     </h3>
-                    <p class="lead">
-                        {{machine}}
-                        <i title="" data-original-title="" class="icon-pencil"></i>
+                    <p class="lead" id="selected-machine"> {{machine}}
+                      <i id="change-machine" class="icon-pencil"></i>
                     </p>
-                    <h3>
-                        Set distro
-                        <i data-original-title="When you build an image using the Yocto Project and do not alter the distro, you are creating a Poky distribution" class="icon-question-sign get-help heading-help" title=""></i>
-                    </h3>
-                    <p class="lead">
-                        {{distro}}
-                        <i title="" data-original-title="" class="icon-pencil"></i>
+                    <form id="select-machine">
+                        <div class="alert alert-info">
+                            <strong>Machine changes have a big impact on build outcome.</strong>
+                            You cannot really compare the builds for the new machine with the previous ones.
+                        </div>
+                        <div class="input-append">
+                            <input type="text" id="machine" autocomplete="off" value="qemux86" data-provide="typeahead"
+                            data-minLength="1"
+                            data-autocomplete="off"
+                            data-source='[
+                            ]'>
+                            <button id="apply-change-machine" class="btn" type="button">Save</button>
+                            <a href="#" id="cancel-machine" class="btn btn-link">Cancel</a>
+                        </div>
+                        <p><a href="{% url 'machines' %}" class="link">View all machines</a></p>
+                    </form>
+                    <p class="link-action">
+                        <a href="{% url 'projectconf' project.id %}" class="link">Edit configuration variables</a>
+                        <i class="icon-question-sign get-help heading-help" title="You can set other project configuration options here. Each option, like everything else in the build system, is a variable - value pair"></i>
                     </p>
-					<p class="link-action">
-						<a href="{% url 'projectconf' project.id %}" class="link">Edit configuration variables</a>
-						<i class="icon-question-sign get-help heading-help" title="You can set other project configuration options here. Each option, like everything else in the build system, is a variable - value pair"></i>
-					</p>
+
                 </div>
+
+
             </div>
 
             <h2>Project details</h2>
diff --git a/lib/toaster/toastergui/templates/recipes.html b/lib/toaster/toastergui/templates/recipes.html
old mode 100755
new mode 100644
diff --git a/lib/toaster/toastergui/templates/targets.html b/lib/toaster/toastergui/templates/targets.html
new file mode 100644
index 0000000..3afdf0a
--- /dev/null
+++ b/lib/toaster/toastergui/templates/targets.html
@@ -0,0 +1,186 @@
+{% extends "baseprojectpage.html" %}
+{% load projecttags %}
+{% load humanize %}
+
+{% block localbreadcrumb %}
+<li>Targets</li>
+{% endblock %}
+
+{% block projectinfomain %}
+                <div class="page-header">
+                    <h1>
+                        All targets
+                        <i class="icon-question-sign get-help heading-help" title="This page lists all the targets compatible with Yocto Project 1.7 'Dxxxx' that Toaster knows about. They include community-created targets suitable for use on top of OpenEmbedded Core and any targets you have imported"></i>
+                     </h1>
+                </div>
+                <!--div class="alert">
+                    <div class="input-append" style="margin-bottom:0px;">
+                        <input class="input-xxlarge" type="text" placeholder="Search targets" value="browser" />
+                        <a class="add-on btn">
+                            <i class="icon-remove"></i>
+                        </a>
+                        <button class="btn" type="button">Search</button>
+                        <a class="btn btn-link" href="#">Show all targets</a>
+                    </div>
+                </div-->
+                <div id="target-added" class="alert alert-info lead" style="display:none;"></div>
+                <div id="target-removed" class="alert alert-info lead" style="display:none;">
+                    <button type="button" class="close" data-dismiss="alert">&times;</button>
+                    <strong>1</strong> target deleted from <a href="project-with-targets.html">your project</a>: <a href="#">meta-aarch64</a>
+                </div>
+
+
+{% include "basetable_top.html" %}
+    {% for o in objects %}
+    <tr class="data">
+	<td class="target">
+		{{o.name}} ({{o.id}}, {{o.up_id}})
+		<a target="_blank" href="{{o.get_layersource_view_url}}"><i class="icon-share get-info"></i></a>
+	</td>
+	<td class="version">{{o.version}}</td>
+	<td class="description">{{o.description}}</td>
+	<td class="recipe-file">
+		<code>{{o.file_path}}</code>
+		<a href="{{o.get_vcs_link_url}}" target="_blank"><i class="icon-share get-info"></i></a>
+	</td>
+	<td class="target-section">{{o.section}}</td>
+	<td class="license">{{o.license}}</td>
+	<td class="layer"><a href="#">{{o.layer_version.layer.name}}</a></td>
+	<td class="source">{{o.layer_source.name}}</td>
+	<td class="branch">{{o.layer_version.commit}}</td>
+	<td class="build">
+		<a id="build-target" href="project-with-targets.html?target=3g-router-image" class="btn btn-block" style="display:none;">
+			Build target
+		</a>
+		<a id="add-layer" href="#" class="btn btn-block nopop" title="1 layer added">
+			<i class="icon-plus"></i>
+			Add layer
+			<i class="icon-question-sign get-help" title="To build this target, you must first add the meta-embeddedgeeks layer to your project"></i>
+		</a>
+	</td>
+    </tr>
+    {% endfor %}
+{% include "basetable_bottom.html" %}
+
+    <!-- Modals -->
+
+    <!-- 'Layer dependencies modal' -->
+    <div id="dependencies-message" class="modal hide fade" tabindex="-1" role="dialog" aria-hidden="true">
+        <div class="modal-header">
+            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button>
+            <h3>meta-acer dependencies</h3>
+        </div>
+        <div class="modal-body">
+            <p><strong>meta-acer</strong> depends on some targets that are not added to your project. Select the ones you want to add:</p>
+            <ul class="unstyled">
+                <li>
+                    <label class="checkbox">
+                        <input type="checkbox" checked="checked">
+                        meta-android
+                    </label>
+                </li>
+                <li>
+                    <label class="checkbox">
+                        <input type="checkbox" checked="checked">
+                        meta-oe
+                    </label>
+                </li>
+            </ul>
+        </div>
+        <div class="modal-footer">
+            <button id="add-target-dependencies" type="submit" class="btn btn-primary" data-dismiss="modal" >Add targets</button>
+            <button class="btn" data-dismiss="modal">Cancel</button>
+        </div>
+    </div>
+
+    <script src="assets/js/jquery-1.9.1.min.js" type='text/javascript'></script>
+    <script src="assets/js/jquery.tablesorter.min.js" type='text/javascript'></script>
+    <script src="assets/js/jquery-ui-1.10.3.custom.min.js"></script>
+    <script src="assets/js/bootstrap.min.js" type='text/javascript'></script>
+    <script src="assets/js/prettify.js" type='text/javascript'></script>
+    <script src="assets/js/jit.js" type='text/javascript'></script>
+    <script src="assets/js/main.js" type='text/javascript'></script>
+
+    <script>
+     $(document).ready(function() {
+
+        //show or hide selected columns on load
+        $("input:checkbox").each(function(){
+            var selectedType = $(this).val();
+            if($(this).is(":checked")){
+                $("."+selectedType).show();
+            }
+            else{
+                $("."+selectedType).hide();
+            }
+        });
+
+        // enable add target button
+        $('#add-target-with-deps').removeAttr('disabled');
+
+        //edit columns functionality (show / hide table columns)
+        $("input:checkbox").change();
+            $("input:checkbox").change(function(){
+                var selectedType = $(this).val();
+                    if($(this).is(":checked")){
+                        $("."+selectedType).show();
+                    }
+                    else{
+                        $("."+selectedType).hide();
+                    }
+            });
+
+        //turn edit columns dropdown into a multi-select menu
+        $('.dropdown-menu input, .dropdown-menu label').click(function(e) {
+            e.stopPropagation();
+        });
+
+        //show tooltip with applied filter
+        $('#filtered').tooltip({container:'table', placement:'bottom', delay:{hide:1500}, html:true});
+
+        $('#filtered').click(function() {
+            $(this).tooltip('hide');
+        });
+
+        //show target added tooltip
+        $("#remove-target, #add-target, #add-target-with-deps2").tooltip({ trigger: 'manual' });
+
+        // add target without dependencies
+        $("#add-target").click(function(){
+            $('#target-removed').hide();
+            $('#target-added').html('<button type="button" class="close" data-dismiss="alert">&times;</button><strong>1</strong> target added to <a href="project-with-targets.html">your project</a>: <a href="#">meta-aarch64</a>').fadeIn();
+            $('#add-target').tooltip('show');
+            $("#add-target").hide();
+            $(".add-targets .tooltip").delay(2000).fadeOut(function(){
+                $("#remove-target").delay(300).fadeIn();
+            });
+        });
+
+        // add target with dependencies
+        $(document).on("click", "#add-target-dependencies", function() {
+            $('#target-removed').hide();
+            $('#target-added').html('<button type="button" class="close" data-dismiss="alert">&times;</button><strong>3</strong> targets added to <a href="project-with-targets.html">your project</a>: <a href="#">meta-acer</a> and its dependencies <a href="#">meta-android</a> and <a href="#">meta-oe</a>').delay(400).fadeIn(function(){
+                $('#add-target-with-deps').tooltip('show');
+                $("#add-target-with-deps, #add-target-with-deps").hide();
+                $(".add-targets .tooltip").delay(2000).fadeOut(function(){
+                    $("#remove-target-with-deps").delay(300).fadeIn();
+                });
+            });
+        });
+
+        // delete target
+        $("#remove-target").click(function(){
+            $('#target-added').hide();
+            $('#target-removed').show();
+            $('#remove-target').tooltip('show');
+            $("#remove-target").hide();
+            $(".add-targets .tooltip").delay(2000).fadeOut(function(){
+                $("#add-target").delay(300).fadeIn();
+            });
+        });
+
+     });
+
+</script>
+
+{% endblock %}
diff --git a/lib/toaster/toastergui/views.py b/lib/toaster/toastergui/views.py
index 86a34ad..167b687 100755
--- a/lib/toaster/toastergui/views.py
+++ b/lib/toaster/toastergui/views.py
@@ -1761,7 +1761,7 @@ if toastermain.settings.MANAGED:
     from django.contrib.auth.decorators import login_required
 
     from orm.models import Project, ProjectLayer, ProjectTarget, ProjectVariable
-    from orm.models import Branch, LayerSource, ToasterSetting, Release
+    from orm.models import Branch, LayerSource, ToasterSetting, Release, Machine
     from bldcontrol.models import BuildRequest
 
     import traceback
@@ -1770,10 +1770,13 @@ if toastermain.settings.MANAGED:
 
     # the context processor that supplies data used across all the pages
     def managedcontextprocessor(request):
-        return {
+        ret = {
             "projects": Project.objects.all(),
             "MANAGED" : toastermain.settings.MANAGED
         }
+        if 'project' in request.session:
+            ret['project'] = request.session['project']
+        return ret
 
     # new project
     def newproject(request):
@@ -1922,7 +1925,7 @@ if toastermain.settings.MANAGED:
         # define here what parameters the view needs in the GET portion in order to
         # be able to display something.  'count' and 'page' are mandatory for all views
         # that use paginators.
-        mandatory_parameters = { 'count': 10,  'page' : 1, 'orderby' : 'layer__name:-' };
+        mandatory_parameters = { 'count': 10,  'page' : 1, 'orderby' : 'layer__name:+' };
         retval = _verify_parameters( request.GET, mandatory_parameters )
         if retval:
             return _redirect_parameters( 'layers', request.GET, mandatory_parameters)
@@ -1945,7 +1948,8 @@ if toastermain.settings.MANAGED:
         context = {
             'objects' : layer_info,
             'objectname' : "layers",
-            'default_orderby' : 'completed_on:-',
+            'default_orderby' : 'layer__name:+',
+            'total_count': queryset_with_search.count(),
 
             'tablecols' : [
                 {   'name': 'Layer',
@@ -1954,8 +1958,10 @@ if toastermain.settings.MANAGED:
                 },
                 {   'name': 'Description',
                     'dclass': 'span4',
+                    'clclass': 'description',
                 },
                 {   'name': 'Layer source',
+                    'clclass': 'source',
                     'qhelp': "Where the layer is coming from, for example, if it's part of the OpenEmbedded collection of layers or if it's a layer you have imported",
                     'orderfield': _get_toggle_order(request, "layer_source__name"),
                     'ordericon': _get_toggle_order_icon(request, "layer_source__name"),
@@ -1967,15 +1973,20 @@ if toastermain.settings.MANAGED:
                 },
                 {   'name': 'Git repository URL',
                     'dclass': 'span6',
+                    'clclass': 'git-repo', 'hidden': 1,
                     'qhelp': "The Git repository for the layer source code",
                 },
                 {   'name': 'Subdirectory',
+                    'clclass': 'git-subdir',
+                    'hidden': 1,
                     'qhelp': "The layer directory within the Git repository",
                 },
                 {   'name': 'Branch, tag o commit',
+                    'clclass': 'branch',
                     'qhelp': "The Git branch of the layer. For the layers from the OpenEmbedded source, the branch matches the Yocto Project version you selected for this project",
                 },
                 {   'name': 'Dependencies',
+                    'clclass': 'dependencies',
                     'qhelp': "Other layers a layer depends upon",
                 },
                 {   'name': 'Add | Delete',
@@ -1992,10 +2003,160 @@ if toastermain.settings.MANAGED:
         raise Exception("TODO: implement page #6591")
 
     def targets(request):
-        raise Exception("TODO: implement page #6592")
+        template = "targets.html"
+        # define here what parameters the view needs in the GET portion in order to
+        # be able to display something.  'count' and 'page' are mandatory for all views
+        # that use paginators.
+        mandatory_parameters = { 'count': 10,  'page' : 1, 'orderby' : 'name:+' };
+        retval = _verify_parameters( request.GET, mandatory_parameters )
+        if retval:
+            return _redirect_parameters( 'targets', request.GET, mandatory_parameters)
+
+        # boilerplate code that takes a request for an object type and returns a queryset
+        # for that object type. copypasta for all needed table searches
+        (filter_string, search_term, ordering_string) = _search_tuple(request, Recipe)
+
+        queryset_all = Recipe.objects.all()
+        if 'project' in request.session:
+            queryset_all = queryset_all.filter(Q(layer_version__up_branch__in = Branch.objects.filter(name = request.session['project'].release.name)) | Q(layer_version__build__in = request.session['project'].build_set.all()))
+
+        queryset_with_search = _get_queryset(Recipe, queryset_all, None, search_term, ordering_string, '-name')
+        queryset = _get_queryset(Recipe, queryset_all, filter_string, search_term, ordering_string, '-name')
+
+        # retrieve the objects that will be displayed in the table; targets a paginator and gets a page range to display
+        target_info = _build_page_range(Paginator(queryset, request.GET.get('count', 10)),request.GET.get('page', 1))
+
+
+        context = {
+            'objects' : target_info,
+            'objectname' : "targets",
+            'default_orderby' : 'name:+',
+            'total_count': queryset_with_search.count(),
+
+            'tablecols' : [
+                {   'name': 'Target',
+                    'orderfield': _get_toggle_order(request, "name"),
+                    'ordericon' : _get_toggle_order_icon(request, "name"),
+                },
+                {   'name': 'Target version',
+                    'dclass': 'span2',
+                },
+                {   'name': 'Description',
+                    'dclass': 'span5',
+                    'clclass': 'description',
+                },
+                {   'name': 'Recipe file',
+                    'clclass': 'recipe-file',
+                    'hidden': 1,
+                    'dclass': 'span5',
+                },
+                {   'name': 'Section',
+                    'clclass': 'target-section',
+                    'hidden': 1,
+                },
+                {   'name': 'License',
+                    'clclass': 'license',
+                    'hidden': 1,
+                },
+                {   'name': 'Layer',
+                    'clclass': 'layer',
+                },
+                {   'name': 'Layer source',
+                    'clclass': 'source',
+                    'qhelp': "Where the target is coming from, for example, if it's part of the OpenEmbedded collection of targets or if it's a target you have imported",
+                    'orderfield': _get_toggle_order(request, "layer_source__name"),
+                    'ordericon': _get_toggle_order_icon(request, "layer_source__name"),
+                    'filter': {
+                        'class': 'target',
+                        'label': 'Show:',
+                        'options': map(lambda x: (x.name, 'layer_source__pk:' + str(x.id), queryset_with_search.filter(layer_source__pk = x.id).count() ), LayerSource.objects.all()),
+                    }
+                },
+                {   'name': 'Branch, tag or commit',
+                    'clclass': 'branch',
+                    'hidden': 1,
+                },
+                {   'name': 'Build',
+                    'dclass': 'span2',
+                    'qhelp': "Add or delete targets to / from your project ",
+                },
+
+            ]
+        }
+
+        return render(request, template, context)
 
     def machines(request):
-        raise Exception("TODO: implement page #6593")
+        template = "machines.html"
+        # define here what parameters the view needs in the GET portion in order to
+        # be able to display something.  'count' and 'page' are mandatory for all views
+        # that use paginators.
+        mandatory_parameters = { 'count': 10,  'page' : 1, 'orderby' : 'name:+' };
+        retval = _verify_parameters( request.GET, mandatory_parameters )
+        if retval:
+            return _redirect_parameters( 'machines', request.GET, mandatory_parameters)
+
+        # boilerplate code that takes a request for an object type and returns a queryset
+        # for that object type. copypasta for all needed table searches
+        (filter_string, search_term, ordering_string) = _search_tuple(request, Machine)
+
+        queryset_all = Machine.objects.all()
+#        if 'project' in request.session:
+#            queryset_all = queryset_all.filter(Q(layer_version__up_branch__in = Branch.objects.filter(name = request.session['project'].release.name)) | Q(layer_version__build__in = request.session['project'].build_set.all()))
+
+        queryset_with_search = _get_queryset(Machine, queryset_all, None, search_term, ordering_string, '-name')
+        queryset = _get_queryset(Machine, queryset_all, filter_string, search_term, ordering_string, '-name')
+
+        # retrieve the objects that will be displayed in the table; machines a paginator and gets a page range to display
+        machine_info = _build_page_range(Paginator(queryset, request.GET.get('count', 10)),request.GET.get('page', 1))
+
+
+        context = {
+            'objects' : machine_info,
+            'objectname' : "machines",
+            'default_orderby' : 'name:+',
+            'total_count': queryset_with_search.count(),
+
+            'tablecols' : [
+                {   'name': 'Machine',
+                    'orderfield': _get_toggle_order(request, "name"),
+                    'ordericon' : _get_toggle_order_icon(request, "name"),
+                },
+                {   'name': 'Description',
+                    'dclass': 'span5',
+                    'clclass': 'description',
+                },
+                {   'name': 'Machine file',
+                    'clclass': 'machine-file',
+                    'hidden': 1,
+                },
+                {   'name': 'Layer',
+                    'clclass': 'layer',
+                },
+                {   'name': 'Layer source',
+                    'clclass': 'source',
+                    'qhelp': "Where the machine is coming from, for example, if it's part of the OpenEmbedded collection of machines or if it's a machine you have imported",
+                    'orderfield': _get_toggle_order(request, "layer_source__name"),
+                    'ordericon': _get_toggle_order_icon(request, "layer_source__name"),
+                    'filter': {
+                        'class': 'machine',
+                        'label': 'Show:',
+                        'options': map(lambda x: (x.name, 'layer_source__pk:' + str(x.id), queryset_with_search.filter(layer_source__pk = x.id).count() ), LayerSource.objects.all()),
+                    }
+                },
+                {   'name': 'Branch, tag or commit',
+                    'clclass': 'branch',
+                    'hidden': 1,
+                },
+                {   'name': 'Select',
+                    'dclass': 'span2',
+                    'qhelp': "Add or delete machines to / from your project ",
+                },
+
+            ]
+        }
+
+        return render(request, template, context)
 
     def projectconf(request, pid):
         raise Exception("TODO: implement page #6588")
-- 
1.9.1



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

* [PATCH 2/2] toastergui: added pages for project details
  2014-08-29 15:41 [PATCH 0/2] add pages for Toaster project views Alex DAMIAN
  2014-08-29 15:41 ` [PATCH 1/2] toaster: add project pages for machines, targets, layers Alex DAMIAN
@ 2014-08-29 15:42 ` Alex DAMIAN
  1 sibling, 0 replies; 3+ messages in thread
From: Alex DAMIAN @ 2014-08-29 15:42 UTC (permalink / raw)
  To: bitbake-devel, toaster; +Cc: Alexandru DAMIAN

From: Alexandru DAMIAN <alexandru.damian@intel.com>

We add new pages for the layer importing, layer details,
showing project builds and project configuration.

The pages are  in read-only mode, but they're needed as
to be able to verify the quality of data in the system.

Write capabilities will be added in a subsequent patch.

[YOCTO #6595]
[YOCTO #6590]
[YOCTO #6591]
[YOCTO #6588]
[YOCTO #6589]

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
---
 lib/toaster/toastergui/templates/importlayer.html  |  68 ++++++++
 lib/toaster/toastergui/templates/layerdetails.html | 159 +++++++++++++++++
 lib/toaster/toastergui/templates/layers.html       |   2 +-
 lib/toaster/toastergui/templates/project.html      |  58 ++++---
 .../toastergui/templates/projectbuilds.html        |  59 +++++++
 lib/toaster/toastergui/templates/projectconf.html  |  62 +++++++
 lib/toaster/toastergui/urls.py                     |   2 +-
 lib/toaster/toastergui/views.py                    | 192 +++++++++++++++++++--
 8 files changed, 564 insertions(+), 38 deletions(-)
 create mode 100644 lib/toaster/toastergui/templates/importlayer.html
 create mode 100644 lib/toaster/toastergui/templates/layerdetails.html
 create mode 100644 lib/toaster/toastergui/templates/projectbuilds.html
 create mode 100644 lib/toaster/toastergui/templates/projectconf.html

diff --git a/lib/toaster/toastergui/templates/importlayer.html b/lib/toaster/toastergui/templates/importlayer.html
new file mode 100644
index 0000000..7e48eac
--- /dev/null
+++ b/lib/toaster/toastergui/templates/importlayer.html
@@ -0,0 +1,68 @@
+{% extends "baseprojectpage.html" %}
+{% load projecttags %}
+{% load humanize %}
+
+{% block localbreadcrumb %}
+<li>Layers</li>
+{% endblock %}
+
+{% block projectinfomain %}
+                <div class="page-header">
+                    <h1>Import layer</h1>
+                </div>
+                <form>
+        {% if project %}
+                    <span class="help-block" style="padding-left:19px;">The layer you are importing must be compatible with {{project.release.name}} ({{project.release.description}}), which is the release you are using in this project.</span>
+          {% endif %}
+                    <fieldset class="air">
+                        <legend>Layer repository information</legend>
+                        <label>
+                            Git repository URL
+                            <i class="icon-question-sign get-help" title="Fetch/clone URL of the repository. Currently, Toaster only supports Git repositories."></i>
+                        </label>
+                        <input id="repo" type="text" class="input-xxlarge" required>
+                        <label class="project-form">
+                            Repository subdirectory
+                            <span class="muted">(optional)</span>
+                            <i class="icon-question-sign get-help" title="Subdirectory within the repository where the layer is located, if not in the root (usually only used if the repository contains more than one layer)"></i>
+                        </label>
+                        <input type="text"  id="subdir">
+                        <label class="project-form">Branch, tag or commit</label>
+                        <input type="text" class="span4" id="layer-version" required>
+                        <label class="project-form">
+                            Layer name
+                            <i class="icon-question-sign get-help" title="Something like 'meta-mylayer'. Your layer name must be unique and can only include letters, numbers and dashes"></i>
+                        </label>
+                        <input id="layer-name" type="text" required>
+                    </fieldset>
+                    <fieldset class="air">
+                        <legend>
+                            Layer dependencies
+                            <span class="muted">(optional)</span>
+                            <i class="icon-question-sign get-help heading-help" title="Other layers this layer depends upon"></i>
+                        </legend>
+                        <ul class="unstyled configuration-list">
+                            <li>
+                                <a href="" class="layer-info" title="OpenEmbedded | daisy">openembedded-core (meta)</a>
+                                <i class="icon-trash"></i>
+                            </li>
+                        </ul>
+                        <div class="input-append">
+                            <input type="text" autocomplete="off" data-minLength="1" data-autocomplete="off"
+                            data-provide="typeahead"  data-source='
+                []
+                ' placeholder="Type a layer name" id="layer-dependency" class="input-xlarge">
+                            <a class="btn" type="button" id="add-layer-dependency" disabled>
+                                Add layer
+                            </a>
+                        </div>
+                        <span class="help-inline">You can only add layers Toaster knows about</span>
+                    </fieldset>
+                    <div class="form-actions">
+                        <a href="#dependencies-message" class="btn btn-primary btn-large" data-toggle="modal" data-target="#dependencies-message" disabled>Import and add to project</a>
+                        <a href="layer-details-just-imported.html" class="btn btn-large" disabled>Just import for the moment</a>
+                        <span class="help-inline" style="vertical-align: middle;">To import a layer, you need to enter a repository URL, a branch, tag or commit and a layer name</span>
+                    </div>
+                </form>
+
+{% endblock %}
diff --git a/lib/toaster/toastergui/templates/layerdetails.html b/lib/toaster/toastergui/templates/layerdetails.html
new file mode 100644
index 0000000..78dc54b
--- /dev/null
+++ b/lib/toaster/toastergui/templates/layerdetails.html
@@ -0,0 +1,159 @@
+{% extends "baseprojectpage.html" %}
+{% load projecttags %}
+{% load humanize %}
+
+{% block localbreadcrumb %}
+<li>Layer Details</li>
+{% endblock %}
+
+{% block projectinfomain %}
+<div class="page-header">
+    <h1>Layer Details</h1>
+</div>
+
+ <div class="row-fluid span7 tabbable">
+       <ul class="nav nav-pills">
+       <li class="active">
+           <a data-toggle="tab" href="#information">Layer details</a>
+       </li>
+       <li>
+           <a data-toggle="tab" href="#targets">Targets (0)</a>
+       </li>
+       <li>
+           <a data-toggle="tab" href="#machines">Machines (0)</a>
+       </li>
+       <li>
+           <a data-toggle="tab" href="#classes">Classes (0)</a>
+       </li>
+       <li>
+           <a data-toggle="tab" href="#bbappends">bbappends (0)</a>
+       </li>
+       </ul>
+       <div class="tab-content">
+               <div name="information" id="information" class="tab-pane active">
+        <dl class="dl-horizontal">
+        <dt class="">
+            <i class="icon-question-sign get-help" title="Fetch/clone URL of the repository"></i>
+            Repository URL
+        </dt>
+        <dd>
+            <form id="change-repo-form" class="control-group">
+            <div class="input-append">
+            <input type="text" class="input-xlarge" id="type-repo" value="{{layerversion.layer.vcs_url}}">
+            <button id="apply-change-repo" class="btn" type="button">Change</button>
+            <!--a href="#" id="cancel-change-repo" class="btn btn-link">Cancel</a-->
+            </div>
+            <span class="help-block">Cloning this Git repository failed</span>
+            </form>
+        </dd>
+        <dt>
+            <i class="icon-question-sign get-help" title="Subdirectory within the repository where the layer is located, if not in the root (usually only used if the repository contains more than one layer)"></i>
+            Repository subdirectory
+        </dt>
+        <dd>
+            <span id="subdir">{{layerversion.dirpath}}</span>
+            <i id="change-subdir" class="icon-pencil"></i>
+            <i id="delete-subdir" class="icon-trash"></i>
+            <form id="change-subdir-form" style="display:none;">
+            <div class="input-append">
+            <input type="text" id="type-subdir" value="meta-acer">
+            <button id="apply-change-subdir" class="btn" type="button">Change</button>
+            <a href="#" id="cancel-change-subdir" class="btn btn-link">Cancel</a>
+            </div>
+            </form>
+        </dd>
+        <dt>Brach, tag or commit</dt>
+        <dd>
+            {{layerversion.up_branch.name}}
+            <i class="icon-pencil"></i>
+        </dd>
+        <dt>
+            <i class="icon-question-sign get-help" title="The Yocto Project versions with which this layer is compatible. Currently Toaster supports Yocto Project 1.6 and 1.7"></i>
+            Yocto Project compatibility
+        </dt>
+        <dd>
+            <i class="icon-pencil"></i>
+        </dd>
+        <dt>
+            <i class="icon-question-sign get-help" title="Other layers this layer depends upon"></i>
+            Layer dependencies
+        </dt>
+        <dd>
+            <ul class="unstyled">
+            {% for ld in layer.dependencies.all %}
+            <li>
+                <a href="#">openembedded core (meta)</a>
+                <i class="icon-trash"></i>
+            </li>
+            {% endfor %}
+            </ul>
+            <div class="input-append">
+            <input type="text" autocomplete="off" data-minLength="1" data-autocomplete="off"
+            data-provide="typeahead"  data-source='
+            '
+            placeholder="Type a layer name" id="layer-dependency">
+            <a class="btn" type="button" id="add-layer-dependency" disabled>
+            Add layer
+            </a>
+            </div>
+            <span class="help-block">You can only add layers Toaster knows about</span>
+        </dd>
+        </dl>
+        </div>
+        <div name="targets" id="targets" class="tab-pane">
+        <div class="alert alert-info">
+        <strong>There is no target data for {{layerversion.layer.name}} ... yet</strong> <br />
+        Toaster learns about layers as they are built. Once you have used {{layerversion.layer.name}} in a build, Toaster will show you
+        here the targets it provides.
+        </div>
+        </div>
+        <div name="machines" id="machines" class="tab-pane">
+        <div class="alert alert-info">
+        <strong>There is no machine data for {{layerversion.layer.name}} ... yet</strong> <br />
+        Toaster learns about layers as they are built. Once you have used {{layerversion.layer.name}} in a build, Toaster will show you
+        here the machines it provides.
+        </div>
+        </div>
+    </div>
+</div>
+<div class="row span4 well">
+<h2>About {{layerversion.layer.name}}</h2>
+<dl>
+
+    <dt>
+    Summary
+    <i class="icon-question-sign get-help" title="One-line description of the layer"></i>
+    </dt>
+    <dd>
+    <span >{{layerversion.layer.summary}}</span>
+    <i class="icon-pencil"></i>
+    </dd>
+    <!--form>
+    <textarea class="span12" rows="2"></textarea>
+    <button class="btn" type="button">Change</button>
+    <a href="#" class="btn btn-link">Cancel</a>
+    </form-->
+    <dt>
+    Description
+    </dt>
+    <dd>
+    <span >{{layerversion.layer.description}}</span>
+    <i class="icon-pencil"></i>
+    </dd>
+    <!--form>
+    <textarea class="span12" rows="6"></textarea>
+    <button class="btn" type="button">Change</button>
+    <a href="#" class="btn btn-link">Cancel</a>
+    </form-->
+    <dt>
+    Maintainer(s)
+    </dt>
+    <dd>
+    <span class="muted">Not set</span>
+    <i class="icon-pencil"></i>
+    </dd>
+</dl>
+</div>
+
+
+{% endblock %}
diff --git a/lib/toaster/toastergui/templates/layers.html b/lib/toaster/toastergui/templates/layers.html
index bc6e5a3..281b72a 100644
--- a/lib/toaster/toastergui/templates/layers.html
+++ b/lib/toaster/toastergui/templates/layers.html
@@ -33,7 +33,7 @@
 {% include "basetable_top.html" %}
     {% for lv in objects %}
     <tr class="data">
-            <td class="layer">{{lv.layer.name}}</td>
+            <td class="layer"><a href="{% url 'layerdetails' lv.id %}">{{lv.layer.name}}</a></td>
             <td class="description">{{lv.layer.summary}}</td>
             <td class="source"><a href="{% url 'layerdetails' lv.pk %}">{{lv.layer_source.name}}</a></td>
             <td class="git-repo"><a href="{% url 'layerdetails' lv.pk %}"><code>{{lv.layer.layer_index_url}}</code></a></td>
diff --git a/lib/toaster/toastergui/templates/project.html b/lib/toaster/toastergui/templates/project.html
index d7bfa2b..c3a470c 100644
--- a/lib/toaster/toastergui/templates/project.html
+++ b/lib/toaster/toastergui/templates/project.html
@@ -110,22 +110,34 @@ $(document).ready(function () {
 
 
             <div class="well">
-                <!--div class="control-group error"-->
-                    <button id="build-all-button" class="btn btn-primary btn-large">Build all added targets</button>
-                    <div class="input-append build-form controls">
-                        <input class="huge input-xxlarge" placeholder="Or enter the target you want to build" autocomplete="off" data-minlength="1" data-autocomplete="off" data-provide="typeahead" data-source="" type="text">
-                        <button id="build-button" class="btn btn-large" disabled="">Build</button>
+                <form class="build-form">
+                    <div class="input-append input-prepend controls">
+                        <input type="text" class="huge span7" placeholder="Type the target(s) you want to build" autocomplete="off" data-minLength="1" data-autocomplete="off"
+                        data-provide="typeahead"  data-source='["core-image-base [meta | daisy]",
+                        "core-image-clutter [meta | daisy]",
+                        "core-image-directfb [meta | daisy]",
+                        "core-image-myimage [meta-imported-layer | 3e1dbabbf3&hellip;]",
+                        "core-image-anotherimage [meta-imported-layer | master]",
+                        "core-image-full-cmdline [meta | daisy]",
+                        "core-image-lsb [meta | daisy]",
+                        "core-image-lsb-dev [meta | daisy]",
+                        "core-image-lsb-sdk [meta| daisy]",
+                        "core-image-minimal [meta| daisy]"
+                        ]'>
+                        <a href="#" id="build-button" class="btn btn-large btn-primary" disabled>
+                            Build
+                            <i class="icon-question-sign get-help heading-help" style="margin-left: 5px;" title="Type the name of one or more targets you want to build, separated by a space. You can also specify a task by appending a semicolon and a task name to a target name, like so: <code>core-image-minimal:do_build</code>"></i>
+                        </a>
                     </div>
-
-                    <!--span class="help-inline">This target is not provided <br />by any of your added layers
-                        <i class="icon-question-sign get-help get-help-red" title="Review your list of added layers to make sure one of them provides core-image-xyz. Clicking on a layer name will give you all the information Toaster has about the layer"></i>
-                    </span>
-                </div-->
-            </div>
-
-            <div id="meta-tizen-alert" class="alert alert-info lead air" style="display:none;">
-                 <button type="button" class="close" data-dismiss="alert">?</button>
-                You have added <strong>6</strong> layers: <a href="#">meta-tizen</a> and its dependencies (<a href="#">meta-efl</a>, <a href="#">meta-intel</a>, <a href="#">meta-multimedia</a>, <a href="#">meta-oe</a> and <a href="#">meta-ruby</a>).
+                    <p>
+                    <a href="all-targets.html" style="padding-right: 5px;">
+                        View all targets
+                    </a>
+                    |
+                    <a href="{% url 'projectbuilds' project.id%}" style="padding-left:5px;">
+                        View all project builds ({{project.build_set.count}})
+                    </a>
+                </form>
             </div>
 
 
@@ -145,11 +157,11 @@ $(document).ready(function () {
                 </span>
             </div>
             <div class="span2">
-	 {{br.0.get_state_display}}
+     {{br.0.get_state_display}}
             </div>
-	    <div class="span8">
+        <div class="span8">
 {% if br.state == br.REQ_FAILED%}
-	{% for bre in br.0.brerror_set.all %} {{bre.errmsg}} ({{bre.errtype}}) <br/><hr/><code>{{bre.traceback}}</code>{%endfor%}
+    {% for bre in br.0.brerror_set.all %} {{bre.errmsg}} ({{bre.errtype}}) <br/><hr/><code>{{bre.traceback}}</code>{%endfor%}
 {%endif%}
             </div>
 
@@ -224,14 +236,14 @@ $(document).ready(function () {
                         <div id="dependency-alert" class="alert alert-info" style="display:none;">
                             <p><strong>meta-tizen</strong> depends on the layers below. Check the ones you want to add: </p>
                             <ul class="unstyled">
-	{% for f in layer_dependency %}
+    {% for f in layer_dependency %}
                                 <li>
                                     <label class="checkbox">
                                         <input checked="checked" type="checkbox">
                                         meta-ruby
                                     </label>
                                 </li>
-	{% endfor %}
+    {% endfor %}
                             </ul>
                             <button id="add-layer-dependencies" class="btn btn-info add-layer">Add layers</button>
                         </div>
@@ -278,9 +290,9 @@ $(document).ready(function () {
             {% if target %}
                         <li>
                             <a href="#">{{target.target}}{% if target.task%} (target.task){%endif%}</a>
-			    {% if target.notprovided %}
+                {% if target.notprovided %}
                             <i title="" data-original-title="" id="msg1" class="icon-exclamation-sign get-help-yellow" data-title="<strong>Target may not be provided</strong>" data-content="From the layer information it currently has, Toaster thinks this target is not provided by any of your added layers. If a target is not provided by one of your added layers, the build will fail.<h5>What Toaster suggests</h5><p>The <a href='#'>meta-abc</a> and <a href='#'>meta-efg</a> layers provide core-image-notprovided. You could add one of them to your project.</p><button class='btn btn-block'>Add meta-abc</button><button class='btn btn-block'>Add meta-efg</button><button id='dismiss1' class='btn btn-block btn-info'>Stop showing this message</button>"></i>
-		            {% elif target.notknown %}
+                    {% elif target.notknown %}
                             <i title="" data-original-title="" id="msg2" class="icon-exclamation-sign get-help-yellow" data-title="<strong>Target may not be provided</strong>" data-content="From the layer information it currently has, Toaster thinks this target is not provided by any of your added layers. If a target is not provided by one of your added layers, the build will fail.<h5>What Toaster suggests</h5><p>Review your added layers to make sure one of them provides core-image-unknown. Clicking on a layer name will give you all the information Toaster has about the layer. </p> <button class='btn btn-block btn-info'>Stop showing this message</button>"></i>
                             {% endif %}
                             <i title="" data-original-title="" class="icon-trash" id="del-target-icon" x-data="{{target.pk}}"></i>
@@ -347,7 +359,7 @@ $(document).ready(function () {
                 </p>
                 <h3>Yocto Project version</h3>
                 <p class="lead">
-                    {{project.release}} - {{project.short_description}}
+                    {{project.release.name}} - {{project.release.description}}
                     <i title="" data-original-title="" class="icon-pencil"></i>
                 </p>
             </div>
diff --git a/lib/toaster/toastergui/templates/projectbuilds.html b/lib/toaster/toastergui/templates/projectbuilds.html
new file mode 100644
index 0000000..8c5942c
--- /dev/null
+++ b/lib/toaster/toastergui/templates/projectbuilds.html
@@ -0,0 +1,59 @@
+{% extends "baseprojectpage.html" %}
+{% load projecttags %}
+{% load humanize %}
+
+{% block localbreadcrumb %}
+<li>Project builds</li>
+{% endblock %}
+
+{% block projectinfomain %}
+                <div class="page-header">
+                    <h1>
+                        All builds
+                        <i class="icon-question-sign get-help heading-help" title="This page lists all the layers compatible with Yocto Project 1.7 'Dxxxx' that Toaster knows about. They include community-created layers suitable for use on top of OpenEmbedded Core and any layers you have imported"></i>
+                     </h1>
+                </div>
+                <!--div class="alert">
+                    <div class="input-append" style="margin-bottom:0px;">
+                        <input class="input-xxlarge" type="text" placeholder="Search layers" value="browser" />
+                        <a class="add-on btn">
+                            <i class="icon-remove"></i>
+                        </a>
+                        <button class="btn" type="button">Search</button>
+                        <a class="btn btn-link" href="#">Show all layers</a>
+                    </div>
+                </div-->
+                <div id="layer-added" class="alert alert-info lead" style="display:none;"></div>
+                <div id="layer-removed" class="alert alert-info lead" style="display:none;">
+                    <button type="button" class="close" data-dismiss="alert">&times;</button>
+                    <strong>1</strong> layer deleted from <a href="project-with-targets.html">your project</a>: <a href="#">meta-aarch64</a>
+                </div>
+
+
+{% include "basetable_top.html" %}
+    {% for build in objects %}
+        <tr class="data">
+            <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></td>
+            <td class="target">{% for t in build.target_set.all %} <a href="{% url "builddashboard" build.id %}"> {{t.target}} </a> <br />{% endfor %}</td>
+            <td class="machine"><a href="{% url "builddashboard" build.id %}">{{build.machine}}</a></td>
+            <td class="started_on"><a href="{% url "builddashboard" build.id %}">{{build.started_on|date:"d/m/y H:i"}}</a></td>
+            <td class="completed_on"><a href="{% url "builddashboard" build.id %}">{{build.completed_on|date:"d/m/y H:i"}}</a></td>
+            <td class="failed_tasks error">{% query build.task_build outcome=4 order__gt=0 as exectask%}{% if exectask.count == 1 %}<a href="{% url "task" build.id exectask.0.id %}">{{exectask.0.recipe.name}}.{{exectask.0.task_name}}</a>{% elif exectask.count > 1%}<a href="{% url "tasks" build.id %}?filter=outcome%3A4">{{exectask.count}}</a>{%endif%}</td>
+            <td class="errors_no">{% if  build.errors_no %}<a class="errors_no error" href="{% url "builddashboard" build.id %}#errors">{{build.errors_no}} error{{build.errors_no|pluralize}}</a>{%endif%}</td>
+            <td class="warnings_no">{% if  build.warnings_no %}<a class="warnings_no warning" href="{% url "builddashboard" build.id %}#warnings">{{build.warnings_no}} warning{{build.warnings_no|pluralize}}</a>{%endif%}</td>
+            <td class="time"><a href="{% url "buildtime" build.id %}">{{build.timespent|sectohms}}</a></td>
+            <td class="log">{{build.cooker_log_path}}</td>
+            <td class="output">
+              {% if build.outcome == build.SUCCEEDED %}
+              <a href="{%url "builddashboard" build.id%}#images">{{fstypes|get_dict_value:build.id}}</a>
+              {% endif %}
+            </td>
+        </tr>
+
+    {% endfor %}
+{% include "basetable_bottom.html" %}
+
+    <!-- Modals -->
+
+
+{% endblock %}
diff --git a/lib/toaster/toastergui/templates/projectconf.html b/lib/toaster/toastergui/templates/projectconf.html
new file mode 100644
index 0000000..e8b0c39
--- /dev/null
+++ b/lib/toaster/toastergui/templates/projectconf.html
@@ -0,0 +1,62 @@
+{% extends "baseprojectpage.html" %}
+{% load projecttags %}
+{% load humanize %}
+
+{% block localbreadcrumb %}
+<li>Project configuration</li>
+{% endblock %}
+
+{% block projectinfomain %}
+    <div class="page-header">
+        <h1>Configuration Variables</h1>
+    </div>
+
+    <div style="padding-left:19px;">
+
+        <dl class="dl-vertical">
+        {% for c in configvars %}
+            <dt>
+                {{c.name}}
+                <i class="icon-question-sign get-help" title="{{c.desc}}"></i>
+            </dt>
+            <dd class="lead">
+                <span id="distro">{{c.value}}</span>
+                <i class="icon-pencil" id="change-distro-icon"></i>
+                <form id="change-distro-form" style="display:none;">
+                    <div class="input-append">
+                        <input type="text" id="new-distro" value="poky tiny">
+                        <button id="apply-change-distro" class="btn" type="button">Save</button>
+                        <button id="cancel-change-distro" type="button" class="btn btn-link">Cancel</button>
+                    </div>
+                </form>
+            </dd>
+        {% endfor %}
+
+
+        </dl>
+        <form id="variable-form">
+            <fieldset style="padding-left:0px;">
+                <legend>Add variable</legend>
+                <label>
+                    Variable
+                    <i class="icon-question-sign get-help" title="Variable names are case sensitive, cannot have spaces, and can only include letters, numbers, underscores and dashes"></i>
+                </label>
+                <input id="variable" type="text" placeholder="Type variable name">
+                <label>Value</label>
+                <input id="value" type="text" placeholder="Type variable value">
+                <div style="display:block;margin-top:10px;">
+                    <a href="#" class="btn save" disabled>
+                        Add variable
+                    </a>
+                </div>
+            </fieldset>
+        </form>
+        <!--button id="add-variable" class="btn air">
+            <i class="icon-plus"></i>
+            Add variable
+        </button-->
+
+    </div>
+
+
+{% endblock %}
diff --git a/lib/toaster/toastergui/urls.py b/lib/toaster/toastergui/urls.py
index 30f0063..a9c0592 100644
--- a/lib/toaster/toastergui/urls.py
+++ b/lib/toaster/toastergui/urls.py
@@ -76,7 +76,7 @@ urlpatterns = patterns('toastergui.views',
 
         url(r'^project/(?P<pid>\d+)/$', 'project', name='project'),
         url(r'^project/(?P<pid>\d+)/configuration$', 'projectconf', name='projectconf'),
-        url(r'^project/(?P<pid>\d+)/builds$', 'projectbuilds', name='projectbuild'),
+        url(r'^project/(?P<pid>\d+)/builds$', 'projectbuilds', name='projectbuilds'),
 
         url(r'^xhr_projectbuild/(?P<pid>\d+)/$', 'xhr_projectbuild', name='xhr_projectbuild'),
         url(r'^xhr_projectedit/(?P<pid>\d+)/$', 'xhr_projectedit', name='xhr_projectedit'),
diff --git a/lib/toaster/toastergui/views.py b/lib/toaster/toastergui/views.py
index 167b687..13788b0 100755
--- a/lib/toaster/toastergui/views.py
+++ b/lib/toaster/toastergui/views.py
@@ -903,7 +903,7 @@ def tasks_common(request, build_id, variant, task_anchor):
     retval = _verify_parameters( request.GET, mandatory_parameters )
     if retval:
         if task_anchor:
-	        mandatory_parameters['anchor']=task_anchor
+            mandatory_parameters['anchor']=task_anchor
         return _redirect_parameters( variant, request.GET, mandatory_parameters, build_id = build_id)
     (filter_string, search_term, ordering_string) = _search_tuple(request, Task)
     queryset_all = Task.objects.filter(build=build_id).exclude(order__isnull=True).exclude(outcome=Task.OUTCOME_NA)
@@ -917,19 +917,19 @@ def tasks_common(request, build_id, variant, task_anchor):
     else:
         queryset = _get_queryset(Task, queryset_all, filter_string, search_term, ordering_string, 'order')
 
-	# compute the anchor's page
+    # compute the anchor's page
     if anchor:
-	    request.GET = request.GET.copy()
+        request.GET = request.GET.copy()
         del request.GET['anchor']
         i=0
         a=int(anchor)
-		count_per_page=int(request.GET.get('count', 100))
+        count_per_page=int(request.GET.get('count', 100))
         for task in queryset.iterator():
             if a == task.order:
-				new_page= (i / count_per_page ) + 1
-				request.GET.__setitem__('page', new_page)
-				mandatory_parameters['page']=new_page
-				return _redirect_parameters( variant, request.GET, mandatory_parameters, build_id = build_id)
+                new_page= (i / count_per_page ) + 1
+                request.GET.__setitem__('page', new_page)
+                mandatory_parameters['page']=new_page
+                return _redirect_parameters( variant, request.GET, mandatory_parameters, build_id = build_id)
             i += 1
 
     tasks = _build_page_range(Paginator(queryset, request.GET.get('count', 100)),request.GET.get('page', 1))
@@ -1917,10 +1917,12 @@ if toastermain.settings.MANAGED:
             return HttpResponse(json.dumps({"error":str(e) + "\n" + traceback.format_exc()}), content_type = "application/json")
 
     def importlayer(request):
-        raise Exception("TODO: implement page #6595")
+        template = "importlayer.html"
+        context = {
+        }
+        return render(request, template, context)
 
     def layers(request):
-        # "TODO: implement page #6590"
         template = "layers.html"
         # define here what parameters the view needs in the GET portion in order to
         # be able to display something.  'count' and 'page' are mandatory for all views
@@ -2000,7 +2002,11 @@ if toastermain.settings.MANAGED:
         return render(request, template, context)
 
     def layerdetails(request, layerid):
-        raise Exception("TODO: implement page #6591")
+        template = "layerdetails.html"
+        context = {
+            'layerversion': Layer_Version.objects.get(pk = layerid),
+        }
+        return render(request, template, context)
 
     def targets(request):
         template = "targets.html"
@@ -2159,11 +2165,171 @@ if toastermain.settings.MANAGED:
         return render(request, template, context)
 
     def projectconf(request, pid):
-        raise Exception("TODO: implement page #6588")
+        template = "projectconf.html"
+        context = {
+            'configvars': ProjectVariable.objects.filter(project_id = pid),
+        }
+        return render(request, template, context)
 
     def projectbuilds(request, pid):
-        raise Exception("TODO: implement page #6589")
+        template = 'projectbuilds.html'
+        # define here what parameters the view needs in the GET portion in order to
+        # be able to display something.  'count' and 'page' are mandatory for all views
+        # that use paginators.
+        mandatory_parameters = { 'count': 10,  'page' : 1, 'orderby' : 'completed_on:-' };
+        retval = _verify_parameters( request.GET, mandatory_parameters )
 
+        # boilerplate code that takes a request for an object type and returns a queryset
+        # for that object type. copypasta for all needed table searches
+        (filter_string, search_term, ordering_string) = _search_tuple(request, Build)
+        queryset_all = Build.objects.all.exclude(outcome = Build.IN_PROGRESS)
+        queryset_with_search = _get_queryset(Build, queryset_all, None, search_term, ordering_string, '-completed_on')
+        queryset = _get_queryset(Build, queryset_all, filter_string, search_term, ordering_string, '-completed_on')
+
+        # retrieve the objects that will be displayed in the table; builds a paginator and gets a page range to display
+        build_info = _build_page_range(Paginator(queryset, request.GET.get('count', 10)),request.GET.get('page', 1))
+
+
+        # set up list of fstypes for each build
+        fstypes_map = {};
+        for build in build_info:
+            targets = Target.objects.filter( build_id = build.id )
+            comma = "";
+            extensions = "";
+            for t in targets:
+                if ( not t.is_image ):
+                    continue
+                tif = Target_Image_File.objects.filter( target_id = t.id )
+                for i in tif:
+                    s=re.sub('.*tar.bz2', 'tar.bz2', i.file_name)
+                    if s == i.file_name:
+                        s=re.sub('.*\.', '', i.file_name)
+                    if None == re.search(s,extensions):
+                        extensions += comma + s
+                        comma = ", "
+            fstypes_map[build.id]=extensions
+
+        # send the data to the template
+        context = {
+                    'objects' : build_info,
+                    'objectname' : "builds",
+                    'default_orderby' : 'completed_on:-',
+                    'fstypes' : fstypes_map,
+                    'search_term' : search_term,
+                    'total_count' : queryset_with_search.count(),
+                # Specifies the display of columns for the table, appearance in "Edit columns" box, toggling default show/hide, and specifying filters for columns
+                    'tablecols' : [
+                    {'name': 'Outcome',                                                # column with a single filter
+                     'qhelp' : "The outcome tells you if a build successfully completed or failed",     # the help button content
+                     'dclass' : "span2",                                                # indication about column width; comes from the design
+                     'orderfield': _get_toggle_order(request, "outcome"),               # adds ordering by the field value; default ascending unless clicked from ascending into descending
+                     'ordericon':_get_toggle_order_icon(request, "outcome"),
+                      # filter field will set a filter on that column with the specs in the filter description
+                      # the class field in the filter has no relation with clclass; the control different aspects of the UI
+                      # still, it is recommended for the values to be identical for easy tracking in the generated HTML
+                     'filter' : {'class' : 'outcome',
+                                 'label': 'Show:',
+                                 'options' : [
+                                             ('Successful builds', 'outcome:' + str(Build.SUCCEEDED), queryset_with_search.filter(outcome=str(Build.SUCCEEDED)).count()),  # this is the field search expression
+                                             ('Failed builds', 'outcome:'+ str(Build.FAILED), queryset_with_search.filter(outcome=str(Build.FAILED)).count()),
+                                             ]
+                                }
+                    },
+                    {'name': 'Target',                                                 # default column, disabled box, with just the name in the list
+                     'qhelp': "This is the build target or build targets (i.e. one or more recipes or image recipes)",
+                     'orderfield': _get_toggle_order(request, "target__target"),
+                     'ordericon':_get_toggle_order_icon(request, "target__target"),
+                    },
+                    {'name': 'Machine',
+                     'qhelp': "The machine is the hardware for which you are building a recipe or image recipe",
+                     'orderfield': _get_toggle_order(request, "machine"),
+                     'ordericon':_get_toggle_order_icon(request, "machine"),
+                     'dclass': 'span3'
+                    },                           # a slightly wider column
+                    {'name': 'Started on', 'clclass': 'started_on', 'hidden' : 1,      # this is an unchecked box, which hides the column
+                     'qhelp': "The date and time you started the build",
+                     'orderfield': _get_toggle_order(request, "started_on", True),
+                     'ordericon':_get_toggle_order_icon(request, "started_on"),
+                     'filter' : {'class' : 'started_on',
+                                 'label': 'Show:',
+                                 'options' : [
+                                             ("Today's builds" , 'started_on__gte:'+timezone.now().strftime("%Y-%m-%d"), queryset_with_search.filter(started_on__gte=timezone.now()).count()),
+                                             ("Yesterday's builds", 'started_on__gte:'+(timezone.now()-timedelta(hours=24)).strftime("%Y-%m-%d"), queryset_with_search.filter(started_on__gte=(timezone.now()-timedelta(hours=24))).count()),
+                                             ("This week's builds", 'started_on__gte:'+(timezone.now()-timedelta(days=7)).strftime("%Y-%m-%d"), queryset_with_search.filter(started_on__gte=(timezone.now()-timedelta(days=7))).count()),
+                                             ]
+                                }
+                    },
+                    {'name': 'Completed on',
+                     'qhelp': "The date and time the build finished",
+                     'orderfield': _get_toggle_order(request, "completed_on", True),
+                     'ordericon':_get_toggle_order_icon(request, "completed_on"),
+                     'orderkey' : 'completed_on',
+                     'filter' : {'class' : 'completed_on',
+                                 'label': 'Show:',
+                                 'options' : [
+                                             ("Today's builds", 'completed_on__gte:'+timezone.now().strftime("%Y-%m-%d"), queryset_with_search.filter(completed_on__gte=timezone.now()).count()),
+                                             ("Yesterday's builds", 'completed_on__gte:'+(timezone.now()-timedelta(hours=24)).strftime("%Y-%m-%d"), queryset_with_search.filter(completed_on__gte=(timezone.now()-timedelta(hours=24))).count()),
+                                             ("This week's builds", 'completed_on__gte:'+(timezone.now()-timedelta(days=7)).strftime("%Y-%m-%d"), queryset_with_search.filter(completed_on__gte=(timezone.now()-timedelta(days=7))).count()),
+                                             ]
+                                }
+                    },
+                    {'name': 'Failed tasks', 'clclass': 'failed_tasks',                # specifing a clclass will enable the checkbox
+                     'qhelp': "How many tasks failed during the build",
+                     'filter' : {'class' : 'failed_tasks',
+                                 'label': 'Show:',
+                                 'options' : [
+                                             ('Builds with failed tasks', 'task_build__outcome:4', queryset_with_search.filter(task_build__outcome=4).count()),
+                                             ('Builds without failed tasks', 'task_build__outcome:NOT4', queryset_with_search.filter(~Q(task_build__outcome=4)).count()),
+                                             ]
+                                }
+                    },
+                    {'name': 'Errors', 'clclass': 'errors_no',
+                     'qhelp': "How many errors were encountered during the build (if any)",
+                     'orderfield': _get_toggle_order(request, "errors_no", True),
+                     'ordericon':_get_toggle_order_icon(request, "errors_no"),
+                     'orderkey' : 'errors_no',
+                     'filter' : {'class' : 'errors_no',
+                                 'label': 'Show:',
+                                 'options' : [
+                                             ('Builds with errors', 'errors_no__gte:1', queryset_with_search.filter(errors_no__gte=1).count()),
+                                             ('Builds without errors', 'errors_no:0', queryset_with_search.filter(errors_no=0).count()),
+                                             ]
+                                }
+                    },
+                    {'name': 'Warnings', 'clclass': 'warnings_no',
+                     'qhelp': "How many warnings were encountered during the build (if any)",
+                     'orderfield': _get_toggle_order(request, "warnings_no", True),
+                     'ordericon':_get_toggle_order_icon(request, "warnings_no"),
+                     'orderkey' : 'warnings_no',
+                     'filter' : {'class' : 'warnings_no',
+                                 'label': 'Show:',
+                                 'options' : [
+                                             ('Builds with warnings','warnings_no__gte:1', queryset_with_search.filter(warnings_no__gte=1).count()),
+                                             ('Builds without warnings','warnings_no:0', queryset_with_search.filter(warnings_no=0).count()),
+                                             ]
+                                }
+                    },
+                    {'name': 'Time', 'clclass': 'time', 'hidden' : 1,
+                     'qhelp': "How long it took the build to finish",
+                     'orderfield': _get_toggle_order(request, "timespent", True),
+                     'ordericon':_get_toggle_order_icon(request, "timespent"),
+                     'orderkey' : 'timespent',
+                    },
+                    {'name': 'Log',
+                     'dclass': "span4",
+                     'qhelp': "Path to the build main log file",
+                     'clclass': 'log', 'hidden': 1,
+                     'orderfield': _get_toggle_order(request, "cooker_log_path"),
+                     'ordericon':_get_toggle_order_icon(request, "cooker_log_path"),
+                     'orderkey' : 'cooker_log_path',
+                    },
+                    {'name': 'Output', 'clclass': 'output',
+                     'qhelp': "The root file system types produced by the build. You can find them in your <code>/build/tmp/deploy/images/</code> directory",
+                    },
+                    ]
+                }
+
+        return render(request, template, context)
 else:
     # these are pages that are NOT available in interactive mode
     def managedcontextprocessor(request):
-- 
1.9.1



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

end of thread, other threads:[~2014-08-29 15:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-29 15:41 [PATCH 0/2] add pages for Toaster project views Alex DAMIAN
2014-08-29 15:41 ` [PATCH 1/2] toaster: add project pages for machines, targets, layers Alex DAMIAN
2014-08-29 15:42 ` [PATCH 2/2] toastergui: added pages for project details Alex DAMIAN

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox