@camstack/addon-admin-ui 1.2.104 → 1.2.106
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/dist/assets/{AddLocationWizard-BRqOiJb6.js → AddLocationWizard-DPvpYCGn.js} +1 -1
- package/dist/assets/{AddonCollectionPage-CjRbqWJ3.js → AddonCollectionPage-DLJXV_3S.js} +1 -1
- package/dist/assets/{Addons-lqIiQzO7.js → Addons-COnaHviu.js} +1 -1
- package/dist/assets/{AdminTabs-CVoGbDhA.js → AdminTabs-ugTfV6vR.js} +1 -1
- package/dist/assets/{AiProfiles-ou-7yuXL.js → AiProfiles-B3OoMGwy.js} +1 -1
- package/dist/assets/{BrokerForm-7u8E5U9_.js → BrokerForm-FW8CGvEw.js} +1 -1
- package/dist/assets/{Build-Brn7Tn4h.js → Build-CKSSyLHR.js} +1 -1
- package/dist/assets/{Capabilities-DwNU00eE.js → Capabilities-Bvk135Hx.js} +1 -1
- package/dist/assets/{CapabilityBadges-CsAl2y39.js → CapabilityBadges-2_RTtE8F.js} +1 -1
- package/dist/assets/{Cluster-BGuGB9uF.js → Cluster-BIIxDRXP.js} +1 -1
- package/dist/assets/{Data-BVA5NVsY.js → Data-DUfQYWdR.js} +1 -1
- package/dist/assets/{DetectionIntelligence-DlT6ynCp.js → DetectionIntelligence-_SicEHJ7.js} +1 -1
- package/dist/assets/{DeviceAggregateSection-CWkYXbF4.js → DeviceAggregateSection-B-LbbxBn.js} +1 -1
- package/dist/assets/{DeviceDetail-kmk5FqDj.js → DeviceDetail-QGu4Zppg.js} +1 -1
- package/dist/assets/{Devices-Cu-hek-9.js → Devices-DyOwMmsB.js} +1 -1
- package/dist/assets/{EmbedPlayerPage-BJDQ5V6L.js → EmbedPlayerPage-DLylekcq.js} +1 -1
- package/dist/assets/{Events-BaiUPGhH.js → Events-Bd7_dT0H.js} +1 -1
- package/dist/assets/{FormBuilder-DTj4iNvO.js → FormBuilder-DaTNPCtr.js} +1 -1
- package/dist/assets/{Identity-ELB_u3oq.js → Identity-qjHZBREK.js} +1 -1
- package/dist/assets/{IntegrationDetail-B8qQWo3C.js → IntegrationDetail-DaIdJdyp.js} +1 -1
- package/dist/assets/{Integrations-bxxcBBWJ.js → Integrations-B3wdYU9G.js} +1 -1
- package/dist/assets/{Integrations-CBEyW7sW.js → Integrations-BXkqNtA2.js} +1 -1
- package/dist/assets/Logs-B9aMiGDX.js +1 -0
- package/dist/assets/{MotionZonesSettings-DN-JV0gx.js → MotionZonesSettings-BAld-2Lw.js} +1 -1
- package/dist/assets/{MyAccess-53YgTEoJ.js → MyAccess-DYc5Ia6R.js} +1 -1
- package/dist/assets/{Network-BjpS-_QA.js → Network-DtCqr7_n.js} +1 -1
- package/dist/assets/{NodeAddonsSettingsPanel-CgRwgUJe.js → NodeAddonsSettingsPanel-DCrm5WAe.js} +1 -1
- package/dist/assets/{NodeInferenceDevices-2XvdP1jz.js → NodeInferenceDevices-DruKQsKv.js} +1 -1
- package/dist/assets/{Notifications-CjkVAVEO.js → Notifications-DN4WDeO2.js} +1 -1
- package/dist/assets/{Pipeline-AJroyXyh.js → Pipeline-BQaaY2RF.js} +1 -1
- package/dist/assets/{Plates-CenIrr1w.js → Plates-DzAZ1RGB.js} +1 -1
- package/dist/assets/{PrivacyMaskSettings-N8sR1n-o.js → PrivacyMaskSettings-t81B_gek.js} +1 -1
- package/dist/assets/{ProviderIcon-DlT21Ll7.js → ProviderIcon-1IBp_VK5.js} +1 -1
- package/dist/assets/{Recordings-B3o4xrdm.js → Recordings-C6gSAs30.js} +1 -1
- package/dist/assets/{ScanNetworkModal-Db-0EJTb.js → ScanNetworkModal-DId274fd.js} +1 -1
- package/dist/assets/{SceneMonitorEditor-D2k8KDjP.js → SceneMonitorEditor-B57j4d9e.js} +1 -1
- package/dist/assets/{Scenes-lQRmFsHt.js → Scenes-BJcEln5I.js} +1 -1
- package/dist/assets/{Settings-DT5l0Uli.js → Settings-DxbbgMBy.js} +1 -1
- package/dist/assets/{Showroom-UboCKCyZ.js → Showroom-CGYvWhTb.js} +1 -1
- package/dist/assets/{Terminal-DLc46OTC.js → Terminal-Db32GfJu.js} +1 -1
- package/dist/assets/{_virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-oaa5M1jQ.js → _virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-x2EKNp38.js} +1 -1
- package/dist/assets/{bell-ring-COda2YP6.js → bell-ring-fa6SzUi_.js} +1 -1
- package/dist/assets/{boxes-Draytijm.js → boxes-CfnJWdJa.js} +1 -1
- package/dist/assets/{build-cluster-graph-BdSDB2Ts.js → build-cluster-graph-BlQoSudm.js} +1 -1
- package/dist/assets/circle-check-big-C_6LzyMr.js +1 -0
- package/dist/assets/{circle-x-Bm_9zsoV.js → circle-x-B470_M0K.js} +1 -1
- package/dist/assets/clock-44ycL5OK.js +1 -0
- package/dist/assets/{copy-DG5q0dKt.js → copy-Bz5_L_j0.js} +1 -1
- package/dist/assets/{debounced-invalidate-BzPG7ouP.js → debounced-invalidate-BgLJ3Lz0.js} +1 -1
- package/dist/assets/{dist-D0drQOtu.js → dist-BiaTzHe6.js} +1 -1
- package/dist/assets/dist-CxVTxcO_.js +349 -0
- package/dist/assets/{download-cpVQjEyE.js → download-CPPi4lEs.js} +1 -1
- package/dist/assets/{face-bbox-Crck7-aj.js → face-bbox-Bk5OxbZ9.js} +1 -1
- package/dist/assets/{hostInit-4XqubaxD.js → hostInit-CfHVCMU0.js} +1 -1
- package/dist/assets/{index-BVi-8S32.js → index-DmGVQVip.js} +3 -3
- package/dist/assets/{key-round-DayV9A0N.js → key-round-GUiZ3GBz.js} +1 -1
- package/dist/assets/{layers-DlO9Vujj.js → layers-BHA4WXNG.js} +1 -1
- package/dist/assets/{mf-entry-bootstrap-0-bf6e91c7.js → mf-entry-bootstrap-0-72686030.js} +2 -2
- package/dist/assets/{pencil-Cg8GCU7r.js → pencil-CywoEYDw.js} +1 -1
- package/dist/assets/play-Dfmddr6T.js +1 -0
- package/dist/assets/{player-overlays-Du1-MBv9.js → player-overlays-C1Oe-16j.js} +1 -1
- package/dist/assets/plus-BpSOCY8P.js +1 -0
- package/dist/assets/power-CNppeI6O.js +1 -0
- package/dist/assets/{radio-BcMTYzH7.js → radio-lEGHQd-3.js} +1 -1
- package/dist/assets/{refresh-cw-DHnNPZDY.js → refresh-cw-BEHJsw3X.js} +1 -1
- package/dist/assets/remoteEntry-CpjMZXjT.js +1 -0
- package/dist/assets/rotate-ccw-ZN_nOrZf.js +1 -0
- package/dist/assets/rotate-cw-CDaIhQNY.js +1 -0
- package/dist/assets/{send-DEwovXZg.js → send-CdTPIK-7.js} +1 -1
- package/dist/assets/{server-DIC_0QGI.js → server-CKXUNcfQ.js} +1 -1
- package/dist/assets/{shield-B3CTkpId.js → shield-DuQG63BO.js} +1 -1
- package/dist/assets/square-BpVTHFXt.js +1 -0
- package/dist/assets/{square-check-big-Cv6J95Y0.js → square-check-big-xoQlO2z6.js} +1 -1
- package/dist/assets/src-DLoxi-uA.js +349 -0
- package/dist/assets/{src-CgQ6F-z1.js → src-DjZVUvrt.js} +17 -17
- package/dist/assets/{star-Bpxj8FrH.js → star-Dij84nD8.js} +1 -1
- package/dist/assets/{undo-2-D72fS4H9.js → undo-2-DtQ5QK61.js} +1 -1
- package/dist/assets/{upload-CE7bvcbx.js → upload-Bh__Gcoi.js} +1 -1
- package/dist/assets/{use-scenes-feed-CSDyreHh.js → use-scenes-feed-BAtj9fjN.js} +1 -1
- package/dist/assets/useEventInvalidation-Deon74Uu.js +1 -0
- package/dist/assets/{video-BpGHjT4M.js → video-_cSQX0pK.js} +1 -1
- package/dist/assets/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-D9Edks6N.js → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-CCi4D5V9.js} +2 -2
- package/dist/assets/{wifi-DxMdBp3O.js → wifi-DFad8LAE.js} +1 -1
- package/dist/assets/{zap-DIdS1Ske.js → zap-BEaKr1nX.js} +1 -1
- package/dist/index.html +5 -5
- package/dist/server/addon.js +323 -26
- package/package.json +1 -1
- package/dist/assets/Logs-CHKov6qD.js +0 -1
- package/dist/assets/circle-check-big-BDVeFhGN.js +0 -1
- package/dist/assets/clock-c8JqsuNE.js +0 -1
- package/dist/assets/dist-HEbubhPn.js +0 -349
- package/dist/assets/play-DTqMPbh1.js +0 -1
- package/dist/assets/plus-BVdOrfOf.js +0 -1
- package/dist/assets/power-3oIL7U77.js +0 -1
- package/dist/assets/remoteEntry-D_kgSt6K.js +0 -1
- package/dist/assets/rotate-ccw-Y2yzHDE5.js +0 -1
- package/dist/assets/rotate-cw-CsJmHTKk.js +0 -1
- package/dist/assets/square-Y5IC2BkQ.js +0 -1
- package/dist/assets/src-DKK7VZz6.js +0 -349
- package/dist/assets/useEventInvalidation-sVWBGyHi.js +0 -1
package/dist/server/addon.js
CHANGED
|
@@ -7471,6 +7471,111 @@ var CameraSwitchGroupSchema = object({
|
|
|
7471
7471
|
fetchedAt: number()
|
|
7472
7472
|
});
|
|
7473
7473
|
/**
|
|
7474
|
+
* Per-component log CHANNELS — the gate a hot path consults, and the registry
|
|
7475
|
+
* an addon declares its channels in.
|
|
7476
|
+
*
|
|
7477
|
+
* ## Two axes, deliberately separated
|
|
7478
|
+
*
|
|
7479
|
+
* - **DECLARATION** — which channels exist. Only the addon knows:
|
|
7480
|
+
* `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
|
|
7481
|
+
* baichuan/handshake. A hand-wired central list rots at the first addition,
|
|
7482
|
+
* and rots silently. So a channel is declared where it is consulted, and the
|
|
7483
|
+
* `log-channels` capability enumerates the declarations.
|
|
7484
|
+
* - **VALUE** — at which level, for which scope, until when. That stays ONE
|
|
7485
|
+
* thing: the logging settings document on the `system` cap. Two authorities
|
|
7486
|
+
* over the values is the exact defect
|
|
7487
|
+
* `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
|
|
7488
|
+
* remove; re-introducing it from the cure side would be grotesque.
|
|
7489
|
+
*
|
|
7490
|
+
* Nothing in this file reads a clock, an env var or a store. The registry is
|
|
7491
|
+
* a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
|
|
7492
|
+
* the hot path with a value somebody actually read, and by
|
|
7493
|
+
* {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
|
|
7494
|
+
* never reaches here, so it can neither disarm an armed channel nor arm a
|
|
7495
|
+
* disarmed one (D49).
|
|
7496
|
+
*
|
|
7497
|
+
* ## The canonical call shape
|
|
7498
|
+
*
|
|
7499
|
+
* ```ts
|
|
7500
|
+
* if (CH_RTP.on && CH_RTP.wants(deviceId)) {
|
|
7501
|
+
* CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
|
|
7502
|
+
* }
|
|
7503
|
+
* ```
|
|
7504
|
+
*
|
|
7505
|
+
* `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
|
|
7506
|
+
* read. Disarmed, a call site costs one load and one branch, and the `extras`
|
|
7507
|
+
* object literal is never constructed because it lives inside the branch. It
|
|
7508
|
+
* is the same shape already proven in production at `stream-broker.ts:1650`,
|
|
7509
|
+
* and the same discipline `LoggingGate.allowsDestination` uses for the
|
|
7510
|
+
* destination floor (measured at 1.93 ns/call when off).
|
|
7511
|
+
*
|
|
7512
|
+
* ## Why a channel emits at `info`
|
|
7513
|
+
*
|
|
7514
|
+
* `loki-logging.addon.ts` pins the destination default at `info` and
|
|
7515
|
+
* `loki-destination.ts` drops everything below it, so a line emitted at
|
|
7516
|
+
* `debug` never reaches Loki and the hub's in-memory ring only holds ~35
|
|
7517
|
+
* minutes. A diagnostic that cannot be read an hour later is worse than no
|
|
7518
|
+
* diagnostic, because it looks done. {@link LogChannelGate.log} therefore
|
|
7519
|
+
* emits at the channel's declared level, whose schema floor is `info`.
|
|
7520
|
+
*/
|
|
7521
|
+
/**
|
|
7522
|
+
* The level a channel writes at once armed.
|
|
7523
|
+
*
|
|
7524
|
+
* `debug` is absent ON PURPOSE and not by omission: below `info` the line does
|
|
7525
|
+
* not leave the process for Loki, and the whole point of arming a channel is
|
|
7526
|
+
* to read it later.
|
|
7527
|
+
*/
|
|
7528
|
+
var LogChannelLevelSchema = _enum([
|
|
7529
|
+
"info",
|
|
7530
|
+
"warn",
|
|
7531
|
+
"error"
|
|
7532
|
+
]);
|
|
7533
|
+
/**
|
|
7534
|
+
* What an addon declares about one channel. No value, no state — a
|
|
7535
|
+
* declaration is inert.
|
|
7536
|
+
*/
|
|
7537
|
+
var LogChannelDescriptorSchema = object({
|
|
7538
|
+
/**
|
|
7539
|
+
* Dotted `area.thing`, unique across the workspace. `area` is conventionally
|
|
7540
|
+
* the addon's short name so an operator reading a channel list can tell who
|
|
7541
|
+
* owns it without a second lookup.
|
|
7542
|
+
*/
|
|
7543
|
+
name: string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
|
|
7544
|
+
/** One sentence: what the operator will SEE after arming it. */
|
|
7545
|
+
description: string().min(1),
|
|
7546
|
+
/** The level its lines are emitted at. Never below `info`. */
|
|
7547
|
+
defaultLevel: LogChannelLevelSchema,
|
|
7548
|
+
/**
|
|
7549
|
+
* Whether this channel can be narrowed to a camera.
|
|
7550
|
+
*
|
|
7551
|
+
* `true` is a PROMISE with two halves, and both must hold: the gate is
|
|
7552
|
+
* consulted with the numeric device id, AND every line the channel admits
|
|
7553
|
+
* carries `tags: { deviceId }` with that same numeric id. The second half is
|
|
7554
|
+
* what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
|
|
7555
|
+
* keeps `deviceId` out of the stream labels for cardinality, so the tag in
|
|
7556
|
+
* the body is the only way to filter.
|
|
7557
|
+
*
|
|
7558
|
+
* A channel whose lines carry the device only in `meta` (or not at all) is
|
|
7559
|
+
* declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
|
|
7560
|
+
* the operator narrows to one camera, sees nothing, and concludes the code
|
|
7561
|
+
* path was never taken.
|
|
7562
|
+
*/
|
|
7563
|
+
perDevice: boolean()
|
|
7564
|
+
});
|
|
7565
|
+
/**
|
|
7566
|
+
* An armed window over one channel, as the document hands it to a mirror.
|
|
7567
|
+
*
|
|
7568
|
+
* A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
|
|
7569
|
+
* expires by itself, which is the one failure a boolean cannot avoid.
|
|
7570
|
+
*/
|
|
7571
|
+
var LogChannelWindowSchema = object({
|
|
7572
|
+
channel: string().min(1),
|
|
7573
|
+
/** Epoch ms the window closes at. */
|
|
7574
|
+
armedUntilMs: number(),
|
|
7575
|
+
/** `null` = every camera. A non-empty list narrows to those numeric ids. */
|
|
7576
|
+
deviceIds: array(number().int()).readonly().nullable()
|
|
7577
|
+
});
|
|
7578
|
+
/**
|
|
7474
7579
|
* Ops-log — the durable, append-only operations audit shared by the
|
|
7475
7580
|
* recordings and events management surfaces.
|
|
7476
7581
|
*
|
|
@@ -10989,6 +11094,35 @@ var MutationFilterSchema = object({
|
|
|
10989
11094
|
whereBetween: record(string(), tuple([unknown(), unknown()])).optional(),
|
|
10990
11095
|
whereNot: record(string(), unknown()).optional()
|
|
10991
11096
|
});
|
|
11097
|
+
/**
|
|
11098
|
+
* One scalar an {@link settingsStoreCapability.methods.aggregate} call asks for.
|
|
11099
|
+
*
|
|
11100
|
+
* `as` names the slot in the result, so the SAME column may be asked twice with
|
|
11101
|
+
* two operations (`MIN(startMs)` and `MAX(startMs)` in one round trip) — which
|
|
11102
|
+
* a `Record<column, op>` shape could not express.
|
|
11103
|
+
*/
|
|
11104
|
+
var AggregateFieldSchema = object({
|
|
11105
|
+
/** Result key. */
|
|
11106
|
+
as: string().min(1),
|
|
11107
|
+
/** Column to aggregate. Must be a real column of a declared collection. */
|
|
11108
|
+
field: string().min(1),
|
|
11109
|
+
op: _enum([
|
|
11110
|
+
"sum",
|
|
11111
|
+
"min",
|
|
11112
|
+
"max"
|
|
11113
|
+
])
|
|
11114
|
+
});
|
|
11115
|
+
/**
|
|
11116
|
+
* `COUNT(*)` plus one number per requested field.
|
|
11117
|
+
*
|
|
11118
|
+
* `null` means NO ROW MATCHED, never zero: a `SUM` over an empty set and a sum
|
|
11119
|
+
* that really is 0 are different facts, and an accounting caller that renders
|
|
11120
|
+
* "0 bytes, oldest = 0" for "nothing here" reports a lie about a disk.
|
|
11121
|
+
*/
|
|
11122
|
+
var AggregateResultSchema = object({
|
|
11123
|
+
count: number().int(),
|
|
11124
|
+
values: record(string(), number().nullable())
|
|
11125
|
+
});
|
|
10992
11126
|
/** A single stored record: `{ id, data }`. */
|
|
10993
11127
|
var SettingsRecordSchema = object({
|
|
10994
11128
|
id: string(),
|
|
@@ -11073,6 +11207,11 @@ method(object({
|
|
|
11073
11207
|
collection: string(),
|
|
11074
11208
|
filter: QueryFilterSchema.optional()
|
|
11075
11209
|
}), number()), method(object({
|
|
11210
|
+
namespace: string().optional(),
|
|
11211
|
+
collection: string(),
|
|
11212
|
+
fields: array(AggregateFieldSchema).readonly(),
|
|
11213
|
+
filter: QueryFilterSchema.optional()
|
|
11214
|
+
}), AggregateResultSchema), method(object({
|
|
11076
11215
|
namespace: string().optional(),
|
|
11077
11216
|
collection: string(),
|
|
11078
11217
|
field: string(),
|
|
@@ -11189,6 +11328,11 @@ method(_void(), EngineInfoSchema, { auth: "admin" }), method(object({
|
|
|
11189
11328
|
collection: string(),
|
|
11190
11329
|
filter: QueryFilterSchema.optional()
|
|
11191
11330
|
}), number(), { auth: "admin" }), method(object({
|
|
11331
|
+
namespace: string().optional(),
|
|
11332
|
+
collection: string(),
|
|
11333
|
+
fields: array(AggregateFieldSchema).readonly(),
|
|
11334
|
+
filter: QueryFilterSchema.optional()
|
|
11335
|
+
}), AggregateResultSchema, { auth: "admin" }), method(object({
|
|
11192
11336
|
namespace: string().optional(),
|
|
11193
11337
|
collection: string(),
|
|
11194
11338
|
field: string(),
|
|
@@ -11750,24 +11894,6 @@ method(_void(), _void(), { kind: "mutation" }), method(_void(), _void(), { kind:
|
|
|
11750
11894
|
kind: "mutation",
|
|
11751
11895
|
auth: "admin"
|
|
11752
11896
|
});
|
|
11753
|
-
/**
|
|
11754
|
-
* Device Manager capability — hub-side singleton that unifies device persistence,
|
|
11755
|
-
* live registry access, and all management operations into a single tRPC surface.
|
|
11756
|
-
*
|
|
11757
|
-
* Replaces:
|
|
11758
|
-
* - `device-persistence` capability (persistence methods absorbed here)
|
|
11759
|
-
* - `device-management.router.ts` (deleted in Phase 2)
|
|
11760
|
-
* - `device-ops.router.ts` (compat layer — deleted; device-provider ops absorbed here)
|
|
11761
|
-
*
|
|
11762
|
-
* All device provider addons (rtsp, onvif, frigate, …) are hub-local: they may
|
|
11763
|
-
* fork into separate processes but never run on remote cluster agents. Therefore:
|
|
11764
|
-
* - No nodeId routing needed — this is a pure hub singleton.
|
|
11765
|
-
* - The hub's DeviceRegistry is the single source of truth for all live devices.
|
|
11766
|
-
* - No shadow registry or cross-node aggregation required.
|
|
11767
|
-
*
|
|
11768
|
-
* Forked workers register devices back to the hub via `ctx.devices`
|
|
11769
|
-
* (DeviceManagerApi → ctx.api.deviceManager.registerDevice), same as today.
|
|
11770
|
-
*/
|
|
11771
11897
|
/** One child-placement directive on a container's `childLayout`. Structurally
|
|
11772
11898
|
* identical to `ChildLayoutEntry` in `device-management.ts` — the cap wire
|
|
11773
11899
|
* shape for the same field. The child is identified by its re-sync-stable
|
|
@@ -12136,7 +12262,7 @@ method(object({
|
|
|
12136
12262
|
* it answers today and the caller filters as it already does.
|
|
12137
12263
|
*/
|
|
12138
12264
|
deviceIds: array(number()).optional()
|
|
12139
|
-
}), array(DeviceInfoSchema)), method(object({ deviceId: number() }), DeviceInfoSchema.nullable()), method(object({ parentDeviceId: number() }), array(DeviceInfoSchema)), method(object({ deviceId: number() }), object({
|
|
12265
|
+
}), array(DeviceInfoSchema)), method(object({ deviceId: number() }), DeviceInfoSchema.nullable()), method(object({ parentDeviceId: number() }), array(DeviceInfoSchema)), method(object({ parentDeviceIds: array(number()).max(256) }), record(string(), array(DeviceInfoSchema))), method(object({ deviceId: number() }), object({
|
|
12140
12266
|
mode: LinkedDevicesModeSchema,
|
|
12141
12267
|
devices: array(LinkedDeviceSchema)
|
|
12142
12268
|
})), method(object({ deviceIds: array(number()) }), array(LinkedDevicesForDeviceSchema)), method(object({ deviceId: number() }), array(StreamSourceEntrySchema$1)), method(object({ deviceId: number() }), array(ConfigEntrySchema)), method(object({ deviceId: number() }), ConfigUISchemaOutput), method(object({
|
|
@@ -12860,6 +12986,59 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
|
|
|
12860
12986
|
kind: "mutation",
|
|
12861
12987
|
auth: "admin"
|
|
12862
12988
|
});
|
|
12989
|
+
/**
|
|
12990
|
+
* `log-channels` — the capability an addon DECLARES its diagnostic channels
|
|
12991
|
+
* through. It stores nothing.
|
|
12992
|
+
*
|
|
12993
|
+
* ## Why a capability at all, and why this shape
|
|
12994
|
+
*
|
|
12995
|
+
* Which channels exist is knowledge only the addon has: `stream-broker` knows
|
|
12996
|
+
* webrtc/ICE/RTP, `provider-reolink` knows baichuan/handshake. A central list
|
|
12997
|
+
* maintained by hand rots at the first addition and rots INVISIBLY — nothing
|
|
12998
|
+
* fails, an operator just never sees the channel somebody added. So the list
|
|
12999
|
+
* is assembled from declarations at runtime.
|
|
13000
|
+
*
|
|
13001
|
+
* The shape is copied from `log-destination.cap.ts`, which already does
|
|
13002
|
+
* exactly this job: `mode: 'collection'`, `internal: true`,
|
|
13003
|
+
* `mount: { kind: 'skip' }` — no tRPC route, no generated hooks — while
|
|
13004
|
+
* `addons.listCapabilityProviders` still enumerates it, and the hub's
|
|
13005
|
+
* `CapabilityRegistry` still holds an RPC proxy per provider so a forked
|
|
13006
|
+
* runner's declarations reach hub-main over the transport that already exists.
|
|
13007
|
+
* No new UDS message, no second registry.
|
|
13008
|
+
*
|
|
13009
|
+
* ## What it deliberately does NOT own
|
|
13010
|
+
*
|
|
13011
|
+
* The VALUES — which channel is armed, for which cameras, until when — live in
|
|
13012
|
+
* ONE place: the logging settings document on the `system` cap
|
|
13013
|
+
* (`getLoggingSettings` / `setLoggingSettings`). Two authorities over the same
|
|
13014
|
+
* value is the defect the plan behind this work exists to remove, and
|
|
13015
|
+
* `setRequestCensus` was retired (D245) rather than allowed to be a second
|
|
13016
|
+
* one. {@link logChannelsCapability} therefore has no getter for a level, no
|
|
13017
|
+
* setter for a window and no persistence of any kind.
|
|
13018
|
+
*
|
|
13019
|
+
* ## Why `apply` is here even so
|
|
13020
|
+
*
|
|
13021
|
+
* The gate lives in the addon's PROCESS; the document lives in hub-main. Some
|
|
13022
|
+
* seam has to carry the value from the authority to the mirror, and a channel
|
|
13023
|
+
* that cannot be reached is precisely the dead knob this whole slice exists to
|
|
13024
|
+
* make impossible (D62 — `audioThresholdDbfs`, the HA entities with no source).
|
|
13025
|
+
* `apply` is that seam and nothing more: it writes an in-memory mirror, it
|
|
13026
|
+
* persists nothing, it is never the source of a value, and it is called only
|
|
13027
|
+
* with a set the hub actually read (D49 — a read that fails does not call it
|
|
13028
|
+
* at all, so no channel is silently disarmed by a bad read).
|
|
13029
|
+
*/
|
|
13030
|
+
/** What `apply` reports back — enough to log, not enough to be a second state. */
|
|
13031
|
+
var LogChannelApplyResultSchema = object({
|
|
13032
|
+
/** How many declared channels are armed in this process after the call. */
|
|
13033
|
+
armed: number().int().min(0),
|
|
13034
|
+
/**
|
|
13035
|
+
* Names the document armed that this process does not declare. Reported
|
|
13036
|
+
* rather than swallowed: a name here is either a typo or an addon that has
|
|
13037
|
+
* not booted, and both deserve a line instead of silence.
|
|
13038
|
+
*/
|
|
13039
|
+
unknown: array(string()).readonly()
|
|
13040
|
+
});
|
|
13041
|
+
method(_void(), array(LogChannelDescriptorSchema).readonly()), method(object({ windows: array(LogChannelWindowSchema).readonly() }), LogChannelApplyResultSchema, { kind: "mutation" });
|
|
12863
13042
|
var LogLevelSchema = _enum([
|
|
12864
13043
|
"debug",
|
|
12865
13044
|
"info",
|
|
@@ -26277,10 +26456,11 @@ var DiagnosticIdSchema = _enum(["request-census"]);
|
|
|
26277
26456
|
* The layers of the level hierarchy, general → specific. The most specific
|
|
26278
26457
|
* layer that carries an explicit value wins.
|
|
26279
26458
|
*
|
|
26280
|
-
* `component`
|
|
26281
|
-
*
|
|
26282
|
-
*
|
|
26283
|
-
*
|
|
26459
|
+
* `component` became RESOLVABLE on 2026-08-27: a component is a declared log
|
|
26460
|
+
* CHANNEL (`stream-broker.webrtc`, `provider-reolink.baichuan`), named by
|
|
26461
|
+
* `scopeComponent`. It was declared-but-dark in the first slice precisely so
|
|
26462
|
+
* that turning it on would not force every consumer of this document to widen
|
|
26463
|
+
* a `levelSource` enum — which is what has now not happened.
|
|
26284
26464
|
*/
|
|
26285
26465
|
var LoggingScopeKindSchema = _enum([
|
|
26286
26466
|
"cluster",
|
|
@@ -26307,6 +26487,14 @@ var LoggingLevelLayerSchema = object({
|
|
|
26307
26487
|
scope: LoggingScopeKindSchema,
|
|
26308
26488
|
/** The node this layer speaks for; `null` on the cluster layer. */
|
|
26309
26489
|
nodeId: string().nullable(),
|
|
26490
|
+
/**
|
|
26491
|
+
* The declared channel this layer speaks for; `null` on every layer but
|
|
26492
|
+
* `component`. Never folded into `nodeId`: a component level is CLUSTER-WIDE
|
|
26493
|
+
* by design — the convention this repo settled on is one orchestrator-wide
|
|
26494
|
+
* setting, never per node (D52) — so a component layer that carried a node
|
|
26495
|
+
* would invite a per-node copy of a value that has no per-node meaning.
|
|
26496
|
+
*/
|
|
26497
|
+
component: string().nullable(),
|
|
26310
26498
|
/** Explicitly set here, or `null` when this layer inherits. */
|
|
26311
26499
|
level: LogLevelSchema$1.nullable()
|
|
26312
26500
|
});
|
|
@@ -26348,6 +26536,49 @@ var DiagnosticWindowPatchSchema = object({
|
|
|
26348
26536
|
reportEveryMs: number().int().positive().optional()
|
|
26349
26537
|
});
|
|
26350
26538
|
/**
|
|
26539
|
+
* A channel ARMED, as the document reports it.
|
|
26540
|
+
*
|
|
26541
|
+
* `armMs` is not echoed back: what an operator needs to see is the deadline
|
|
26542
|
+
* and the time left, because a diagnostic left running is itself an incident
|
|
26543
|
+
* and "armed for 10 minutes" said an hour ago is not an answer.
|
|
26544
|
+
*/
|
|
26545
|
+
var LogChannelWindowStateSchema = object({
|
|
26546
|
+
channel: string(),
|
|
26547
|
+
armed: boolean(),
|
|
26548
|
+
/** Epoch ms the window closes at. 0 when disarmed. */
|
|
26549
|
+
armedUntilMs: number(),
|
|
26550
|
+
/** Ms left before it expires on its own. 0 when disarmed. */
|
|
26551
|
+
remainingMs: number(),
|
|
26552
|
+
/**
|
|
26553
|
+
* The cameras it is narrowed to, or `null` for every camera.
|
|
26554
|
+
*
|
|
26555
|
+
* A channel declared `perDevice: false` can only ever report `null` here:
|
|
26556
|
+
* its lines do not carry `tags: { deviceId }`, so narrowing them would
|
|
26557
|
+
* produce a filter that silently matches nothing. The server REFUSES such a
|
|
26558
|
+
* patch rather than quietly widening it — ignoring the request would teach
|
|
26559
|
+
* the operator that per-camera filtering works on that channel when it does
|
|
26560
|
+
* not.
|
|
26561
|
+
*/
|
|
26562
|
+
deviceIds: array(number().int()).readonly().nullable()
|
|
26563
|
+
});
|
|
26564
|
+
/**
|
|
26565
|
+
* `armMs: 0` DISARMS. Same grammar as {@link DiagnosticWindowPatchSchema}, and
|
|
26566
|
+
* for the same reason: a channel is a window with a deadline, never a switch.
|
|
26567
|
+
*/
|
|
26568
|
+
var LogChannelWindowPatchSchema = object({
|
|
26569
|
+
channel: string().min(1),
|
|
26570
|
+
armMs: number().int().min(0),
|
|
26571
|
+
/**
|
|
26572
|
+
* Narrow to these numeric device ids. Absent or `null` = every camera.
|
|
26573
|
+
*
|
|
26574
|
+
* Numeric because the repo's own rule makes it possible: every log line
|
|
26575
|
+
* about a device carries `tags: { deviceId }` with the numeric id. That rule
|
|
26576
|
+
* was paid for with a 22% thumbnail gap and a 3-hour media blackout both
|
|
26577
|
+
* diagnosed by hand, and this is the first thing that collects on it.
|
|
26578
|
+
*/
|
|
26579
|
+
deviceIds: array(number().int()).readonly().nullable().optional()
|
|
26580
|
+
});
|
|
26581
|
+
/**
|
|
26351
26582
|
* A PATCH, and patches MERGE.
|
|
26352
26583
|
*
|
|
26353
26584
|
* A field absent from the patch is left exactly as it was — arming a
|
|
@@ -26366,7 +26597,14 @@ var LoggingSettingsPatchSchema = object({
|
|
|
26366
26597
|
* Only the diagnostics NAMED here change. An armed window that is not listed
|
|
26367
26598
|
* keeps running — a patch is never a full replacement.
|
|
26368
26599
|
*/
|
|
26369
|
-
diagnostics: array(DiagnosticWindowPatchSchema).readonly().optional()
|
|
26600
|
+
diagnostics: array(DiagnosticWindowPatchSchema).readonly().optional(),
|
|
26601
|
+
/**
|
|
26602
|
+
* Only the channels NAMED here change. An armed channel that is not listed
|
|
26603
|
+
* keeps running — same rule as `diagnostics`, because a patch that silently
|
|
26604
|
+
* disarmed the channels it did not mention would make the Levels page and
|
|
26605
|
+
* the Diagnostics page fight over the same value.
|
|
26606
|
+
*/
|
|
26607
|
+
channels: array(LogChannelWindowPatchSchema).readonly().optional()
|
|
26370
26608
|
});
|
|
26371
26609
|
/**
|
|
26372
26610
|
* Which LAYER of the hierarchy is addressed. Absent = the cluster layer.
|
|
@@ -26379,9 +26617,22 @@ var LoggingSettingsPatchSchema = object({
|
|
|
26379
26617
|
* authority over the whole hierarchy and answers for every layer, so the
|
|
26380
26618
|
* layer selector needs a name the transport does not already own.
|
|
26381
26619
|
*/
|
|
26382
|
-
var GetLoggingSettingsInputSchema = object({
|
|
26620
|
+
var GetLoggingSettingsInputSchema = object({
|
|
26621
|
+
scopeNodeId: string().optional(),
|
|
26622
|
+
/**
|
|
26623
|
+
* The declared CHANNEL this document is addressed at, when the caller wants
|
|
26624
|
+
* the `component` layer. Absent = the node/cluster hierarchy only.
|
|
26625
|
+
*
|
|
26626
|
+
* Naming it separately rather than overloading `scopeNodeId` keeps the two
|
|
26627
|
+
* axes from collapsing: a component level is cluster-wide, a node level is
|
|
26628
|
+
* not, and one selector for both would make "which of these two did I just
|
|
26629
|
+
* set" unanswerable — the exact ambiguity `explicit` exists to remove.
|
|
26630
|
+
*/
|
|
26631
|
+
scopeComponent: string().optional()
|
|
26632
|
+
});
|
|
26383
26633
|
var SetLoggingSettingsInputSchema = object({
|
|
26384
26634
|
scopeNodeId: string().optional(),
|
|
26635
|
+
scopeComponent: string().optional(),
|
|
26385
26636
|
patch: LoggingSettingsPatchSchema
|
|
26386
26637
|
});
|
|
26387
26638
|
/**
|
|
@@ -26396,9 +26647,20 @@ var SetLoggingSettingsInputSchema = object({
|
|
|
26396
26647
|
var LoggingSettingsStateSchema = object({
|
|
26397
26648
|
/** The layer this document was read at. `null` = the cluster layer. */
|
|
26398
26649
|
scopeNodeId: string().nullable(),
|
|
26650
|
+
/** The channel this document was read at. `null` = no component layer. */
|
|
26651
|
+
scopeComponent: string().nullable(),
|
|
26399
26652
|
effective: LoggingEffectiveSchema,
|
|
26400
26653
|
explicit: LoggingExplicitSchema,
|
|
26401
26654
|
activeWindows: array(DiagnosticWindowSchema).readonly(),
|
|
26655
|
+
/**
|
|
26656
|
+
* Every channel the cluster's addons DECLARE, gathered from the
|
|
26657
|
+
* `log-channels` providers. Not stored anywhere: assembled per read, so a
|
|
26658
|
+
* channel added by a redeployed addon appears without anybody editing a
|
|
26659
|
+
* list, and a channel whose addon is gone stops being offered.
|
|
26660
|
+
*/
|
|
26661
|
+
channels: array(LogChannelDescriptorSchema).readonly(),
|
|
26662
|
+
/** The channels ARMED right now, each with its deadline. */
|
|
26663
|
+
activeChannels: array(LogChannelWindowStateSchema).readonly(),
|
|
26402
26664
|
persisted: boolean()
|
|
26403
26665
|
});
|
|
26404
26666
|
method(_void(), FeatureManifestSchema), method(_void(), HealthStatusSchema), method(_void(), FeatureManifestSchema), method(_void(), array(NetworkAddressSchema).readonly()), method(_void(), unknown().nullable(), { auth: "admin" }), method(record(string(), unknown()), _null(), {
|
|
@@ -27975,6 +28237,12 @@ Object.freeze({
|
|
|
27975
28237
|
addonId: null,
|
|
27976
28238
|
access: "view"
|
|
27977
28239
|
},
|
|
28240
|
+
"dataStoreProvider.aggregate": {
|
|
28241
|
+
capName: "data-store-provider",
|
|
28242
|
+
capScope: "system",
|
|
28243
|
+
addonId: null,
|
|
28244
|
+
access: "view"
|
|
28245
|
+
},
|
|
27978
28246
|
"dataStoreProvider.count": {
|
|
27979
28247
|
capName: "data-store-provider",
|
|
27980
28248
|
capScope: "system",
|
|
@@ -28389,6 +28657,12 @@ Object.freeze({
|
|
|
28389
28657
|
addonId: null,
|
|
28390
28658
|
access: "view"
|
|
28391
28659
|
},
|
|
28660
|
+
"deviceManager.getChildrenBatch": {
|
|
28661
|
+
capName: "device-manager",
|
|
28662
|
+
capScope: "system",
|
|
28663
|
+
addonId: null,
|
|
28664
|
+
access: "view"
|
|
28665
|
+
},
|
|
28392
28666
|
"deviceManager.getConfigSchema": {
|
|
28393
28667
|
capName: "device-manager",
|
|
28394
28668
|
capScope: "system",
|
|
@@ -29439,6 +29713,18 @@ Object.freeze({
|
|
|
29439
29713
|
addonId: null,
|
|
29440
29714
|
access: "create"
|
|
29441
29715
|
},
|
|
29716
|
+
"logChannels.apply": {
|
|
29717
|
+
capName: "log-channels",
|
|
29718
|
+
capScope: "system",
|
|
29719
|
+
addonId: null,
|
|
29720
|
+
access: "create"
|
|
29721
|
+
},
|
|
29722
|
+
"logChannels.list": {
|
|
29723
|
+
capName: "log-channels",
|
|
29724
|
+
capScope: "system",
|
|
29725
|
+
addonId: null,
|
|
29726
|
+
access: "view"
|
|
29727
|
+
},
|
|
29442
29728
|
"logDestination.query": {
|
|
29443
29729
|
capName: "log-destination",
|
|
29444
29730
|
capScope: "system",
|
|
@@ -31593,6 +31879,12 @@ Object.freeze({
|
|
|
31593
31879
|
addonId: null,
|
|
31594
31880
|
access: "create"
|
|
31595
31881
|
},
|
|
31882
|
+
"settingsStore.aggregate": {
|
|
31883
|
+
capName: "settings-store",
|
|
31884
|
+
capScope: "system",
|
|
31885
|
+
addonId: null,
|
|
31886
|
+
access: "view"
|
|
31887
|
+
},
|
|
31596
31888
|
"settingsStore.count": {
|
|
31597
31889
|
capName: "settings-store",
|
|
31598
31890
|
capScope: "system",
|
|
@@ -33172,6 +33464,11 @@ Object.freeze({
|
|
|
33172
33464
|
form: "single",
|
|
33173
33465
|
optional: false
|
|
33174
33466
|
}],
|
|
33467
|
+
"deviceManager.getChildrenBatch": [{
|
|
33468
|
+
name: "parentDeviceIds",
|
|
33469
|
+
form: "array",
|
|
33470
|
+
optional: false
|
|
33471
|
+
}],
|
|
33175
33472
|
"deviceManager.getConfigSchema": [{
|
|
33176
33473
|
name: "deviceId",
|
|
33177
33474
|
form: "single",
|
|
@@ -35141,7 +35438,7 @@ var AdminUIAddon = class extends BaseAddon {
|
|
|
35141
35438
|
capability: adminUiCapability,
|
|
35142
35439
|
provider: {
|
|
35143
35440
|
getStaticDir: async () => ({ staticDir: resolveAdminUiDistDir() }),
|
|
35144
|
-
getVersion: async () => ({ version: "1.2.
|
|
35441
|
+
getVersion: async () => ({ version: "1.2.106" })
|
|
35145
35442
|
}
|
|
35146
35443
|
}];
|
|
35147
35444
|
}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Q as e,S as t,W as n,q as r,x as i}from"./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-DhP-Lgiq.js";import{$o as a,Dn as o,On as s,Y as c,ia as l,ts as u}from"./src-CgQ6F-z1.js";import{t as d}from"./layers-DlO9Vujj.js";import{B as f,K as p,c as m,h,q as g,t as _,w as v}from"./index-BVi-8S32.js";import{t as y}from"./AdminPage-CCD07UMs.js";import{t as b}from"./AdminTabs-CVoGbDhA.js";import{t as x}from"./AddonCollectionPage-CjRbqWJ3.js";import{t as S}from"./addon-display-names-DvSEQty-.js";var C=g(`file-text`,[[`path`,{d:`M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z`,key:`1rqfz7`}],[`path`,{d:`M14 2v4a2 2 0 0 0 2 2h4`,key:`tnqrlb`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]),w=g(`timer-reset`,[[`path`,{d:`M10 2h4`,key:`n1abiw`}],[`path`,{d:`M12 14v-4`,key:`1evpnu`}],[`path`,{d:`M4 13a8 8 0 0 1 8-7 8 8 0 1 1-5.3 14L4 17.6`,key:`1ts96g`}],[`path`,{d:`M9 17H4v5`,key:`8t5av`}]]);e();var T=5e3,E={"winston-logging":`Rotated log files on this node’s disk.`,"console-logging":`stdout / stderr of the node process.`,"loki-logging":`Pushes to a Grafana Loki instance. Off until enabled with a URL.`,"hub-forwarder":`Agent-only — forwards this node’s entries to the hub.`};function D(){let e=s({capName:`log-destination`},{refetchInterval:T}),t=o(void 0,{refetchInterval:T}),r=n(()=>S(t.data??[]),[t.data]),a=n(()=>{let e=new Map;for(let n of t.data??[]){let t=n.description,r=n.id;typeof r==`string`&&typeof t==`string`&&t.length>0&&e.set(r,t)}return e},[t.data]);return i(x,{title:`Logging`,subtitle:`Every registered log destination. Entries are fanned to all enabled destinations at once — enabling one does not disable another. Each destination's own configuration is docked under it.`,pageIcon:h,itemIcon:C,capability:`log-destination`,installButtonLabel:`Add destination`,items:n(()=>(e.data??[]).map(e=>({addonId:e.addonId,displayName:r.get(e.addonId)??e.addonId,isActive:e.isActive,caption:a.get(e.addonId)??E[e.addonId]??``})),[e.data,r,a]),isLoading:e.isLoading,emptyTitle:`No log destinations registered`,emptyDescription:`This should not happen — the console and rotated-file destinations are builtins. If the list is empty, the node is still booting.`,renderStatusBadges:e=>e.caption.length>0?i(`span`,{className:`text-[10px] text-foreground-subtle`,children:e.caption}):null})}e();var O=[12e4,3e5,6e5,18e5],k={"request-census":`Counts every tRPC call by TRANSPORT PLANE — http, ws, mesh — and by procedure, caller, address and user-agent. Subscriptions are counted apart from calls, so a long-lived stream cannot pass for a storm. Arm it, then restart: the deadline is persisted, so the window is still running when clients reconnect.`};function A(){let{t:e}=_(),n=a({},{refetchInterval:5e3}),o=u(),[s,c]=r(null),l=(e,t)=>{c(e),o.mutate({patch:{diagnostics:[{id:e,armMs:t}]}},{onSettled:()=>{c(null),n.refetch()}})},d=n.data?.activeWindows??[];return i(y,{icon:p,title:e(`logging.diagnostics.title`,`Diagnostics`),subtitle:e(`logging.diagnostics.subtitle`,`Diagnostics are armed for a window, never switched on. Each carries a deadline and expires by itself — one left running is an incident of its own.`),children:n.isLoading?t(`div`,{className:`flex items-center gap-2 text-xs text-foreground-subtle`,children:[i(v,{className:`h-3.5 w-3.5 animate-spin`}),e(`common.loading`,`Loading…`)]}):i(`div`,{className:`rounded-lg border border-border bg-surface divide-y divide-border`,children:d.map(e=>i(j,{window:e,busy:s===e.id,onArm:t=>l(e.id,t)},e.id))})})}function j({window:e,busy:n,onArm:r}){let{t:a}=_();return t(`div`,{className:`flex flex-col gap-2 p-3 lg:flex-row lg:items-center lg:justify-between`,children:[t(`div`,{className:`min-w-0`,children:[t(`div`,{className:`flex items-center gap-2`,children:[i(`span`,{className:`text-sm font-medium text-foreground`,children:e.id}),e.armed?t(`span`,{className:`inline-flex items-center gap-1 rounded bg-warning/10 px-1.5 py-0.5 text-[10px] font-semibold text-warning`,children:[i(w,{className:`h-3 w-3`}),a(`logging.diagnostics.expiresIn`,`expires in {{left}}`,{left:M(e.remainingMs)})]}):i(`span`,{className:`rounded border border-border px-1.5 py-0.5 text-[10px] text-foreground-subtle`,children:a(`logging.diagnostics.disarmed`,`disarmed`)}),e.armed&&!e.persisted&&i(`span`,{className:`text-[10px] text-warning`,children:a(`logging.diagnostics.notPersisted`,`not persisted — will not survive a restart`)})]}),i(`p`,{className:`mt-0.5 max-w-2xl text-[11px] text-foreground-subtle`,children:k[e.id]??``})]}),t(`div`,{className:`flex shrink-0 flex-wrap items-center gap-1`,children:[O.map(e=>i(`button`,{type:`button`,disabled:n,onClick:()=>r(e),className:`rounded border border-border px-2 py-1 text-[11px] text-foreground-subtle hover:text-foreground disabled:opacity-50`,children:M(e)},e)),i(`button`,{type:`button`,disabled:n||!e.armed,onClick:()=>r(0),className:`rounded bg-primary px-2 py-1 text-[11px] font-medium text-primary-foreground disabled:opacity-40`,children:a(`logging.diagnostics.disarm`,`Disarm`)})]})]})}function M(e){let t=Math.max(0,Math.round(e/1e3)),n=Math.floor(t/60),r=t%60;return n===0?`${r}s`:r===0?`${n}m`:`${n}m ${r}s`}e();var N=[`debug`,`info`,`warn`,`error`],P=``;function F(){let{t:e}=_(),[o,s]=r(P),c=l(void 0,{staleTime:6e4}),f=n(()=>(c.data??[]).filter(e=>typeof e.id==`string`).map(e=>({id:e.id,label:typeof e.name==`string`&&e.name?e.name:e.id})),[c.data]),p=a(o===P?{}:{scopeNodeId:o},{refetchInterval:15e3}),m=u(),h=p.data,g=m.isPending||p.isFetching,b=(e,t)=>{m.mutate({...e.nodeId===null?{}:{scopeNodeId:e.nodeId},patch:{level:t}},{onSuccess:()=>void p.refetch()})};return i(y,{icon:d,title:e(`logging.levels.title`,`Levels`),subtitle:e(`logging.levels.subtitle`,`Cluster → node, most specific wins. The floor gates what reaches the log destinations; the in-memory viewer keeps every line either way.`),actions:t(`label`,{className:`flex items-center gap-2 text-xs text-foreground-subtle`,children:[e(`logging.levels.scope`,`Scope`),t(`select`,{className:`rounded border border-border bg-surface px-2 py-1 text-xs text-foreground`,value:o,onChange:e=>s(e.target.value),children:[i(`option`,{value:P,children:e(`logging.levels.cluster`,`Cluster`)}),f.map(e=>i(`option`,{value:e.id,children:e.label},e.id))]})]}),children:p.isLoading||h===void 0?t(`div`,{className:`flex items-center gap-2 text-xs text-foreground-subtle`,children:[i(v,{className:`h-3.5 w-3.5 animate-spin`}),e(`common.loading`,`Loading…`)]}):t(`div`,{className:`space-y-3`,children:[i(I,{level:h.effective.level,source:h.effective.levelSource,persisted:h.persisted}),i(`div`,{className:`rounded-lg border border-border bg-surface divide-y divide-border`,children:h.explicit.layers.map(e=>i(L,{layer:e,inForce:e.scope===h.effective.levelSource,busy:g,onSet:t=>b(e,t),onClear:()=>b(e,null)},`${e.scope}:${e.nodeId??`cluster`}`))}),i(`p`,{className:`text-[11px] text-foreground-subtle`,children:e(`logging.levels.componentNote`,`A per-component layer is planned and not resolvable yet — nothing on this page inherits from one.`)})]})})}function I({level:e,source:n,persisted:r}){let{t:a}=_();return t(`div`,{className:`rounded-lg border border-border bg-surface p-3`,children:[t(`div`,{className:`flex items-center gap-2`,children:[i(`span`,{className:`text-xs text-foreground-subtle`,children:a(`logging.levels.effective`,`In force here`)}),i(`span`,{className:`rounded bg-primary/10 px-2 py-0.5 text-xs font-semibold text-primary`,children:e}),i(`span`,{className:`text-[11px] text-foreground-subtle`,children:n==="default"?a(`logging.levels.fromDefault`,`nothing is set anywhere — this is the default`):a(`logging.levels.fromLayer`,`decided by the {{source}} layer`,{source:n})})]}),!r&&i(`p`,{className:`mt-1 text-[11px] text-warning`,children:a(`logging.levels.notPersisted`,`The settings store could not be read or written — what you see is live, but it would not survive a restart.`)})]})}function L({layer:e,inForce:n,busy:r,onSet:a,onClear:o}){let{t:s}=_();return t(`div`,{className:`flex flex-col gap-2 p-3 sm:flex-row sm:items-center sm:justify-between`,children:[t(`div`,{className:`min-w-0`,children:[t(`div`,{className:`flex items-center gap-2`,children:[i(`span`,{className:`text-sm font-medium text-foreground`,children:e.scope===`cluster`?s(`logging.levels.cluster`,`Cluster`):e.nodeId??``}),n&&t(`span`,{className:`inline-flex items-center gap-1 rounded bg-primary/10 px-1.5 py-0.5 text-[10px] font-semibold text-primary`,children:[i(f,{className:`h-3 w-3`}),s(`logging.levels.inForce`,`in force`)]})]}),i(`p`,{className:`mt-0.5 text-[11px] text-foreground-subtle`,children:e.level===null?s(`logging.levels.inherits`,`inherits — nothing set at this layer`):s(`logging.levels.setHere`,`set here: {{level}}`,{level:e.level})})]}),t(`div`,{className:`flex shrink-0 items-center gap-1`,children:[N.map(t=>i(`button`,{type:`button`,disabled:r,onClick:()=>a(t),className:`rounded px-2 py-1 text-[11px] font-medium transition-colors disabled:opacity-50 ${e.level===t?`bg-primary text-primary-foreground`:`border border-border text-foreground-subtle hover:text-foreground`}`,children:t},t)),i(`button`,{type:`button`,disabled:r||e.level===null,onClick:o,className:`rounded border border-border px-2 py-1 text-[11px] text-foreground-subtle hover:text-foreground disabled:opacity-40`,children:s(`logging.levels.clear`,`Clear`)})]})]})}function R(){return i(y,{children:i(`div`,{className:`rounded-lg border border-border bg-surface overflow-hidden`,children:i(c,{limit:500,maxHeight:`max-h-[calc(100vh-310px)]`,showScope:!0,showFilters:!0})})})}function z(){return i(`div`,{className:`flex flex-col p-4`,children:i(b,{tabs:[{id:`viewer`,label:`Viewer`,icon:m,content:i(R,{})},{id:`destinations`,label:`Destinations`,icon:h,content:i(D,{})},{id:`levels`,label:`Levels`,icon:d,content:i(F,{})},{id:`diagnostics`,label:`Diagnostics`,icon:p,content:i(A,{})}]})})}export{z as LogsPage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{q as e}from"./index-BVi-8S32.js";var t=e(`circle-check-big`,[[`path`,{d:`M21.801 10A10 10 0 1 1 17 3.335`,key:`yps3ct`}],[`path`,{d:`m9 11 3 3L22 4`,key:`1pflzl`}]]);export{t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{q as e}from"./index-BVi-8S32.js";var t=e(`clock`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`polyline`,{points:`12 6 12 12 16 14`,key:`68esgv`}]]);export{t};
|