Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(109)

Unified Diff: tools/deep_memory_profiler/visualizer/index.html

Issue 23781012: Upload file to app engine and generate public url for dmprof visualizer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add default_template attribute validation Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..23a72172159a7cca1bc4de672f6a5e5076cc579e 100644
--- a/tools/deep_memory_profiler/visualizer/index.html
+++ b/tools/deep_memory_profiler/visualizer/index.html
@@ -17,13 +17,33 @@ 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() {
+ var json = {{ json|safe }};
+ var template = {{ template|safe }};
+ if (!json || !template)
+ return;
+
+ // Create model.
+ var profiler = new Profiler(json, template);
+ // 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"/>
+ <p><font color="red">
+ {{ upload_msg }}
+ </font></p>
</form>
<div id="graph-div"></div>
<div id="info-div">

Powered by Google App Engine
This is Rietveld 408576698