Index: tools/deep_memory_profiler/visualizer/index.html |
diff --git a/tools/deep_memory_profiler/visualizer/index.html b/tools/deep_memory_profiler/visualizer/index.html |
index 4d756c49a61e9c2a50ab8c678c35ce87b45840d1..129988e43b96330a1cf89d043811311594f61d23 100644 |
--- a/tools/deep_memory_profiler/visualizer/index.html |
+++ b/tools/deep_memory_profiler/visualizer/index.html |
@@ -17,13 +17,25 @@ found in the LICENSE file. |
<script src="static/graph-view.js"></script> |
<script src="static/dropdown-view.js"></script> |
<script src="static/menu-view.js"></script> |
-<script src="static/index.js"></script> |
+<script> |
+ $(function() { |
+ // Create model. |
+ var profiler = new Profiler({{ json|safe }}, {{ template|safe }}); |
+ // Create views subscribing model events. |
+ var graphView = new GraphView(profiler); |
+ var dropdownView = new DropdownView(profiler); |
+ var menuView = new MenuView(profiler); |
+ |
+ // initialize categories according to roots information. |
+ profiler.reparse(); |
+}); |
+</script> |
<body> |
<h2>Deep Memory Profiler Visulaizer</h2> |
- <form action="/" method="post"> |
- <input type="file" action=name="data"/> |
- <input type="submit"/> |
+ <form enctype="multipart/form-data" action="{{ upload_url }}" method="post"> |
+ <input type="file" name="file"/> |
+ <input type="submit" value="Upload"/> |
</form> |
<div id="graph-div"></div> |
<div id="info-div"> |