| 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..170548e7a0dce311f444a4f3ff9f3538c3ebe2e0 100644
|
| --- a/tools/deep_memory_profiler/visualizer/index.html
|
| +++ b/tools/deep_memory_profiler/visualizer/index.html
|
| @@ -17,13 +17,30 @@ 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() {
|
| + {% if json is defined and template is defined %}
|
| + // 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();
|
| + {% endif %}
|
| +});
|
| +</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"/>
|
| + <p><font color="red">
|
| + {{ upload_msg }}
|
| + </font></p>
|
| </form>
|
| <div id="graph-div"></div>
|
| <div id="info-div">
|
|
|