Patchwork [bitbake-devel,66/94] bitbake: webhob: refactor Simple web interface

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

Comments

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

We're refactoring the inheritance model and code
placement in the Simple interface as to bring the
search functionality and column selection to all
table-based pages.

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
---
 bitbake/lib/webhob/bldviewer/templates/base.html    | 15 ++++++++++++++-
 bitbake/lib/webhob/bldviewer/templates/build.html   | 17 +++++------------
 bitbake/lib/webhob/bldviewer/templates/layer.html   |  6 ++++--
 bitbake/lib/webhob/bldviewer/templates/package.html | 12 +++++++-----
 bitbake/lib/webhob/bldviewer/templates/recipe.html  |  6 ++++--
 bitbake/lib/webhob/bldviewer/templates/task.html    |  6 ++++--
 6 files changed, 38 insertions(+), 24 deletions(-)

Patch

diff --git a/bitbake/lib/webhob/bldviewer/templates/base.html b/bitbake/lib/webhob/bldviewer/templates/base.html
index 12b2f01..0d24d36 100644
--- a/bitbake/lib/webhob/bldviewer/templates/base.html
+++ b/bitbake/lib/webhob/bldviewer/templates/base.html
@@ -36,8 +36,21 @@  function filterTableRows(test) {
 
 <div>Menu: <a href="/simple/build/">All Builds</a>&nbsp;|&nbsp;<a href="/simple/layer/">All Layers</a>
 </div>
-{% block pagecontent %}
 
+{% block pagename %}
+{% endblock %}
+
+<div style="padding-top:1em ;padding-bottom: 1em">
+<div align="left" style="display:inline-block; width: 49%"> Search: <input type="search" id="filterstring" style="width: 30em" onkeyup="filterTableRows($('#filterstring').val())" autocomplete="off">
+</div>
+<div align="right" style="display: inline-block; width: 49%">Show/Hide columns:
+{% for i in hideshowcols %}
+    <span>{{i.name}} <input type="checkbox" id="ct{{i.name}}" onchange="showhideTableColumn({{i.order}}, $('#ct{{i.name}}').is(':checked'))" checked autocomplete="off"></span> |
+{% endfor %}
+</div>
+</div>
+
+{% block pagetable %}
 {% endblock %}
 </body>
 </html>
diff --git a/bitbake/lib/webhob/bldviewer/templates/build.html b/bitbake/lib/webhob/bldviewer/templates/build.html
index 5db72db..2828404 100644
--- a/bitbake/lib/webhob/bldviewer/templates/build.html
+++ b/bitbake/lib/webhob/bldviewer/templates/build.html
@@ -1,17 +1,10 @@ 
 {% extends "base.html" %}
 
-{% block pagecontent %}
-    <h1>WebHob Builds</h1>
-
-<div style="padding-top:1em ;padding-bottom: 1em">
-<div align="left" style="display:inline-block; width: 49%"> Search: <input type="search" id="filterstring" style="width: 30em" onkeyup="filterTableRows($('#filterstring').val())" autocomplete="off">
-</div>
-<div align="right" style="display: inline-block; width: 49%">Show/Hide columns:
-{% for i in hideshowcols %}
-    <span>{{i.name}} <input type="checkbox" id="ct{{i.name}}" onchange="showhideTableColumn({{i.order}}, $('#ct{{i.name}}').is(':checked'))" checked autocomplete="off"></span> |
-{% endfor %}
-</div>
-</div>
+{% block pagename %}
+    <h1>Toaster - Builds</h1>
+{% endblock %}
+
+{% block pagetable %}
     <table border="1">
     {% load projecttags %}
 
diff --git a/bitbake/lib/webhob/bldviewer/templates/layer.html b/bitbake/lib/webhob/bldviewer/templates/layer.html
index 9d44f17..0ffdaba 100644
--- a/bitbake/lib/webhob/bldviewer/templates/layer.html
+++ b/bitbake/lib/webhob/bldviewer/templates/layer.html
@@ -1,8 +1,10 @@ 
 {% extends "base.html" %}
 
-{% block pagecontent %}
-    <h1>WebHob Layers</h1>
+{% block pagename %}
+    <h1>Toaster - Layers</h1>
+{% endblock %}
 
+{% block pagetable %}
     <table border="1">
 
     {% load projecttags %}
diff --git a/bitbake/lib/webhob/bldviewer/templates/package.html b/bitbake/lib/webhob/bldviewer/templates/package.html
index d1259e9..e7856ba 100644
--- a/bitbake/lib/webhob/bldviewer/templates/package.html
+++ b/bitbake/lib/webhob/bldviewer/templates/package.html
@@ -1,8 +1,10 @@ 
 {% extends "base.html" %}
 
-{% block pagecontent %}
-    <h1>WebHob Packages</h1>
+{% block pagename %}
+    <h1>Toaster - Packages</h1>
+{% endblock %}
 
+{% block pagetable %}
     {% if not packages %}
         <p>No packages were build in this build!</p>
     {% else %}
@@ -29,11 +31,11 @@ 
             <div style="height: 3em; overflow:auto">
                     {% for d in package.depends_on %}
                     <a href="#{{d.name}}">{{d.name}}</a><br/>
-                    {% endfor %} 
+                    {% endfor %}
             </div>
                 </td>
-            
-            {% endfor %}        
+
+            {% endfor %}
 
         </table>
 
diff --git a/bitbake/lib/webhob/bldviewer/templates/recipe.html b/bitbake/lib/webhob/bldviewer/templates/recipe.html
index 5ebd880..0c9c077 100644
--- a/bitbake/lib/webhob/bldviewer/templates/recipe.html
+++ b/bitbake/lib/webhob/bldviewer/templates/recipe.html
@@ -1,8 +1,10 @@ 
 {% extends "base.html" %}
 
-{% block pagecontent %}
-    <h1>WebHob Recipes for a Layer</h1>
+{% block pagename %}
+    <h1>Toaster - Recipes for a Layer</h1>
+{% endblock %}
 
+{% block pagetable %}
     <table border="1">
 
     {% load projecttags %}
diff --git a/bitbake/lib/webhob/bldviewer/templates/task.html b/bitbake/lib/webhob/bldviewer/templates/task.html
index d87d261..0ed5f9d 100644
--- a/bitbake/lib/webhob/bldviewer/templates/task.html
+++ b/bitbake/lib/webhob/bldviewer/templates/task.html
@@ -1,8 +1,10 @@ 
 {% extends "base.html" %}
 
-{% block pagecontent %}
-    <h1>WebHob Tasks</h1>
+{% block pagename %}
+    <h1>Toaster - Tasks</h1>
+{% endblock %}
 
+{% block pagetable %}
     {% if not tasks %}
         <p>No tasks were executed in this build!</p>
     {% else %}