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

Unified Diff: dashboard/dashboard/start_try_job.py

Issue 2960873002: WIP - Pinpoint - New Page.
Patch Set: . Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « dashboard/dashboard/pinpoint/services/dashboard_service.py ('k') | dashboard/pinpoint.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dashboard/dashboard/start_try_job.py
diff --git a/dashboard/dashboard/start_try_job.py b/dashboard/dashboard/start_try_job.py
index ad928fa9e8d2f5da5f6d7cbf1c4802220bafc7e5..63dc4132842a26b197dc369900c4c3c677e7cb31 100644
--- a/dashboard/dashboard/start_try_job.py
+++ b/dashboard/dashboard/start_try_job.py
@@ -10,6 +10,7 @@ import json
import logging
import pipes
import re
+import urllib
import httplib2
@@ -95,6 +96,29 @@ _DISABLE_STORY_FILTER_STORY_LIST = set([
])
+class StartPinpointHandler(request_handler.RequestHandler):
+ def post(self):
+ user = users.get_current_user()
+ if not utils.IsValidSheriffUser():
+ message = 'User "%s" not authorized.' % user
+ self.response.out.write(json.dumps({'error': message}))
+ return
+
+ body = dict((a, self.request.get(a)) for a in self.request.arguments())
+ body['email'] = user.email()
+ logging.info('BODY: %s' % str(body))
+ NEW_URL = 'https://dev-simonhatch-822662b0-dot-pinpoint-dot-chromeperf.appspot.com/api/new'
+ http_auth = utils.ServiceAccountHttp()
+ resp, content = http_auth.request(
+ NEW_URL,
+ method="POST",
+ body=urllib.urlencode(body),
+ headers={'Content-length': 0})
+
+ logging.info('CONTENT: %s' % content)
+ self.response.write(content)
+
+
class StartBisectHandler(request_handler.RequestHandler):
"""URL endpoint for AJAX requests for bisect config handling.
« no previous file with comments | « dashboard/dashboard/pinpoint/services/dashboard_service.py ('k') | dashboard/pinpoint.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698