diff --git a/lnt/server/ui/api.py b/lnt/server/ui/api.py --- a/lnt/server/ui/api.py +++ b/lnt/server/ui/api.py @@ -456,11 +456,11 @@ q = q.limit(limit) samples = [ - [convert_revision(rev), val, + [rev, val, {'label': rev, 'date': str(time), 'runID': str(rid)}] for val, rev, time, rid in q.all()[::-1] ] - samples.sort(key=lambda x: x[0]) + samples.sort(key=lambda x: convert_revision(x[0])) return samples diff --git a/lnt/server/ui/templates/v4_new_regressions.html b/lnt/server/ui/templates/v4_new_regressions.html --- a/lnt/server/ui/templates/v4_new_regressions.html +++ b/lnt/server/ui/templates/v4_new_regressions.html @@ -36,8 +36,8 @@ {% set fc = changes[loop.index -1] %} {% set fc_ri_field_index = ts.get_field_index(fc.ri.field) %} {"url": "/{{api_graph}}/{{ fc.ri.machine.id}}/{{fc.ri.test.id}}/{{fc_ri_field_index}}", - "start": {{fc.ri.start_order.llvm_project_revision}}, - "end": {{fc.ri.end_order.llvm_project_revision}} + "start": "{{fc.ri.start_order.as_ordered_string()}}", + "end": "{{fc.ri.end_order.as_ordered_string()}}" }, {% endfor %} ]; diff --git a/lnt/server/ui/templates/v4_regression_detail.html b/lnt/server/ui/templates/v4_regression_detail.html --- a/lnt/server/ui/templates/v4_regression_detail.html +++ b/lnt/server/ui/templates/v4_regression_detail.html @@ -43,8 +43,8 @@ {% set fc = changes[loop.index -1] %} {% set fc_ri_field_index = ts.get_field_index(fc.ri.field) %} {"url": "{{fc.ri.machine.id}}/{{fc.ri.test.id}}/{{fc_ri_field_index}}", - "start": {{fc.ri.start_order.llvm_project_revision}}, - "end": {{fc.ri.end_order.llvm_project_revision}} + "start": "{{fc.ri.start_order.as_ordered_string()}}", + "end": "{{fc.ri.end_order.as_ordered_string()}}" }, {% endfor %} ]; diff --git a/tests/server/ui/test_api.py b/tests/server/ui/test_api.py --- a/tests/server/ui/test_api.py +++ b/tests/server/ui/test_api.py @@ -41,20 +41,20 @@ u'test_id': 1, u'compile_time': 0.007} -graph_data = [[[152292], 1.0, - {u'date': u'2012-05-01 16:28:23', - u'label': u'152292', - u'runID': u'5'}], - [[152293], 10.0, +graph_data = [[u'152292', 1.0, + {u'date': u'2012-05-01 16:28:23', + u'label': u'152292', + u'runID': u'5'}], + [u'152293', 10.0, + {u'date': u'2012-05-03 16:28:24', + u'label': u'152293', + u'runID': u'6'}]] + +graph_data2 = [[u'152293', 10.0, {u'date': u'2012-05-03 16:28:24', u'label': u'152293', u'runID': u'6'}]] -graph_data2 = [[[152293], 10.0, - {u'date': u'2012-05-03 16:28:24', - u'label': u'152293', - u'runID': u'6'}]] - possible_run_keys = { u'ARCH', u'CC_UNDER_TEST_IS_CLANG',