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

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

Issue 1827903002: [Findit] Modify handlers_util to prepare for the new UI change. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: remove possible flaky tests. Created 4 years, 8 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
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 base_handler import BaseHandler 5 from base_handler import BaseHandler
6 from base_handler import Permission 6 from base_handler import Permission
7 from handlers import handlers_util 7 from handlers import handlers_util
8 from waterfall import buildbot 8 from waterfall import buildbot
9 9
10 10
11 class SwarmingTask(BaseHandler): 11 class SwarmingTask(BaseHandler):
12 PERMISSION_LEVEL = Permission.ANYONE 12 PERMISSION_LEVEL = Permission.ANYONE
13 13
14 def HandleGet(self): 14 def HandleGet(self):
15 """Get the information about swarming tasks for failed steps.""" 15 """Get the information about swarming tasks for failed steps."""
16 url = self.request.get('url').strip() 16 url = self.request.get('url').strip()
17 build_keys = buildbot.ParseBuildUrl(url) 17 build_keys = buildbot.ParseBuildUrl(url)
18 18
19 if not build_keys: # pragma: no cover 19 if not build_keys: # pragma: no cover
20 return {'data': {}} 20 return {'data': {}}
21 21
22 data = handlers_util.GenerateSwarmingTasksData(*build_keys) 22 data = handlers_util.GetSwarmingTaskInfo(*build_keys)
23 return {'data': data} 23 return {'data': data}
24 24
25 def HandlePost(self): # pragma: no cover 25 def HandlePost(self): # pragma: no cover
26 return self.HandleGet() 26 return self.HandleGet()
OLDNEW
« no previous file with comments | « appengine/findit/handlers/result_status.py ('k') | appengine/findit/handlers/test/handlers_util_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698