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

Unified Diff: appengine_apps/trooper_o_matic/appengine_module/trooper_o_matic/build_details.py

Issue 774323002: Moved trooper_o_matic to appengine/ (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Created 6 years 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
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),
- }))

Powered by Google App Engine
This is Rietveld 408576698