[bitbake-devel] [PATCH 62/94] bitbake: webhob: add toggle column functionality to build page

Alex DAMIAN alexandru.damian at intel.com
Tue Sep 24 16:52:31 UTC 2013


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

We add demo toggle column functionality for the Simple interface,
webhob builds page.

Signed-off-by: Alexandru DAMIAN <alexandru.damian at intel.com>
---
 bitbake/lib/webhob/bldviewer/templates/base.html  | 15 +++++++++++++++
 bitbake/lib/webhob/bldviewer/templates/build.html |  6 ++++++
 bitbake/lib/webhob/bldviewer/views.py             |  3 ++-
 3 files changed, 23 insertions(+), 1 deletion(-)

diff --git a/bitbake/lib/webhob/bldviewer/templates/base.html b/bitbake/lib/webhob/bldviewer/templates/base.html
index ab3c3b7..3f056a0 100644
--- a/bitbake/lib/webhob/bldviewer/templates/base.html
+++ b/bitbake/lib/webhob/bldviewer/templates/base.html
@@ -3,9 +3,24 @@
 <html>
 	<head>
 		<title>WebHob Simple Explorer</title>
+<script src="/static/js/jquery-2.0.3.js">
+</script>
+<script src="/static/js/bootstrap.js">
+</script>
+<link href="/static/css/bootstrap.css" rel="stylesheet" type="text/css">
 	</head>
 
 <body>
+<script>
+function showhideTableColumn(i, sh) {
+    if (sh)
+        $('td:nth-child('+i+'),th:nth-child('+i+')').show();
+    else
+        $('td:nth-child('+i+'),th:nth-child('+i+')').hide();
+g
+}
+</script>
+
 <div>Menu: <a href="/simple/build/">All Builds</a>&nbsp;|&nbsp;<a href="/simple/layer/">All Layers</a>
 </div>
 {% block pagecontent %}
diff --git a/bitbake/lib/webhob/bldviewer/templates/build.html b/bitbake/lib/webhob/bldviewer/templates/build.html
index 20aa310..e30801b 100644
--- a/bitbake/lib/webhob/bldviewer/templates/build.html
+++ b/bitbake/lib/webhob/bldviewer/templates/build.html
@@ -5,6 +5,12 @@
 
     <table border="1">
 
+<div align="right" style="display: float">Show/Hide columns:
+<span>Output: <input type="checkbox" id="ctoutput" onchange="showhideTableColumn(10, $('#ctoutput').is(':checked'))" checked autocomplete="off"></span> |
+<span>Log: <input type="checkbox" id="ctlog" onchange="showhideTableColumn(11, $('#ctlog').is(':checked'))"checked autocomplete="off"></span> |
+<span>Build Name: <input type="checkbox" id="ctbuildname" onchange="showhideTableColumn(13, $('#ctbuildname').is(':checked'))" checked autocomplete="off"></span> |
+</div>
+
     {% load projecttags %}
 
         <tr>
diff --git a/bitbake/lib/webhob/bldviewer/views.py b/bitbake/lib/webhob/bldviewer/views.py
index 7f97312..ab69c91 100644
--- a/bitbake/lib/webhob/bldviewer/views.py
+++ b/bitbake/lib/webhob/bldviewer/views.py
@@ -4,8 +4,9 @@ from django.db.models import Q
 from django.shortcuts import render
 from orm.models import Build, Task, Layer, Layer_Version, Recipe, Package, LogMessage
 from orm.models import Task_Dependency, Package_Dependency
+from django.views.decorators.cache import cache_control
 
-
+ at cache_control(no_store=True)
 def build(request):
     template = 'build.html'
     build_info = Build.objects.all()
-- 
1.8.1.2




More information about the bitbake-devel mailing list