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

Side by Side Diff: appengine/findit/handlers/crash/fracas_result_feedback.py

Issue 2075153003: [Findit] Add fracas analysis result feedback page. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Rebase. Created 4 years, 5 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
« no previous file with comments | « no previous file | appengine/findit/handlers/crash/test/fracas_result_feedback_test.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 import constants
8 from common import time_util
9 from common.base_handler import BaseHandler
10 from common.base_handler import Permission
11
12
13 class FracasResultFeedback(BaseHandler):
14 PERMISSION_LEVEL = Permission.CORP_USER
15
16 def HandleGet(self):
17 """Gets the analysis and feedback triage result of a crash.
18
19 Serve HTML page or JSON result as requested.
20 """
21 key = self.request.get('key')
22
23 analysis = ndb.Key(urlsafe=key).get()
24 if not analysis: # pragma: no cover.
25 return BaseHandler.CreateError(
26 'cannot find analysis for crash key %s' % key)
27
28 data = {
29 'signature': analysis.signature,
30 'version': analysis.crashed_version,
31 'channel': analysis.channel,
32 'platform': analysis.platform,
33 'regression_range': analysis.result.get('regression_range'),
34 'historical_metadata': analysis.historical_metadata,
35 'stack_trace': analysis.stack_trace,
36 'suspected_cls': analysis.result.get('suspected_cls'),
37 'suspected_project': analysis.result.get('suspected_project'),
38 'suspected_components': analysis.result.get('suspected_components'),
39 'request_time': time_util.FormatDatetime(analysis.requested_time),
40 'analysis_completed': analysis.completed,
41 'analysis_failed': analysis.failed,
42 }
43
44 return {
45 'template': 'crash/fracas_result_feedback.html',
46 'data': data,
47 }
OLDNEW
« no previous file with comments | « no previous file | appengine/findit/handlers/crash/test/fracas_result_feedback_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698