Author: Antonio Cuni <[email protected]>
Branch: 
Changeset: r129:bf5a490f2be7
Date: 2011-06-10 15:23 +0200
http://bitbucket.org/pypy/jitviewer/changeset/bf5a490f2be7/

Log:    add a title to the index page

diff --git a/bin/jitviewer.py b/bin/jitviewer.py
--- a/bin/jitviewer.py
+++ b/bin/jitviewer.py
@@ -69,7 +69,8 @@
         return '???'
 
 class Server(object):
-    def __init__(self, storage):
+    def __init__(self, filename, storage):
+        self.filename = filename
         self.storage = storage
 
     def index(self):
@@ -96,7 +97,8 @@
         if not all:
             loops = loops[:CUTOFF]
         return flask.render_template('index.html', loops=loops,
-                                    extra_data=extra_data)
+                                     filename=self.filename,
+                                     extra_data=extra_data)
 
     def loop(self):
         no = int(flask.request.args.get('no', '0'))
@@ -197,7 +199,7 @@
     parse_log_counts(extract_category(log, 'jit-backend-count'), loops)
     storage.reconnect_loops(loops)
     app = OverrideFlask('__name__', root_path=PATH)
-    server = Server(storage)
+    server = Server(filename, storage)
     app.debug = True
     app.route('/')(server.index)
     app.route('/loop')(server.loop)
diff --git a/templates/index.html b/templates/index.html
--- a/templates/index.html
+++ b/templates/index.html
@@ -1,5 +1,6 @@
 <html>
 <head>
+  <title>PyPy JIT Viewer: {{ filename }}</title>
   <link 
href='http://fonts.googleapis.com/css?family=Droid+Sans+Mono&subset=latin' 
rel='stylesheet' type='text/css'>
   <link rel="stylesheet" type="text/css" href="/static/style.css"/>
   <link rel="stylesheet" type="text/css" href="/static/pygments.css"/>
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to