Commits

Antonio Cuni committed bf5a490

add a title to the index page

  • Participants
  • Parent commits 18e1209

Comments (0)

Files changed (2)

         return '???'
 
 class Server(object):
-    def __init__(self, storage):
+    def __init__(self, filename, storage):
+        self.filename = filename
         self.storage = storage
 
     def index(self):
         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'))
     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)

templates/index.html

 <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"/>