| 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.ext import ndb | 5 from google.appengine.ext import ndb |
| 6 | 6 |
| 7 from common.base_handler import BaseHandler | 7 from common.base_handler import BaseHandler, Permission |
| 8 from common.base_handler import Permission | |
| 9 from model.flake.master_flake_analysis import MasterFlakeAnalysis | 8 from model.flake.master_flake_analysis import MasterFlakeAnalysis |
| 10 | 9 |
| 11 | 10 |
| 12 def FilterMasterFlakeAnalysis(master_flake_analysis_query, master_name, | 11 def FilterMasterFlakeAnalysis(master_flake_analysis_query, master_name, |
| 13 builder_name, build_number, step_name, test_name): | 12 builder_name, build_number, step_name, test_name): |
| 14 if master_name: | 13 if master_name: |
| 15 master_flake_analysis_query = master_flake_analysis_query.filter( | 14 master_flake_analysis_query = master_flake_analysis_query.filter( |
| 16 MasterFlakeAnalysis.master_name == master_name) | 15 MasterFlakeAnalysis.master_name == master_name) |
| 17 if builder_name: | 16 if builder_name: |
| 18 master_flake_analysis_query = master_flake_analysis_query.filter( | 17 master_flake_analysis_query = master_flake_analysis_query.filter( |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 'builder_name': master_flake_analysis.builder_name, | 51 'builder_name': master_flake_analysis.builder_name, |
| 53 'build_number': master_flake_analysis.build_number, | 52 'build_number': master_flake_analysis.build_number, |
| 54 'step_name': master_flake_analysis.step_name, | 53 'step_name': master_flake_analysis.step_name, |
| 55 'test_name': master_flake_analysis.test_name | 54 'test_name': master_flake_analysis.test_name |
| 56 }) | 55 }) |
| 57 | 56 |
| 58 return { | 57 return { |
| 59 'template': 'flake/dashboard.html', | 58 'template': 'flake/dashboard.html', |
| 60 'data': data | 59 'data': data |
| 61 } | 60 } |
| OLD | NEW |