MojoLlama
Archived Mojo/MAX quantizer and serving research repository (read-only history)
Brought by drakestapleton
MojoLlama / desktop / renderer / log.html
| 1 | <!DOCTYPE html> |
| 2 | <html lang="en"> |
| 3 | <head> |
| 4 | <meta charset="UTF-8"> |
| 5 | <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| 6 | <title>MojoLlama Studio — Console Log</title> |
| 7 | <style> |
| 8 | :root { |
| 9 | --bg: #0d1117; --surface: #161b22; --border: #30363d; |
| 10 | --text: #e6edf3; --dim: #8b949e; --accent: #58a6ff; |
| 11 | --green: #3fb950; --red: #f85149; --yellow: #d29922; |
| 12 | } |
| 13 | * { margin: 0; padding: 0; box-sizing: border-box; } |
| 14 | body { |
| 15 | font-family: 'SF Mono', 'Monaco', 'Menlo', 'Consolas', monospace; |
| 16 | background: var(--bg); color: var(--text); font-size: 12px; |
| 17 | height: 100vh; display: flex; flex-direction: column; |
| 18 | overflow: hidden; |
| 19 | } |
| 20 | .toolbar { |
| 21 | display: flex; align-items: center; gap: 8px; |
| 22 | padding: 8px 12px; background: var(--surface); |
| 23 | border-bottom: 1px solid var(--border); flex-shrink: 0; |
| 24 | } |
| 25 | .toolbar-title { |
| 26 | font-size: 12px; font-weight: 600; color: var(--accent); |
| 27 | margin-right: auto; font-family: -apple-system, sans-serif; |
| 28 | } |
| 29 | .status-badge { |
| 30 | display: flex; align-items: center; gap: 5px; |
| 31 | font-size: 11px; padding: 3px 8px; |
| 32 | border-radius: 4px; background: var(--bg); |
| 33 | font-family: -apple-system, sans-serif; |
| 34 | } |
| 35 | .badge-dot { |
| 36 | width: 6px; height: 6px; border-radius: 50%; display: inline-block; |
| 37 | } |
| 38 | .badge-dot.running { background: var(--green); } |
| 39 | .badge-dot.stopped { background: var(--dim); } |
| 40 | .badge-dot.starting, |
| 41 | .badge-dot.stopping { background: var(--yellow); animation: pulse 1s infinite; } |
| 42 | .badge-dot.error { background: var(--red); } |
| 43 | @keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } } |
| 44 | |
| 45 | .search-box { |
| 46 | display: flex; align-items: center; gap: 4px; |
| 47 | padding: 3px 8px; background: var(--bg); |
| 48 | border: 1px solid var(--border); border-radius: 4px; |
| 49 | } |
| 50 | .search-box input { |
| 51 | background: transparent; border: none; color: var(--text); |
| 52 | font-size: 11px; outline: none; width: 160px; |
| 53 | font-family: 'SF Mono', monospace; |
| 54 | } |
| 55 | .search-box input::placeholder { color: var(--dim); } |
| 56 | |
| 57 | .btn { |
| 58 | padding: 4px 10px; border: none; border-radius: 4px; |
| 59 | cursor: pointer; font-size: 11px; font-weight: 500; |
| 60 | transition: all .2s; font-family: -apple-system, sans-serif; |
| 61 | } |
| 62 | .btn:hover { filter: brightness(1.15); } |
| 63 | .btn-dim { background: var(--border); color: var(--text); } |
| 64 | .btn-red { background: var(--red); color: #fff; } |
| 65 | |
| 66 | .log-container { |
| 67 | flex: 1; overflow-y: auto; padding: 4px 0; |
| 68 | scroll-behavior: smooth; |
| 69 | } |
| 70 | .log-container::-webkit-scrollbar { width: 6px; } |
| 71 | .log-container::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; } |
| 72 | .log-container::-webkit-scrollbar-track { background: transparent; } |
| 73 | |
| 74 | .log-entry { |
| 75 | padding: 2px 12px; line-height: 1.5; |
| 76 | border-bottom: 1px solid rgba(48, 54, 61, 0.3); |
| 77 | white-space: pre-wrap; word-break: break-all; |
| 78 | transition: background .15s; |
| 79 | } |
| 80 | .log-entry:hover { background: rgba(88,166,255,0.05); } |
| 81 | |
| 82 | .log-entry .timestamp { |
| 83 | color: var(--dim); margin-right: 8px; |
| 84 | -webkit-user-select: none; user-select: none; |
| 85 | } |
| 86 | .log-entry .level-tag { |
| 87 | display: inline-block; font-size: 10px; font-weight: 600; |
| 88 | padding: 0 4px; border-radius: 2px; margin-right: 6px; |
| 89 | text-transform: uppercase; min-width: 36px; text-align: center; |
| 90 | } |
| 91 | .level-info .level-tag { color: var(--accent); background: rgba(88,166,255,0.1); } |
| 92 | .level-warn .level-tag { color: var(--yellow); background: rgba(210,153,34,0.1); } |
| 93 | .level-error .level-tag { color: var(--red); background: rgba(248,81,73,0.1); } |
| 94 | .level-debug .level-tag { color: var(--dim); background: rgba(139,148,158,0.1); } |
| 95 | |
| 96 | .log-entry .message { color: var(--text); } |
| 97 | |
| 98 | .filter-bar { |
| 99 | display: flex; gap: 4px; padding: 4px 12px; |
| 100 | background: var(--surface); border-top: 1px solid var(--border); |
| 101 | flex-shrink: 0; flex-wrap: wrap; |
| 102 | } |
| 103 | .filter-btn { |
| 104 | padding: 2px 8px; border: 1px solid var(--border); |
| 105 | border-radius: 3px; background: transparent; color: var(--dim); |
| 106 | cursor: pointer; font-size: 10px; font-weight: 500; |
| 107 | transition: all .15s; font-family: -apple-system, sans-serif; |
| 108 | } |
| 109 | .filter-btn:hover { border-color: var(--accent); color: var(--text); } |
| 110 | .filter-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); } |
| 111 | .filter-count { font-size: 10px; color: var(--dim); margin-left: auto; } |
| 112 | |
| 113 | .empty-state { |
| 114 | display: flex; align-items: center; justify-content: center; |
| 115 | height: 100%; color: var(--dim); font-size: 13px; |
| 116 | font-family: -apple-system, sans-serif; |
| 117 | } |
| 118 | </style> |
| 119 | </head> |
| 120 | <body> |
| 121 | |
| 122 | <div class="toolbar"> |
| 123 | <span class="toolbar-title">📋 Console Log</span> |
| 124 | <div class="status-badge"> |
| 125 | <span class="badge-dot stopped" id="statusDot"></span> |
| 126 | <span id="statusLabel">Server: checking...</span> |
| 127 | </div> |
| 128 | <div class="search-box"> |
| 129 | <input type="text" id="searchInput" placeholder="Filter log..." oninput="applyFilter()"> |
| 130 | </div> |
| 131 | <button class="btn btn-dim" onclick="clearLog()">Clear</button> |
| 132 | </div> |
| 133 | |
| 134 | <div class="log-container" id="logContainer"> |
| 135 | <div class="empty-state">Waiting for server output...</div> |
| 136 | </div> |
| 137 | |
| 138 | <div class="filter-bar"> |
| 139 | <button class="filter-btn active" data-level="all" onclick="toggleFilter(this, 'all')">All</button> |
| 140 | <button class="filter-btn active" data-level="info" onclick="toggleFilter(this, 'info')">Info</button> |
| 141 | <button class="filter-btn active" data-level="warn" onclick="toggleFilter(this, 'warn')">Warn</button> |
| 142 | <button class="filter-btn active" data-level="error" onclick="toggleFilter(this, 'error')">Error</button> |
| 143 | <button class="filter-btn active" data-level="debug" onclick="toggleFilter(this, 'debug')">Debug</button> |
| 144 | <span class="filter-count" id="entryCount">0 entries</span> |
| 145 | <span style="font-size:10px;color:var(--dim)" id="autoScrollLabel">▼ Auto-scroll</span> |
| 146 | </div> |
| 147 | |
| 148 | <script src="log.js"></script> |
| 149 | </body> |
| 150 | </html> |