mod_http_stats_stream/example.html
changeset 2437 1908e7aefca9
parent 2436 47a6f01231b2
equal deleted inserted replaced
2436:47a6f01231b2 2437:1908e7aefca9
     6 </head>
     6 </head>
     7 <body>
     7 <body>
     8 <h1>Glorious statistics!</h1>
     8 <h1>Glorious statistics!</h1>
     9 <script>
     9 <script>
    10 
    10 
    11 var evtSource = new EventSource("/streamstats");
    11 var evtSource = new EventSource("/stats_stream");
    12 
    12 
    13 evtSource.addEventListener("stats-full", function(e) {
    13 evtSource.addEventListener("stats-full", function(e) {
    14 	var initial_stats = JSON.parse(e.data);
    14 	var initial_stats = JSON.parse(e.data);
    15 	console.log(initial_stats);
    15 	console.log(initial_stats);
    16 
    16