feat: 2,3,7,8,9 - search/sort, Docker, log viewer, .tsb backup
- Dashboard browser: search box + sort dropdown (name/category/author) - Dockerfile + docker-compose.yml - Debug page: log viewer button (/api/logs) - Settings: .tsb full backup export (dashboards+scenes+config) - F1 composite dashboard previously included
This commit is contained in:
@@ -33,6 +33,17 @@ const PageDebug = {
|
||||
document.getElementById('debug-autoscroll')?.addEventListener('change', (e) => {
|
||||
this._autoScroll = e.target.checked;
|
||||
});
|
||||
|
||||
document.getElementById('debug-show-log')?.addEventListener('click', async () => {
|
||||
try {
|
||||
const res = await fetch('/api/logs?lines=100');
|
||||
const data = await res.json();
|
||||
const el = document.getElementById('debug-raw');
|
||||
if (el) el.innerHTML = data.lines.map(l =>
|
||||
`<span style="color:${l.includes('ERROR')?'red':l.includes('WARNING')?'#f90':l.includes('INFO')?'#888':'#555'}">${l}</span>`
|
||||
).join('\n');
|
||||
} catch (e) {}
|
||||
});
|
||||
},
|
||||
|
||||
_onTelemetry(data) {
|
||||
@@ -97,6 +108,7 @@ const PageDebug = {
|
||||
<label style="display:flex;align-items:center;gap:6px;font-size:12px;color:var(--text-secondary);">
|
||||
<input type="checkbox" id="debug-autoscroll" checked> 自动滚动
|
||||
</label>
|
||||
<button id="debug-show-log" class="btn btn-sm btn-secondary">📄 日志</button>
|
||||
</div>
|
||||
<div style="display:grid;grid-template-columns:1fr 1fr;gap:16px;flex:1;min-height:0;">
|
||||
<div style="overflow-y:auto;">
|
||||
|
||||
Reference in New Issue
Block a user