Telnet terminal built using HTML5 Canvas/WebSocket/Node.js
jsterm.com
jsterm.com
http://news.ycombinator.com/item?id=852573
http://github.com/paddymul/rxvt-js
HTML and not Canvas, so cut-and-paste works.
var tail = spawn('ssh', ['user@yourserver.com', 'tail', '-f', '/path/to/some.log']); tail.stdout.addListener('data', function (data) { listener.broadcast(data.toString()); });
I did a really simple version of what you're talking about with some client-side parsing of rails logs for fun. Feel free to contact me and I'll be happy to zip up the source and send it your way.
So what I did now is that basically I've made a 'forever frame' in my html which points to a URI where app resides. That app now outputs multipart/x-mixed-replace MIME which is then loaded into an iframe in my html and JS copied when onLoad happens to a styled div.
I've made a small proof of concept here:
- here is a straight sample output (in this case a dummy php): http://www.vga.hr/console_test/count.php
since this is a multipart/x-mixed-replace, I can blurt out a html (as 'Start' is) and plain afterwards.
- here is a simple client html: http://www.vga.hr/console_test/con_out.html - and another one which concatenates: http://www.vga.hr/console_test/con_out_plus.html
so my idea was basically to output text/html <script> out when I need to issue commands to a reader (for commands like overwrite mode, concatenate mode, highlight, clear, flash... whatever - basically a state machine) and text/plain for actual messages being shown.
I wish I could get rid of 'loading' status in browser while doing a long poll as primitive as I am now (forever frame).
tl;dr; should be on a client side only with x-mixed-replace on server.
Thanks again.
http://bgpmon.netsec.colostate.edu/index.php/live-data
You can also telnet to some CISCO routers and access their routing tables. Host: route-views.routeviews.org Port: 23
Follow instructions. It looks like it doesn't work well. Either characters are scrambled, or the echoed characters are capitalised (it shouldn't be).
I tried DOM manipulation, but I couldn't make it run quickly with a color-per-character scheme, or even after some segmentation into the specific needs of the tracker. I am not an expert at that subject, though, so I've probably overlooked a lot of the tricks.
Within Canvas I looked into caching the characters as bitmaps and drawing those, but it turned out that FF4 Canvas has a lot of fixed overhead in each API call, so my best bet was to batch each color used into a different layer, and draw them row-by-row, layer-by-layer with textFill(). If textFill() were to let me use newlines it would be even better.