| Index: appengine_apps/trooper_o_matic/appengine_module/trooper_o_matic/build_details.py
|
| diff --git a/appengine_apps/trooper_o_matic/appengine_module/trooper_o_matic/build_details.py b/appengine_apps/trooper_o_matic/appengine_module/trooper_o_matic/build_details.py
|
| deleted file mode 100644
|
| index 7d3af8bef887630e5bb3a2c839fe8d7eff5d44c1..0000000000000000000000000000000000000000
|
| --- a/appengine_apps/trooper_o_matic/appengine_module/trooper_o_matic/build_details.py
|
| +++ /dev/null
|
| @@ -1,40 +0,0 @@
|
| -# Copyright (c) 2014 The Chromium Authors. All rights reserved.
|
| -# Use of this source code is governed by a BSD-style license that can be
|
| -# found in the LICENSE file.
|
| -
|
| -"""Shows details of builds which did not meet our SLO.
|
| -
|
| -See template at templates/build_details.html for sortable table.
|
| -"""
|
| -import jinja2
|
| -import json
|
| -import os
|
| -import webapp2
|
| -
|
| -from google.appengine.ext import ndb
|
| -
|
| -
|
| -JINJA_ENVIRONMENT = jinja2.Environment(
|
| - loader=jinja2.FileSystemLoader(os.path.join(os.path.dirname(__file__),
|
| - 'templates')),
|
| - extensions=['jinja2.ext.autoescape'],
|
| - autoescape=True)
|
| -
|
| -
|
| -class BuildDetailsHandler(webapp2.RequestHandler):
|
| -
|
| - def get(self, key):
|
| - stats = ndb.Key(urlsafe=key).get()
|
| - builds = [{
|
| - 'tree': stat.tree,
|
| - 'master': stat.master,
|
| - 'builder': stat.builder,
|
| - 'buildnumber': stat.buildnumber,
|
| - 'buildtime': stat.buildtime,
|
| - 'result': stat.result,
|
| - 'revision': stat.revision,
|
| - } for stat in stats.slo_offenders]
|
| - template = JINJA_ENVIRONMENT.get_template('build_details.html')
|
| - self.response.write(template.render({
|
| - 'builds': json.dumps(builds),
|
| - }))
|
|
|