Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

pids in reporting strings

  • Loading branch information...
commit e68a267ccd853a6a9e83df555e85525dee6854df 1 parent 02f4b9e
Steven Gravell authored
Showing with 9 additions and 6 deletions.
  1. +1 −0  README
  2. +3 −5 priv/js/rb.js
  3. +5 −1 priv/js/renderer.js
View
1  README
@@ -16,6 +16,7 @@ USAGE
=====
Start up the dev server and head to http://localhost:40829/
+ ./rebar get-deps
./start-dev.sh
or include as a rebar dep and start your own node:
View
8 priv/js/rb.js
@@ -42,12 +42,10 @@ RB = (function() {
} else {
//el.addClass('selected');
}
- if(data) {
- $('.data', el).text(JSON.stringify(data, null, 4));
- } else {
- $('.data', el).text(JSON.stringify(report, null, 4));
+ if(!data) {
+ data = report;
}
-
+ $('.data', el).html(RENDERER.stringify(data));
});
$('.filter').click(function() {
View
6 priv/js/renderer.js
@@ -141,6 +141,9 @@ var RENDERER = (function() {
}
}
}
+ var stringify = function(json) {
+ return (JSON.stringify(json, null, 4)).replace(/\<(\d+)\.(\d+)\.(\d+)\>/, '<a class="_pid" href="#">&lt;$1.$2.$3&gt;</a>');
+ }
return {
@@ -149,7 +152,8 @@ var RENDERER = (function() {
gen_pid_html: gen_pid_html,
render_list: render_list,
render_json_val: render_json_val,
- json: render_json_val
+ json: render_json_val,
+ stringify: stringify
}
})();
Please sign in to comment.
Something went wrong with that request. Please try again.