| 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 """This module is to handle manual triage of a suspected CL. | 5 """This module is to handle manual triage of a suspected CL. |
| 6 | 6 |
| 7 This handler will flag the suspected cl as correct or incorrect. | 7 This handler will flag the suspected cl as correct or incorrect. |
| 8 """ | 8 """ |
| 9 | 9 |
| 10 from google.appengine.api import users | 10 from google.appengine.api import users |
| 11 from google.appengine.ext import ndb | 11 from google.appengine.ext import ndb |
| 12 | 12 |
| 13 from common.base_handler import BaseHandler | 13 from common.base_handler import BaseHandler |
| 14 from common.base_handler import Permission | 14 from common.base_handler import Permission |
| 15 from lib import time_util | 15 from libs import time_util |
| 16 from model import result_status | 16 from model import result_status |
| 17 from model import suspected_cl_status | 17 from model import suspected_cl_status |
| 18 from model.wf_analysis import WfAnalysis | 18 from model.wf_analysis import WfAnalysis |
| 19 from model.wf_suspected_cl import WfSuspectedCL | 19 from model.wf_suspected_cl import WfSuspectedCL |
| 20 from waterfall import build_util | 20 from waterfall import build_util |
| 21 from waterfall import buildbot | 21 from waterfall import buildbot |
| 22 from waterfall.suspected_cl_util import GetCLInfo | 22 from waterfall.suspected_cl_util import GetCLInfo |
| 23 | 23 |
| 24 @ndb.transactional | 24 @ndb.transactional |
| 25 def _UpdateSuspectedCL( | 25 def _UpdateSuspectedCL( |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 # already logged in. | 157 # already logged in. |
| 158 user_name = users.get_current_user().email().split('@')[0] | 158 user_name = users.get_current_user().email().split('@')[0] |
| 159 success = _UpdateSuspectedCLAndAnalysis( | 159 success = _UpdateSuspectedCLAndAnalysis( |
| 160 master_name, builder_name, build_number, cl_info, cl_status, user_name) | 160 master_name, builder_name, build_number, cl_info, cl_status, user_name) |
| 161 | 161 |
| 162 return {'data': {'success': success}} | 162 return {'data': {'success': success}} |
| 163 | 163 |
| 164 | 164 |
| 165 def HandlePost(self): # pragma: no cover | 165 def HandlePost(self): # pragma: no cover |
| 166 return self.HandleGet() | 166 return self.HandleGet() |
| OLD | NEW |