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

Side by Side Diff: gm/rebaseline_server/server.py

Issue 196533021: rebaseline_server: make intermediate JSON specify base urls for diff images (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: nits Created 6 years, 9 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 | « gm/rebaseline_server/results.py ('k') | gm/rebaseline_server/static/constants.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 2
3 """ 3 """
4 Copyright 2013 Google Inc. 4 Copyright 2013 Google Inc.
5 5
6 Use of this source code is governed by a BSD-style license that can be 6 Use of this source code is governed by a BSD-style license that can be
7 found in the LICENSE file. 7 found in the LICENSE file.
8 8
9 HTTP server for our HTML rebaseline viewer. 9 HTTP server for our HTML rebaseline viewer.
10 """ 10 """
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 # the handler's .server instance variable. 323 # the handler's .server instance variable.
324 results_obj = _SERVER.results 324 results_obj = _SERVER.results
325 if results_obj: 325 if results_obj:
326 response_dict = results_obj.get_packaged_results_of_type( 326 response_dict = results_obj.get_packaged_results_of_type(
327 results_type=results_type, reload_seconds=_SERVER.reload_seconds, 327 results_type=results_type, reload_seconds=_SERVER.reload_seconds,
328 is_editable=_SERVER.is_editable, is_exported=_SERVER.is_exported) 328 is_editable=_SERVER.is_editable, is_exported=_SERVER.is_exported)
329 else: 329 else:
330 now = int(time.time()) 330 now = int(time.time())
331 response_dict = { 331 response_dict = {
332 results_mod.KEY__HEADER: { 332 results_mod.KEY__HEADER: {
333 results_mod.KEY__HEADER__SCHEMA_VERSION: (
334 results_mod.REBASELINE_SERVER_SCHEMA_VERSION_NUMBER),
333 results_mod.KEY__HEADER__IS_STILL_LOADING: True, 335 results_mod.KEY__HEADER__IS_STILL_LOADING: True,
334 results_mod.KEY__HEADER__TIME_UPDATED: now, 336 results_mod.KEY__HEADER__TIME_UPDATED: now,
335 results_mod.KEY__HEADER__TIME_NEXT_UPDATE_AVAILABLE: ( 337 results_mod.KEY__HEADER__TIME_NEXT_UPDATE_AVAILABLE: (
336 now + RELOAD_INTERVAL_UNTIL_READY), 338 now + RELOAD_INTERVAL_UNTIL_READY),
337 }, 339 },
338 } 340 }
339 self.send_json_dict(response_dict) 341 self.send_json_dict(response_dict)
340 342
341 def do_GET_static(self, path): 343 def do_GET_static(self, path):
342 """ Handle a GET request for a file under the 'static' directory. 344 """ Handle a GET request for a file under the 'static' directory.
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 _SERVER = Server(actuals_dir=args.actuals_dir, 529 _SERVER = Server(actuals_dir=args.actuals_dir,
528 actuals_repo_revision=args.actuals_revision, 530 actuals_repo_revision=args.actuals_revision,
529 actuals_repo_url=args.actuals_repo, 531 actuals_repo_url=args.actuals_repo,
530 port=args.port, export=args.export, editable=args.editable, 532 port=args.port, export=args.export, editable=args.editable,
531 reload_seconds=args.reload) 533 reload_seconds=args.reload)
532 _SERVER.run() 534 _SERVER.run()
533 535
534 536
535 if __name__ == '__main__': 537 if __name__ == '__main__':
536 main() 538 main()
OLDNEW
« no previous file with comments | « gm/rebaseline_server/results.py ('k') | gm/rebaseline_server/static/constants.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698