{{ define "admin/activity.html" }}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>WarpBox Admin Activity</title>
    <link rel="icon" type="image/png" href="/static/WarpBoxLogo.png">
    <link rel="stylesheet" href="/static/css/app.css">
    <link rel="stylesheet" href="/static/css/window.css">
    <link rel="stylesheet" href="/static/css/components/buttons.css">
    <link rel="stylesheet" href="/static/css/components/toast.css">
    <link rel="stylesheet" href="/static/css/admin.css">
    <link rel="stylesheet" href="/static/css/activity.css">
</head>
<body>
    <div class="admin-shell">
        <div class="admin-frame">
            {{ template "admin/header.html" . }}
            <div class="win98-window admin-workspace-window" role="main">
                <div class="win98-titlebar">
                    <div class="win98-titlebar-label">
                        <img class="win98-titlebar-icon" src="/static/WarpBoxLogo.png" alt="" aria-hidden="true">
                        <h1>WarpBox Activity</h1>
                    </div>
                    <div class="win98-window-controls" aria-hidden="true">
                        <button class="win98-control" type="button">_</button>
                        <button class="win98-control" type="button">□</button>
                        <button class="win98-control" type="button">x</button>
                    </div>
                </div>

                <nav class="menu-bar" aria-label="Activity toolbar">
                    <div class="menu-item">
                        <button class="menu-button" type="button" aria-expanded="false">File</button>
                        <div class="menu-popup">
                            <button class="menu-action" type="button" data-command="refresh"><span>R</span><span>Refresh list</span><span>F5</span></button>
                            <button class="menu-action" type="button" data-command="export"><span>E</span><span>Export visible JSON</span><span></span></button>
                        </div>
                    </div>
                </nav>

                <div class="admin-workspace-body activity-page-body">
                    <section class="activity-panel">
                        <div class="activity-toolbar-grid">
                            <input class="activity-input" id="activity-search" type="search" placeholder="Search kind, message, ip, path">
                            <select class="activity-select" id="activity-severity">
                                <option value="all" selected>All severities</option>
                                <option value="high">High</option>
                                <option value="medium">Medium</option>
                                <option value="low">Low</option>
                            </select>
                            <select class="activity-select" id="activity-kind">
                                <option value="all" selected>All kinds</option>
                            </select>
                        </div>

                        <div class="activity-table-wrap">
                            <table class="activity-table">
                                <thead>
                                    <tr>
                                        <th>Time</th>
                                        <th>Kind</th>
                                        <th>Severity</th>
                                        <th>IP</th>
                                        <th>Method</th>
                                        <th>Path</th>
                                        <th>Message</th>
                                    </tr>
                                </thead>
                                <tbody id="activity-body"></tbody>
                            </table>
                        </div>
                    </section>
                </div>

                <footer class="status-bar admin-dashboard-statusbar">
                    <span id="activity-status-left">{{ len .Events }} events loaded</span>
                    <span id="activity-status-middle">retention from settings</span>
                    <span id="activity-status-right">admin only</span>
                </footer>
            </div>
        </div>
    </div>

    <div class="toast" id="toast" role="status" aria-live="polite"></div>
    <script id="activity-data" type="application/json">{{ toJSON .Events }}</script>
    <script src="/static/js/warpbox-ui.js"></script>
    <script src="/static/js/admin/activity.js"></script>
</body>
</html>
{{ end }}
