Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(260)

Side by Side Diff: appengine/findit/handlers/flake/check_flake.py

Issue 2131473003: UI for the regression range test. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: +tests and lint Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 common import constants
5 from common.base_handler import BaseHandler 6 from common.base_handler import BaseHandler
6 from common.base_handler import Permission 7 from common.base_handler import Permission
8 from waterfall.flake.initialize_flake_pipeline import ScheduleAnalysisIfNeeded
9
10 from google.appengine.api import users
chanli 2016/07/27 21:52:18 This import should be at the top and in a separate
caiw 2016/07/27 23:27:11 Done.
7 11
8 12
9 class CheckFlake(BaseHandler): 13 class CheckFlake(BaseHandler):
10 PERMISSION_LEVEL = Permission.CORP_USER 14 PERMISSION_LEVEL = Permission.CORP_USER
11 15
12 def HandleGet(self): 16 def HandleGet(self):
13
14 # Get input parameters. 17 # Get input parameters.
15 # pylint: disable=W0612 18 # pylint: disable=W0612
16 master_name = self.request.get('master_name').strip() 19 master_name = self.request.get('master_name').strip()
17 builder_name = self.request.get('builder_name').strip() 20 builder_name = self.request.get('builder_name').strip()
18 build_number = int(self.request.get('build_number').strip()) 21 build_number = int(self.request.get('build_number').strip())
19 test_target_name = self.request.get('test_target_name').strip() 22 step_name = self.request.get('test_target_name').strip()
20 testcase = self.request.get('testcase').strip() 23 test_name = self.request.get('test_name').strip()
24 force = (users.is_current_user_admin() and
25 self.request.get('force') == '1')
21 26
22 # TODO(caiw): Get status of master_analysis from database. 27 ScheduleAnalysisIfNeeded(master_name, builder_name, build_number, step_name,
23 28 test_name, force=force,
24 # TODO(caiw): If there is a completed master_analysis, return 29 queue_name=constants.WATERFALL_ANALYSIS_QUEUE)
25 # the template which displays it. 30 return {
26 31 'template': 'flake/result.html'
27 # TODO(caiw): If the current master_analysis has an error, 32 }
28 # delete it.
29
30 # TODO(caiw): If there is no master_analysis, create one.
31
32 # TODO(caiw): Trigger pipeline.
33
34 # TODO(caiw): Return the appropriate template based on the case.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698