| 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 constants | 7 from common import constants |
| 8 from common.base_handler import BaseHandler | 8 from common.base_handler import BaseHandler, Permission |
| 9 from common.base_handler import Permission | |
| 10 from model.analysis_status import STATUS_TO_DESCRIPTION | 9 from model.analysis_status import STATUS_TO_DESCRIPTION |
| 11 from waterfall.flake.initialize_flake_pipeline import ScheduleAnalysisIfNeeded | 10 from waterfall.flake.initialize_flake_pipeline import ScheduleAnalysisIfNeeded |
| 12 | 11 |
| 13 | 12 |
| 14 class CheckFlake(BaseHandler): | 13 class CheckFlake(BaseHandler): |
| 15 PERMISSION_LEVEL = Permission.ANYONE | 14 PERMISSION_LEVEL = Permission.ANYONE |
| 16 | 15 |
| 17 def HandleGet(self): | 16 def HandleGet(self): |
| 18 # Get input parameters. | 17 # Get input parameters. |
| 19 # pylint: disable=W0612 | 18 # pylint: disable=W0612 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 } | 56 } |
| 58 zipped = zip(master_flake_analysis.build_numbers, | 57 zipped = zip(master_flake_analysis.build_numbers, |
| 59 master_flake_analysis.success_rates) | 58 master_flake_analysis.success_rates) |
| 60 zipped.sort(key = lambda x: x[0]) | 59 zipped.sort(key = lambda x: x[0]) |
| 61 for (build_number, success_rate) in zipped: | 60 for (build_number, success_rate) in zipped: |
| 62 data['success_rates'].append([build_number, success_rate]) | 61 data['success_rates'].append([build_number, success_rate]) |
| 63 return { | 62 return { |
| 64 'template': 'flake/result.html', | 63 'template': 'flake/result.html', |
| 65 'data': data | 64 'data': data |
| 66 } | 65 } |
| OLD | NEW |