| 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.
|
|
|
|
|