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

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

Issue 2480593002: [Predator] Move time_util from common/ to lib/, split code review related part to code_review_util (Closed)
Patch Set: Rebase and fix nits. Created 4 years, 1 month 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 datetime import datetime 5 from datetime import datetime
6 from datetime import time 6 from datetime import time
7 from datetime import timedelta 7 from datetime import timedelta
8 8
9 from common import time_util
10 from common.base_handler import BaseHandler 9 from common.base_handler import BaseHandler
11 from common.base_handler import Permission 10 from common.base_handler import Permission
12 11
12 from lib import time_util
13 from model import result_status 13 from model import result_status
14 from model.flake.master_flake_analysis import MasterFlakeAnalysis 14 from model.flake.master_flake_analysis import MasterFlakeAnalysis
15 15
16 16
17 def FilterMasterFlakeAnalysis( 17 def FilterMasterFlakeAnalysis(
18 master_flake_analysis_query, master_name=None, builder_name=None, 18 master_flake_analysis_query, master_name=None, builder_name=None,
19 build_number=None, step_name=None, test_name=None, start_date=None, 19 build_number=None, step_name=None, test_name=None, start_date=None,
20 end_date=None, status_code=result_status.UNSPECIFIED): 20 end_date=None, status_code=result_status.UNSPECIFIED):
21 if master_name: 21 if master_name:
22 master_flake_analysis_query = master_flake_analysis_query.filter( 22 master_flake_analysis_query = master_flake_analysis_query.filter(
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 120
121 # TODO (stgao): use index instead of in-memory sort. 121 # TODO (stgao): use index instead of in-memory sort.
122 # Index doesn't work for now, possibly due to legacy data. 122 # Index doesn't work for now, possibly due to legacy data.
123 data['master_flake_analyses'].sort( 123 data['master_flake_analyses'].sort(
124 key=lambda e: e['request_time'], reverse=True) 124 key=lambda e: e['request_time'], reverse=True)
125 125
126 return { 126 return {
127 'template': 'flake/dashboard.html', 127 'template': 'flake/dashboard.html',
128 'data': data 128 'data': data
129 } 129 }
OLDNEW
« no previous file with comments | « appengine/findit/handlers/flake/check_flake.py ('k') | appengine/findit/handlers/flake/test/list_flakes_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698