<!doctype html>
<html lang="en-US">
<head>
    <title>Marginalia Search Status</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <link rel="stylesheet" href="/style.css" />
</head>
<body>
  <h1>Marginalia Search Status</h1>

  <p>This page polls the status of each public endpoint every 15 seconds, and keeps statistics for 14 days.</p>

  <table>
  {{#each measurements}}
      <tr><th colspan="2">{{name}}</th></tr>

      {{#if isOnline}}
          <tr><td>Online</td><td>Yes &#128526;</td></tr>
          <tr><td>Request time</td><td>{{requestTimeMs}} ms</td></tr>
          <tr><td>Avg request time</td><td>{{avgRequestTimeMs}} ms</td></tr>
          <tr><td>Last error</td><td>{{timeSinceLastOffline}}</td></tr>
      {{/if}}
      {{#unless isOnline}}
            <tr><td>Online</td><td>No &#128293;</td></tr>
            <tr><td>Last seen</td><td>{{timeSinceLastOnline}}</td></tr>
      {{/unless}}
        <tr><td># failures</td><td>{{numFailures}}</td></tr>
        <tr><td># successes</td><td>{{numSuccesses}}</td></tr>
        <tr><td>Percent online</td><td>{{percentOnlineStr}}</td></tr>
  {{/each}}
  </table>
</body>