mirror of
https://github.com/MarekWo/mc-webui.git
synced 2026-06-11 09:14:52 +02:00
feat(analyzer): add configurable analyzer services in Settings
Add a Settings > Analyzer tab letting users CRUD custom MeshCore Analyzer
services with a star-toggle default and inline disabled switch. The chart
icon under each group-chat message now resolves at click time: built-in
Letsmesh when no enabled customs, the default when set, or a chooser
modal otherwise. Backend stops shipping the prebuilt analyzer_url and
emits packet_hash instead — the frontend substitutes {packetHash} in the
chosen URL template.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -53,6 +53,19 @@ CREATE TABLE IF NOT EXISTS regions (
|
||||
updated_at TEXT NOT NULL DEFAULT (datetime('now'))
|
||||
);
|
||||
|
||||
-- User-configured MeshCore Analyzer services
|
||||
CREATE TABLE IF NOT EXISTS analyzers (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
name TEXT NOT NULL UNIQUE,
|
||||
url_template TEXT NOT NULL, -- must contain '{packetHash}'
|
||||
is_default INTEGER NOT NULL DEFAULT 0,
|
||||
is_disabled INTEGER NOT NULL DEFAULT 0,
|
||||
created_at TEXT NOT NULL DEFAULT (datetime('now')),
|
||||
updated_at TEXT NOT NULL DEFAULT (datetime('now'))
|
||||
);
|
||||
CREATE UNIQUE INDEX IF NOT EXISTS idx_analyzers_one_default
|
||||
ON analyzers(is_default) WHERE is_default = 1;
|
||||
|
||||
-- Per-channel region mapping (absent row = no override; firmware default applies)
|
||||
CREATE TABLE IF NOT EXISTS channel_scopes (
|
||||
channel_idx INTEGER PRIMARY KEY,
|
||||
|
||||
Reference in New Issue
Block a user