OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <!-- | 2 <!-- |
3 Copyright 2013 The Chromium Authors. All rights reserved. | 3 Copyright 2013 The Chromium Authors. All rights reserved. |
4 Use of this source code is governed by a BSD-style license that can be | 4 Use of this source code is governed by a BSD-style license that can be |
5 found in the LICENSE file. | 5 found in the LICENSE file. |
6 --> | 6 --> |
7 <meta charset="utf-8"> | 7 <meta charset="utf-8"> |
8 <link rel="stylesheet" href="static/index.css"> | 8 <link rel="stylesheet" href="static/index.css"> |
9 <link rel="stylesheet" href="static/third_party/jqTree/jqtree.css"> | 9 <link rel="stylesheet" href="static/third_party/jqTree/jqtree.css"> |
10 | 10 |
11 <script src="static/third_party/flot/jquery.min.js"></script> | 11 <script src="static/third_party/flot/jquery.min.js"></script> |
12 <script src="static/third_party/flot/jquery.flot.min.js"></script> | 12 <script src="static/third_party/flot/jquery.flot.min.js"></script> |
13 <script src="static/third_party/flot/jquery.flot.stack.min.js"></script> | 13 <script src="static/third_party/flot/jquery.flot.stack.min.js"></script> |
14 <script src="static/third_party/jqTree/tree.jquery.js"></script> | 14 <script src="static/third_party/jqTree/tree.jquery.js"></script> |
15 <script src="static/utility.js"></script> | 15 <script src="static/utility.js"></script> |
16 <script src="static/profiler.js"></script> | 16 <script src="static/profiler.js"></script> |
17 <script src="static/graph-view.js"></script> | 17 <script src="static/graph-view.js"></script> |
18 <script src="static/dropdown-view.js"></script> | 18 <script src="static/dropdown-view.js"></script> |
19 <script src="static/menu-view.js"></script> | 19 <script src="static/menu-view.js"></script> |
20 <script src="static/index.js"></script> | 20 <script> |
| 21 $(function() { |
| 22 var json = {{ json|safe }}; |
| 23 var template = {{ template|safe }}; |
| 24 if (!json || !template) |
| 25 return; |
| 26 |
| 27 // Create model. |
| 28 var profiler = new Profiler(json, template); |
| 29 // Create views subscribing model events. |
| 30 var graphView = new GraphView(profiler); |
| 31 var dropdownView = new DropdownView(profiler); |
| 32 var menuView = new MenuView(profiler); |
| 33 |
| 34 // initialize categories according to roots information. |
| 35 profiler.reparse(); |
| 36 }); |
| 37 </script> |
21 | 38 |
22 <body> | 39 <body> |
23 <h2>Deep Memory Profiler Visulaizer</h2> | 40 <h2>Deep Memory Profiler Visulaizer</h2> |
24 <form action="/" method="post"> | 41 <form enctype="multipart/form-data" action="{{ upload_url }}" method="post"> |
25 <input type="file" action=name="data"/> | 42 <input type="file" name="file"/> |
26 <input type="submit"/> | 43 <input type="submit" value="Upload"/> |
| 44 <p><font color="red"> |
| 45 {{ upload_msg }} |
| 46 </font></p> |
27 </form> | 47 </form> |
28 <div id="graph-div"></div> | 48 <div id="graph-div"></div> |
29 <div id="info-div"> | 49 <div id="info-div"> |
30 <div id="subs-dropdown"></div> | 50 <div id="subs-dropdown"></div> |
31 <div id="category-menu"></div> | 51 <div id="category-menu"></div> |
32 </div> | 52 </div> |
33 </body> | 53 </body> |
OLD | NEW |