Patchwork [bitbake-devel,71/94] bitbake: webhob: add navigation links Simple interface

login
register
mail settings
Submitter Alexandru DAMIAN
Date Sept. 24, 2013, 4:52 p.m.
Message ID <be46d5f7739973c711fd4ea8f397ee8f76302ad6.1380041477.git.alexandru.damian@intel.com>
Download mbox | patch
Permalink /patch/58761/
State New
Headers show

Comments

Alexandru DAMIAN - Sept. 24, 2013, 4:52 p.m.
From: Alexandru DAMIAN <alexandru.damian@intel.com>

Adding a couple of navigation links on top of pages
so that we provide easier movement between pages and
a bit more context.

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
---
 bitbake/lib/webhob/bldviewer/templates/build.html         | 2 +-
 bitbake/lib/webhob/bldviewer/templates/configuration.html | 1 +
 bitbake/lib/webhob/bldviewer/templates/package.html       | 1 +
 bitbake/lib/webhob/bldviewer/templates/recipe.html        | 3 +++
 bitbake/lib/webhob/bldviewer/templates/task.html          | 1 +
 bitbake/lib/webhob/bldviewer/views.py                     | 6 ++++--
 6 files changed, 11 insertions(+), 3 deletions(-)

Patch

diff --git a/bitbake/lib/webhob/bldviewer/templates/build.html b/bitbake/lib/webhob/bldviewer/templates/build.html
index 53271a7..bbd283e 100644
--- a/bitbake/lib/webhob/bldviewer/templates/build.html
+++ b/bitbake/lib/webhob/bldviewer/templates/build.html
@@ -24,7 +24,7 @@ 
         </tr>
         {% for build in builds %}
         <tr class="data">
-            <td><a href="/simple/build/{{build.id}}/task/">{{build.get_outcome_display}}</a></td>
+            <td><a href="/simple/build/{{build.id}}/configuration/">{{build.get_outcome_display}}</a></td>
             <td>{{build.started_on}}</td>
             <td>{{build.completed_on}}</td>
             <td>{{build.target}}</td>
diff --git a/bitbake/lib/webhob/bldviewer/templates/configuration.html b/bitbake/lib/webhob/bldviewer/templates/configuration.html
index 2f197c0..4db4765 100644
--- a/bitbake/lib/webhob/bldviewer/templates/configuration.html
+++ b/bitbake/lib/webhob/bldviewer/templates/configuration.html
@@ -2,6 +2,7 @@ 
 
 {% block pagename %}
 <ul class="nav nav-tabs" style="display: inline-block">
+  <li><a>Build {{build}} : </a></li>
   <li><a href="/simple/build/{{build}}/task/"> Tasks </a></li>
   <li><a href="/simple/build/{{build}}/package/"> Package </a> </li>
   <li><a href="/simple/build/{{build}}/configuration/"> Configuration </a> </li>
diff --git a/bitbake/lib/webhob/bldviewer/templates/package.html b/bitbake/lib/webhob/bldviewer/templates/package.html
index 339b411..b4091c6 100644
--- a/bitbake/lib/webhob/bldviewer/templates/package.html
+++ b/bitbake/lib/webhob/bldviewer/templates/package.html
@@ -2,6 +2,7 @@ 
 
 {% block pagename %}
 <ul class="nav nav-tabs" style="display: inline-block">
+  <li><a>Build {{build}} : </a></li>
   <li><a href="/simple/build/{{build}}/task/"> Tasks </a></li>
   <li><a href="/simple/build/{{build}}/package/"> Package </a> </li>
   <li><a href="/simple/build/{{build}}/configuration/"> Configuration </a> </li>
diff --git a/bitbake/lib/webhob/bldviewer/templates/recipe.html b/bitbake/lib/webhob/bldviewer/templates/recipe.html
index e855625..32fcdb8 100644
--- a/bitbake/lib/webhob/bldviewer/templates/recipe.html
+++ b/bitbake/lib/webhob/bldviewer/templates/recipe.html
@@ -1,6 +1,9 @@ 
 {% extends "basetable.html" %}
 
 {% block pagename %}
+<ul class="nav nav-tabs" style="display: inline-block">
+  <li><a>Layer  {{layer_version.layer.name}}&nbsp;:&nbsp;{{layer_version.branch}}&nbsp;:&nbsp;{{layer_version.commit}}</a></li>
+</ul>
     <h1>Toaster - Recipes for a Layer</h1>
 {% endblock %}
 
diff --git a/bitbake/lib/webhob/bldviewer/templates/task.html b/bitbake/lib/webhob/bldviewer/templates/task.html
index 4939531..9736b4a 100644
--- a/bitbake/lib/webhob/bldviewer/templates/task.html
+++ b/bitbake/lib/webhob/bldviewer/templates/task.html
@@ -2,6 +2,7 @@ 
 
 {% block pagename %}
 <ul class="nav nav-tabs" style="display: inline-block">
+  <li><a>Build {{build}} : </a></li>
   <li><a href="/simple/build/{{build}}/task/"> Tasks </a></li>
   <li><a href="/simple/build/{{build}}/package/"> Package </a> </li>
   <li><a href="/simple/build/{{build}}/configuration/"> Configuration </a> </li>
diff --git a/bitbake/lib/webhob/bldviewer/views.py b/bitbake/lib/webhob/bldviewer/views.py
index 77be08b..cb7cfc7 100644
--- a/bitbake/lib/webhob/bldviewer/views.py
+++ b/bitbake/lib/webhob/bldviewer/views.py
@@ -12,7 +12,7 @@  def build(request):
     build_info = Build.objects.all()
     logs = LogMessage.objects.all()
 
-    context = {'builds': build_info, 'logs': logs , 
+    context = {'builds': build_info, 'logs': logs ,
         'hideshowcols' : [
                 {'name': 'Output', 'order':10},
                 {'name': 'Log', 'order':11},
@@ -76,7 +76,9 @@  def layer_versions_recipes(request, layerversion_id):
     template = 'recipe.html'
     recipes = Recipe.objects.filter(layer_version__id = layerversion_id)
 
-    context = {'recipes': recipes}
+    context = {'recipes': recipes,
+            'layer_version' : Layer_Version.objects.filter( id = layerversion_id )[0]
+    }
 
     return render(request, template, context)