summaryrefslogtreecommitdiff
path: root/tko/compose_query.cgi
diff options
context:
space:
mode:
authormbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4>2008-04-16 23:09:31 +0000
committermbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4>2008-04-16 23:09:31 +0000
commit7344c0955705832c436ac8affce92f8ed59509c5 (patch)
tree805108abbe36a17fa18f47857d51fbd6aa012294 /tko/compose_query.cgi
parent8ecbd75f80365212904e96bbee26d14d9529ee56 (diff)
TKO doesn't handle time conditions well, time_daily in the condition field does not work properly
If you click on anything in this query the entire query gets screwed up. Row and column are both set to tag for no good reason, and the time condition is set equal to a particular second of the day. The time condition needs to be changed from time_daily='2008-03-17 00:00:00' to time_daily<'2008-03-18 00:00:00'&time_daily>'2008-03-17 00:00:00' time_daily should map to the SQL "DATE(whatever_the_time_column_is)". Also, the input to time_daily should have the time stripped off. I.e. it's not an acceptable solution for 'time_daily = some date' to map to 'time >= some date 00:00:00 & time <= some date 23:59:59" From: Vladimir Samarskiy <vsamarsk@google.com> Signed-off-by: Martin J. Bligh <mbligh@google.com> git-svn-id: svn://test.kernel.org/autotest/trunk@1440 592f7852-d20e-0410-864c-8624ca9c26a4
Diffstat (limited to 'tko/compose_query.cgi')
-rwxr-xr-xtko/compose_query.cgi23
1 files changed, 3 insertions, 20 deletions
diff --git a/tko/compose_query.cgi b/tko/compose_query.cgi
index 012c383e..8b66145a 100755
--- a/tko/compose_query.cgi
+++ b/tko/compose_query.cgi
@@ -66,7 +66,8 @@ next_field = {
'user': 'tag',
'status': 'tag',
- 'time_daily': 'tag',
+ 'time': 'tag',
+ 'time_daily': 'time',
}
@@ -138,22 +139,6 @@ def construct_link(x, y):
def create_select_options(selected_val):
ret = ""
for option in sorted(frontend.test_view_field_dict.keys()):
- ## exceptional handling of id and time :(
- ## To do: when we have more then two such prohibitions,
- ## something better should be implemented
- ## e.g. let frontend.test_view_field_dict
- ## have tuples as a values: (next_field,bAllowGrouping)
- if option == "id":
- ## do not allow to group by id
- ## because it may result in jumbo data transacted
- continue
- if option == "time":
- ## we have time_daily and time_weekly
- ## in both drop down menus
- ## They are two different clones of "time"
- ## just 'time' should be avoided due to big
- ## data transfer
- continue
if selected_val == option:
selected = " SELECTED"
else:
@@ -179,8 +164,6 @@ def header_tuneup(field_name, header):
## - possibly, expect more various refinements for different fields
if field_name == 'kernel':
return map_kernel_base(header)
- elif field_name.startswith('time') and header != None:
- return datetime.date(header.year, header.month, header.day)
else:
return header
@@ -289,7 +272,7 @@ def gen_matrix():
if field_map.has_key(row):
dy = field_map[row](y)
y_header = header_tuneup(row, dy)
- link = construct_link(None, y)
+ link = construct_link(None, y)
cur_row = [display.box(y_header, header=True, link=link)]
for x in test_data.x_values:
## next 2 lines: temporary, until non timestamped