A self hosted chat application with end-to-end encrypted messaging.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
474 B

  1. import { getStats } from "../../common/ajax/Messages";
  2. import { Credentials } from "../../common/global/Credentials";
  3. import log from "loglevel";
  4. export async function stats(): Promise<void> {
  5. const stats = await getStats(Credentials.authToken);
  6. $("#totalMessages").text(stats.totalMessages);
  7. $("#totalUsers").text(stats.totalUsers);
  8. $("#totalOnlineUsers").text(stats.totalOnlineUsers);
  9. $("#numMessagesToday").text(stats.numMessagesToday);
  10. log.debug(stats);
  11. }