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

Side by Side Diff: appengine/findit/handlers/culprit.py

Issue 2085513003: [Findit] Show the list of failed build cycles that a culprit is responsible for. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@group_same_failures
Patch Set: Tests will be added in next patchset Created 4 years, 6 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
(Empty)
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
3 # found in the LICENSE file.
4
5 from google.appengine.ext import ndb
6
7 from common.base_handler import BaseHandler
8 from common.base_handler import Permission
9 from model import analysis_status as status
10
11
12 class WfCulprit(BaseHandler):
13 PERMISSION_LEVEL = Permission.ANYONE
14
15 def HandleGet(self):
16 """Lists the build cycles in which the culprit caused failures."""
17 key = self.request.get('key', '')
18
19 culprit = ndb.Key(urlsafe=key).get()
20 if not culprit:
21 return self.CreateError('Culprit not found', 404)
22
23 def ConvertBuildInfoToADict(build_info):
24 return {
25 'master_name': build_info[0],
26 'builder_name': build_info[1],
27 'build_number': build_info[2],
28 }
29
30 data = {
31 'project_name': culprit.project_name,
32 'revision': culprit.revision,
33 'cr_notified': culprit.cr_notified,
34 'cr_notification_time': culprit.cr_notification_time,
35 'builds': map(ConvertBuildInfoToADict, culprit.builds),
36 }
37 return {'template': 'waterfall/culprit.html', 'data': data}
OLDNEW
« no previous file with comments | « no previous file | appengine/findit/templates/waterfall/culprit.html » ('j') | appengine/findit/templates/waterfall/culprit.html » ('J')

Powered by Google App Engine
This is Rietveld 408576698