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

Side by Side Diff: appengine_scripts/skia-tree-status/skia_telemetry.py

Issue 1214213002: Add get_skp_repos endpoint to skia-telemetry (Closed) Base URL: https://skia.googlesource.com/buildbot@master
Patch Set: Created 5 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 | « appengine_scripts/skia-tree-status/main.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2013 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 """Skia Telemetry pages.""" 5 """Skia Telemetry pages."""
6 6
7 7
8 import base64 8 import base64
9 import datetime 9 import datetime
10 import json 10 import json
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after
628 self.is_admin) 628 self.is_admin)
629 629
630 lua_tasks = LuaTasks.get_all_lua_tasks_of_user(self.user.email()) 630 lua_tasks = LuaTasks.get_all_lua_tasks_of_user(self.user.email())
631 template_values['lua_tasks'] = lua_tasks 631 template_values['lua_tasks'] = lua_tasks
632 template_values['oldest_pending_task_key'] = get_oldest_pending_task_key() 632 template_values['oldest_pending_task_key'] = get_oldest_pending_task_key()
633 template_values['pagesets_to_builds'] = get_skp_pagesets_to_builds() 633 template_values['pagesets_to_builds'] = get_skp_pagesets_to_builds()
634 634
635 self.DisplayTemplate('lua_script.html', template_values) 635 self.DisplayTemplate('lua_script.html', template_values)
636 636
637 637
638 class GetSKPRepos(BasePage):
639 """Returns the recently-created SKP repositories in JSON format."""
640 def get(self):
641 self.response.headers['Content-Type'] = 'application/json'
642 repos = get_skp_pagesets_to_builds()
643 rv = {}
rmistry 2015/06/29 18:33:55 rv = collections.defaultdict(list) then line 645 c
borenet 2015/06/29 18:50:41 Done.
644 for pageset, builds in repos.iteritems():
645 rv[pageset] = []
646 for chrome_rev, skia_rev, dt in builds:
647 rv[pageset].append((chrome_rev, skia_rev, dt.__str__()))
648 json.dump(rv, self.response.out)
649
650
638 class ChromiumBuildsPage(BasePage): 651 class ChromiumBuildsPage(BasePage):
639 """Allows users to add and delete new chromium builds to the framework.""" 652 """Allows users to add and delete new chromium builds to the framework."""
640 653
641 @utils.require_user 654 @utils.require_user
642 def get(self): 655 def get(self):
643 return self._handle() 656 return self._handle()
644 657
645 @utils.require_user 658 @utils.require_user
646 def post(self): 659 def post(self):
647 # Check if this is a delete chromium build request. 660 # Check if this is a delete chromium build request.
(...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after
1266 completed_time=datetime.datetime.now()).put() 1279 completed_time=datetime.datetime.now()).put()
1267 1280
1268 if db.GqlQuery('SELECT __key__ FROM AdminTasks').get() is None: 1281 if db.GqlQuery('SELECT __key__ FROM AdminTasks').get() is None:
1269 AdminTasks( 1282 AdminTasks(
1270 username='Admin', 1283 username='Admin',
1271 task_name='Initial Table Creation', 1284 task_name='Initial Table Creation',
1272 pagesets_type='Test type', 1285 pagesets_type='Test type',
1273 requested_time=datetime.datetime.now(), 1286 requested_time=datetime.datetime.now(),
1274 completed_time=datetime.datetime.now()).put() 1287 completed_time=datetime.datetime.now()).put()
1275 1288
OLDNEW
« no previous file with comments | « appengine_scripts/skia-tree-status/main.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698