summaryrefslogtreecommitdiff
path: root/tko/compose_query.cgi
diff options
context:
space:
mode:
authormbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4>2008-04-16 23:12:12 +0000
committermbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4>2008-04-16 23:12:12 +0000
commit244de5669f672711af7023ab6e3967d8652a0661 (patch)
tree0895acaa4b9f342c028b02b6c2639c1a484c4350 /tko/compose_query.cgi
parent7344c0955705832c436ac8affce92f8ed59509c5 (diff)
implementing request: reasons of failure should be displayed in non header cells
- reasons are retrieved from the database and displayed in cells only when either columns or rows are grouped by status (because of performance reasons) - reasons are displayed in cell below GOOD / TOTAL ratio and only if GOOD is less then TOTAL i.e. when some problems occured From: Vladimir Samarskiy <vsamarsk@google.com> Signed-off-by: Martin Bligh <mbligh@google.com> git-svn-id: svn://test.kernel.org/autotest/trunk@1441 592f7852-d20e-0410-864c-8624ca9c26a4
Diffstat (limited to 'tko/compose_query.cgi')
-rwxr-xr-xtko/compose_query.cgi18
1 files changed, 16 insertions, 2 deletions
diff --git a/tko/compose_query.cgi b/tko/compose_query.cgi
index 8b66145a..d609fa2e 100755
--- a/tko/compose_query.cgi
+++ b/tko/compose_query.cgi
@@ -238,7 +238,21 @@ def gen_matrix():
return [[display.box(msg)]]
try:
- test_data = frontend.get_matrix_data(db_obj, column, row, where)
+ ## Unfortunately, we can not request reasons of failure always
+ ## because it may result in an inflated size of data transfer
+ ## (at the moment we fetch 500 bytes of reason descriptions into
+ ## each cell )
+ ## If 'status' in [row,column] then either width or height
+ ## of the table <=7, hence table is not really 2D, and
+ ## query_reason is relatively save.
+ ## At the same time view when either rows or columns grouped
+ ## by status is when users need reasons of failures the most.
+
+ ## TO DO: implement [Show/Hide reasons] button or link in
+ ## all views and make thorough performance testing
+ test_data = frontend.get_matrix_data(db_obj, column, row, where,
+ query_reasons = ('status' in [row,column])
+ )
except db.MySQLTooManyRows, error:
return [[display.box(str(error))]]
@@ -280,7 +294,7 @@ def gen_matrix():
if x==datetime.datetime(1970,1,1): x = None
if y==datetime.datetime(1970,1,1): y = None
try:
- box_data = test_data.data[x][y].status_count
+ box_data = test_data.data[x][y]
except:
cur_row.append(display.box(None, None))
continue