view mod_http_stats_stream/example.html @ 4723:0a0334a3a784

mod_muc_http_auth: Allow for enabling/disabling per user host IMPORTANT: This is a breaking change. The `muc_http_auth_enabled_for` and `muc_http_auth_disabled_for` options are now maps (with user hosts as keys) and not sets.
author JC Brand <jc@opkode.com>
date Mon, 25 Oct 2021 15:58:16 +0200
parents 1908e7aefca9
children
line wrap: on
line source

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Stats</title>
</head>
<body>
<h1>Glorious statistics!</h1>
<script>

var evtSource = new EventSource("/stats_stream");

evtSource.addEventListener("stats-full", function(e) {
	var initial_stats = JSON.parse(e.data);
	console.log(initial_stats);

}, false);

evtSource.addEventListener("stats-updated", function(e) {
	var updated_stats = JSON.parse(e.data);
	console.log(updated_stats);

}, false);

</script>
</body>
</html>