| OLD | NEW |
| 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 | 6 |
| 7 from google.appengine.api import users | 7 from google.appengine.api import users |
| 8 from google.appengine.ext import ndb | 8 from google.appengine.ext import ndb |
| 9 | 9 |
| 10 from common import constants | 10 from common import constants |
| 11 from common.base_handler import BaseHandler | 11 from common.base_handler import BaseHandler |
| 12 from common.base_handler import Permission | 12 from common.base_handler import Permission |
| 13 from lib import time_util | 13 from libs import time_util |
| 14 | 14 |
| 15 | 15 |
| 16 def _GetTriageHistory(analysis): | 16 def _GetTriageHistory(analysis): |
| 17 if (not users.is_current_user_admin() or | 17 if (not users.is_current_user_admin() or |
| 18 not analysis.completed or | 18 not analysis.completed or |
| 19 not analysis.triage_history): | 19 not analysis.triage_history): |
| 20 return None | 20 return None |
| 21 | 21 |
| 22 triage_history = [] | 22 triage_history = [] |
| 23 for triage_record in analysis.triage_history: | 23 for triage_record in analysis.triage_history: |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 'suspected_components': analysis.suspected_components_triage_status, | 77 'suspected_components': analysis.suspected_components_triage_status, |
| 78 }, | 78 }, |
| 79 'note': analysis.note, | 79 'note': analysis.note, |
| 80 'key': analysis.key.urlsafe(), | 80 'key': analysis.key.urlsafe(), |
| 81 } | 81 } |
| 82 | 82 |
| 83 return { | 83 return { |
| 84 'template': 'crash/fracas_result_feedback.html', | 84 'template': 'crash/fracas_result_feedback.html', |
| 85 'data': data, | 85 'data': data, |
| 86 } | 86 } |
| OLD | NEW |