<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>{{ title }} - Pynenc Monitor</title>

    <!-- Bootstrap CSS from CDN -->
    <link
      href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css"
      rel="stylesheet"
    />
  </head>
  <body>
    <div class="container mt-5">
      <div class="row justify-content-center">
        <div class="col-md-8">
          <div class="card">
            <div class="card-header bg-danger text-white">
              <h4 class="mb-0">{{ title }}</h4>
            </div>
            <div class="card-body">
              <p class="alert alert-danger">{{ message }}</p>

              <h5>Running with a specific app</h5>
              <p>Start the monitor with a valid Pynenc app instance:</p>
              <pre><code>pynenc --app your_app.py monitor</code></pre>

              <h5 class="mt-4">Using app discovery from state backends</h5>
              <p>
                You can also run the monitor without specifying an app by
                configuring a state backend:
              </p>

              <div class="card mb-3">
                <div class="card-header bg-light">Environment Variables</div>
                <div class="card-body">
                  <pre><code>PYNENC__STATE_BACKEND_CLS=RedisStateBackend \
PYNENC__REDIS_HOST=localhost \
PYNENC__REDIS_PORT=6379 \
pynenc monitor</code></pre>
                </div>
              </div>

              <div class="card mb-3">
                <div class="card-header bg-light">
                  Configuration File (pyproject.toml)
                </div>
                <div class="card-body">
                  <pre><code>[tool.pynenc]
state_backend_cls = "RedisStateBackend"

[tool.pynenc.redis]
host = "localhost"
port = 6379</code></pre>
                </div>
              </div>

              <p class="text-muted mt-3">
                The monitor will attempt to discover apps registered in the
                configured state backend. For more information, refer to the
                Pynenc documentation on configuration options.
              </p>
            </div>
          </div>
        </div>
      </div>
    </div>

    <!-- Bootstrap JS Bundle -->
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
  </body>
</html>
