| OLD | NEW |
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 from google.appengine.api import users | 5 from google.appengine.api import users |
| 6 | 6 |
| 7 from common import auth_util | 7 from common import auth_util |
| 8 from common import constants | 8 from common import constants |
| 9 from common import time_util | 9 from common import time_util |
| 10 from common.base_handler import BaseHandler | 10 from common.base_handler import BaseHandler |
| 11 from common.base_handler import Permission | 11 from common.base_handler import Permission |
| 12 from model import analysis_status | 12 from model import analysis_status |
| 13 from waterfall.flake import initialize_flake_pipeline | 13 from waterfall.flake import initialize_flake_pipeline |
| 14 | 14 |
| 15 | |
| 16 class CheckFlake(BaseHandler): | 15 class CheckFlake(BaseHandler): |
| 17 PERMISSION_LEVEL = Permission.ANYONE | 16 PERMISSION_LEVEL = Permission.ANYONE |
| 18 | 17 |
| 19 def HandleGet(self): | 18 def HandleGet(self): |
| 20 master_name = self.request.get('master_name').strip() | 19 master_name = self.request.get('master_name').strip() |
| 21 builder_name = self.request.get('builder_name').strip() | 20 builder_name = self.request.get('builder_name').strip() |
| 22 build_number = int(self.request.get('build_number', '0').strip()) | 21 build_number = int(self.request.get('build_number', '0').strip()) |
| 23 step_name = self.request.get('step_name').strip() | 22 step_name = self.request.get('step_name').strip() |
| 24 test_name = self.request.get('test_name').strip() | 23 test_name = self.request.get('test_name').strip() |
| 25 | 24 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 coordinates.append([data_point.build_number, data_point.pass_rate]) | 78 coordinates.append([data_point.build_number, data_point.pass_rate]) |
| 80 | 79 |
| 81 # Order by build number from earliest to latest. | 80 # Order by build number from earliest to latest. |
| 82 coordinates.sort(key=lambda x: x[0]) | 81 coordinates.sort(key=lambda x: x[0]) |
| 83 | 82 |
| 84 data['pass_rates'] = coordinates | 83 data['pass_rates'] = coordinates |
| 85 return { | 84 return { |
| 86 'template': 'flake/result.html', | 85 'template': 'flake/result.html', |
| 87 'data': data | 86 'data': data |
| 88 } | 87 } |
| OLD | NEW |