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

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

Issue 2538373003: [Culprit-Finder] Merge lib/ to libs/. (Closed)
Patch Set: Rebase on https://codereview.chromium.org/2557553002/ Created 4 years 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.base_handler import BaseHandler 9 from common.base_handler import BaseHandler
10 from common.base_handler import Permission 10 from common.base_handler import Permission
11 11
12 from lib import time_util 12 from libs 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 PAGE_SIZE = 100 17 PAGE_SIZE = 100
18 18
19 19
20 def FilterMasterFlakeAnalysis( 20 def FilterMasterFlakeAnalysis(
21 master_flake_analysis_query, master_name=None, builder_name=None, 21 master_flake_analysis_query, master_name=None, builder_name=None,
22 build_number=None, step_name=None, test_name=None, start_date=None, 22 build_number=None, step_name=None, test_name=None, start_date=None,
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 132
133 # TODO (stgao): use index instead of in-memory sort. 133 # TODO (stgao): use index instead of in-memory sort.
134 # Index doesn't work for now, possibly due to legacy data. 134 # Index doesn't work for now, possibly due to legacy data.
135 data['master_flake_analyses'].sort( 135 data['master_flake_analyses'].sort(
136 key=lambda e: e['request_time'], reverse=True) 136 key=lambda e: e['request_time'], reverse=True)
137 137
138 return { 138 return {
139 'template': 'flake/dashboard.html', 139 'template': 'flake/dashboard.html',
140 'data': data 140 'data': data
141 } 141 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698