| OLD | NEW |
| 1 # Copyright (C) 2010 Google Inc. All rights reserved. | 1 # Copyright (C) 2010 Google Inc. All rights reserved. |
| 2 # | 2 # |
| 3 # Redistribution and use in source and binary forms, with or without | 3 # Redistribution and use in source and binary forms, with or without |
| 4 # modification, are permitted provided that the following conditions are | 4 # modification, are permitted provided that the following conditions are |
| 5 # met: | 5 # met: |
| 6 # | 6 # |
| 7 # * Redistributions of source code must retain the above copyright | 7 # * Redistributions of source code must retain the above copyright |
| 8 # notice, this list of conditions and the following disclaimer. | 8 # notice, this list of conditions and the following disclaimer. |
| 9 # * Redistributions in binary form must reproduce the above | 9 # * Redistributions in binary form must reproduce the above |
| 10 # copyright notice, this list of conditions and the following disclaimer | 10 # copyright notice, this list of conditions and the following disclaimer |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 if not master_data: | 200 if not master_data: |
| 201 master_data = master_config.getMasterByMasterName(master) | 201 master_data = master_config.getMasterByMasterName(master) |
| 202 if not master_data: | 202 if not master_data: |
| 203 self.error(404) | 203 self.error(404) |
| 204 return | 204 return |
| 205 | 205 |
| 206 json, date = self._get_file_content(master_data['url_name'], builder
, test_type, build_number, name) | 206 json, date = self._get_file_content(master_data['url_name'], builder
, test_type, build_number, name) |
| 207 if json is None: | 207 if json is None: |
| 208 json, date = self._get_file_content(master_data['name'], builder
, test_type, build_number, name) | 208 json, date = self._get_file_content(master_data['name'], builder
, test_type, build_number, name) |
| 209 | 209 |
| 210 if test_list_json: | 210 if json and test_list_json: |
| 211 json = JsonResults.get_test_list(builder, json) | 211 json = JsonResults.get_test_list(builder, json) |
| 212 | 212 |
| 213 if json: | 213 if json: |
| 214 json = _replace_jsonp_callback(json, callback_name) | 214 json = _replace_jsonp_callback(json, callback_name) |
| 215 | 215 |
| 216 self._serve_json(json, date) | 216 self._serve_json(json, date) |
| 217 | 217 |
| 218 | 218 |
| 219 class Upload(webapp2.RequestHandler): | 219 class Upload(webapp2.RequestHandler): |
| 220 """Upload test results file to datastore.""" | 220 """Upload test results file to datastore.""" |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 | 303 |
| 304 class UploadForm(webapp2.RequestHandler): | 304 class UploadForm(webapp2.RequestHandler): |
| 305 """Show a form so user can upload a file.""" | 305 """Show a form so user can upload a file.""" |
| 306 | 306 |
| 307 def get(self): | 307 def get(self): |
| 308 template_values = { | 308 template_values = { |
| 309 "upload_url": "/testfile/upload", | 309 "upload_url": "/testfile/upload", |
| 310 } | 310 } |
| 311 self.response.out.write(template.render("templates/uploadform.html", | 311 self.response.out.write(template.render("templates/uploadform.html", |
| 312 template_values)) | 312 template_values)) |
| OLD | NEW |