Comran Morshed | daf6923 | 2016-04-20 22:25:37 -0700 | [diff] [blame^] | 1 | <!-- |
| 2 | From Seasocks version 1.1.2, under /src/main/web |
| 3 | |
| 4 | Copyright (c) 2013, Matt Godbolt |
| 5 | All rights reserved. |
| 6 | |
| 7 | Redistribution and use in source and binary forms, with or without |
| 8 | modification, are permitted provided that the following conditions are met: |
| 9 | |
| 10 | Redistributions of source code must retain the above copyright notice, this |
| 11 | list of conditions and the following disclaimer. |
| 12 | Redistributions in binary form must reproduce the above copyright notice, this |
| 13 | list of conditions and the following disclaimer in the documentation and/or |
| 14 | other materials provided with the distribution. |
| 15 | |
| 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND |
| 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
| 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
| 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
| 20 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 21 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
| 22 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
| 23 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
| 24 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 25 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 26 | --> |
| 27 | |
| 28 | <html DOCTYPE=html> |
| 29 | <head> |
| 30 | <title>SeaSocks Stats</title> |
| 31 | <link href="/_seasocks.css" rel="stylesheet"> |
| 32 | <script src="/_jquery.min.js" type="text/javascript"></script> |
| 33 | <script> |
| 34 | function clear() { |
| 35 | $('#cx tbody tr:visible').remove(); |
| 36 | } |
| 37 | function connection(stats) { |
| 38 | c = $('#cx .template').clone().removeClass('template').appendTo('#cx'); |
| 39 | for (stat in stats) { |
| 40 | c.find('.' + stat).text(stats[stat]); |
| 41 | } |
| 42 | } |
| 43 | function refresh() { |
| 44 | var stats = new XMLHttpRequest(); |
| 45 | stats.open("GET", "/_livestats.js", false); |
| 46 | stats.send(null); |
| 47 | eval(stats.responseText); |
| 48 | } |
| 49 | $(function() { |
| 50 | setInterval(refresh, 1000); |
| 51 | refresh(); |
| 52 | }); |
| 53 | </script> |
| 54 | </head> |
| 55 | <body><h1>SeaSocks Stats</h1></body> |
| 56 | |
| 57 | <h2>Connections</h2> |
| 58 | <table id="cx"> |
| 59 | <thead> |
| 60 | <tr> |
| 61 | <th>Connection time</th> |
| 62 | <th>Fd</th> |
| 63 | <th>Addr</th> |
| 64 | <th>URI</th> |
| 65 | <th>Username</th> |
| 66 | <th>Pending read</th> |
| 67 | <th>Bytes read</th> |
| 68 | <th>Pending send</th> |
| 69 | <th>Bytes sent</th> |
| 70 | </tr> |
| 71 | </thead> |
| 72 | <tbody> |
| 73 | <tr class="template"> |
| 74 | <td class="since"></td> |
| 75 | <td class="fd"></td> |
| 76 | <td class="addr"></td> |
| 77 | <td class="uri"></td> |
| 78 | <td class="user"></td> |
| 79 | <td class="input"></td> |
| 80 | <td class="read"></td> |
| 81 | <td class="output"></td> |
| 82 | <td class="written"></td> |
| 83 | </tr> |
| 84 | </tbody> |
| 85 | </table> |
| 86 | |
| 87 | </body> |
| 88 | </html> |