| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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 collections import defaultdict | 5 from collections import defaultdict |
| 6 from datetime import datetime | 6 from datetime import datetime |
| 7 | 7 |
| 8 from google.appengine.api import users | 8 from google.appengine.api import users |
| 9 | 9 |
| 10 from common import constants | 10 from common import constants |
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 'pipeline_status_path': analysis.pipeline_status_path, | 286 'pipeline_status_path': analysis.pipeline_status_path, |
| 287 'show_debug_info': self._ShowDebugInfo(), | 287 'show_debug_info': self._ShowDebugInfo(), |
| 288 'analysis_request_time': _FormatDatetime(analysis.request_time), | 288 'analysis_request_time': _FormatDatetime(analysis.request_time), |
| 289 'analysis_start_time': _FormatDatetime(analysis.start_time), | 289 'analysis_start_time': _FormatDatetime(analysis.start_time), |
| 290 'analysis_end_time': _FormatDatetime(analysis.end_time), | 290 'analysis_end_time': _FormatDatetime(analysis.end_time), |
| 291 'analysis_duration': analysis.duration, | 291 'analysis_duration': analysis.duration, |
| 292 'analysis_update_time': _FormatDatetime(analysis.updated_time), | 292 'analysis_update_time': _FormatDatetime(analysis.updated_time), |
| 293 'analysis_completed': analysis.completed, | 293 'analysis_completed': analysis.completed, |
| 294 'analysis_failed': analysis.failed, | 294 'analysis_failed': analysis.failed, |
| 295 'analysis_correct': analysis.correct, | 295 'analysis_correct': analysis.correct, |
| 296 'analysis_is_duplicate': analysis.is_duplicate, |
| 296 'triage_history': _GetTriageHistory(analysis), | 297 'triage_history': _GetTriageHistory(analysis), |
| 297 'show_triage_help_button': self._ShowTriageHelpButton(), | 298 'show_triage_help_button': self._ShowTriageHelpButton(), |
| 299 'triage_reference_analysis_master_name': |
| 300 analysis.triage_reference_analysis_master_name, |
| 301 'triage_reference_analysis_builder_name': |
| 302 analysis.triage_reference_analysis_builder_name, |
| 303 'triage_reference_analysis_build_number': |
| 304 analysis.triage_reference_analysis_build_number |
| 298 } | 305 } |
| 299 | 306 |
| 300 @staticmethod | 307 @staticmethod |
| 301 def _PrepareTryJobDataForCompileFailure(analysis): | 308 def _PrepareTryJobDataForCompileFailure(analysis): |
| 302 try_job_data = {} | 309 try_job_data = {} |
| 303 if not (analysis.failure_result_map and # pragma: no branch. | 310 if not (analysis.failure_result_map and # pragma: no branch. |
| 304 constants.COMPILE_STEP_NAME in analysis.failure_result_map): | 311 constants.COMPILE_STEP_NAME in analysis.failure_result_map): |
| 305 return try_job_data # pragma: no cover. | 312 return try_job_data # pragma: no cover. |
| 306 | 313 |
| 307 referred_build_keys = analysis.failure_result_map[ | 314 referred_build_keys = analysis.failure_result_map[ |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 403 } | 410 } |
| 404 else: | 411 else: |
| 405 return { | 412 return { |
| 406 'template': 'build_failure.html', | 413 'template': 'build_failure.html', |
| 407 'data': self._PrepareDataForTestFailures(analysis, build_info, | 414 'data': self._PrepareDataForTestFailures(analysis, build_info, |
| 408 self._ShowDebugInfo()), | 415 self._ShowDebugInfo()), |
| 409 } | 416 } |
| 410 | 417 |
| 411 def HandlePost(self): # pragma: no cover | 418 def HandlePost(self): # pragma: no cover |
| 412 return self.HandleGet() | 419 return self.HandleGet() |
| OLD | NEW |