signalk-questdb 1.5.2 → 1.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +29 -0
- package/dist/history-v2.js +32 -2
- package/dist/history-v2.js.map +1 -1
- package/dist/host-limits.d.ts +9 -0
- package/dist/host-limits.js +58 -0
- package/dist/host-limits.js.map +1 -0
- package/dist/index.js +435 -49
- package/dist/index.js.map +1 -1
- package/dist/query-client.d.ts +1 -1
- package/dist/query-client.js +13 -2
- package/dist/query-client.js.map +1 -1
- package/dist/test/history-v2.test.js +93 -0
- package/dist/test/history-v2.test.js.map +1 -1
- package/dist/test/host-limits.test.d.ts +1 -0
- package/dist/test/host-limits.test.js +71 -0
- package/dist/test/host-limits.test.js.map +1 -0
- package/dist/test/query-client.test.js +72 -0
- package/dist/test/query-client.test.js.map +1 -1
- package/dist/test/wal-monitor.test.d.ts +1 -0
- package/dist/test/wal-monitor.test.js +333 -0
- package/dist/test/wal-monitor.test.js.map +1 -0
- package/dist/wal-monitor.d.ts +65 -0
- package/dist/wal-monitor.js +293 -0
- package/dist/wal-monitor.js.map +1 -0
- package/package.json +1 -1
- package/public/540.js +1 -1
- package/public/805.js +1 -1
- package/public/main.js +1 -1
- package/public/remoteEntry.js +1 -1
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// WAL suspension monitor: detection, one-shot automatic lossless recovery,
|
|
3
|
+
// and the data needed for a guided (bounded, explicit) skip of an unreadable
|
|
4
|
+
// segment.
|
|
5
|
+
//
|
|
6
|
+
// Background — how a WAL table dies silently: QuestDB ingestion is two-stage.
|
|
7
|
+
// The sequencer durably commits every ILP batch (sequencerTxn advances, the
|
|
8
|
+
// client sees success), then a background apply job merges transactions into
|
|
9
|
+
// the partitions (writerTxn advances). When the apply job hits an error it
|
|
10
|
+
// SUSPENDS the table: sequencerTxn keeps climbing, writerTxn freezes, queries
|
|
11
|
+
// serve stale data, and no client-visible error is raised anywhere. Observed
|
|
12
|
+
// in the field for 17 days straight before anyone noticed.
|
|
13
|
+
//
|
|
14
|
+
// Causes split into two classes with different remedies:
|
|
15
|
+
// - Transient (disk full since cleared, OOM, fd exhaustion): a plain
|
|
16
|
+
// `RESUME WAL` replays every pending transaction — lossless, done.
|
|
17
|
+
// - Unreadable segment (an unclean container stop mid-write corrupts the
|
|
18
|
+
// in-flight segment's column files; QuestDB then throws e.g. an
|
|
19
|
+
// AssertionError from VarcharTypeDriver on EVERY apply attempt): plain
|
|
20
|
+
// resume re-suspends within milliseconds, forever. The only way forward
|
|
21
|
+
// is `RESUME WAL FROM TXN <n>` past the unreadable data — lossy, so it
|
|
22
|
+
// must be explicit, minimal, and quantified before a human triggers it.
|
|
23
|
+
//
|
|
24
|
+
// The monitor auto-applies the lossless remedy (once per stall point) and
|
|
25
|
+
// prepares — but never auto-applies — the lossy one.
|
|
26
|
+
//
|
|
27
|
+
// A trap this design dodges: errorTag/errorMessage from wal_tables() often
|
|
28
|
+
// cannot explain a suspension. A raw Java error (the corrupt-segment case!)
|
|
29
|
+
// sets no errorTag, and the detail lives only in engine memory — a container
|
|
30
|
+
// recreate wipes it while the suspended flag itself persists. Hence
|
|
31
|
+
// `extractApplyError` scrapes the engine log for the real reason while it is
|
|
32
|
+
// still there, and the caller persists the snapshot to the server log.
|
|
33
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34
|
+
exports.WalMonitor = void 0;
|
|
35
|
+
exports.buildPendingSegmentsSQL = buildPendingSegmentsSQL;
|
|
36
|
+
exports.skipPlansEqual = skipPlansEqual;
|
|
37
|
+
exports.computeSkipPlan = computeSkipPlan;
|
|
38
|
+
exports.extractApplyError = extractApplyError;
|
|
39
|
+
// Pending-segment map for a suspended table, oldest first. The WHERE clause
|
|
40
|
+
// restricts to unapplied transactions, so the first group is exactly the
|
|
41
|
+
// stuck segment's unreadable tail and its min(timestamp) is the freeze time.
|
|
42
|
+
function buildPendingSegmentsSQL(table, writerTxn) {
|
|
43
|
+
const safeTable = table.replace(/'/g, "''");
|
|
44
|
+
const txn = Math.max(0, Math.floor(writerTxn));
|
|
45
|
+
return ("SELECT walId, segmentId, count() txns, " +
|
|
46
|
+
"min(sequencerTxn) minTxn, max(sequencerTxn) maxTxn, " +
|
|
47
|
+
"min(timestamp) minTimestamp, max(timestamp) maxTimestamp " +
|
|
48
|
+
`FROM wal_transactions('${safeTable}') ` +
|
|
49
|
+
`WHERE sequencerTxn > ${txn} ` +
|
|
50
|
+
"GROUP BY walId, segmentId ORDER BY minTxn");
|
|
51
|
+
}
|
|
52
|
+
// True when the operator-confirmed plan (untrusted request payload) matches
|
|
53
|
+
// the freshly computed one in EVERY field. The skip is destructive, so a
|
|
54
|
+
// confirmation must prove the operator saw exactly what is about to be
|
|
55
|
+
// skipped — not just the same target txn, which can coincide across plans
|
|
56
|
+
// with different loss windows.
|
|
57
|
+
function skipPlansEqual(plan, confirmed) {
|
|
58
|
+
if (typeof confirmed !== "object" || confirmed === null)
|
|
59
|
+
return false;
|
|
60
|
+
const c = confirmed;
|
|
61
|
+
return (Number(c.skipToTxn) === plan.skipToTxn &&
|
|
62
|
+
Number(c.skippedTxns) === plan.skippedTxns &&
|
|
63
|
+
Number(c.walId) === plan.walId &&
|
|
64
|
+
Number(c.segmentId) === plan.segmentId &&
|
|
65
|
+
String(c.skipWindowStart) === plan.skipWindowStart &&
|
|
66
|
+
String(c.skipWindowEnd) === plan.skipWindowEnd &&
|
|
67
|
+
c.tailSkip === plan.tailSkip);
|
|
68
|
+
}
|
|
69
|
+
function computeSkipPlan(segments) {
|
|
70
|
+
if (segments.length === 0)
|
|
71
|
+
return null;
|
|
72
|
+
const [stuck, ...rest] = segments;
|
|
73
|
+
return {
|
|
74
|
+
skipToTxn: rest.length > 0 ? rest[0].minTxn : stuck.maxTxn + 1,
|
|
75
|
+
skippedTxns: stuck.txns,
|
|
76
|
+
skipWindowStart: stuck.minTimestamp,
|
|
77
|
+
skipWindowEnd: stuck.maxTimestamp,
|
|
78
|
+
walId: stuck.walId,
|
|
79
|
+
segmentId: stuck.segmentId,
|
|
80
|
+
tailSkip: rest.length === 0,
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
// Pull the apply job's failure out of the engine log. QuestDB logs it as a
|
|
84
|
+
// single multi-line entry:
|
|
85
|
+
//
|
|
86
|
+
// 2026-07-17T22:22:51Z C i.q.c.w.ApplyWal2TableJob job failed, table
|
|
87
|
+
// suspended [table=signalk_str~8, seqTxn=..., error=java.lang.AssertionError
|
|
88
|
+
// \tat io.questdb.cairo.VarcharTypeDriver.getDataVectorSize(...)
|
|
89
|
+
// ...
|
|
90
|
+
// ]
|
|
91
|
+
//
|
|
92
|
+
// but arrives from the container-log API as separate lines. Capture the last
|
|
93
|
+
// failure line plus its stack, stopping at the closing bracket or the next
|
|
94
|
+
// timestamped entry.
|
|
95
|
+
const APPLY_FAILED = /ApplyWal2TableJob job failed/;
|
|
96
|
+
const LOG_ENTRY_START = /^\d{4}-\d{2}-\d{2}T/;
|
|
97
|
+
const MAX_ERROR_LINES = 15;
|
|
98
|
+
function extractApplyError(lines, tableName) {
|
|
99
|
+
// The failure line names the table as its on-disk dir name,
|
|
100
|
+
// `table=<name>~<id>` — scope to it so one table's diagnosis can't show
|
|
101
|
+
// another suspended table's stack trace.
|
|
102
|
+
const tableMatcher = tableName
|
|
103
|
+
? new RegExp(`table=${tableName.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}[~,\\]]`)
|
|
104
|
+
: null;
|
|
105
|
+
let start = -1;
|
|
106
|
+
for (let i = lines.length - 1; i >= 0; i--) {
|
|
107
|
+
if (APPLY_FAILED.test(lines[i]) &&
|
|
108
|
+
(!tableMatcher || tableMatcher.test(lines[i]))) {
|
|
109
|
+
start = i;
|
|
110
|
+
break;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
if (start === -1)
|
|
114
|
+
return null;
|
|
115
|
+
const collected = [lines[start]];
|
|
116
|
+
for (let i = start + 1; i < lines.length && collected.length < MAX_ERROR_LINES; i++) {
|
|
117
|
+
const line = lines[i];
|
|
118
|
+
if (LOG_ENTRY_START.test(line))
|
|
119
|
+
break;
|
|
120
|
+
collected.push(line);
|
|
121
|
+
if (line.trim() === "]")
|
|
122
|
+
break;
|
|
123
|
+
}
|
|
124
|
+
return collected.join("\n");
|
|
125
|
+
}
|
|
126
|
+
const DEFAULT_INTERVAL_MS = 60_000;
|
|
127
|
+
const DEFAULT_FIRST_CHECK_DELAY_MS = 10_000;
|
|
128
|
+
const DEFAULT_RETRY_MIN_MS = 10 * 60_000;
|
|
129
|
+
// Per-table suspension tracking. An episode is keyed by (table, writerTxn):
|
|
130
|
+
// the same table re-suspending at a HIGHER writerTxn means the resume made
|
|
131
|
+
// real progress and hit a different failure — that deserves a fresh automatic
|
|
132
|
+
// attempt. Re-suspension at the SAME writerTxn means replay hit the same
|
|
133
|
+
// unreadable data — retrying is the storm the QuestDB web console is known
|
|
134
|
+
// for (it parks a busy ALTER and retries forever), so the episode locks to
|
|
135
|
+
// `failed` and only an operator action moves things forward.
|
|
136
|
+
class WalMonitor {
|
|
137
|
+
deps;
|
|
138
|
+
episodes = new Map();
|
|
139
|
+
// Survives episode teardown so a resume→clear→re-suspend flap at one stall
|
|
140
|
+
// point cannot trigger more than one automatic resume per retryMinMs.
|
|
141
|
+
lastAttempts = new Map();
|
|
142
|
+
timer = null;
|
|
143
|
+
firstTimer = null;
|
|
144
|
+
checking = false;
|
|
145
|
+
// Latched by stop(). A check that was already in flight when the plugin
|
|
146
|
+
// tore down re-reads this after every await so it can't issue an ALTER
|
|
147
|
+
// against — or emit status for — a QuestDB the teardown is removing.
|
|
148
|
+
stopped = false;
|
|
149
|
+
intervalMs;
|
|
150
|
+
firstCheckDelayMs;
|
|
151
|
+
retryMinMs;
|
|
152
|
+
now;
|
|
153
|
+
constructor(deps, options = {}) {
|
|
154
|
+
this.deps = deps;
|
|
155
|
+
this.intervalMs = options.intervalMs ?? DEFAULT_INTERVAL_MS;
|
|
156
|
+
this.firstCheckDelayMs =
|
|
157
|
+
options.firstCheckDelayMs ?? DEFAULT_FIRST_CHECK_DELAY_MS;
|
|
158
|
+
this.retryMinMs = options.retryMinMs ?? DEFAULT_RETRY_MIN_MS;
|
|
159
|
+
this.now = options.now ?? Date.now;
|
|
160
|
+
}
|
|
161
|
+
start() {
|
|
162
|
+
this.stopped = false;
|
|
163
|
+
this.firstTimer = setTimeout(() => {
|
|
164
|
+
void this.check();
|
|
165
|
+
}, this.firstCheckDelayMs);
|
|
166
|
+
this.timer = setInterval(() => {
|
|
167
|
+
void this.check();
|
|
168
|
+
}, this.intervalMs);
|
|
169
|
+
}
|
|
170
|
+
stop() {
|
|
171
|
+
this.stopped = true;
|
|
172
|
+
if (this.firstTimer) {
|
|
173
|
+
clearTimeout(this.firstTimer);
|
|
174
|
+
this.firstTimer = null;
|
|
175
|
+
}
|
|
176
|
+
if (this.timer) {
|
|
177
|
+
clearInterval(this.timer);
|
|
178
|
+
this.timer = null;
|
|
179
|
+
}
|
|
180
|
+
this.episodes.clear();
|
|
181
|
+
this.lastAttempts.clear();
|
|
182
|
+
}
|
|
183
|
+
outcomeFor(table) {
|
|
184
|
+
return this.episodes.get(table)?.outcome ?? null;
|
|
185
|
+
}
|
|
186
|
+
async check() {
|
|
187
|
+
if (this.checking || this.stopped)
|
|
188
|
+
return;
|
|
189
|
+
this.checking = true;
|
|
190
|
+
try {
|
|
191
|
+
await this.runCheck();
|
|
192
|
+
}
|
|
193
|
+
catch (err) {
|
|
194
|
+
// Transient query failures (container restarting, plugin mid-update)
|
|
195
|
+
// must not kill the interval.
|
|
196
|
+
this.deps.debug(`WAL monitor check failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
197
|
+
}
|
|
198
|
+
finally {
|
|
199
|
+
this.checking = false;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
async runCheck() {
|
|
203
|
+
const suspended = await this.deps.listSuspended();
|
|
204
|
+
if (this.stopped)
|
|
205
|
+
return;
|
|
206
|
+
const suspendedNames = new Set(suspended.map((t) => t.name));
|
|
207
|
+
const hadEpisodes = this.episodes.size > 0;
|
|
208
|
+
for (const name of [...this.episodes.keys()]) {
|
|
209
|
+
if (!suspendedNames.has(name))
|
|
210
|
+
this.episodes.delete(name);
|
|
211
|
+
}
|
|
212
|
+
if (suspended.length === 0) {
|
|
213
|
+
if (hadEpisodes) {
|
|
214
|
+
this.deps.debug("WAL suspension resolved — all tables applying again");
|
|
215
|
+
this.deps.onResolved();
|
|
216
|
+
}
|
|
217
|
+
return;
|
|
218
|
+
}
|
|
219
|
+
for (const table of suspended) {
|
|
220
|
+
const episode = this.episodes.get(table.name);
|
|
221
|
+
if (!episode || episode.writerTxn !== table.writerTxn) {
|
|
222
|
+
// New suspension, or the writer advanced to a new stall point.
|
|
223
|
+
// Persist the full snapshot NOW: the engine-side error detail is
|
|
224
|
+
// in-memory only and a container recreate erases it while the
|
|
225
|
+
// suspension itself persists.
|
|
226
|
+
this.deps.error(`WAL suspended on ${table.name}: writerTxn=${table.writerTxn} ` +
|
|
227
|
+
`sequencerTxn=${table.sequencerTxn} lag=${table.txnLag} ` +
|
|
228
|
+
`errorTag=${JSON.stringify(table.errorTag)} ` +
|
|
229
|
+
`errorMessage=${JSON.stringify(table.errorMessage)}`);
|
|
230
|
+
const episode = {
|
|
231
|
+
writerTxn: table.writerTxn,
|
|
232
|
+
outcome: "pending",
|
|
233
|
+
resumeIssued: false,
|
|
234
|
+
};
|
|
235
|
+
this.episodes.set(table.name, episode);
|
|
236
|
+
episode.resumeIssued = await this.attemptResume(table);
|
|
237
|
+
}
|
|
238
|
+
else if (episode.outcome === "pending") {
|
|
239
|
+
if (episode.resumeIssued) {
|
|
240
|
+
// Our resume actually executed and the table is suspended again at
|
|
241
|
+
// the same writerTxn: replay re-hit the same failure. Lock the
|
|
242
|
+
// episode.
|
|
243
|
+
episode.outcome = "failed";
|
|
244
|
+
this.deps.error(`Automatic lossless resume failed on ${table.name} — WAL apply ` +
|
|
245
|
+
`fails again at txn ${table.writerTxn + 1}. The segment data ` +
|
|
246
|
+
`at the stall point is likely unreadable (corrupt, typically ` +
|
|
247
|
+
`after an unclean shutdown). A bounded skip is required: open ` +
|
|
248
|
+
`the QuestDB History plugin panel to repair.`);
|
|
249
|
+
}
|
|
250
|
+
else {
|
|
251
|
+
// The resume REQUEST failed (busy writer, transport error) or was
|
|
252
|
+
// rate-limit deferred — nothing was diagnosed, so this must not
|
|
253
|
+
// escalate to "failed" (which the panel reads as corruption).
|
|
254
|
+
// Keep trying, still bounded by the per-stall-point rate limit.
|
|
255
|
+
episode.resumeIssued = await this.attemptResume(table);
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
if (this.stopped)
|
|
259
|
+
return;
|
|
260
|
+
}
|
|
261
|
+
const anyFailed = suspended.some((t) => this.episodes.get(t.name)?.outcome === "failed");
|
|
262
|
+
this.deps.onSuspended(suspended, anyFailed);
|
|
263
|
+
}
|
|
264
|
+
// Issues the lossless resume unless one already ran recently at this same
|
|
265
|
+
// stall point. Returns true only when the ALTER actually executed — a
|
|
266
|
+
// deferred or failed request must not count as a diagnostic attempt.
|
|
267
|
+
async attemptResume(table) {
|
|
268
|
+
const last = this.lastAttempts.get(table.name);
|
|
269
|
+
if (last &&
|
|
270
|
+
last.writerTxn === table.writerTxn &&
|
|
271
|
+
this.now() - last.at < this.retryMinMs) {
|
|
272
|
+
// Same stall point, attempted recently — e.g. the episode map lost the
|
|
273
|
+
// earlier attempt to an intermediate "resolved" flap. Don't pile on.
|
|
274
|
+
return false;
|
|
275
|
+
}
|
|
276
|
+
this.lastAttempts.set(table.name, {
|
|
277
|
+
writerTxn: table.writerTxn,
|
|
278
|
+
at: this.now(),
|
|
279
|
+
});
|
|
280
|
+
try {
|
|
281
|
+
await this.deps.resumeTable(table.name);
|
|
282
|
+
this.deps.debug(`attempted automatic lossless RESUME WAL on ${table.name}`);
|
|
283
|
+
return true;
|
|
284
|
+
}
|
|
285
|
+
catch (err) {
|
|
286
|
+
this.deps.error(`automatic RESUME WAL on ${table.name} failed: ` +
|
|
287
|
+
`${err instanceof Error ? err.message : String(err)}`);
|
|
288
|
+
return false;
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
exports.WalMonitor = WalMonitor;
|
|
293
|
+
//# sourceMappingURL=wal-monitor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wal-monitor.js","sourceRoot":"","sources":["../src/wal-monitor.ts"],"names":[],"mappings":";AAAA,2EAA2E;AAC3E,6EAA6E;AAC7E,WAAW;AACX,EAAE;AACF,8EAA8E;AAC9E,4EAA4E;AAC5E,6EAA6E;AAC7E,2EAA2E;AAC3E,8EAA8E;AAC9E,6EAA6E;AAC7E,2DAA2D;AAC3D,EAAE;AACF,yDAAyD;AACzD,uEAAuE;AACvE,uEAAuE;AACvE,2EAA2E;AAC3E,oEAAoE;AACpE,2EAA2E;AAC3E,4EAA4E;AAC5E,2EAA2E;AAC3E,4EAA4E;AAC5E,EAAE;AACF,0EAA0E;AAC1E,qDAAqD;AACrD,EAAE;AACF,2EAA2E;AAC3E,4EAA4E;AAC5E,6EAA6E;AAC7E,oEAAoE;AACpE,6EAA6E;AAC7E,uEAAuE;;;AA8CvE,0DAcC;AAOD,wCAYC;AAED,0CAYC;AAkBD,8CAmCC;AAvGD,4EAA4E;AAC5E,yEAAyE;AACzE,6EAA6E;AAC7E,SAAgB,uBAAuB,CACrC,KAAa,EACb,SAAiB;IAEjB,MAAM,SAAS,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC5C,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC;IAC/C,OAAO,CACL,yCAAyC;QACzC,sDAAsD;QACtD,2DAA2D;QAC3D,0BAA0B,SAAS,KAAK;QACxC,wBAAwB,GAAG,GAAG;QA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,IAAI,EAAE,CAC3D,CAAC;YACF,OAAO,IAAI,CAAC;QACd,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,IAAI,CAAC,IAAI,CAAC,KAAK,CACb,2BAA2B,KAAK,CAAC,IAAI,WAAW;gBAC9C,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CACxD,CAAC;YACF,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;CACF;AA5KD,gCA4KC"}
|
package/package.json
CHANGED
package/public/540.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see 540.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunksignalk_questdb=self.webpackChunksignalk_questdb||[]).push([[540],{869(e,t){var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),i=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),l=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),d=Symbol.iterator,h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,b={};function m(e,t,n){this.props=e,this.context=t,this.refs=b,this.updater=n||h}function v(){}function S(e,t,n){this.props=e,this.context=t,this.refs=b,this.updater=n||h}m.prototype.isReactComponent={},m.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},m.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},v.prototype=m.prototype;var E=S.prototype=new v;E.constructor=S,_(E,m.prototype),E.isPureReactComponent=!0;var g=Array.isArray;function w(){}var k={H:null,A:null,T:null,S:null},H=Object.prototype.hasOwnProperty;function j(e,t,r){var o=r.ref;return{$$typeof:n,type:e,key:t,ref:void 0!==o?o:null,props:r}}function C(e){return"object"==typeof e&&null!==e&&e.$$typeof===n}var R=/\/+/g;function $(e,t){return"object"==typeof e&&null!==e&&null!=e.key?(n=""+e.key,r={"=":"=0",":":"=2"},"$"+n.replace(/[=:]/g,function(e){return r[e]})):t.toString(36);var n,r}function T(e,t,o,u,s){var c=typeof e;"undefined"!==c&&"boolean"!==c||(e=null);var i,a,f=!1;if(null===e)f=!0;else switch(c){case"bigint":case"string":case"number":f=!0;break;case"object":switch(e.$$typeof){case n:case r:f=!0;break;case p:return T((f=e._init)(e._payload),t,o,u,s)}}if(f)return s=s(e),f=""===u?"."+$(e,0):u,g(s)?(o="",null!=f&&(o=f.replace(R,"$&/")+"/"),T(s,t,o,"",function(e){return e})):null!=s&&(C(s)&&(i=s,a=o+(null==s.key||e&&e.key===s.key?"":(""+s.key).replace(R,"$&/")+"/")+f,s=j(i.type,a,i.props)),t.push(s)),1;f=0;var l,y=""===u?".":u+":";if(g(e))for(var h=0;h<e.length;h++)f+=T(u=e[h],t,o,c=y+$(u,h),s);else if("function"==typeof(h=null===(l=e)||"object"!=typeof l?null:"function"==typeof(l=d&&l[d]||l["@@iterator"])?l:null))for(e=h.call(e),h=0;!(u=e.next()).done;)f+=T(u=u.value,t,o,c=y+$(u,h++),s);else if("object"===c){if("function"==typeof e.then)return T(function(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch("string"==typeof e.status?e.then(w,w):(e.status="pending",e.then(function(t){"pending"===e.status&&(e.status="fulfilled",e.value=t)},function(t){"pending"===e.status&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}(e),t,o,u,s);throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return f}function x(e,t,n){if(null==e)return e;var r=[],o=0;return T(e,r,"","",function(e){return t.call(n,e,o++)}),r}function A(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)},function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var O="function"==typeof reportError?reportError:function(e){if("object"==typeof window&&"function"==typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"==typeof e&&null!==e&&"string"==typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"==typeof process&&"function"==typeof process.emit)return void process.emit("uncaughtException",e);console.error(e)},I={map:x,forEach:function(e,t,n){x(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return x(e,function(){t++}),t},toArray:function(e){return x(e,function(e){return e})||[]},only:function(e){if(!C(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};t.Activity=y,t.Children=I,t.Component=m,t.Fragment=o,t.Profiler=s,t.PureComponent=S,t.StrictMode=u,t.Suspense=f,t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=k,t.__COMPILER_RUNTIME={__proto__:null,c:function(e){return k.H.useMemoCache(e)}},t.cache=function(e){return function(){return e.apply(null,arguments)}},t.cacheSignal=function(){return null},t.cloneElement=function(e,t,n){if(null==e)throw Error("The argument must be a React element, but you passed "+e+".");var r=_({},e.props),o=e.key;if(null!=t)for(u in void 0!==t.key&&(o=""+t.key),t)!H.call(t,u)||"key"===u||"__self"===u||"__source"===u||"ref"===u&&void 0===t.ref||(r[u]=t[u]);var u=arguments.length-2;if(1===u)r.children=n;else if(1<u){for(var s=Array(u),c=0;c<u;c++)s[c]=arguments[c+2];r.children=s}return j(e.type,o,r)},t.createContext=function(e){return(e={$$typeof:i,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider=e,e.Consumer={$$typeof:c,_context:e},e},t.createElement=function(e,t,n){var r,o={},u=null;if(null!=t)for(r in void 0!==t.key&&(u=""+t.key),t)H.call(t,r)&&"key"!==r&&"__self"!==r&&"__source"!==r&&(o[r]=t[r]);var s=arguments.length-2;if(1===s)o.children=n;else if(1<s){for(var c=Array(s),i=0;i<s;i++)c[i]=arguments[i+2];o.children=c}if(e&&e.defaultProps)for(r in s=e.defaultProps)void 0===o[r]&&(o[r]=s[r]);return j(e,u,o)},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:a,render:e}},t.isValidElement=C,t.lazy=function(e){return{$$typeof:p,_payload:{_status:-1,_result:e},_init:A}},t.memo=function(e,t){return{$$typeof:l,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=k.T,n={};k.T=n;try{var r=e(),o=k.S;null!==o&&o(n,r),"object"==typeof r&&null!==r&&"function"==typeof r.then&&r.then(w,O)}catch(e){O(e)}finally{null!==t&&null!==n.types&&(t.types=n.types),k.T=t}},t.unstable_useCacheRefresh=function(){return k.H.useCacheRefresh()},t.use=function(e){return k.H.use(e)},t.useActionState=function(e,t,n){return k.H.useActionState(e,t,n)},t.useCallback=function(e,t){return k.H.useCallback(e,t)},t.useContext=function(e){return k.H.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e,t){return k.H.useDeferredValue(e,t)},t.useEffect=function(e,t){return k.H.useEffect(e,t)},t.useEffectEvent=function(e){return k.H.useEffectEvent(e)},t.useId=function(){return k.H.useId()},t.useImperativeHandle=function(e,t,n){return k.H.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return k.H.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return k.H.useLayoutEffect(e,t)},t.useMemo=function(e,t){return k.H.useMemo(e,t)},t.useOptimistic=function(e,t){return k.H.useOptimistic(e,t)},t.useReducer=function(e,t,n){return k.H.useReducer(e,t,n)},t.useRef=function(e){return k.H.useRef(e)},t.useState=function(e){return k.H.useState(e)},t.useSyncExternalStore=function(e,t,n){return k.H.useSyncExternalStore(e,t,n)},t.useTransition=function(){return k.H.useTransition()},t.version="19.2.
|
|
2
|
+
"use strict";(self.webpackChunksignalk_questdb=self.webpackChunksignalk_questdb||[]).push([[540],{869(e,t){var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),i=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),l=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),d=Symbol.iterator,h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,b={};function m(e,t,n){this.props=e,this.context=t,this.refs=b,this.updater=n||h}function v(){}function S(e,t,n){this.props=e,this.context=t,this.refs=b,this.updater=n||h}m.prototype.isReactComponent={},m.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},m.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},v.prototype=m.prototype;var E=S.prototype=new v;E.constructor=S,_(E,m.prototype),E.isPureReactComponent=!0;var g=Array.isArray;function w(){}var k={H:null,A:null,T:null,S:null},H=Object.prototype.hasOwnProperty;function j(e,t,r){var o=r.ref;return{$$typeof:n,type:e,key:t,ref:void 0!==o?o:null,props:r}}function C(e){return"object"==typeof e&&null!==e&&e.$$typeof===n}var R=/\/+/g;function $(e,t){return"object"==typeof e&&null!==e&&null!=e.key?(n=""+e.key,r={"=":"=0",":":"=2"},"$"+n.replace(/[=:]/g,function(e){return r[e]})):t.toString(36);var n,r}function T(e,t,o,u,s){var c=typeof e;"undefined"!==c&&"boolean"!==c||(e=null);var i,a,f=!1;if(null===e)f=!0;else switch(c){case"bigint":case"string":case"number":f=!0;break;case"object":switch(e.$$typeof){case n:case r:f=!0;break;case p:return T((f=e._init)(e._payload),t,o,u,s)}}if(f)return s=s(e),f=""===u?"."+$(e,0):u,g(s)?(o="",null!=f&&(o=f.replace(R,"$&/")+"/"),T(s,t,o,"",function(e){return e})):null!=s&&(C(s)&&(i=s,a=o+(null==s.key||e&&e.key===s.key?"":(""+s.key).replace(R,"$&/")+"/")+f,s=j(i.type,a,i.props)),t.push(s)),1;f=0;var l,y=""===u?".":u+":";if(g(e))for(var h=0;h<e.length;h++)f+=T(u=e[h],t,o,c=y+$(u,h),s);else if("function"==typeof(h=null===(l=e)||"object"!=typeof l?null:"function"==typeof(l=d&&l[d]||l["@@iterator"])?l:null))for(e=h.call(e),h=0;!(u=e.next()).done;)f+=T(u=u.value,t,o,c=y+$(u,h++),s);else if("object"===c){if("function"==typeof e.then)return T(function(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch("string"==typeof e.status?e.then(w,w):(e.status="pending",e.then(function(t){"pending"===e.status&&(e.status="fulfilled",e.value=t)},function(t){"pending"===e.status&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}(e),t,o,u,s);throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return f}function x(e,t,n){if(null==e)return e;var r=[],o=0;return T(e,r,"","",function(e){return t.call(n,e,o++)}),r}function A(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)},function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var O="function"==typeof reportError?reportError:function(e){if("object"==typeof window&&"function"==typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"==typeof e&&null!==e&&"string"==typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"==typeof process&&"function"==typeof process.emit)return void process.emit("uncaughtException",e);console.error(e)},I={map:x,forEach:function(e,t,n){x(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return x(e,function(){t++}),t},toArray:function(e){return x(e,function(e){return e})||[]},only:function(e){if(!C(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};t.Activity=y,t.Children=I,t.Component=m,t.Fragment=o,t.Profiler=s,t.PureComponent=S,t.StrictMode=u,t.Suspense=f,t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=k,t.__COMPILER_RUNTIME={__proto__:null,c:function(e){return k.H.useMemoCache(e)}},t.cache=function(e){return function(){return e.apply(null,arguments)}},t.cacheSignal=function(){return null},t.cloneElement=function(e,t,n){if(null==e)throw Error("The argument must be a React element, but you passed "+e+".");var r=_({},e.props),o=e.key;if(null!=t)for(u in void 0!==t.key&&(o=""+t.key),t)!H.call(t,u)||"key"===u||"__self"===u||"__source"===u||"ref"===u&&void 0===t.ref||(r[u]=t[u]);var u=arguments.length-2;if(1===u)r.children=n;else if(1<u){for(var s=Array(u),c=0;c<u;c++)s[c]=arguments[c+2];r.children=s}return j(e.type,o,r)},t.createContext=function(e){return(e={$$typeof:i,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider=e,e.Consumer={$$typeof:c,_context:e},e},t.createElement=function(e,t,n){var r,o={},u=null;if(null!=t)for(r in void 0!==t.key&&(u=""+t.key),t)H.call(t,r)&&"key"!==r&&"__self"!==r&&"__source"!==r&&(o[r]=t[r]);var s=arguments.length-2;if(1===s)o.children=n;else if(1<s){for(var c=Array(s),i=0;i<s;i++)c[i]=arguments[i+2];o.children=c}if(e&&e.defaultProps)for(r in s=e.defaultProps)void 0===o[r]&&(o[r]=s[r]);return j(e,u,o)},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:a,render:e}},t.isValidElement=C,t.lazy=function(e){return{$$typeof:p,_payload:{_status:-1,_result:e},_init:A}},t.memo=function(e,t){return{$$typeof:l,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=k.T,n={};k.T=n;try{var r=e(),o=k.S;null!==o&&o(n,r),"object"==typeof r&&null!==r&&"function"==typeof r.then&&r.then(w,O)}catch(e){O(e)}finally{null!==t&&null!==n.types&&(t.types=n.types),k.T=t}},t.unstable_useCacheRefresh=function(){return k.H.useCacheRefresh()},t.use=function(e){return k.H.use(e)},t.useActionState=function(e,t,n){return k.H.useActionState(e,t,n)},t.useCallback=function(e,t){return k.H.useCallback(e,t)},t.useContext=function(e){return k.H.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e,t){return k.H.useDeferredValue(e,t)},t.useEffect=function(e,t){return k.H.useEffect(e,t)},t.useEffectEvent=function(e){return k.H.useEffectEvent(e)},t.useId=function(){return k.H.useId()},t.useImperativeHandle=function(e,t,n){return k.H.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return k.H.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return k.H.useLayoutEffect(e,t)},t.useMemo=function(e,t){return k.H.useMemo(e,t)},t.useOptimistic=function(e,t){return k.H.useOptimistic(e,t)},t.useReducer=function(e,t,n){return k.H.useReducer(e,t,n)},t.useRef=function(e){return k.H.useRef(e)},t.useState=function(e){return k.H.useState(e)},t.useSyncExternalStore=function(e,t,n){return k.H.useSyncExternalStore(e,t,n)},t.useTransition=function(){return k.H.useTransition()},t.version="19.2.8"},540(e,t,n){e.exports=n(869)}}]);
|
package/public/805.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunksignalk_questdb=self.webpackChunksignalk_questdb||[]).push([[805],{805(e,t,a){a.r(t),a.d(t,{default:()=>i});var n=a(231);const l={root:{fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',color:"#333",padding:"16px 0"},sectionTitle:{fontSize:13,fontWeight:600,color:"#888",textTransform:"uppercase",letterSpacing:"0.05em",marginBottom:10,marginTop:24},btn:{display:"inline-flex",alignItems:"center",gap:8,padding:"8px 16px",border:"none",borderRadius:6,fontSize:13,fontWeight:600,cursor:"pointer"},btnPrimary:{background:"#3b82f6",color:"#fff"},btnSave:{background:"#3b82f6",color:"#fff"},btnDanger:{background:"#ef4444",color:"#fff",padding:"6px 12px",fontSize:12},btnDisabled:{opacity:.5,cursor:"not-allowed"},status:{marginTop:8,fontSize:12,minHeight:18},warnBanner:{padding:"12px 16px",background:"#fef2f2",border:"1px solid #fecaca",borderRadius:10,marginBottom:12,fontSize:13,color:"#991b1b",lineHeight:1.5},warnBannerTitle:{fontWeight:700,marginBottom:4},infoBanner:{padding:"12px 16px",background:"#fffbeb",border:"1px solid #fde68a",borderRadius:10,marginBottom:12,fontSize:13,color:"#92400e",lineHeight:1.5},warnBannerCode:{display:"block",marginTop:8,padding:"8px 10px",background:"#fff",border:"1px solid #fecaca",borderRadius:6,fontFamily:"monospace",fontSize:12,color:"#7f1d1d",whiteSpace:"pre-wrap",wordBreak:"break-word"},card:{display:"flex",alignItems:"center",gap:14,padding:"14px 18px",background:"#f8f9fa",border:"1px solid #e0e0e0",borderRadius:10,marginBottom:12},cardIcon:{width:44,height:44,borderRadius:10,display:"flex",alignItems:"center",justifyContent:"center",fontSize:20,fontWeight:700,flexShrink:0},cardInfo:{flex:1},cardTitle:{fontSize:15,fontWeight:600,color:"#333"},cardMeta:{fontSize:12,color:"#888"},stateIndicator:{width:10,height:10,borderRadius:"50%",flexShrink:0},fieldRow:{display:"flex",alignItems:"center",gap:12,marginBottom:10},label:{fontSize:13,fontWeight:500,color:"#555",width:180,flexShrink:0},select:{padding:"6px 10px",borderRadius:6,border:"1px solid #ccc",fontSize:13,background:"#fff",color:"#333",minWidth:200},input:{padding:"6px 10px",borderRadius:6,border:"1px solid #ccc",fontSize:13,background:"#fff",color:"#333",width:200},inputSmall:{padding:"6px 10px",borderRadius:6,border:"1px solid #ccc",fontSize:13,background:"#fff",color:"#333",width:80},checkbox:{width:16,height:16,accentColor:"#3b82f6"},hint:{fontSize:11,color:"#aaa",marginLeft:8},textarea:{padding:"6px 10px",borderRadius:6,border:"1px solid #ccc",fontSize:13,fontFamily:"monospace",background:"#fff",color:"#333",width:"100%",minHeight:70,boxSizing:"border-box",resize:"vertical"},empty:{textAlign:"center",padding:"30px 16px",color:"#999",fontSize:13},tag:{display:"inline-block",padding:"2px 8px",borderRadius:4,fontSize:10,fontWeight:600,marginLeft:8},tagPre:{background:"#fef3c7",color:"#92400e"},tagLatest:{background:"#dcfce7",color:"#166534"},migrationItem:{display:"flex",alignItems:"center",gap:12,padding:"12px 16px",background:"#f8f9fa",border:"1px solid #e0e0e0",borderRadius:10,marginBottom:8},migrationActions:{display:"flex",gap:8,alignItems:"center"},statsGrid:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(140px, 1fr))",gap:10,marginBottom:12},statCard:{padding:"12px 16px",background:"#f8f9fa",border:"1px solid #e0e0e0",borderRadius:10,textAlign:"center"},statValue:{fontSize:22,fontWeight:700,color:"#333"},statLabel:{fontSize:11,color:"#888",marginTop:2}};function r({title:e,children:t}){const[a,r]=(0,n.useState)(!1);return n.createElement("div",null,n.createElement("button",{type:"button","aria-expanded":a,style:{...l.sectionTitle,cursor:"pointer",userSelect:"none",display:"flex",alignItems:"center",gap:6,width:"100%",textAlign:"left",background:"none",border:"none",padding:0},onClick:()=>r(!a)},n.createElement("span",{style:{fontSize:10,transition:"transform 0.15s",transform:a?"rotate(90deg)":"rotate(0deg)"}},"▶"),e),a&&n.createElement("div",{style:{marginBottom:16}},t))}function o(e){return null==e?"—":e>=1e6?(e/1e6).toFixed(1)+"M":e>=1e3?(e/1e3).toFixed(1)+"K":String(e)}function i({configuration:e,save:t}){const a=e||{},[i,s]=(0,n.useState)(a.questdbHost||"127.0.0.1"),[c,d]=(0,n.useState)(a.questdbIlpPort||9009),[u,m]=(0,n.useState)(a.questdbHttpPort||9e3),[p,g]=(0,n.useState)(a.questdbPgPort||8812),[f,y]=(0,n.useState)(a.questdbVersion||"latest"),[b,h]=(0,n.useState)(!1!==a.managedContainer),[E,v]=(0,n.useState)(!1!==a.recordSelf),[x,w]=(0,n.useState)(a.recordOthers||!1),[S,k]=(0,n.useState)(a.defaultSamplingRate??2e3),[R,C]=(0,n.useState)(a.retentionDays||0),[B,T]=(0,n.useState)("include"===a.pathFilter?.mode?"include":"exclude"),[D,I]=(0,n.useState)((Array.isArray(a.pathFilter?.paths)?a.pathFilter.paths:[]).join("\n")),[z,L]=(0,n.useState)(a.compression||"lz4"),[P,q]=(0,n.useState)(a.compressionLevel||3),[$,Q]=(0,n.useState)(a.networkName||"sk-network"),[A,F]=(0,n.useState)(a.exposeToContainers||!1),[N,U]=(0,n.useState)([]),[j,M]=(0,n.useState)(!1),[W,V]=(0,n.useState)(null),[H,O]=(0,n.useState)(!0),[G,_]=(0,n.useState)(null),[K,Z]=(0,n.useState)(!1),[Y,J]=(0,n.useState)(""),[X,ee]=(0,n.useState)(""),[te,ae]=(0,n.useState)(!1),[ne,le]=(0,n.useState)(null),[re,oe]=(0,n.useState)(!1),[ie,se]=(0,n.useState)(!1),[ce,de]=(0,n.useState)(!1),[ue,me]=(0,n.useState)(!1),[pe,ge]=(0,n.useState)(""),fe=(0,n.useCallback)(async()=>{M(!0);try{const e=await fetch("/plugins/signalk-questdb/api/versions");if(e.ok){const t=await e.json();U(t)}}catch{}M(!1)},[]),ye=(0,n.useCallback)(async()=>{try{const e=await fetch("/plugins/signalk-questdb/api/status");e.ok?V(await e.json()):V({status:"not_running"})}catch{V({status:"not_running"})}O(!1)},[]);(0,n.useEffect)(()=>{fe(),ye();const e=setInterval(ye,5e3);return()=>clearInterval(e)},[fe,ye]);const[be,he]=(0,n.useState)(""),[Ee,ve]=(0,n.useState)(""),[xe,we]=(0,n.useState)("parquet"),[Se,ke]=(0,n.useState)(!1),Re=W&&"running"===W.status,Ce=Re&&W.suspendedTables||[],Be=Ce.length>0,Te=Re&&W.schemaMismatch||!1,De=Re&&W.ulimitClamp||null,Ie=N.filter(e=>!e.prerelease).slice(0,3),ze=N.filter(e=>e.prerelease).slice(0,2);return n.createElement("div",{style:l.root},n.createElement("div",{style:l.sectionTitle},"QuestDB Status"),H?n.createElement("div",{style:l.empty},"Checking QuestDB..."):Re?n.createElement(n.Fragment,null,Be&&n.createElement("div",{style:l.warnBanner},n.createElement("div",{style:l.warnBannerTitle},"QuestDB WAL suspended — recording stalled"),"Rows are arriving but no longer commit, so the counts below have stopped advancing. This follows an error while QuestDB applied the write-ahead log — see the reason reported per table below. Resuming replays every pending transaction, so no data is lost.",n.createElement("code",{style:l.warnBannerCode},Ce.map(e=>{const t=String(e.errorMessage||e.errorTag||"reason not reported").replace(/[\r\n]+/g," ");return`${e.name}: ${o(e.txnLag)} txns behind — ${t}`}).join("\n")),n.createElement("div",{style:{marginTop:10}},n.createElement("button",{style:{...l.btn,...l.btnPrimary,...ue?l.btnDisabled:{}},disabled:ue,onClick:async()=>{me(!0),ge("");try{const e=await fetch("/plugins/signalk-questdb/api/resume-wal",{method:"POST"}),t=await e.json().catch(()=>({error:e.statusText}));if(e.ok){const e=(t.results||[]).filter(e=>!e.ok);ge(0===e.length?`${t.message}. Recording resumes as the backlog drains — the banner clears once tables catch up.`:`${t.message}. `+e.map(e=>`${e.table}: ${e.error}`).join(" · ")),ye()}else ge(`Resume failed: ${t.error}`)}catch(e){ge(`Resume failed: ${e.message}`)}me(!1)}},ue?"Resuming...":"Resume recording")),n.createElement("div",{style:{marginTop:8,fontSize:12}},"Manual fallback in the QuestDB SQL console (",n.createElement("code",null,":9000"),"), one statement at a time — avoid running it from several tabs, the console retries a busy statement forever:",n.createElement("code",{style:l.warnBannerCode},Ce.map(e=>`ALTER TABLE "${String(e.name).replace(/"/g,'""')}" RESUME WAL;`).join("\n")))),pe&&n.createElement("div",{style:l.infoBanner},pe),Te&&n.createElement("div",{style:l.warnBanner},n.createElement("div",{style:l.warnBannerTitle},"QuestDB table schema mismatch — data not readable"),"A QuestDB table was re-created by ILP ingestion with the wrong timestamp column, so rows are being stored but reads filtering on time (history, Grafana, and the counts above) return nothing. The plugin rebuilds the affected table with the correct schema automatically within a minute; if this persists, restart the plugin. (The few rows written into the wrong-schema table are lost — they were unreadable anyway.)"),De&&n.createElement("div",{style:l.infoBanner},n.createElement("div",{style:l.warnBannerTitle},"QuestDB open-files limit capped by the host"),"QuestDB requested a ",n.createElement("code",null,De.ulimit)," limit of"," ",o(De.requested),", but this host only allows"," ",o(De.granted),", so it was capped. QuestDB is running on the lower limit. To grant the full value, raise the host limit for the user running the container runtime — under rootless Podman that means a systemd ",n.createElement("code",null,"user@.service")," ",n.createElement("code",null,"LimitNOFILE")," drop-in (editing"," ",n.createElement("code",null,"/etc/security/limits.conf")," alone is usually not enough) — then restart the QuestDB container."," ",n.createElement("a",{href:"https://github.com/dirkwa/signalk-container#raising-the-open-files-limit-nofile",target:"_blank",rel:"noreferrer",style:{color:"#92400e",textDecoration:"underline"}},"Step-by-step instructions"),"."),n.createElement("div",{style:l.card},n.createElement("div",{style:{...l.cardIcon,background:"#7c3aed",color:"#fff"}},"Q"),n.createElement("div",{style:l.cardInfo},n.createElement("div",{style:l.cardTitle},"QuestDB"),n.createElement("div",{style:l.cardMeta},W?.endpoint||`${i}:${u}`," ","· ",Be?"WAL suspended":"Recording")),n.createElement("div",{style:{...l.stateIndicator,background:Be?"#ef4444":"#10b981"},title:Be?"WAL suspended":"Running"})),n.createElement("div",{style:l.statsGrid},n.createElement("div",{style:l.statCard},n.createElement("div",{style:l.statValue},o(W.totalRows)),n.createElement("div",{style:l.statLabel},"Total Rows")),n.createElement("div",{style:l.statCard},n.createElement("div",{style:l.statValue},o(W.activePathsToday)),n.createElement("div",{style:l.statLabel},"Active Paths Today"))),n.createElement("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:12}},ne&&ne.updateAvailable?n.createElement(n.Fragment,null,n.createElement("span",{style:{fontSize:13}},"v",ne.currentVersion," →"," ",n.createElement("strong",null,"v",ne.latestVersion)," available"),n.createElement("button",{style:{...l.btn,...l.btnPrimary,padding:"4px 12px",fontSize:12,...ie?l.btnDisabled:{}},onClick:async()=>{se(!0),ee("Pulling new image and restarting..."),ae(!1);try{const e=await fetch("/plugins/signalk-questdb/api/update/apply",{method:"POST"});if(e.ok){const t=await e.json();ee(t.message),le(null),t.newVersion&&y(t.newVersion),ye()}else{const t=await e.json().catch(()=>({error:e.statusText}));ee(`Update failed: ${t.error}`),ae(!0)}}catch(e){ee(`Update failed: ${e.message}`),ae(!0)}se(!1)},disabled:ie},ie?"Updating...":"Update QuestDB")):ne&&!ne.updateAvailable?n.createElement("span",{style:{fontSize:12,color:"#888"}},"v",ne.currentVersion," (up to date)"):n.createElement("button",{style:{...l.btn,padding:"4px 12px",fontSize:12,background:"#f1f5f9",color:"#475569",border:"1px solid #e2e8f0",...re?l.btnDisabled:{}},onClick:async()=>{oe(!0);try{const e=await fetch("/plugins/signalk-questdb/api/update/check");e.ok&&le(await e.json())}catch{}oe(!1)},disabled:re},re?"Checking...":"Check for updates"))):n.createElement("div",{style:l.card},n.createElement("div",{style:{...l.cardIcon,background:"#fef2f2",color:"#ef4444"}},"Q"),n.createElement("div",{style:l.cardInfo},n.createElement("div",{style:l.cardTitle},"QuestDB"),n.createElement("div",{style:l.cardMeta},"unhealthy"===W?.status?"Not responding":"Not running",b?" — enable plugin to start container":"")),n.createElement("div",{style:{...l.stateIndicator,background:"#ef4444"}})),n.createElement("div",{style:l.sectionTitle},"Image Version"),n.createElement("div",{style:l.fieldRow},n.createElement("span",{style:l.label},"QuestDB version"),n.createElement("select",{style:l.select,value:f,onChange:e=>y(e.target.value)},n.createElement("option",{value:"latest"},"latest (recommended)"),ze.map(e=>n.createElement("option",{key:e.tag,value:e.tag},e.tag," (pre-release)")),Ie.map((e,t)=>n.createElement("option",{key:e.tag,value:e.tag},e.tag,0===t?" (current stable)":""))),j&&n.createElement("span",{style:l.hint},"loading releases..."),n.createElement("button",{style:{...l.btn,...l.btnPrimary,padding:"4px 10px",fontSize:11},onClick:fe},"↻")),n.createElement("div",{style:l.sectionTitle},"Connection"),n.createElement("div",{style:l.fieldRow},n.createElement("span",{style:l.label},"Managed container"),n.createElement("input",{type:"checkbox",style:l.checkbox,checked:b,onChange:e=>h(e.target.checked)}),n.createElement("span",{style:l.hint},b?"signalk-container manages QuestDB":"Connect to external QuestDB")),!b&&n.createElement(n.Fragment,null,n.createElement("div",{style:l.fieldRow},n.createElement("span",{style:l.label},"QuestDB host"),n.createElement("input",{style:l.input,value:i,onChange:e=>s(e.target.value)})),n.createElement("div",{style:l.fieldRow},n.createElement("span",{style:l.label},"HTTP port (queries)"),n.createElement("input",{style:l.inputSmall,type:"number",value:u,onChange:e=>m(Number(e.target.value))})),n.createElement("div",{style:l.fieldRow},n.createElement("span",{style:l.label},"ILP port (writes)"),n.createElement("input",{style:l.inputSmall,type:"number",value:c,onChange:e=>d(Number(e.target.value))}))),b&&n.createElement("div",{style:l.fieldRow},n.createElement("span",{style:l.label},"Bind to 0.0.0.0"),n.createElement("input",{type:"checkbox",style:l.checkbox,checked:A,onChange:e=>F(e.target.checked)}),n.createElement("span",{style:{...l.hint,color:A?"#ef4444":void 0}},A?"Caution! This exposes your data to the network":"Signal K reaches QuestDB automatically — only enable to reach it from another machine or a separate-Docker Grafana")),b&&A&&n.createElement(n.Fragment,null,n.createElement("div",{style:l.fieldRow},n.createElement("span",{style:l.label},"HTTP port (queries)"),n.createElement("input",{style:l.inputSmall,type:"number",value:u,onChange:e=>m(Number(e.target.value))})),n.createElement("div",{style:l.fieldRow},n.createElement("span",{style:l.label},"ILP port (writes)"),n.createElement("input",{style:l.inputSmall,type:"number",value:c,onChange:e=>d(Number(e.target.value))})),n.createElement("div",{style:l.fieldRow},n.createElement("span",{style:l.label},"PostgreSQL wire port"),n.createElement("input",{style:l.inputSmall,type:"number",value:p,onChange:e=>g(Number(e.target.value))}),n.createElement("span",{style:l.hint},"for Grafana")),n.createElement("div",{style:l.fieldRow},n.createElement("span",{style:l.label},"Container network"),n.createElement("input",{style:l.input,value:$,onChange:e=>Q(e.target.value)}),n.createElement("span",{style:l.hint},"shared with signalk-grafana"))),n.createElement("div",{style:l.sectionTitle},"Recording"),n.createElement("div",{style:l.fieldRow},n.createElement("span",{style:l.label},"Default sampling rate (ms)"),n.createElement("input",{style:l.inputSmall,type:"number",value:S,onChange:e=>k(Number(e.target.value))}),n.createElement("span",{style:l.hint},"1000 = max 1 write/sec per path (0 = every update)")),n.createElement("div",{style:l.fieldRow},n.createElement("span",{style:l.label},"Record own vessel"),n.createElement("input",{type:"checkbox",style:l.checkbox,checked:E,onChange:e=>v(e.target.checked)})),n.createElement("div",{style:l.fieldRow},n.createElement("span",{style:l.label},"Record AIS targets"),n.createElement("input",{type:"checkbox",style:l.checkbox,checked:x,onChange:e=>w(e.target.checked)})),n.createElement("div",{style:l.fieldRow},n.createElement("span",{style:l.label},"Retention (days)"),n.createElement("input",{style:l.inputSmall,type:"number",value:R,onChange:e=>C(Number(e.target.value))}),n.createElement("span",{style:l.hint},"0 = keep forever")),n.createElement(r,{title:"Path filtering"},n.createElement("div",{style:l.fieldRow},n.createElement("span",{style:l.label},"Filter mode"),n.createElement("select",{style:l.select,value:B,onChange:e=>T(e.target.value)},n.createElement("option",{value:"exclude"},"Exclude matching paths"),n.createElement("option",{value:"include"},"Include only matching paths"))),n.createElement("div",{style:{marginBottom:10}},n.createElement("div",{style:{...l.label,width:"auto",marginBottom:6}},"Path patterns (one per line, glob supported)"),n.createElement("textarea",{style:l.textarea,value:D,onChange:e=>I(e.target.value),placeholder:"navigation.position\nnavigation.*\nnotifications.*"}),n.createElement("div",{style:l.hint},"exclude"===B?"These paths are NOT recorded; everything else is.":"ONLY these paths are recorded; everything else is dropped."," ","Leave empty to record everything."))),n.createElement(r,{title:"Compression (on-disk)"},n.createElement("div",{style:l.fieldRow},n.createElement("span",{style:l.label},"Compression codec"),n.createElement("select",{style:l.select,value:z,onChange:e=>L(e.target.value)},n.createElement("option",{value:"none"},"None"),n.createElement("option",{value:"lz4"},"LZ4 (fast)"),n.createElement("option",{value:"zstd"},"ZSTD (smaller)")),n.createElement("span",{style:l.hint},"applies to new data after save")),"zstd"===z&&n.createElement("div",{style:l.fieldRow},n.createElement("span",{style:l.label},"ZSTD level"),n.createElement("input",{style:l.inputSmall,type:"number",min:"1",max:"22",value:P,onChange:e=>q(Number(e.target.value))}),n.createElement("span",{style:l.hint},"1 (fast) to 22 (smallest)"))),n.createElement(r,{title:"InfluxDB Migration"},n.createElement("div",{style:{display:"flex",gap:10,alignItems:"center",marginBottom:10}},n.createElement("button",{style:{...l.btn,...l.btnPrimary,...K?l.btnDisabled:{}},onClick:async()=>{Z(!0),ee("");try{const e=Y?`?url=${encodeURIComponent(Y)}`:"",t=await fetch(`/plugins/signalk-questdb/api/migration/detect${e}`);if(t.ok){const e=await t.json();_(e.sources),0===e.sources.length&&(ee(Y?`No InfluxDB found at ${Y}.`:"No InfluxDB instances detected on localhost:8086."),ae(!1))}}catch(e){ee("Detection failed: "+e.message),ae(!0)}Z(!1)},disabled:K},K?"Detecting...":"Detect InfluxDB"),n.createElement("span",{style:l.hint},"Checks localhost:8086 for InfluxDB 1.x and 2.x")),G&&G.length>0&&n.createElement("div",null,G.map((e,t)=>n.createElement("div",{key:t,style:l.migrationItem},n.createElement("div",{style:{...l.cardIcon,width:36,height:36,fontSize:16,background:"influxdb2"===e.type?"#020a47":"#22adf6",color:"#fff"}},"influxdb2"===e.type?"2":"1"),n.createElement("div",{style:l.cardInfo},n.createElement("div",{style:l.cardTitle},"InfluxDB ","influxdb2"===e.type?"2.x":"1.x",n.createElement("span",{style:{...l.tag,...l.tagLatest}},e.status)),n.createElement("div",{style:l.cardMeta},e.url," · v",e.version))))),n.createElement("div",{style:{...l.fieldRow,marginTop:10}},n.createElement("span",{style:l.label},"Manual InfluxDB URL"),n.createElement("input",{style:l.input,placeholder:"http://192.168.1.100:8086",value:Y,onChange:e=>J(e.target.value)}),n.createElement("span",{style:l.hint},"for remote instances")),G&&0===G.length&&!K&&n.createElement("div",{style:{...l.empty,padding:"16px",textAlign:"left"}},"No InfluxDB found on localhost. Use manual URL above for remote instances.")),n.createElement(r,{title:"Data Export"},n.createElement("div",{style:l.fieldRow},n.createElement("span",{style:l.label},"From"),n.createElement("input",{style:l.input,type:"datetime-local",value:be,onChange:e=>he(e.target.value)})),n.createElement("div",{style:l.fieldRow},n.createElement("span",{style:l.label},"To"),n.createElement("input",{style:l.input,type:"datetime-local",value:Ee,onChange:e=>ve(e.target.value)})),n.createElement("div",{style:l.fieldRow},n.createElement("span",{style:l.label},"Format"),n.createElement("select",{style:l.select,value:xe,onChange:e=>we(e.target.value)},n.createElement("option",{value:"parquet"},"Parquet"),n.createElement("option",{value:"csv"},"CSV"))),n.createElement("button",{style:{...l.btn,...l.btnPrimary,...Se?l.btnDisabled:{}},onClick:async()=>{if(!be||!Ee)return ee("Set both from and to dates for export."),void ae(!0);ke(!0),ee(`Exporting ${xe.toUpperCase()}...`),ae(!1);try{const e=`/plugins/signalk-questdb/api/export?from=${encodeURIComponent(be)}&to=${encodeURIComponent(Ee)}&format=${xe}`,t=await fetch(e);if(!t.ok){const e=await t.json().catch(()=>({error:t.statusText}));return ee(`Export failed: ${e.error}`),ae(!0),void ke(!1)}const a=await t.blob(),n="parquet"===xe?"parquet":"csv",l=document.createElement("a");l.href=URL.createObjectURL(a),l.download=`signalk-export-${be.slice(0,10)}.${n}`,l.click(),URL.revokeObjectURL(l.href),ee(`Exported ${(a.size/1024/1024).toFixed(1)} MB`)}catch(e){ee(`Export failed: ${e.message}`),ae(!0)}ke(!1)},disabled:Se},Se?"Exporting...":"Export Data")),!1!==a.managedContainer&&n.createElement(r,{title:"Danger zone"},n.createElement("div",{style:{fontSize:13,color:"#555",marginBottom:10}},"Remove the QuestDB container and permanently delete all recorded data. Use this to fully reset QuestDB — Signal K's plugin-uninstall cannot delete this data on rootless Podman. This cannot be undone."),n.createElement("button",{style:{...l.btn,...l.btnDanger,...ce?l.btnDisabled:{}},onClick:async()=>{if(window.confirm("Remove the QuestDB container and DELETE ALL recorded data? This cannot be undone.")){de(!0),ee("Removing QuestDB container and data..."),ae(!1);try{const e=await fetch("/plugins/signalk-questdb/api/purge-data",{method:"POST"}),t=await e.json().catch(()=>({error:e.statusText}));e.ok?(ee(t.message),ye()):(ee(`Remove failed: ${t.error}`),ae(!0))}catch(e){ee(`Remove failed: ${e.message}`),ae(!0)}de(!1)}},disabled:ce},ce?"Removing...":"Remove container & all data")),X&&n.createElement("div",{style:{...l.status,color:te?"#ef4444":"#10b981",marginTop:16}},X),n.createElement("div",{style:{marginTop:24}},n.createElement("button",{style:{...l.btn,...l.btnSave},onClick:()=>{t({questdbHost:i,questdbIlpPort:c,questdbHttpPort:u,questdbPgPort:p,questdbVersion:f,managedContainer:b,defaultSamplingRate:S,recordSelf:E,recordOthers:x,retentionDays:R,compression:z,compressionLevel:P,networkName:$,exposeToContainers:A,pathFilter:{mode:B,paths:D.split("\n").map(e=>e.trim()).filter(Boolean)},samplingRates:a.samplingRates||{}}),ee("Saved! Plugin will restart with new configuration."),ae(!1)}},"Save Configuration")))}}}]);
|
|
1
|
+
"use strict";(self.webpackChunksignalk_questdb=self.webpackChunksignalk_questdb||[]).push([[805],{805(e,t,a){a.r(t),a.d(t,{default:()=>i});var n=a(231);const l={root:{fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',color:"#333",padding:"16px 0"},sectionTitle:{fontSize:13,fontWeight:600,color:"#888",textTransform:"uppercase",letterSpacing:"0.05em",marginBottom:10,marginTop:24},btn:{display:"inline-flex",alignItems:"center",gap:8,padding:"8px 16px",border:"none",borderRadius:6,fontSize:13,fontWeight:600,cursor:"pointer"},btnPrimary:{background:"#3b82f6",color:"#fff"},btnSave:{background:"#3b82f6",color:"#fff"},btnDanger:{background:"#ef4444",color:"#fff",padding:"6px 12px",fontSize:12},btnDisabled:{opacity:.5,cursor:"not-allowed"},status:{marginTop:8,fontSize:12,minHeight:18},warnBanner:{padding:"12px 16px",background:"#fef2f2",border:"1px solid #fecaca",borderRadius:10,marginBottom:12,fontSize:13,color:"#991b1b",lineHeight:1.5},warnBannerTitle:{fontWeight:700,marginBottom:4},infoBanner:{padding:"12px 16px",background:"#fffbeb",border:"1px solid #fde68a",borderRadius:10,marginBottom:12,fontSize:13,color:"#92400e",lineHeight:1.5},warnBannerCode:{display:"block",marginTop:8,padding:"8px 10px",background:"#fff",border:"1px solid #fecaca",borderRadius:6,fontFamily:"monospace",fontSize:12,color:"#7f1d1d",whiteSpace:"pre-wrap",wordBreak:"break-word"},card:{display:"flex",alignItems:"center",gap:14,padding:"14px 18px",background:"#f8f9fa",border:"1px solid #e0e0e0",borderRadius:10,marginBottom:12},cardIcon:{width:44,height:44,borderRadius:10,display:"flex",alignItems:"center",justifyContent:"center",fontSize:20,fontWeight:700,flexShrink:0},cardInfo:{flex:1},cardTitle:{fontSize:15,fontWeight:600,color:"#333"},cardMeta:{fontSize:12,color:"#888"},stateIndicator:{width:10,height:10,borderRadius:"50%",flexShrink:0},fieldRow:{display:"flex",alignItems:"center",gap:12,marginBottom:10},label:{fontSize:13,fontWeight:500,color:"#555",width:180,flexShrink:0},select:{padding:"6px 10px",borderRadius:6,border:"1px solid #ccc",fontSize:13,background:"#fff",color:"#333",minWidth:200},input:{padding:"6px 10px",borderRadius:6,border:"1px solid #ccc",fontSize:13,background:"#fff",color:"#333",width:200},inputSmall:{padding:"6px 10px",borderRadius:6,border:"1px solid #ccc",fontSize:13,background:"#fff",color:"#333",width:80},checkbox:{width:16,height:16,accentColor:"#3b82f6"},hint:{fontSize:11,color:"#aaa",marginLeft:8},textarea:{padding:"6px 10px",borderRadius:6,border:"1px solid #ccc",fontSize:13,fontFamily:"monospace",background:"#fff",color:"#333",width:"100%",minHeight:70,boxSizing:"border-box",resize:"vertical"},empty:{textAlign:"center",padding:"30px 16px",color:"#999",fontSize:13},tag:{display:"inline-block",padding:"2px 8px",borderRadius:4,fontSize:10,fontWeight:600,marginLeft:8},tagPre:{background:"#fef3c7",color:"#92400e"},tagLatest:{background:"#dcfce7",color:"#166534"},migrationItem:{display:"flex",alignItems:"center",gap:12,padding:"12px 16px",background:"#f8f9fa",border:"1px solid #e0e0e0",borderRadius:10,marginBottom:8},migrationActions:{display:"flex",gap:8,alignItems:"center"},statsGrid:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(140px, 1fr))",gap:10,marginBottom:12},statCard:{padding:"12px 16px",background:"#f8f9fa",border:"1px solid #e0e0e0",borderRadius:10,textAlign:"center"},statValue:{fontSize:22,fontWeight:700,color:"#333"},statLabel:{fontSize:11,color:"#888",marginTop:2}};function r({title:e,children:t}){const[a,r]=(0,n.useState)(!1);return n.createElement("div",null,n.createElement("button",{type:"button","aria-expanded":a,style:{...l.sectionTitle,cursor:"pointer",userSelect:"none",display:"flex",alignItems:"center",gap:6,width:"100%",textAlign:"left",background:"none",border:"none",padding:0},onClick:()=>r(!a)},n.createElement("span",{style:{fontSize:10,transition:"transform 0.15s",transform:a?"rotate(90deg)":"rotate(0deg)"}},"▶"),e),a&&n.createElement("div",{style:{marginBottom:16}},t))}function s(e){return null==e?"—":e>=1e6?(e/1e6).toFixed(1)+"M":e>=1e3?(e/1e3).toFixed(1)+"K":String(e)}function i({configuration:e,save:t}){const a=e||{},[i,o]=(0,n.useState)(a.questdbHost||"127.0.0.1"),[c,d]=(0,n.useState)(a.questdbIlpPort||9009),[u,m]=(0,n.useState)(a.questdbHttpPort||9e3),[p,g]=(0,n.useState)(a.questdbPgPort||8812),[f,h]=(0,n.useState)(a.questdbVersion||"latest"),[y,b]=(0,n.useState)(!1!==a.managedContainer),[E,v]=(0,n.useState)(!1!==a.recordSelf),[w,k]=(0,n.useState)(a.recordOthers||!1),[x,S]=(0,n.useState)(a.defaultSamplingRate??2e3),[R,T]=(0,n.useState)(a.retentionDays||0),[B,C]=(0,n.useState)("include"===a.pathFilter?.mode?"include":"exclude"),[D,I]=(0,n.useState)((Array.isArray(a.pathFilter?.paths)?a.pathFilter.paths:[]).join("\n")),[L,$]=(0,n.useState)(a.compression||"lz4"),[z,P]=(0,n.useState)(a.compressionLevel||3),[q,Q]=(0,n.useState)(a.networkName||"sk-network"),[A,N]=(0,n.useState)(a.exposeToContainers||!1),[M,W]=(0,n.useState)([]),[j,F]=(0,n.useState)(!1),[U,O]=(0,n.useState)(null),[V,H]=(0,n.useState)(!0),[_,G]=(0,n.useState)(null),[K,Z]=(0,n.useState)(!1),[J,X]=(0,n.useState)(""),[Y,ee]=(0,n.useState)(""),[te,ae]=(0,n.useState)(!1),[ne,le]=(0,n.useState)(null),[re,se]=(0,n.useState)(!1),[ie,oe]=(0,n.useState)(!1),[ce,de]=(0,n.useState)(!1),[ue,me]=(0,n.useState)(!1),[pe,ge]=(0,n.useState)(""),[fe,he]=(0,n.useState)(null),[ye,be]=(0,n.useState)(!1),Ee=(0,n.useRef)(0),[ve,we]=(0,n.useState)(!1),ke=(0,n.useCallback)(async()=>{F(!0);try{const e=await fetch("/plugins/signalk-questdb/api/versions");if(e.ok){const t=await e.json();W(t)}}catch{}F(!1)},[]),xe=(0,n.useCallback)(async()=>{try{const e=await fetch("/plugins/signalk-questdb/api/status"),t=await e.json().catch(()=>null);O(t&&"object"==typeof t?t:{status:"not_running"})}catch{O({status:"not_running"})}H(!1)},[]),Se=(0,n.useCallback)(async e=>{const t=++Ee.current;try{const a=await fetch("/plugins/signalk-questdb/api/wal-diagnosis",{signal:e});if(t!==Ee.current)return;if(a.ok){const e=await a.json();if(t!==Ee.current)return;he(e),be(!1)}else be(!0)}catch{t===Ee.current&&be(!0)}},[]),Re=Boolean(U&&"running"===U.status&&(U.suspendedTables||[]).length>0);(0,n.useEffect)(()=>{if(!Re)return he(null),void be(!1);let e=!1,t=null;const a=new AbortController,n=async()=>{await Se(a.signal),e||(t=setTimeout(n,15e3))};return n(),()=>{e=!0,a.abort(),t&&clearTimeout(t)}},[Re,Se]),(0,n.useEffect)(()=>{ke(),xe();const e=setInterval(xe,5e3);return()=>clearInterval(e)},[ke,xe]);const[Te,Be]=(0,n.useState)(""),[Ce,De]=(0,n.useState)(""),[Ie,Le]=(0,n.useState)("parquet"),[$e,ze]=(0,n.useState)(!1),Pe=U&&"running"===U.status,qe=Pe&&U.suspendedTables||[],Qe=qe.length>0,Ae=Pe&&U.schemaMismatch||!1,Ne=Pe&&U.ulimitClamp||null,Me=U?.hostMaxMapCount?.tooLow&&U.hostMaxMapCount||null,We=M.filter(e=>!e.prerelease).slice(0,3),je=M.filter(e=>e.prerelease).slice(0,2);return n.createElement("div",{style:l.root},n.createElement("div",{style:l.sectionTitle},"QuestDB Status"),Me&&n.createElement("div",{style:l.infoBanner},n.createElement("div",{style:l.warnBannerTitle},"Host vm.max_map_count is low — ",s(Me.current)," ","(QuestDB recommends ",s(Me.recommended),")"),"QuestDB memory-maps every partition and WAL segment it touches. As the database grows, this kernel limit can run out — mmap then fails with out-of-memory errors even though RAM is free, which shows up as slow or failing history queries, can suspend recording, and can take QuestDB down entirely. Run this in a shell on the host machine — not inside the QuestDB container, which can neither change the kernel-global limit nor has sudo (takes effect immediately, no restart needed):",n.createElement("code",{style:l.warnBannerCode},`echo 'vm.max_map_count=${Me.recommended}' | sudo tee /etc/sysctl.d/99-questdb.conf && sudo sysctl --system`)),V?n.createElement("div",{style:l.empty},"Checking QuestDB..."):Pe?n.createElement(n.Fragment,null,Qe&&n.createElement("div",{style:l.warnBanner},n.createElement("div",{style:l.warnBannerTitle},"QuestDB WAL suspended — recording stalled"),"Rows are arriving but no longer commit, so the counts below have stopped advancing. This follows an error while QuestDB applied the write-ahead log — see the reason reported per table below. Resuming replays every pending transaction, so no data is lost.",n.createElement("code",{style:l.warnBannerCode},qe.map(e=>{const t=String(e.errorMessage||e.errorTag||"reason not reported").replace(/[\r\n]+/g," "),a=(fe?.tables||[]).find(t=>t.name===e.name),n=a?.suspendedSince?` — frozen since ${a.suspendedSince}`:"";return`${e.name}: ${s(e.txnLag)} txns behind — ${t}${n}`}).join("\n")),(fe?.tables||[]).filter(e=>e.applyError).map(e=>n.createElement("div",{key:e.name,style:{marginTop:8,fontSize:12}},"QuestDB's own log reports the apply failure on"," ",n.createElement("code",null,e.name)," as:",n.createElement("code",{style:l.warnBannerCode},e.applyError))),n.createElement("div",{style:{marginTop:10}},n.createElement("button",{style:{...l.btn,...l.btnPrimary,...ue||ve?l.btnDisabled:{}},disabled:ue||ve,onClick:async()=>{me(!0),ge("");try{const e=await fetch("/plugins/signalk-questdb/api/resume-wal",{method:"POST"}),t=await e.json().catch(()=>({error:e.statusText}));if(e.ok){const e=(t.results||[]).filter(e=>!e.ok);ge(0===e.length?`${t.message}. Recording resumes as the backlog drains — the banner clears once tables catch up.`:`${t.message}. `+e.map(e=>`${e.table}: ${e.error}`).join(" · ")),xe(),Se()}else ge(`Resume failed: ${t.error}`)}catch(e){ge(`Resume failed: ${e.message}`)}me(!1)}},ue?"Resuming...":"Resume recording")),qe.filter(e=>"failed"===e.autoResume).map(e=>{const t=(fe?.tables||[]).find(t=>t.name===e.name),a=t?.skipPlan;return a?n.createElement("div",{key:e.name,style:{marginTop:12}},n.createElement("div",{style:l.warnBannerTitle},e.name,": automatic resume failed — WAL segment unreadable"),"A lossless resume was attempted and the table re-suspended at the same transaction: the write-ahead-log segment at the stall point cannot be read back (typically corrupted by an unclean shutdown mid-write). Replaying can never get past it. The only repair is to skip the unreadable segment, losing"," ",n.createElement("b",null,s(a.skippedTxns)," transaction(s)")," ","recorded between ",n.createElement("b",null,a.skipWindowStart)," and"," ",n.createElement("b",null,a.skipWindowEnd),a.tailSkip?" — and this is the newest pending segment, so skipping it drops the ENTIRE pending backlog":` — everything after the skipped segment (${s(Math.max(0,e.txnLag-a.skippedTxns))} txns) is replayed without loss`,".",n.createElement("div",{style:{marginTop:8}},n.createElement("button",{style:{...l.btn,...l.btnDanger,...ve||ue||ye?l.btnDisabled:{}},disabled:ve||ue||ye,onClick:()=>(async(e,t)=>{const a=t.tailSkip?"\n\nWARNING: this is the newest pending segment — skipping it drops the ENTIRE pending backlog.":"";if(window.confirm(`Skip the unreadable WAL segment on ${e}?\n\nThis permanently loses ${s(t.skippedTxns)} transaction(s) recorded between ${t.skipWindowStart} and ${t.skipWindowEnd}. Everything after the skipped segment is replayed without loss.`+a)){we(!0),ge("");try{const a=await fetch("/plugins/signalk-questdb/api/resume-wal/skip",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({table:e,confirmPlan:t})}),n=await a.json().catch(()=>({error:a.statusText}));a.ok?ge(n.message):ge(`Skip failed: ${n.error}`),xe(),Se()}catch(e){ge(`Skip failed: ${e.message}`)}we(!1)}})(e.name,a)},ve?"Skipping...":"Skip unreadable segment (loses data)"),ye&&n.createElement("div",{style:{marginTop:6,fontSize:12}},"The diagnosis could not be refreshed — the numbers above may be stale. The skip re-enables once a refresh succeeds."))):null}),n.createElement("div",{style:{marginTop:8,fontSize:12}},"Manual fallback in the QuestDB SQL console (",n.createElement("code",null,":9000"),"), one statement at a time — avoid running it from several tabs, the console retries a busy statement forever:",n.createElement("code",{style:l.warnBannerCode},qe.map(e=>{const t=`"${String(e.name).replace(/"/g,'""')}"`,a=(fe?.tables||[]).find(t=>t.name===e.name),n=[`ALTER TABLE ${t} RESUME WAL;`];return"failed"===e.autoResume&&a?.skipPlan&&!ye&&n.push(`-- if the resume re-suspends: skip the unreadable segment (loses ${s(a.skipPlan.skippedTxns)} txns)`,`ALTER TABLE ${t} RESUME WAL FROM TXN ${a.skipPlan.skipToTxn};`),n.join("\n")}).join("\n")))),pe&&n.createElement("div",{style:l.infoBanner},pe),Ae&&n.createElement("div",{style:l.warnBanner},n.createElement("div",{style:l.warnBannerTitle},"QuestDB table schema mismatch — data not readable"),"A QuestDB table was re-created by ILP ingestion with the wrong timestamp column, so rows are being stored but reads filtering on time (history, Grafana, and the counts above) return nothing. The plugin rebuilds the affected table with the correct schema automatically within a minute; if this persists, restart the plugin. (The few rows written into the wrong-schema table are lost — they were unreadable anyway.)"),Ne&&n.createElement("div",{style:l.infoBanner},n.createElement("div",{style:l.warnBannerTitle},"QuestDB open-files limit capped by the host"),"QuestDB requested a ",n.createElement("code",null,Ne.ulimit)," limit of"," ",s(Ne.requested),", but this host only allows"," ",s(Ne.granted),", so it was capped. QuestDB is running on the lower limit. To grant the full value, raise the host limit for the user running the container runtime — under rootless Podman that means a systemd ",n.createElement("code",null,"user@.service")," ",n.createElement("code",null,"LimitNOFILE")," drop-in (editing"," ",n.createElement("code",null,"/etc/security/limits.conf")," alone is usually not enough) — then restart the QuestDB container."," ",n.createElement("a",{href:"https://github.com/dirkwa/signalk-container#raising-the-open-files-limit-nofile",target:"_blank",rel:"noreferrer",style:{color:"#92400e",textDecoration:"underline"}},"Step-by-step instructions"),"."),n.createElement("div",{style:l.card},n.createElement("div",{style:{...l.cardIcon,background:"#7c3aed",color:"#fff"}},"Q"),n.createElement("div",{style:l.cardInfo},n.createElement("div",{style:l.cardTitle},"QuestDB"),n.createElement("div",{style:l.cardMeta},U?.endpoint||`${i}:${u}`," ","· ",Qe?"WAL suspended":"Recording")),n.createElement("div",{style:{...l.stateIndicator,background:Qe?"#ef4444":"#10b981"},title:Qe?"WAL suspended":"Running"})),n.createElement("div",{style:l.statsGrid},n.createElement("div",{style:l.statCard},n.createElement("div",{style:l.statValue},s(U.totalRows)),n.createElement("div",{style:l.statLabel},"Total Rows")),n.createElement("div",{style:l.statCard},n.createElement("div",{style:l.statValue},s(U.activePathsToday)),n.createElement("div",{style:l.statLabel},"Active Paths Today"))),n.createElement("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:12}},ne&&ne.updateAvailable?n.createElement(n.Fragment,null,n.createElement("span",{style:{fontSize:13}},"v",ne.currentVersion," →"," ",n.createElement("strong",null,"v",ne.latestVersion)," available"),n.createElement("button",{style:{...l.btn,...l.btnPrimary,padding:"4px 12px",fontSize:12,...ie?l.btnDisabled:{}},onClick:async()=>{oe(!0),ee("Pulling new image and restarting..."),ae(!1);try{const e=await fetch("/plugins/signalk-questdb/api/update/apply",{method:"POST"});if(e.ok){const t=await e.json();ee(t.message),le(null),t.newVersion&&h(t.newVersion),xe()}else{const t=await e.json().catch(()=>({error:e.statusText}));ee(`Update failed: ${t.error}`),ae(!0)}}catch(e){ee(`Update failed: ${e.message}`),ae(!0)}oe(!1)},disabled:ie},ie?"Updating...":"Update QuestDB")):ne&&!ne.updateAvailable?n.createElement("span",{style:{fontSize:12,color:"#888"}},"v",ne.currentVersion," (up to date)"):n.createElement("button",{style:{...l.btn,padding:"4px 12px",fontSize:12,background:"#f1f5f9",color:"#475569",border:"1px solid #e2e8f0",...re?l.btnDisabled:{}},onClick:async()=>{se(!0);try{const e=await fetch("/plugins/signalk-questdb/api/update/check");e.ok&&le(await e.json())}catch{}se(!1)},disabled:re},re?"Checking...":"Check for updates"))):n.createElement("div",{style:l.card},n.createElement("div",{style:{...l.cardIcon,background:"#fef2f2",color:"#ef4444"}},"Q"),n.createElement("div",{style:l.cardInfo},n.createElement("div",{style:l.cardTitle},"QuestDB"),n.createElement("div",{style:l.cardMeta},"unhealthy"===U?.status?"Not responding":"Not running",y?" — enable plugin to start container":"")),n.createElement("div",{style:{...l.stateIndicator,background:"#ef4444"}})),n.createElement("div",{style:l.sectionTitle},"Image Version"),n.createElement("div",{style:l.fieldRow},n.createElement("span",{style:l.label},"QuestDB version"),n.createElement("select",{style:l.select,value:f,onChange:e=>h(e.target.value)},n.createElement("option",{value:"latest"},"latest (recommended)"),je.map(e=>n.createElement("option",{key:e.tag,value:e.tag},e.tag," (pre-release)")),We.map((e,t)=>n.createElement("option",{key:e.tag,value:e.tag},e.tag,0===t?" (current stable)":""))),j&&n.createElement("span",{style:l.hint},"loading releases..."),n.createElement("button",{style:{...l.btn,...l.btnPrimary,padding:"4px 10px",fontSize:11},onClick:ke},"↻")),n.createElement("div",{style:l.sectionTitle},"Connection"),n.createElement("div",{style:l.fieldRow},n.createElement("span",{style:l.label},"Managed container"),n.createElement("input",{type:"checkbox",style:l.checkbox,checked:y,onChange:e=>b(e.target.checked)}),n.createElement("span",{style:l.hint},y?"signalk-container manages QuestDB":"Connect to external QuestDB")),!y&&n.createElement(n.Fragment,null,n.createElement("div",{style:l.fieldRow},n.createElement("span",{style:l.label},"QuestDB host"),n.createElement("input",{style:l.input,value:i,onChange:e=>o(e.target.value)})),n.createElement("div",{style:l.fieldRow},n.createElement("span",{style:l.label},"HTTP port (queries)"),n.createElement("input",{style:l.inputSmall,type:"number",value:u,onChange:e=>m(Number(e.target.value))})),n.createElement("div",{style:l.fieldRow},n.createElement("span",{style:l.label},"ILP port (writes)"),n.createElement("input",{style:l.inputSmall,type:"number",value:c,onChange:e=>d(Number(e.target.value))}))),y&&n.createElement("div",{style:l.fieldRow},n.createElement("span",{style:l.label},"Bind to 0.0.0.0"),n.createElement("input",{type:"checkbox",style:l.checkbox,checked:A,onChange:e=>N(e.target.checked)}),n.createElement("span",{style:{...l.hint,color:A?"#ef4444":void 0}},A?"Caution! This exposes your data to the network":"Signal K reaches QuestDB automatically — only enable to reach it from another machine or a separate-Docker Grafana")),y&&A&&n.createElement(n.Fragment,null,n.createElement("div",{style:l.fieldRow},n.createElement("span",{style:l.label},"HTTP port (queries)"),n.createElement("input",{style:l.inputSmall,type:"number",value:u,onChange:e=>m(Number(e.target.value))})),n.createElement("div",{style:l.fieldRow},n.createElement("span",{style:l.label},"ILP port (writes)"),n.createElement("input",{style:l.inputSmall,type:"number",value:c,onChange:e=>d(Number(e.target.value))})),n.createElement("div",{style:l.fieldRow},n.createElement("span",{style:l.label},"PostgreSQL wire port"),n.createElement("input",{style:l.inputSmall,type:"number",value:p,onChange:e=>g(Number(e.target.value))}),n.createElement("span",{style:l.hint},"for Grafana")),n.createElement("div",{style:l.fieldRow},n.createElement("span",{style:l.label},"Container network"),n.createElement("input",{style:l.input,value:q,onChange:e=>Q(e.target.value)}),n.createElement("span",{style:l.hint},"shared with signalk-grafana"))),n.createElement("div",{style:l.sectionTitle},"Recording"),n.createElement("div",{style:l.fieldRow},n.createElement("span",{style:l.label},"Default sampling rate (ms)"),n.createElement("input",{style:l.inputSmall,type:"number",value:x,onChange:e=>S(Number(e.target.value))}),n.createElement("span",{style:l.hint},"1000 = max 1 write/sec per path (0 = every update)")),n.createElement("div",{style:l.fieldRow},n.createElement("span",{style:l.label},"Record own vessel"),n.createElement("input",{type:"checkbox",style:l.checkbox,checked:E,onChange:e=>v(e.target.checked)})),n.createElement("div",{style:l.fieldRow},n.createElement("span",{style:l.label},"Record AIS targets"),n.createElement("input",{type:"checkbox",style:l.checkbox,checked:w,onChange:e=>k(e.target.checked)})),n.createElement("div",{style:l.fieldRow},n.createElement("span",{style:l.label},"Retention (days)"),n.createElement("input",{style:l.inputSmall,type:"number",value:R,onChange:e=>T(Number(e.target.value))}),n.createElement("span",{style:l.hint},"0 = keep forever")),n.createElement(r,{title:"Path filtering"},n.createElement("div",{style:l.fieldRow},n.createElement("span",{style:l.label},"Filter mode"),n.createElement("select",{style:l.select,value:B,onChange:e=>C(e.target.value)},n.createElement("option",{value:"exclude"},"Exclude matching paths"),n.createElement("option",{value:"include"},"Include only matching paths"))),n.createElement("div",{style:{marginBottom:10}},n.createElement("div",{style:{...l.label,width:"auto",marginBottom:6}},"Path patterns (one per line, glob supported)"),n.createElement("textarea",{style:l.textarea,value:D,onChange:e=>I(e.target.value),placeholder:"navigation.position\nnavigation.*\nnotifications.*"}),n.createElement("div",{style:l.hint},"exclude"===B?"These paths are NOT recorded; everything else is.":"ONLY these paths are recorded; everything else is dropped."," ","Leave empty to record everything."))),n.createElement(r,{title:"Compression (on-disk)"},n.createElement("div",{style:l.fieldRow},n.createElement("span",{style:l.label},"Compression codec"),n.createElement("select",{style:l.select,value:L,onChange:e=>$(e.target.value)},n.createElement("option",{value:"none"},"None"),n.createElement("option",{value:"lz4"},"LZ4 (fast)"),n.createElement("option",{value:"zstd"},"ZSTD (smaller)")),n.createElement("span",{style:l.hint},"applies to new data after save")),"zstd"===L&&n.createElement("div",{style:l.fieldRow},n.createElement("span",{style:l.label},"ZSTD level"),n.createElement("input",{style:l.inputSmall,type:"number",min:"1",max:"22",value:z,onChange:e=>P(Number(e.target.value))}),n.createElement("span",{style:l.hint},"1 (fast) to 22 (smallest)"))),n.createElement(r,{title:"InfluxDB Migration"},n.createElement("div",{style:{display:"flex",gap:10,alignItems:"center",marginBottom:10}},n.createElement("button",{style:{...l.btn,...l.btnPrimary,...K?l.btnDisabled:{}},onClick:async()=>{Z(!0),ee("");try{const e=J?`?url=${encodeURIComponent(J)}`:"",t=await fetch(`/plugins/signalk-questdb/api/migration/detect${e}`);if(t.ok){const e=await t.json();G(e.sources),0===e.sources.length&&(ee(J?`No InfluxDB found at ${J}.`:"No InfluxDB instances detected on localhost:8086."),ae(!1))}}catch(e){ee("Detection failed: "+e.message),ae(!0)}Z(!1)},disabled:K},K?"Detecting...":"Detect InfluxDB"),n.createElement("span",{style:l.hint},"Checks localhost:8086 for InfluxDB 1.x and 2.x")),_&&_.length>0&&n.createElement("div",null,_.map((e,t)=>n.createElement("div",{key:t,style:l.migrationItem},n.createElement("div",{style:{...l.cardIcon,width:36,height:36,fontSize:16,background:"influxdb2"===e.type?"#020a47":"#22adf6",color:"#fff"}},"influxdb2"===e.type?"2":"1"),n.createElement("div",{style:l.cardInfo},n.createElement("div",{style:l.cardTitle},"InfluxDB ","influxdb2"===e.type?"2.x":"1.x",n.createElement("span",{style:{...l.tag,...l.tagLatest}},e.status)),n.createElement("div",{style:l.cardMeta},e.url," · v",e.version))))),n.createElement("div",{style:{...l.fieldRow,marginTop:10}},n.createElement("span",{style:l.label},"Manual InfluxDB URL"),n.createElement("input",{style:l.input,placeholder:"http://192.168.1.100:8086",value:J,onChange:e=>X(e.target.value)}),n.createElement("span",{style:l.hint},"for remote instances")),_&&0===_.length&&!K&&n.createElement("div",{style:{...l.empty,padding:"16px",textAlign:"left"}},"No InfluxDB found on localhost. Use manual URL above for remote instances.")),n.createElement(r,{title:"Data Export"},n.createElement("div",{style:l.fieldRow},n.createElement("span",{style:l.label},"From"),n.createElement("input",{style:l.input,type:"datetime-local",value:Te,onChange:e=>Be(e.target.value)})),n.createElement("div",{style:l.fieldRow},n.createElement("span",{style:l.label},"To"),n.createElement("input",{style:l.input,type:"datetime-local",value:Ce,onChange:e=>De(e.target.value)})),n.createElement("div",{style:l.fieldRow},n.createElement("span",{style:l.label},"Format"),n.createElement("select",{style:l.select,value:Ie,onChange:e=>Le(e.target.value)},n.createElement("option",{value:"parquet"},"Parquet"),n.createElement("option",{value:"csv"},"CSV"))),n.createElement("button",{style:{...l.btn,...l.btnPrimary,...$e?l.btnDisabled:{}},onClick:async()=>{if(!Te||!Ce)return ee("Set both from and to dates for export."),void ae(!0);ze(!0),ee(`Exporting ${Ie.toUpperCase()}...`),ae(!1);try{const e=`/plugins/signalk-questdb/api/export?from=${encodeURIComponent(Te)}&to=${encodeURIComponent(Ce)}&format=${Ie}`,t=await fetch(e);if(!t.ok){const e=await t.json().catch(()=>({error:t.statusText}));return ee(`Export failed: ${e.error}`),ae(!0),void ze(!1)}const a=await t.blob(),n="parquet"===Ie?"parquet":"csv",l=document.createElement("a");l.href=URL.createObjectURL(a),l.download=`signalk-export-${Te.slice(0,10)}.${n}`,l.click(),URL.revokeObjectURL(l.href),ee(`Exported ${(a.size/1024/1024).toFixed(1)} MB`)}catch(e){ee(`Export failed: ${e.message}`),ae(!0)}ze(!1)},disabled:$e},$e?"Exporting...":"Export Data")),!1!==a.managedContainer&&n.createElement(r,{title:"Danger zone"},n.createElement("div",{style:{fontSize:13,color:"#555",marginBottom:10}},"Remove the QuestDB container and permanently delete all recorded data. Use this to fully reset QuestDB — Signal K's plugin-uninstall cannot delete this data on rootless Podman. This cannot be undone."),n.createElement("button",{style:{...l.btn,...l.btnDanger,...ce?l.btnDisabled:{}},onClick:async()=>{if(window.confirm("Remove the QuestDB container and DELETE ALL recorded data? This cannot be undone.")){de(!0),ee("Removing QuestDB container and data..."),ae(!1);try{const e=await fetch("/plugins/signalk-questdb/api/purge-data",{method:"POST"}),t=await e.json().catch(()=>({error:e.statusText}));e.ok?(ee(t.message),xe()):(ee(`Remove failed: ${t.error}`),ae(!0))}catch(e){ee(`Remove failed: ${e.message}`),ae(!0)}de(!1)}},disabled:ce},ce?"Removing...":"Remove container & all data")),Y&&n.createElement("div",{style:{...l.status,color:te?"#ef4444":"#10b981",marginTop:16}},Y),n.createElement("div",{style:{marginTop:24}},n.createElement("button",{style:{...l.btn,...l.btnSave},onClick:()=>{t({questdbHost:i,questdbIlpPort:c,questdbHttpPort:u,questdbPgPort:p,questdbVersion:f,managedContainer:y,defaultSamplingRate:x,recordSelf:E,recordOthers:w,retentionDays:R,compression:L,compressionLevel:z,networkName:q,exposeToContainers:A,pathFilter:{mode:B,paths:D.split("\n").map(e=>e.trim()).filter(Boolean)},samplingRates:a.samplingRates||{}}),ee("Saved! Plugin will restart with new configuration."),ae(!1)}},"Save Configuration")))}}}]);
|
package/public/main.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var e={316(){}};const t={};function r(n){const o=t[n];if(void 0!==o)return o.exports;const s=t[n]={exports:{}};return e[n](s,s.exports,r),s.exports}r.m=e,r.c=t,r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce((t,n)=>(r.f[n](e,t),t),[])),r.u=e=>e+".js",r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{const e={},t="signalk-questdb:";r.l=(n,o,s,i)=>{if(e[n])return void e[n].push(o);let c,l;if(void 0!==s){const e=document.getElementsByTagName("script");for(var a=0;a<e.length;a++){const r=e[a];if(r.getAttribute("src")==n||r.getAttribute("data-webpack")==t+s){c=r;break}}}c||(l=!0,c=document.createElement("script"),c.charset="utf-8",r.nc&&c.setAttribute("nonce",r.nc),c.setAttribute("data-webpack",t+s),c.src=n),e[n]=[o];const u=(t,r)=>{c.onerror=c.onload=null,clearTimeout(p);const o=e[n];if(delete e[n],c.parentNode?.removeChild(c),o?.forEach(e=>e(r)),t)return t(r)},p=setTimeout(u.bind(null,void 0,{type:"timeout",target:c}),12e4);c.onerror=u.bind(null,c.onerror),c.onload=u.bind(null,c.onload),l&&document.head.appendChild(c)}})(),(()=>{r.S={};const e={},t={};r.I=(n,o)=>{o||(o=[]);let s=t[n];if(s||(s=t[n]={}),o.indexOf(s)>=0)return;if(o.push(s),e[n])return e[n];r.o(r.S,n)||(r.S[n]={});const i=r.S[n],c="signalk-questdb",l=[];return"default"===n&&((e,t,n,o)=>{const s=i[e]=i[e]||{},l=s[t];(!l||!l.loaded&&(1!=!l.eager?o:c>l.from))&&(s[t]={get:()=>r.e(540).then(()=>()=>r(540)),from:c,eager:!1})})("react","19.2.
|
|
1
|
+
(()=>{var e={316(){}};const t={};function r(n){const o=t[n];if(void 0!==o)return o.exports;const s=t[n]={exports:{}};return e[n](s,s.exports,r),s.exports}r.m=e,r.c=t,r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce((t,n)=>(r.f[n](e,t),t),[])),r.u=e=>e+".js",r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{const e={},t="signalk-questdb:";r.l=(n,o,s,i)=>{if(e[n])return void e[n].push(o);let c,l;if(void 0!==s){const e=document.getElementsByTagName("script");for(var a=0;a<e.length;a++){const r=e[a];if(r.getAttribute("src")==n||r.getAttribute("data-webpack")==t+s){c=r;break}}}c||(l=!0,c=document.createElement("script"),c.charset="utf-8",r.nc&&c.setAttribute("nonce",r.nc),c.setAttribute("data-webpack",t+s),c.src=n),e[n]=[o];const u=(t,r)=>{c.onerror=c.onload=null,clearTimeout(p);const o=e[n];if(delete e[n],c.parentNode?.removeChild(c),o?.forEach(e=>e(r)),t)return t(r)},p=setTimeout(u.bind(null,void 0,{type:"timeout",target:c}),12e4);c.onerror=u.bind(null,c.onerror),c.onload=u.bind(null,c.onload),l&&document.head.appendChild(c)}})(),(()=>{r.S={};const e={},t={};r.I=(n,o)=>{o||(o=[]);let s=t[n];if(s||(s=t[n]={}),o.indexOf(s)>=0)return;if(o.push(s),e[n])return e[n];r.o(r.S,n)||(r.S[n]={});const i=r.S[n],c="signalk-questdb",l=[];return"default"===n&&((e,t,n,o)=>{const s=i[e]=i[e]||{},l=s[t];(!l||!l.loaded&&(1!=!l.eager?o:c>l.from))&&(s[t]={get:()=>r.e(540).then(()=>()=>r(540)),from:c,eager:!1})})("react","19.2.8"),e[n]=l.length?Promise.all(l).then(()=>e[n]=1):1}})(),(()=>{let e;r.g.importScripts&&(e=r.g.location+"");const t=r.g.document;if(!e&&t&&("SCRIPT"===t.currentScript?.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){const r=t.getElementsByTagName("script");if(r.length){let t=r.length-1;for(;t>-1&&(!e||!/^http(s?):/.test(e));)e=r[t--].src}}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e})(),(()=>{const e={792:0};r.f.j=(t,n)=>{let o=r.o(e,t)?e[t]:void 0;if(0!==o)if(o)n.push(o[2]);else{const s=new Promise((r,n)=>o=e[t]=[r,n]);n.push(o[2]=s);const i=r.p+r.u(t),c=new Error,l=n=>{if(r.o(e,t)&&(o=e[t],0!==o&&(e[t]=void 0),o)){const e=n&&("load"===n.type?"missing":n.type),r=n&&n.target&&n.target.src;c.message="Loading chunk "+t+" failed.\n("+e+": "+r+")",c.name="ChunkLoadError",c.type=e,c.request=r,c.event=n,o[1](c)}};r.l(i,l,"chunk-"+t,t)}};const t=(t,n)=>{let[o,s,i]=n;var c,l,a=0;if(o.some(t=>0!==e[t])){for(c in s)r.o(s,c)&&(r.m[c]=s[c]);i&&i(r)}for(t&&t(n);a<o.length;a++)l=o[a],r.o(e,l)&&e[l]&&e[l][0](),e[l]=0},n=self.webpackChunksignalk_questdb=self.webpackChunksignalk_questdb||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})(),r(316)})();
|
package/public/remoteEntry.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var signalk_questdb;(()=>{"use strict";var e={623(e,t,r){const n={"./PluginConfigurationPanel":()=>r.e(805).then(()=>()=>r(805))},o=(e,t)=>(r.R=t,t=r.o(n,e)?n[e]():Promise.resolve().then(()=>{throw new Error('Module "'+e+'" does not exist in container.')}),r.R=void 0,t),i=(e,t)=>{if(!r.S)return;const n="default",o=r.S[n];if(o&&o!==e)throw new Error("Container initialization failed as it has already been initialized with a different share scope");return r.S[n]=e,r.I(n,t)};r.d(t,{get:()=>o,init:()=>i})}};const t={};function r(n){const o=t[n];if(void 0!==o)return o.exports;const i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.m=e,r.c=t,r.d=(e,t)=>{if(Array.isArray(t))for(var n=0;n<t.length;){var o=t[n++],i=t[n++];r.o(e,o)?0===i&&n++:0===i?Object.defineProperty(e,o,{enumerable:!0,value:t[n++]}):Object.defineProperty(e,o,{enumerable:!0,get:i})}else for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce((t,n)=>(r.f[n](e,t),t),[])),r.u=e=>e+".js",r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{const e={},t="signalk-questdb:";r.l=(n,o,i,s)=>{if(e[n])return void e[n].push(o);let a,u;if(void 0!==i){const e=document.getElementsByTagName("script");for(var l=0;l<e.length;l++){const r=e[l];if(r.getAttribute("src")==n||r.getAttribute("data-webpack")==t+i){a=r;break}}}a||(u=!0,a=document.createElement("script"),a.charset="utf-8",r.nc&&a.setAttribute("nonce",r.nc),a.setAttribute("data-webpack",t+i),a.src=n),e[n]=[o];const c=(t,r)=>{a.onerror=a.onload=null,clearTimeout(f);const o=e[n];if(delete e[n],a.parentNode?.removeChild(a),o?.forEach(e=>e(r)),t)return t(r)},f=setTimeout(c.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=c.bind(null,a.onerror),a.onload=c.bind(null,a.onload),u&&document.head.appendChild(a)}})(),r.r=e=>{Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{r.S={};const e={},t={};r.I=(n,o)=>{o||(o=[]);let i=t[n];if(i||(i=t[n]={}),o.indexOf(i)>=0)return;if(o.push(i),e[n])return e[n];r.o(r.S,n)||(r.S[n]={});const s=r.S[n],a="signalk-questdb",u=[];return"default"===n&&((e,t,n,o)=>{const i=s[e]=s[e]||{},u=i[t];(!u||!u.loaded&&(1!=!u.eager?o:a>u.from))&&(i[t]={get:()=>r.e(540).then(()=>()=>r(540)),from:a,eager:!1})})("react","19.2.
|
|
1
|
+
var signalk_questdb;(()=>{"use strict";var e={623(e,t,r){const n={"./PluginConfigurationPanel":()=>r.e(805).then(()=>()=>r(805))},o=(e,t)=>(r.R=t,t=r.o(n,e)?n[e]():Promise.resolve().then(()=>{throw new Error('Module "'+e+'" does not exist in container.')}),r.R=void 0,t),i=(e,t)=>{if(!r.S)return;const n="default",o=r.S[n];if(o&&o!==e)throw new Error("Container initialization failed as it has already been initialized with a different share scope");return r.S[n]=e,r.I(n,t)};r.d(t,{get:()=>o,init:()=>i})}};const t={};function r(n){const o=t[n];if(void 0!==o)return o.exports;const i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.m=e,r.c=t,r.d=(e,t)=>{if(Array.isArray(t))for(var n=0;n<t.length;){var o=t[n++],i=t[n++];r.o(e,o)?0===i&&n++:0===i?Object.defineProperty(e,o,{enumerable:!0,value:t[n++]}):Object.defineProperty(e,o,{enumerable:!0,get:i})}else for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce((t,n)=>(r.f[n](e,t),t),[])),r.u=e=>e+".js",r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{const e={},t="signalk-questdb:";r.l=(n,o,i,s)=>{if(e[n])return void e[n].push(o);let a,u;if(void 0!==i){const e=document.getElementsByTagName("script");for(var l=0;l<e.length;l++){const r=e[l];if(r.getAttribute("src")==n||r.getAttribute("data-webpack")==t+i){a=r;break}}}a||(u=!0,a=document.createElement("script"),a.charset="utf-8",r.nc&&a.setAttribute("nonce",r.nc),a.setAttribute("data-webpack",t+i),a.src=n),e[n]=[o];const c=(t,r)=>{a.onerror=a.onload=null,clearTimeout(f);const o=e[n];if(delete e[n],a.parentNode?.removeChild(a),o?.forEach(e=>e(r)),t)return t(r)},f=setTimeout(c.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=c.bind(null,a.onerror),a.onload=c.bind(null,a.onload),u&&document.head.appendChild(a)}})(),r.r=e=>{Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{r.S={};const e={},t={};r.I=(n,o)=>{o||(o=[]);let i=t[n];if(i||(i=t[n]={}),o.indexOf(i)>=0)return;if(o.push(i),e[n])return e[n];r.o(r.S,n)||(r.S[n]={});const s=r.S[n],a="signalk-questdb",u=[];return"default"===n&&((e,t,n,o)=>{const i=s[e]=s[e]||{},u=i[t];(!u||!u.loaded&&(1!=!u.eager?o:a>u.from))&&(i[t]={get:()=>r.e(540).then(()=>()=>r(540)),from:a,eager:!1})})("react","19.2.8"),e[n]=u.length?Promise.all(u).then(()=>e[n]=1):1}})(),(()=>{let e;r.g.importScripts&&(e=r.g.location+"");const t=r.g.document;if(!e&&t&&("SCRIPT"===t.currentScript?.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){const r=t.getElementsByTagName("script");if(r.length){let t=r.length-1;for(;t>-1&&(!e||!/^http(s?):/.test(e));)e=r[t--].src}}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e})(),(()=>{var e=e=>{var t=e=>e.split(".").map(e=>+e==e?+e:e),r=/^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(e),n=r[1]?t(r[1]):[];return r[2]&&(n.length++,n.push.apply(n,t(r[2]))),r[3]&&(n.push([]),n.push.apply(n,t(r[3]))),n},t=e=>{var r=e[0],n="";if(1===e.length)return"*";if(r+.5){n+=0==r?">=":-1==r?"<":1==r?"^":2==r?"~":r>0?"=":"!=";for(var o=1,i=1;i<e.length;i++)o--,n+="u"==(typeof(a=e[i]))[0]?"-":(o>0?".":"")+(o=2,a);return n}var s=[];for(i=1;i<e.length;i++){var a=e[i];s.push(0===a?"not("+u()+")":1===a?"("+u()+" || "+u()+")":2===a?s.pop()+" "+s.pop():t(a))}return u();function u(){return s.pop().replace(/^\((.+)\)$/,"$1")}},n=(t,r)=>{if(0 in t){r=e(r);var o=t[0],i=o<0;i&&(o=-o-1);for(var s=0,a=1,u=!0;;a++,s++){var l,c,f=a<t.length?(typeof t[a])[0]:"";if(s>=r.length||"o"==(c=(typeof(l=r[s]))[0]))return!u||("u"==f?a>o&&!i:""==f!=i);if("u"==c){if(!u||"u"!=f)return!1}else if(u)if(f==c)if(a<=o){if(l!=t[a])return!1}else{if(i?l>t[a]:l<t[a])return!1;l!=t[a]&&(u=!1)}else if("s"!=f&&"n"!=f){if(i||a<=o)return!1;u=!1,a--}else{if(a<=o||c<f!=i)return!1;u=!1}else"s"!=f&&"n"!=f&&(u=!1,a--)}}var d=[],p=d.pop.bind(d);for(s=1;s<t.length;s++){var h=t[s];d.push(1==h?p()|p():2==h?p()&p():h?n(h,r):!p())}return!!p()};const o=(t,r,n)=>{const o=n?(e=>Object.keys(e).reduce((t,r)=>(e[r].eager&&(t[r]=e[r]),t),{}))(t[r]):t[r];return Object.keys(o).reduce((t,r)=>!t||!o[t].loaded&&((t,r)=>{t=e(t),r=e(r);for(var n=0;;){if(n>=t.length)return n<r.length&&"u"!=(typeof r[n])[0];var o=t[n],i=(typeof o)[0];if(n>=r.length)return"u"==i;var s=r[n],a=(typeof s)[0];if(i!=a)return"o"==i&&"n"==a||"s"==a||"u"==i;if("o"!=i&&"u"!=i&&o!=s)return o<s;n++}})(t,r)?r:t,0)},i=(e,t,r)=>r?r():((e,t)=>(e=>{throw new Error(e)})("Shared module "+t+" doesn't exist in shared scope "+e))(e,t),s=(e=>function(t,n,o,i,s){const a=r.I(t);return a?.then&&!o?a.then(e.bind(e,t,r.S[t],n,!1,i,s)):e(t,r.S[t],n,o,i,s)})((e,s,a,u,l,c)=>{if(!((e,t)=>e&&r.o(e,t))(s,a))return i(e,a,c);const f=o(s,a,u);return n(l,f)||(p=((e,r,n,o)=>"Unsatisfied version "+n+" from "+(n&&e[r][n].from)+" of shared singleton module "+r+" (required "+t(o)+")")(s,a,f,l),"undefined"!=typeof console&&console.warn&&console.warn(p)),(d=s[a][f]).loaded=1,d.get();var d,p}),a={},u={231:()=>s("default","react",!1,[1,19],()=>r.e(540).then(()=>()=>r(540)))},l={805:[231]},c={};r.f.consumes=(e,t)=>{r.o(l,e)&&l[e].forEach(e=>{if(r.o(a,e))return t.push(a[e]);if(!c[e]){const n=t=>{a[e]=0,r.m[e]=n=>{delete r.c[e],n.exports=t()}};c[e]=!0;const o=t=>{delete a[e],r.m[e]=n=>{throw delete r.c[e],t}};try{const r=u[e]();r.then?t.push(a[e]=r.then(n).catch(o)):n(r)}catch(e){o(e)}}})}})(),(()=>{const e={807:0};r.f.j=(t,n)=>{let o=r.o(e,t)?e[t]:void 0;if(0!==o)if(o)n.push(o[2]);else{const i=new Promise((r,n)=>o=e[t]=[r,n]);n.push(o[2]=i);const s=r.p+r.u(t),a=new Error,u=n=>{if(r.o(e,t)&&(o=e[t],0!==o&&(e[t]=void 0),o)){const e=n&&("load"===n.type?"missing":n.type),r=n&&n.target&&n.target.src;a.message="Loading chunk "+t+" failed.\n("+e+": "+r+")",a.name="ChunkLoadError",a.type=e,a.request=r,a.event=n,o[1](a)}};r.l(s,u,"chunk-"+t,t)}};const t=(t,n)=>{let[o,i,s]=n;var a,u,l=0;if(o.some(t=>0!==e[t])){for(a in i)r.o(i,a)&&(r.m[a]=i[a]);s&&s(r)}for(t&&t(n);l<o.length;l++)u=o[l],r.o(e,u)&&e[u]&&e[u][0](),e[u]=0},n=self.webpackChunksignalk_questdb=self.webpackChunksignalk_questdb||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();let n=r(623);signalk_questdb=n})();
|