r9661 - in helma-ng/trunk/apps/demo: . skins
[email protected] Wed, 22 Apr 2009 22:30:48 +0200 (CEST)
| Newsgroups | gmane.comp.java.helma.cvs |
|---|---|
| Message-ID | <20090422203048.3F3703D0D6@mia> |
Author: hannes
Date: 2009-04-22 22:30:48 +0200 (Wed, 22 Apr 2009)
New Revision: 9661
Added:
helma-ng/trunk/apps/demo/skins/profiler.html
Modified:
helma-ng/trunk/apps/demo/actions.js
helma-ng/trunk/apps/demo/skins/base.html
Log:
Add profiler demo
Details at http://dev.helma.org/trac/helma/changeset/9661
Modified: helma-ng/trunk/apps/demo/actions.js
===================================================================
--- helma-ng/trunk/apps/demo/actions.js 2009-04-22 20:30:46 UTC (rev 9660)
+++ helma-ng/trunk/apps/demo/actions.js 2009-04-22 20:30:48 UTC (rev 9661)
@@ -4,7 +4,7 @@
var log = helma.logging.getLogger(__name__);
-export('index', 'extra_path', 'skins', 'logging', 'continuation');
+export('index', 'extra_path', 'skins', 'logging', 'continuation', 'profiler');
// the main action is invoked for http://localhost:8080/
function index(req) {
@@ -82,5 +82,17 @@
title: "Thank you!",
data: data
}));
+}
+function profiler(req) {
+ var profilerCalled = false;
+ req.process = function() {
+ if (profilerCalled)
+ return SkinnedResponse('skins/profiler.html', {
+ title: "Profiler Demo"
+ });
+ profilerCalled = true;
+ return require('helma/profiler').handleRequest(req);
+ }
+ return req.process();
}
\ No newline at end of file
Modified: helma-ng/trunk/apps/demo/skins/base.html
===================================================================
--- helma-ng/trunk/apps/demo/skins/base.html 2009-04-22 20:30:46 UTC (rev 9660)
+++ helma-ng/trunk/apps/demo/skins/base.html 2009-04-22 20:30:48 UTC (rev 9661)
@@ -25,6 +25,7 @@
<li><a href="/mount/point/">modules</a></li>
<li><a href="/continuation">continuations</a></li>
<li><a href="/logging">logging</a></li>
+ <li><a href="/profiler">profiler</a></li>
</ul>
</div>
<div id="footer"><% footer %></div>
Added: helma-ng/trunk/apps/demo/skins/profiler.html