Skip to content

Commit

Permalink
pretty process page
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronblohowiak committed Sep 15, 2011
1 parent 5e4e7e1 commit 34e02ce
Show file tree
Hide file tree
Showing 11 changed files with 264 additions and 98 deletions.
3 changes: 1 addition & 2 deletions README
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
A simple template project for you to start a new Transitive project. Eventually, we may have a useful CLI to generate this for you, but downloading this as an archive should "just work."

Magnifying glass icons: http://shapeshed.com/journal/free_icon_set_quant/
25 changes: 22 additions & 3 deletions generated/public/templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,15 @@ with(locals || {}) {
'<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">' +
"<html><head><link rel=\"stylesheet\" href=\"/app.css\" media=\"all\" /><script src=\"/socket.io/socket.io.js\"></script><script src=\"/transitive.js\"></script><script src=\"/templates.js\"></script>\n<script type=\"text/javascript\">\n//<![CDATA[\nTransitive = require(\"./transitive\");\nTransitive.Views.templates = require(\"./templates.js\");\njQuery = $;\nif(window.console){}else{\n console = {};\n console.log = function(){}\n}\n//]]>\n</script>\n<script src=\"/jquery.flot.js\"></script><script src=\"/jquery.flot.selection.js\"></script><!--[if lt IE 9]>" +
'<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>' +
"<![endif]--><title></title> dX-dT.com Change over time</head><body><div class=\"topbar\"><div class=\"fill\"><div class=\"container\"><h3><a href=\"#\" style=\"font-family:Monaco;font-weight:bold\">dx-dt</a></h3><ul><li><a href=\"/\">Home</a></li></ul><div class=\"sep\"></div><ul><li><a href=\"#masthead\">Staging</a></li><li><a>> </a></li><li><a href=\"/server\">Web Server 1</a></li><li><a>></a></li><li><a href=\"/about\">Processes</a></li></ul><ul class=\"secondary-nav\"><li><form><input placeholder=\"Search \" /></form></li><li style=\"margin-left:50px\" class=\"dropdown\"><a href=\"#toggle\" class=\"dropdown-toggle\">Account</a><ul class=\"dropdown-menu\"><li><a href=\"#\">secondary-link</a></li></ul></li></ul></div></div></div><div style=\"margin-top:40px\"></div><div class=\"container\">" +
"<![endif]--><title></title> dX-dT.com Change over time</head><body><div class=\"topbar\"><div class=\"fill\"><div class=\"container\"><h3><a href=\"#\" style=\"letter-spacing:3px;\">dx-dt</a></h3><ul><li><a href=\"/\">Home</a></li>" +
(function () { if (this.crumbs) { return (
(function () { var __result__ = [], __key__, idx; for (__key__ in this.crumbs) { if (this.crumbs.hasOwnProperty(__key__)) { idx = this.crumbs[__key__]; __result__.push(
"<li><a class=\"skinny\">></a></li><li><a href=\"#masthead\">" +
this.escape(idx) +
"</a></li>"
); } } return __result__.join(""); }).call(this)
);} else { return ""; } }).call(this) +
"</ul><ul class=\"secondary-nav\"><li><form><input class=\"search\" /></form></li><li style=\"margin-left:10px\" class=\"dropdown\"><a href=\"#toggle\" class=\"dropdown-toggle\">Account</a><ul class=\"dropdown-menu\"><li><a href=\"#\">secondary-link</a></li></ul></li></ul></div></div></div><div style=\"margin-top:40px\"></div><div class=\"container\">" +
content +
"</div>\n<script type=\"text/javascript\">\n//<![CDATA[\n" +
etc +
Expand Down Expand Up @@ -159,7 +167,18 @@ with(locals || {}) {
, "process": function anonymous(locals) {
with(locals || {}) {
try {
var _$output="<div class=\"row\"><div class=\"span4 leftnav\"><div class=\"nav-category\"><h3><div class=\"ico\">♛</div><a href=\"/\">Staging</a></h3><div class=\"listing active\"> <a href=\"/\">Servers</a> </div><div class=\"listing\"> <a href=\"/\">Urls</a> </div><div class=\"listing\"> <a href=\"/\">Comments</a> </div></div><div class=\"nav-category\"><h3><div class=\"ico\">♞</div><a href=\"/\">Web Server 1</a></h3><div class=\"listing active\"> <a href=\"/\">Processes</a> </div><div class=\"listing\"> <a href=\"/\">CPU</a> </div><div class=\"listing\"> <a href=\"/\">Memory</a> </div><div class=\"listing\"> <a href=\"/\">Disk</a> </div><div class=\"listing\"> <a href=\"/\">Network</a> </div><div class=\"listing\"> <a href=\"/\">Comments</a> </div></div><div class=\"nav-category\"><h3><div class=\"ico\">♟</div><a href=\"/\">mysql</a></h3><div class=\"listing\"> <a href=\"/\">Current</a> </div><div class=\"listing\"> <a href=\"/\">History</a> </div><div class=\"listing\"> <a href=\"/\">Comments</a> </div></div></div><div class=\"span12\"><div class=\"page-header\"><h1>mysql <small>PID: 42141 MEM%: 10.4 CPU%: 35.0</small> </h1></div><div class=\"row\"><div class=\"span6\"><h3>Memory</h3><div style=\"width:340px;height:200px;background-color:#666;\" class=\"graph\"></div></div><div class=\"span6\"><h3>CPU</h3><div style=\"width:340px;height:200px;background-color:#666;\" class=\"graph\"></div></div></div><div class=\"row\"><div class=\"span12\"><h2>Starting details</h2></div><div class=\"span4\"><h3>Started</h3></div><div class=\"span8\"><h3>Args</h3></div></div><div class=\"row\"><div class=\"span4\"><h3>Ports</h3></div></div></div></div>";
var _$output="";
this.crumbs = ["Staging", "Web Server 1", "Processes"]
; _$output = _$output +
"<div class=\"row\"><div class=\"span4 leftnav\"><div class=\"nav-category\"><h3><div class=\"ico\">♛</div><a href=\"/\">Staging</a></h3><div class=\"listing active\"> <a href=\"/\">Servers</a> </div><div class=\"listing\"> <a href=\"/\">Urls</a> </div><div class=\"listing\"> <a href=\"/\">Notes</a> </div></div><div class=\"nav-category\"><h3><div class=\"ico\">♞</div><a href=\"/\">Web Server 1</a></h3><div class=\"listing active\"> <a href=\"/\">Processes</a> </div><div class=\"listing\"> <a href=\"/\">CPU</a> </div><div class=\"listing\"> <a href=\"/\">Memory</a> </div><div class=\"listing\"> <a href=\"/\">Disk</a> </div><div class=\"listing\"> <a href=\"/\">Network</a> </div><div class=\"listing\"> <a href=\"/\">Notes</a> </div></div><div class=\"nav-category\"><h3><div class=\"ico\">♟</div><a href=\"/\">node</a></h3><div class=\"listing active\"> <a href=\"/\">Statistics</a> </div><div class=\"listing\"> <a href=\"/\">Alerts</a> </div><div class=\"listing\"> <a href=\"/\">Notes</a> </div></div></div><div class=\"span12\"><div style=\"margin-bottom:3px;\" class=\"page-header\"><h1>node <small class=\"strong\">PID: 42141 &nbsp; Started: Mon Sep 12 7:58 PM UTC</small> </h1></div><div style=\"margin-bottom:17px\" class=\"code\"> <input style=\"width: 100%;\" value=\"node /usr/local/bin/restartr -c lessc -a public/lesscss/bootstrap.less -a public/app.css public/lesscss/bootstrap.less public/lesscss/dxdt.less public/lesscss/forms.less public/lesscss/patterns.less public/lesscss/preboot.less public/lesscss/reset.less public/lesscss/scaffolding.less public/lesscss/tables.less public/lesscss/type.less\" class=\"stealth\" /> </div><div class=\"row\"><div class=\"span12\"><ul class=\"tabs\"><li class=\"active\"><a>graph</a></li><li><a href=\"/\"> add to dashboard </a></li><li><a href=\"/\"> compare timeframes </a></li></ul><div style=\"width:100%;height:300px;background-color:#666;color:white\" class=\"graph\">zoom view</div><div style=\"width:100%;height:75px;background-color:#666;margin-top:20px;color:white\" class=\"graph\">overview</div></div><div class=\"graph-options span4\"><h3>Stats</h3><ul class=\"unstyled\"><li> <input type=\"checkbox\" checked=\"checked\" /> Mem%</li><li> <input type=\"checkbox\" checked=\"checked\" /> CPU%</li><li> <input type=\"checkbox\" /> time</li><li> <input type=\"checkbox\" /> utime</li><li> <input type=\"checkbox\" /> rss</li><li> <input type=\"checkbox\" /> vsz</li></ul></div><div class=\"graph-options span4\"><h3>Annotate</h3><ul class=\"unstyled\"><li> <input type=\"checkbox\" checked=\"checked\" /> Process Notes</li><li> <input type=\"checkbox\" checked=\"checked\" /> Staging Notes</li><li> <input type=\"checkbox\" checked=\"checked\" /> Web Server 1 Notes</li></ul></div><div class=\"graph-options span4\"><h3>Additional Stats</h3><input type=\"text\" placeholder=\"server or environment stats\" class=\"search\" /></div></div><div class=\"row\"><div class=\"span6\"><h3>Open TCP Ports</h3><table class=\"tcp-ports\"><tr><td class=\"host\">*</td><td class=\"port\">" +
this.escape(":80") +
"</td><td><a href=\"/\"> add check </a></td></tr><tr><td class=\"host\">*</td><td class=\"port\">" +
this.escape(":443") +
"</td><td><a href=\"/\"> add check </a></td></tr><tr><td class=\"host\">localhost</td><td class=\"port\">" +
this.escape(":3000") +
"</td><td></td></tr><tr><td class=\"host\">*</td><td class=\"port\">" +
this.escape(":8080") +
"</td><td><a href=\"/\"> add check </a></td></tr></table></div><div class=\"span6\"><h3>Notes</h3><input type=\"text\" /> <input type=\"button\" value=\"Create\" class=\"btn success\" /> <ul class=\"unstyled\"><li><small> Wed Sep 14 </small>Opened local port for migration</li><li><small> Mon Sep 12 </small>Modified fsync frequency</li></ul></div></div><div class=\"row\"><div class=\"span12\"><h2>Events</h2><div class=\"row\"><div class=\"span4\"><h3>Wed Sep 14</h3></div><div class=\"span8\"><div class=\"alert-message\">9:22 AM UTC Began listening to port 3000</div></div></div><hr /><div class=\"row\"><div class=\"span4\"><h3>Mon Sep 12</h3></div><div class=\"span8\"><div class=\"alert-message success\">8:05 PM UTC CPU stayed below 80% for 2 Minutes</div><div class=\"alert-message error\">7:58 PM UTC CPU Exceeded 90% for 2 Minutes</div><div class=\"alert-message\">2:22 PM UTC Process Started</div></div></div></div></div></div></div>";
return _$output; } catch (e) {
return "\n<pre class='error'>" + this.escape(e.stack) + "</pre>\n";
}
Expand All @@ -177,7 +196,7 @@ with(locals || {}) {
, "server": function anonymous(locals) {
with(locals || {}) {
try {
var _$output="<div class=\"row\"><div class=\"span4 leftnav\"><div class=\"nav-category\"><h3><div class=\"ico\">♛</div><a href=\"/\">Staging</a></h3><div class=\"listing active\"> <a href=\"/\">Servers</a> </div><div class=\"listing\"> <a href=\"/\">Urls</a> </div><div class=\"listing\"> <a href=\"/\">Comments</a> </div></div><div class=\"nav-category\"><h3><div class=\"ico\">♞</div><a href=\"/\">Web Server 1</a></h3><div class=\"listing active\"> <a href=\"/\">Processes</a> </div><div class=\"listing\"> <a href=\"/\">CPU</a> </div><div class=\"listing\"> <a href=\"/\">Memory</a> </div><div class=\"listing\"> <a href=\"/\">Disk</a> </div><div class=\"listing\"> <a href=\"/\">Network</a> </div><div class=\"listing\"> <a href=\"/\">Comments</a> </div></div><div class=\"nav-category\"><h3><div class=\"ico\">♟</div><a href=\"/\">mysql</a></h3><div class=\"listing\"> <a href=\"/\">Current</a> </div><div class=\"listing\"> <a href=\"/\">History</a> </div><div class=\"listing\"> <a href=\"/\">Comments</a> </div></div></div><div class=\"span12\"><div class=\"row\"><div style=\"border-right:1px solid black; margin-right: -1px\" class=\"span6\"><h2>Most Memory</h2></div><div class=\"span6\"><h2>Most CPU</h2></div></div><div class=\"row\"><div class=\"span11 column\"><table class=\"zebra-striped\"><thead><tr><th>PID</th>" +
var _$output="<div class=\"row\"><div class=\"span4 leftnav\"><div class=\"nav-category\"><h3><div class=\"ico\">♛</div><a href=\"/\">Staging</a></h3><div class=\"listing active\"> <a href=\"/\">Servers</a> </div><div class=\"listing\"> <a href=\"/\">Urls</a> </div><div class=\"listing\"> <a href=\"/\">Comments</a> </div></div><div class=\"nav-category\"><h3><div class=\"ico\">♞</div><a href=\"/\">Web Server 1</a></h3><div class=\"listing active\"> <a href=\"/\">Processes</a> </div><div class=\"listing\"> <a href=\"/\">CPU</a> </div><div class=\"listing\"> <a href=\"/\">Memory</a> </div><div class=\"listing\"> <a href=\"/\">Disk</a> </div><div class=\"listing\"> <a href=\"/\">Network</a> </div><div class=\"listing\"> <a href=\"/\">Comments</a> </div></div></div><div class=\"span12\"><h1>Processes</h1><div class=\"row\"><div style=\"border-right:1px solid black; margin-right: -1px\" class=\"span6\"><h2>Most Memory</h2></div><div class=\"span6\"><h2>Most CPU</h2></div></div><div class=\"row\"><div class=\"span12 column\"><table class=\"zebra-striped\"><thead><tr><th>PID</th>" +
"";columns = "lstart ucomm mem cpu rss vsz utime time".split(" "); _$output = _$output +
"";for(idx in columns){; _$output = _$output +
"<th>" +
Expand Down
Loading

0 comments on commit 34e02ce

Please sign in to comment.