| OLD | NEW |
| 1 # Copyright 2014 The LUCI Authors. All rights reserved. | 1 # Copyright 2014 The LUCI Authors. All rights reserved. |
| 2 # Use of this source code is governed by the Apache v2.0 license that can be | 2 # Use of this source code is governed under the Apache License, Version 2.0 |
| 3 # found in the LICENSE file. | 3 # that can be found in the LICENSE file. |
| 4 | 4 |
| 5 """GViz connector code for stats_framework.py.""" | 5 """GViz connector code for stats_framework.py.""" |
| 6 | 6 |
| 7 import logging | 7 import logging |
| 8 | 8 |
| 9 from components import stats_framework | 9 from components import stats_framework |
| 10 from components import utils | 10 from components import utils |
| 11 from gviz import gviz_api | 11 from gviz import gviz_api |
| 12 | 12 |
| 13 | 13 |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 } | 119 } |
| 120 encoder = gviz_api.DataTableJSONEncoder() | 120 encoder = gviz_api.DataTableJSONEncoder() |
| 121 response.write(encoder.encode(response_obj).encode('utf-8')) | 121 response.write(encoder.encode(response_obj).encode('utf-8')) |
| 122 else: | 122 else: |
| 123 # Client requested JSONP. | 123 # Client requested JSONP. |
| 124 response.headers['Content-Type'] = ( | 124 response.headers['Content-Type'] = ( |
| 125 'application/javascript; charset=utf-8') | 125 'application/javascript; charset=utf-8') |
| 126 response.write( | 126 response.write( |
| 127 gviz_api.DataTable(description, table).ToJSonResponse( | 127 gviz_api.DataTable(description, table).ToJSonResponse( |
| 128 columns_order=order, **tqx_args)) | 128 columns_order=order, **tqx_args)) |
| OLD | NEW |