@camstack/addon-admin-ui 1.2.45 → 1.2.47
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-D8Izx1gh.js +1 -0
- package/dist/assets/AddonCollectionPage-DqaifWMB.js +1 -0
- package/dist/assets/Addons-Cbum2Ue7.js +1 -0
- package/dist/assets/{AdminTabs-DCAQ34eW.js → AdminTabs-qMC1WN7t.js} +1 -1
- package/dist/assets/{AiProfiles-BJwPlJEb.js → AiProfiles-CkaDb5G-.js} +1 -1
- package/dist/assets/{BrokerForm-DZ83yAiW.js → BrokerForm-nGOoPwcx.js} +1 -1
- package/dist/assets/{Build-hqC1_9r_.js → Build-D4A-vNUJ.js} +4 -4
- package/dist/assets/{Capabilities-DYCNCy2C.js → Capabilities-BvTJQt-3.js} +1 -1
- package/dist/assets/CapabilityBadges-74hb8M82.js +1 -0
- package/dist/assets/Cluster-BdYYMi89.js +1 -0
- package/dist/assets/Data-D8MGzmyj.js +1 -0
- package/dist/assets/DetectionIntelligence-E410sfaW.js +1 -0
- package/dist/assets/{DeviceAggregateSection-CqXb8OlC.js → DeviceAggregateSection-Tq3TjsO-.js} +1 -1
- package/dist/assets/DeviceDetail-Cyp63o9e.js +2 -0
- package/dist/assets/{Devices-179tBCuu.js → Devices-DQeFVfTP.js} +1 -1
- package/dist/assets/{EmbedPlayerPage-BU7GeV3g.js → EmbedPlayerPage-B2geI7HH.js} +1 -1
- package/dist/assets/Events-tUp70vOo.js +1 -0
- package/dist/assets/{FormBuilder-CQPeVoyZ.js → FormBuilder-_oFQtE7x.js} +1 -1
- package/dist/assets/{Identity-CIajGxd0.js → Identity-B9xM3PPQ.js} +1 -1
- package/dist/assets/IntegrationDetail-D6srOD52.js +1 -0
- package/dist/assets/Integrations-BMDYnEUm.js +1 -0
- package/dist/assets/Integrations-D5GsA0v6.js +1 -0
- package/dist/assets/{Logs-OlvU8Myc.js → Logs-Cr3usRtb.js} +1 -1
- package/dist/assets/{MotionZonesSettings-DrBBWPoz.js → MotionZonesSettings-BgF0ipHJ.js} +1 -1
- package/dist/assets/{MyAccess-kU61J5nx.js → MyAccess-COg9lyIf.js} +1 -1
- package/dist/assets/Network-DzuA8p3Z.js +1 -0
- package/dist/assets/{NodeAddonsSettingsPanel-Dup84Hcy.js → NodeAddonsSettingsPanel-BAVG1LEY.js} +1 -1
- package/dist/assets/{NodeInferenceDevices-C61KVRFZ.js → NodeInferenceDevices-CcxOtvMd.js} +1 -1
- package/dist/assets/{Notifications-5jSvbck-.js → Notifications-mGunk-af.js} +1 -1
- package/dist/assets/Pipeline-YdFX0pzB.js +1 -0
- package/dist/assets/{Plates-CHYS-eHp.js → Plates-BZ8XXBRF.js} +1 -1
- package/dist/assets/{PrivacyMaskSettings-CKx4w-TC.js → PrivacyMaskSettings-yOIEXwrU.js} +1 -1
- package/dist/assets/{ProviderIcon-xTtXx3zj.js → ProviderIcon-Ck_2pUvf.js} +1 -1
- package/dist/assets/Recordings-DN2qpsF8.js +1 -0
- package/dist/assets/ScanNetworkModal-D2dbax7J.js +1 -0
- package/dist/assets/{Settings-D6f3sP3y.js → Settings-n3YjyvD9.js} +1 -1
- package/dist/assets/{Showroom-l9Xg2vRn.js → Showroom-kb37ihHy.js} +1 -1
- package/dist/assets/{Terminal-CWAHPGYc.js → Terminal-DPgh1LOa.js} +2 -2
- package/dist/assets/{_virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-BDKT2siH.js → _virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-DD9SArM5.js} +1 -1
- package/dist/assets/{boxes-DSSHwgkj.js → boxes-0BrwpGRK.js} +1 -1
- package/dist/assets/{build-cluster-graph-CY_MeFyL.js → build-cluster-graph-CNmW9-To.js} +2 -2
- package/dist/assets/circle-check-big-CX86TDQ3.js +1 -0
- package/dist/assets/{circle-x-CZOmp7In.js → circle-x-CeSEyt9j.js} +1 -1
- package/dist/assets/clock-dbqOPTlc.js +1 -0
- package/dist/assets/{copy-iAdKX02A.js → copy-CLkoN4vv.js} +1 -1
- package/dist/assets/{debounced-invalidate-IzluQKKm.js → debounced-invalidate-CjozCZrp.js} +1 -1
- package/dist/assets/{dist-BrD5LzQi.js → dist-5MqZUHpg.js} +1 -1
- package/dist/assets/dist-Bayrm69X.js +345 -0
- package/dist/assets/{download-C8A3QjNx.js → download-D2kk10ws.js} +1 -1
- package/dist/assets/{face-bbox-DNeyfPs5.js → face-bbox-Dd_CKaP5.js} +1 -1
- package/dist/assets/hard-drive-YgwGO7Iy.js +1 -0
- package/dist/assets/{hostInit-B7p5ig8j.js → hostInit-DQHnlGm4.js} +1 -1
- package/dist/assets/index-DfbxOmzG.css +2 -0
- package/dist/assets/index-qYnug9Qs.js +4 -0
- package/dist/assets/{key-round-b-yFAbkx.js → key-round-58wJWtml.js} +1 -1
- package/dist/assets/{mf-entry-bootstrap-0-c6c17c10.js → mf-entry-bootstrap-0-d57082e0.js} +2 -2
- package/dist/assets/{pencil-D6ny7fbm.js → pencil-DDNEW9Yb.js} +1 -1
- package/dist/assets/play-rmom08n0.js +1 -0
- package/dist/assets/{player-overlays-BfbNCp8v.js → player-overlays-BzwYRH08.js} +1 -1
- package/dist/assets/plus-DW_KHfhe.js +1 -0
- package/dist/assets/power-DV05ZWPi.js +1 -0
- package/dist/assets/{radio-X72WUypz.js → radio-M8jdl_tl.js} +1 -1
- package/dist/assets/{refresh-cw-CSup0Ybd.js → refresh-cw-CYEUy6Ve.js} +1 -1
- package/dist/assets/remoteEntry-BAJ0ezfD.js +1 -0
- package/dist/assets/rotate-ccw-DTUvT-HV.js +1 -0
- package/dist/assets/rotate-cw-DWJibY6w.js +1 -0
- package/dist/assets/search-BVDP_pJD.js +1 -0
- package/dist/assets/{send-IMkq2UdA.js → send-DeNrNMe8.js} +1 -1
- package/dist/assets/{server-DPDg3vKu.js → server-C3tpWUwZ.js} +1 -1
- package/dist/assets/square-C5l0pveB.js +1 -0
- package/dist/assets/{square-check-big-B03NkszD.js → square-check-big-DEqd8dem.js} +1 -1
- package/dist/assets/{src-B5uaqYy4.js → src-BoczRE1G.js} +10 -10
- package/dist/assets/src-Bok3PEiz.js +345 -0
- package/dist/assets/{undo-2-se0alJPw.js → undo-2-BnRU8pkW.js} +1 -1
- package/dist/assets/{upload-CxxAxkr4.js → upload--4mqPfVH.js} +1 -1
- package/dist/assets/{useEventInvalidation-DwiztDPv.js → useEventInvalidation-XgGxFYwt.js} +1 -1
- package/dist/assets/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-DKcJvK59.js → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-Cl2xnNlc.js} +2 -2
- package/dist/assets/{wifi-BeWxYg9K.js → wifi-C8Oz0yjQ.js} +1 -1
- package/dist/assets/{zap-CK7p8C80.js → zap-BQjibRA6.js} +1 -1
- package/dist/index.html +6 -6
- package/dist/server/addon.js +295 -32
- package/package.json +1 -2
- package/dist/assets/AddLocationWizard-DwiJEwmB.js +0 -1
- package/dist/assets/AddonCollectionPage-C-sV4fIE.js +0 -1
- package/dist/assets/Addons-Bj2e32kO.js +0 -1
- package/dist/assets/CapabilityBadges-CfOevyl9.js +0 -1
- package/dist/assets/Cluster-CiJw1tTY.js +0 -1
- package/dist/assets/ClusterRecordingTab-BwcbpIiG.js +0 -1
- package/dist/assets/Dashboard-F_NYL9_0.js +0 -1
- package/dist/assets/Data-C891Mq8c.js +0 -1
- package/dist/assets/DetectionIntelligence-B140cLaE.js +0 -1
- package/dist/assets/DeviceDetail-DUs1WsF0.js +0 -2
- package/dist/assets/Events-raCaU5X3.js +0 -1
- package/dist/assets/IntegrationDetail-BVkPsTEt.js +0 -1
- package/dist/assets/Integrations-BQXHkcJu.js +0 -1
- package/dist/assets/Integrations-bKHN6L6j.js +0 -1
- package/dist/assets/Network-XAie7-vc.js +0 -1
- package/dist/assets/Pipeline-B0fH3vgZ.js +0 -1
- package/dist/assets/Recordings-DB3LVKyX.js +0 -1
- package/dist/assets/ScanNetworkModal-CauWfDR6.js +0 -1
- package/dist/assets/circle-check-big-Bf0ewxaf.js +0 -1
- package/dist/assets/clock-i-Al31lJ.js +0 -1
- package/dist/assets/dist-CLRQNGYv.js +0 -345
- package/dist/assets/index-DW7B7QJD.css +0 -2
- package/dist/assets/index-Dg1Uu8YH.js +0 -4
- package/dist/assets/play-CSzv0kMk.js +0 -1
- package/dist/assets/plus-Ct8CXOT7.js +0 -1
- package/dist/assets/remoteEntry-DiBMNlUL.js +0 -1
- package/dist/assets/rotate-ccw-PrFzYuvu.js +0 -1
- package/dist/assets/rotate-cw-DTN0bra-.js +0 -1
- package/dist/assets/search-DM6VGLFN.js +0 -1
- package/dist/assets/square-gf10c5Em.js +0 -1
- package/dist/assets/src-B0nZ9rxd.js +0 -345
package/dist/server/addon.js
CHANGED
|
@@ -7545,12 +7545,11 @@ var RecordingConfigSchema = object({
|
|
|
7545
7545
|
/**
|
|
7546
7546
|
* Entity-relocation job state (storage entity-routing spec, Phase 4).
|
|
7547
7547
|
*
|
|
7548
|
-
* One shape shared by the recorder
|
|
7549
|
-
*
|
|
7550
|
-
*
|
|
7551
|
-
*
|
|
7552
|
-
*
|
|
7553
|
-
* row on the owning addon's surface.
|
|
7548
|
+
* One shape shared by the recorder and pipeline-analytics internal movers.
|
|
7549
|
+
* The public admin surface is `storage-migration`; child jobs remain in RAM
|
|
7550
|
+
* because copy-if-absent, verify, delete and index/row repoint are resumable.
|
|
7551
|
+
* Each completed/failed run also lands one durable ops-log row on its owning
|
|
7552
|
+
* addon surface.
|
|
7554
7553
|
*/
|
|
7555
7554
|
var RelocateJobStateSchema = _enum([
|
|
7556
7555
|
"running",
|
|
@@ -7577,19 +7576,100 @@ var RelocateJobSchema = object({
|
|
|
7577
7576
|
finishedAt: number().nullable(),
|
|
7578
7577
|
error: string().nullable()
|
|
7579
7578
|
});
|
|
7579
|
+
/** Profile-derived footage selection used only by the migration coordinator:
|
|
7580
|
+
* `recordings` owns high+mid; `recordingsLow` owns low. */
|
|
7581
|
+
var RelocateFootageClassSchema = _enum(["recordings", "recordingsLow"]);
|
|
7580
7582
|
var RelocateFootageInputSchema = object({
|
|
7581
|
-
deviceId: number().optional(),
|
|
7582
7583
|
fromLocationId: string(),
|
|
7583
7584
|
toLocationId: string(),
|
|
7584
7585
|
entities: array(_enum(["segments"])).optional(),
|
|
7586
|
+
/** Limits relocation to the logical profile class. Omit only for the
|
|
7587
|
+
* pre-orchestration compatibility path. */
|
|
7588
|
+
footageClass: RelocateFootageClassSchema.optional(),
|
|
7585
7589
|
/** Copy throttle in MB/s (default 40) — the drain is a background chore,
|
|
7586
7590
|
* never allowed to starve live writers. */
|
|
7587
7591
|
throttleMbps: number().min(1).max(1e3).optional()
|
|
7588
7592
|
});
|
|
7589
|
-
|
|
7590
|
-
|
|
7593
|
+
/** Internal, lease-scoped participant operation. It is intentionally separate
|
|
7594
|
+
* from persistent recording settings: a migration never changes
|
|
7595
|
+
* `RecordingConfig.enabled` or camera wrapper bindings. */
|
|
7596
|
+
var StorageMigrationLeaseInputSchema = object({ leaseId: string().min(1) });
|
|
7597
|
+
var StorageMigrationFootageMoveInputSchema = RelocateFootageInputSchema.extend({ leaseId: string().min(1) });
|
|
7598
|
+
var StorageMigrationMediaMoveInputSchema = object({
|
|
7591
7599
|
toLocationId: string(),
|
|
7592
7600
|
throttleMbps: number().min(1).max(1e3).optional()
|
|
7601
|
+
}).extend({ leaseId: string().min(1) });
|
|
7602
|
+
/** The independently selectable logical storage classes. `recordings`
|
|
7603
|
+
* encompasses the high and mid segment profiles; `recordingsLow` is low
|
|
7604
|
+
* segments; `eventMedia` is post-analysis blobs. */
|
|
7605
|
+
var StorageMigrationClassSchema = _enum([
|
|
7606
|
+
"recordings",
|
|
7607
|
+
"recordingsLow",
|
|
7608
|
+
"eventMedia"
|
|
7609
|
+
]);
|
|
7610
|
+
/** A destination is always an existing, fully-qualified location id. The
|
|
7611
|
+
* migration API intentionally never changes a source location's `basePath`:
|
|
7612
|
+
* callers create a new `<type>:<slug>` location, then select it here. */
|
|
7613
|
+
var StorageMigrationDestinationsSchema = object({
|
|
7614
|
+
recordings: string().min(1).optional(),
|
|
7615
|
+
recordingsLow: string().min(1).optional(),
|
|
7616
|
+
eventMedia: string().min(1).optional()
|
|
7617
|
+
}).refine((value) => Object.keys(value).length > 0, { message: "select at least one storage class" });
|
|
7618
|
+
/** Shared input for planning and starting an orchestrated storage migration. */
|
|
7619
|
+
var StorageMigrationInputSchema = object({
|
|
7620
|
+
destinations: StorageMigrationDestinationsSchema,
|
|
7621
|
+
throttleMbps: number().min(1).max(1e3).optional()
|
|
7622
|
+
});
|
|
7623
|
+
/** The durable coordinator state machine. The only phase that changes default
|
|
7624
|
+
* locations is `repointing`, after every selected mover has completed and been
|
|
7625
|
+
* verified. */
|
|
7626
|
+
var StorageMigrationPhaseSchema = _enum([
|
|
7627
|
+
"planning",
|
|
7628
|
+
"pausing",
|
|
7629
|
+
"moving",
|
|
7630
|
+
"verifying",
|
|
7631
|
+
"repointing",
|
|
7632
|
+
"refreshing",
|
|
7633
|
+
"resuming",
|
|
7634
|
+
"done",
|
|
7635
|
+
"failed",
|
|
7636
|
+
"cancelled"
|
|
7637
|
+
]);
|
|
7638
|
+
var StorageMigrationParticipantSchema = _enum([
|
|
7639
|
+
"pipeline",
|
|
7640
|
+
"recorder",
|
|
7641
|
+
"analytics"
|
|
7642
|
+
]);
|
|
7643
|
+
var StorageMigrationMoveSchema = object({
|
|
7644
|
+
storageClass: StorageMigrationClassSchema,
|
|
7645
|
+
fromLocationId: string(),
|
|
7646
|
+
toLocationId: string(),
|
|
7647
|
+
moverJobId: string().nullable(),
|
|
7648
|
+
state: RelocateJobStateSchema.nullable(),
|
|
7649
|
+
error: string().nullable()
|
|
7650
|
+
});
|
|
7651
|
+
var StorageMigrationJobSchema = object({
|
|
7652
|
+
jobId: string(),
|
|
7653
|
+
phase: StorageMigrationPhaseSchema,
|
|
7654
|
+
destinations: StorageMigrationDestinationsSchema,
|
|
7655
|
+
throttleMbps: number(),
|
|
7656
|
+
moves: array(StorageMigrationMoveSchema),
|
|
7657
|
+
pauseLeaseId: string().nullable(),
|
|
7658
|
+
pausedParticipants: array(StorageMigrationParticipantSchema),
|
|
7659
|
+
repointed: boolean(),
|
|
7660
|
+
cancelRequested: boolean(),
|
|
7661
|
+
startedAt: number(),
|
|
7662
|
+
updatedAt: number(),
|
|
7663
|
+
finishedAt: number().nullable(),
|
|
7664
|
+
error: string().nullable()
|
|
7665
|
+
});
|
|
7666
|
+
var StorageMigrationPlanSchema = object({
|
|
7667
|
+
destinations: StorageMigrationDestinationsSchema,
|
|
7668
|
+
moves: array(object({
|
|
7669
|
+
storageClass: StorageMigrationClassSchema,
|
|
7670
|
+
fromLocationId: string(),
|
|
7671
|
+
toLocationId: string()
|
|
7672
|
+
}))
|
|
7593
7673
|
});
|
|
7594
7674
|
/**
|
|
7595
7675
|
* `StorageLocationType` — an addon-declared id that identifies the *kind* of
|
|
@@ -15965,13 +16045,19 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
15965
16045
|
}), method(object({ deviceId: number() }), EventPruneCountsSchema, {
|
|
15966
16046
|
kind: "mutation",
|
|
15967
16047
|
auth: "admin"
|
|
15968
|
-
}), method(
|
|
16048
|
+
}), method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
15969
16049
|
kind: "mutation",
|
|
15970
16050
|
auth: "admin"
|
|
15971
|
-
}), method(object({
|
|
15972
|
-
kind: "
|
|
16051
|
+
}), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
|
|
16052
|
+
kind: "mutation",
|
|
16053
|
+
auth: "admin"
|
|
16054
|
+
}), method(StorageMigrationLeaseInputSchema, object({ refreshed: literal(true) }), {
|
|
16055
|
+
kind: "mutation",
|
|
15973
16056
|
auth: "admin"
|
|
15974
|
-
}), method(object({ jobId: string() }),
|
|
16057
|
+
}), method(StorageMigrationMediaMoveInputSchema, object({ jobId: string() }), {
|
|
16058
|
+
kind: "mutation",
|
|
16059
|
+
auth: "admin"
|
|
16060
|
+
}), method(object({ jobId: string() }), RelocateJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
15975
16061
|
kind: "mutation",
|
|
15976
16062
|
auth: "admin"
|
|
15977
16063
|
}), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
|
|
@@ -17468,7 +17554,13 @@ var NodeInferenceDevicesSchema = object({
|
|
|
17468
17554
|
reachable: boolean(),
|
|
17469
17555
|
devices: array(NodeInferenceDeviceSchema).readonly()
|
|
17470
17556
|
});
|
|
17471
|
-
method(object({
|
|
17557
|
+
method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
17558
|
+
kind: "mutation",
|
|
17559
|
+
auth: "admin"
|
|
17560
|
+
}), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
|
|
17561
|
+
kind: "mutation",
|
|
17562
|
+
auth: "admin"
|
|
17563
|
+
}), method(object({
|
|
17472
17564
|
deviceId: number(),
|
|
17473
17565
|
agentNodeId: string()
|
|
17474
17566
|
}), object({ success: literal(true) }), {
|
|
@@ -18142,6 +18234,13 @@ method(object({ locationId: string() }), EvictableUsageSchema), method(object({
|
|
|
18142
18234
|
locationId: string(),
|
|
18143
18235
|
targetBytes: number().int().positive()
|
|
18144
18236
|
}), EvictResultSchema, { kind: "mutation" });
|
|
18237
|
+
method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin" }), method(StorageMigrationInputSchema, object({ jobId: string() }), {
|
|
18238
|
+
kind: "mutation",
|
|
18239
|
+
auth: "admin"
|
|
18240
|
+
}), method(object({ jobId: string().optional() }), StorageMigrationJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
18241
|
+
kind: "mutation",
|
|
18242
|
+
auth: "admin"
|
|
18243
|
+
});
|
|
18145
18244
|
var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
|
|
18146
18245
|
providerId: string().min(1),
|
|
18147
18246
|
displayName: string().min(1),
|
|
@@ -18245,6 +18344,28 @@ var TerminalProfileInfoSchema = object({
|
|
|
18245
18344
|
label: string(),
|
|
18246
18345
|
description: string().optional()
|
|
18247
18346
|
});
|
|
18347
|
+
/**
|
|
18348
|
+
* A durable operator-created Terminal instance. Profiles are templates; only
|
|
18349
|
+
* an instance declares a camera.
|
|
18350
|
+
*/
|
|
18351
|
+
var TerminalInstanceInfoSchema = object({
|
|
18352
|
+
instanceId: string(),
|
|
18353
|
+
cameraStableId: string(),
|
|
18354
|
+
nodeId: string(),
|
|
18355
|
+
profileId: string(),
|
|
18356
|
+
profileLabel: string(),
|
|
18357
|
+
name: string(),
|
|
18358
|
+
enabled: boolean()
|
|
18359
|
+
});
|
|
18360
|
+
var TerminalLegacyCameraSchema = object({
|
|
18361
|
+
stableId: string(),
|
|
18362
|
+
nodeId: string(),
|
|
18363
|
+
profileId: string(),
|
|
18364
|
+
profileLabel: string(),
|
|
18365
|
+
name: string(),
|
|
18366
|
+
/** Only legacy monitor cameras can retain their historic stable identity. */
|
|
18367
|
+
adoptable: boolean()
|
|
18368
|
+
});
|
|
18248
18369
|
var TerminalOutputEventSchema = discriminatedUnion("kind", [object({
|
|
18249
18370
|
seq: number().int().positive(),
|
|
18250
18371
|
kind: literal("data"),
|
|
@@ -18261,7 +18382,29 @@ var TerminalOutputBatchSchema = object({
|
|
|
18261
18382
|
snapshot: string().optional(),
|
|
18262
18383
|
events: array(TerminalOutputEventSchema).readonly()
|
|
18263
18384
|
});
|
|
18264
|
-
method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }), method(_void(), array(
|
|
18385
|
+
method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }), method(_void(), array(TerminalInstanceInfoSchema).readonly(), { auth: "admin" }), method(object({
|
|
18386
|
+
targetNodeId: string().min(1),
|
|
18387
|
+
profileId: string().min(1),
|
|
18388
|
+
name: string().trim().min(1).max(160).optional()
|
|
18389
|
+
}), TerminalInstanceInfoSchema, {
|
|
18390
|
+
kind: "mutation",
|
|
18391
|
+
auth: "admin"
|
|
18392
|
+
}), method(object({ instanceId: string().min(1) }), _void(), {
|
|
18393
|
+
kind: "mutation",
|
|
18394
|
+
auth: "admin"
|
|
18395
|
+
}), method(object({
|
|
18396
|
+
instanceId: string().min(1),
|
|
18397
|
+
enabled: boolean()
|
|
18398
|
+
}), TerminalInstanceInfoSchema, {
|
|
18399
|
+
kind: "mutation",
|
|
18400
|
+
auth: "admin"
|
|
18401
|
+
}), method(_void(), array(TerminalLegacyCameraSchema).readonly(), { auth: "admin" }), method(object({
|
|
18402
|
+
stableId: string().min(1),
|
|
18403
|
+
name: string().trim().min(1).max(160).optional()
|
|
18404
|
+
}), TerminalInstanceInfoSchema, {
|
|
18405
|
+
kind: "mutation",
|
|
18406
|
+
auth: "admin"
|
|
18407
|
+
}), method(_void(), array(TerminalSessionInfoSchema).readonly(), { auth: "admin" }), method(object({
|
|
18265
18408
|
profileId: string(),
|
|
18266
18409
|
cols: number().int().positive(),
|
|
18267
18410
|
rows: number().int().positive()
|
|
@@ -18278,7 +18421,13 @@ method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }),
|
|
|
18278
18421
|
}), method(object({
|
|
18279
18422
|
sessionId: string(),
|
|
18280
18423
|
afterSeq: number().int().nonnegative(),
|
|
18281
|
-
waitMs: number().int().min(0).max(2e3).default(0)
|
|
18424
|
+
waitMs: number().int().min(0).max(2e3).default(0),
|
|
18425
|
+
/**
|
|
18426
|
+
* Wait when a just-opened session has no output yet. Kept opt-in so a
|
|
18427
|
+
* browser's initial repaint remains immediate; the camera snapshot
|
|
18428
|
+
* relay uses it to avoid encoding a blank startup frame.
|
|
18429
|
+
*/
|
|
18430
|
+
waitForOutput: boolean().optional()
|
|
18282
18431
|
}), TerminalOutputBatchSchema, {
|
|
18283
18432
|
kind: "mutation",
|
|
18284
18433
|
auth: "admin",
|
|
@@ -23018,13 +23167,19 @@ method(object({
|
|
|
23018
23167
|
}), {
|
|
23019
23168
|
kind: "mutation",
|
|
23020
23169
|
auth: "admin"
|
|
23021
|
-
}), method(
|
|
23170
|
+
}), method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
23022
23171
|
kind: "mutation",
|
|
23023
23172
|
auth: "admin"
|
|
23024
|
-
}), method(object({
|
|
23025
|
-
kind: "
|
|
23173
|
+
}), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
|
|
23174
|
+
kind: "mutation",
|
|
23175
|
+
auth: "admin"
|
|
23176
|
+
}), method(StorageMigrationLeaseInputSchema, object({ refreshed: literal(true) }), {
|
|
23177
|
+
kind: "mutation",
|
|
23026
23178
|
auth: "admin"
|
|
23027
|
-
}), method(object({ jobId: string() }),
|
|
23179
|
+
}), method(StorageMigrationFootageMoveInputSchema, object({ jobId: string() }), {
|
|
23180
|
+
kind: "mutation",
|
|
23181
|
+
auth: "admin"
|
|
23182
|
+
}), method(object({ jobId: string() }), RelocateJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
23028
23183
|
kind: "mutation",
|
|
23029
23184
|
auth: "admin"
|
|
23030
23185
|
});
|
|
@@ -27248,7 +27403,7 @@ Object.freeze({
|
|
|
27248
27403
|
addonId: null,
|
|
27249
27404
|
access: "create"
|
|
27250
27405
|
},
|
|
27251
|
-
"pipelineAnalytics.
|
|
27406
|
+
"pipelineAnalytics.cancelStorageMigrationMove": {
|
|
27252
27407
|
capName: "pipeline-analytics",
|
|
27253
27408
|
capScope: "device",
|
|
27254
27409
|
addonId: null,
|
|
@@ -27320,12 +27475,6 @@ Object.freeze({
|
|
|
27320
27475
|
addonId: null,
|
|
27321
27476
|
access: "view"
|
|
27322
27477
|
},
|
|
27323
|
-
"pipelineAnalytics.getMediaRelocateStatus": {
|
|
27324
|
-
capName: "pipeline-analytics",
|
|
27325
|
-
capScope: "device",
|
|
27326
|
-
addonId: null,
|
|
27327
|
-
access: "view"
|
|
27328
|
-
},
|
|
27329
27478
|
"pipelineAnalytics.getMotionEvents": {
|
|
27330
27479
|
capName: "pipeline-analytics",
|
|
27331
27480
|
capScope: "device",
|
|
@@ -27362,6 +27511,12 @@ Object.freeze({
|
|
|
27362
27511
|
addonId: null,
|
|
27363
27512
|
access: "view"
|
|
27364
27513
|
},
|
|
27514
|
+
"pipelineAnalytics.getStorageMigrationMoveStatus": {
|
|
27515
|
+
capName: "pipeline-analytics",
|
|
27516
|
+
capScope: "device",
|
|
27517
|
+
addonId: null,
|
|
27518
|
+
access: "view"
|
|
27519
|
+
},
|
|
27365
27520
|
"pipelineAnalytics.getTrack": {
|
|
27366
27521
|
capName: "pipeline-analytics",
|
|
27367
27522
|
capScope: "device",
|
|
@@ -27440,6 +27595,12 @@ Object.freeze({
|
|
|
27440
27595
|
addonId: null,
|
|
27441
27596
|
access: "view"
|
|
27442
27597
|
},
|
|
27598
|
+
"pipelineAnalytics.pauseForStorageMigration": {
|
|
27599
|
+
capName: "pipeline-analytics",
|
|
27600
|
+
capScope: "device",
|
|
27601
|
+
addonId: null,
|
|
27602
|
+
access: "create"
|
|
27603
|
+
},
|
|
27443
27604
|
"pipelineAnalytics.proposeRetrainAnnotations": {
|
|
27444
27605
|
capName: "pipeline-analytics",
|
|
27445
27606
|
capScope: "device",
|
|
@@ -27470,7 +27631,7 @@ Object.freeze({
|
|
|
27470
27631
|
addonId: null,
|
|
27471
27632
|
access: "create"
|
|
27472
27633
|
},
|
|
27473
|
-
"pipelineAnalytics.
|
|
27634
|
+
"pipelineAnalytics.refreshStorageLocationsForMigration": {
|
|
27474
27635
|
capName: "pipeline-analytics",
|
|
27475
27636
|
capScope: "device",
|
|
27476
27637
|
addonId: null,
|
|
@@ -27482,6 +27643,12 @@ Object.freeze({
|
|
|
27482
27643
|
addonId: null,
|
|
27483
27644
|
access: "create"
|
|
27484
27645
|
},
|
|
27646
|
+
"pipelineAnalytics.resumeForStorageMigration": {
|
|
27647
|
+
capName: "pipeline-analytics",
|
|
27648
|
+
capScope: "device",
|
|
27649
|
+
addonId: null,
|
|
27650
|
+
access: "create"
|
|
27651
|
+
},
|
|
27485
27652
|
"pipelineAnalytics.saveRetrainAnnotations": {
|
|
27486
27653
|
capName: "pipeline-analytics",
|
|
27487
27654
|
capScope: "device",
|
|
@@ -27506,6 +27673,12 @@ Object.freeze({
|
|
|
27506
27673
|
addonId: null,
|
|
27507
27674
|
access: "create"
|
|
27508
27675
|
},
|
|
27676
|
+
"pipelineAnalytics.startStorageMigrationMove": {
|
|
27677
|
+
capName: "pipeline-analytics",
|
|
27678
|
+
capScope: "device",
|
|
27679
|
+
addonId: null,
|
|
27680
|
+
access: "create"
|
|
27681
|
+
},
|
|
27509
27682
|
"pipelineAnalytics.wipeAllAnalytics": {
|
|
27510
27683
|
capName: "pipeline-analytics",
|
|
27511
27684
|
capScope: "device",
|
|
@@ -27872,6 +28045,12 @@ Object.freeze({
|
|
|
27872
28045
|
addonId: null,
|
|
27873
28046
|
access: "view"
|
|
27874
28047
|
},
|
|
28048
|
+
"pipelineOrchestrator.pauseForStorageMigration": {
|
|
28049
|
+
capName: "pipeline-orchestrator",
|
|
28050
|
+
capScope: "system",
|
|
28051
|
+
addonId: null,
|
|
28052
|
+
access: "create"
|
|
28053
|
+
},
|
|
27875
28054
|
"pipelineOrchestrator.rebalance": {
|
|
27876
28055
|
capName: "pipeline-orchestrator",
|
|
27877
28056
|
capScope: "system",
|
|
@@ -27896,6 +28075,12 @@ Object.freeze({
|
|
|
27896
28075
|
addonId: null,
|
|
27897
28076
|
access: "view"
|
|
27898
28077
|
},
|
|
28078
|
+
"pipelineOrchestrator.resumeForStorageMigration": {
|
|
28079
|
+
capName: "pipeline-orchestrator",
|
|
28080
|
+
capScope: "system",
|
|
28081
|
+
addonId: null,
|
|
28082
|
+
access: "create"
|
|
28083
|
+
},
|
|
27899
28084
|
"pipelineOrchestrator.saveTemplate": {
|
|
27900
28085
|
capName: "pipeline-orchestrator",
|
|
27901
28086
|
capScope: "system",
|
|
@@ -28292,7 +28477,7 @@ Object.freeze({
|
|
|
28292
28477
|
addonId: null,
|
|
28293
28478
|
access: "create"
|
|
28294
28479
|
},
|
|
28295
|
-
"recording.
|
|
28480
|
+
"recording.cancelStorageMigrationMove": {
|
|
28296
28481
|
capName: "recording",
|
|
28297
28482
|
capScope: "system",
|
|
28298
28483
|
addonId: null,
|
|
@@ -28328,7 +28513,7 @@ Object.freeze({
|
|
|
28328
28513
|
addonId: null,
|
|
28329
28514
|
access: "view"
|
|
28330
28515
|
},
|
|
28331
|
-
"recording.
|
|
28516
|
+
"recording.getStorageMigrationMoveStatus": {
|
|
28332
28517
|
capName: "recording",
|
|
28333
28518
|
capScope: "system",
|
|
28334
28519
|
addonId: null,
|
|
@@ -28352,6 +28537,12 @@ Object.freeze({
|
|
|
28352
28537
|
addonId: null,
|
|
28353
28538
|
access: "view"
|
|
28354
28539
|
},
|
|
28540
|
+
"recording.pauseForStorageMigration": {
|
|
28541
|
+
capName: "recording",
|
|
28542
|
+
capScope: "system",
|
|
28543
|
+
addonId: null,
|
|
28544
|
+
access: "create"
|
|
28545
|
+
},
|
|
28355
28546
|
"recording.pruneFootage": {
|
|
28356
28547
|
capName: "recording",
|
|
28357
28548
|
capScope: "system",
|
|
@@ -28370,7 +28561,7 @@ Object.freeze({
|
|
|
28370
28561
|
addonId: null,
|
|
28371
28562
|
access: "view"
|
|
28372
28563
|
},
|
|
28373
|
-
"recording.
|
|
28564
|
+
"recording.refreshStorageLocationsForMigration": {
|
|
28374
28565
|
capName: "recording",
|
|
28375
28566
|
capScope: "system",
|
|
28376
28567
|
addonId: null,
|
|
@@ -28394,12 +28585,24 @@ Object.freeze({
|
|
|
28394
28585
|
addonId: null,
|
|
28395
28586
|
access: "create"
|
|
28396
28587
|
},
|
|
28588
|
+
"recording.resumeForStorageMigration": {
|
|
28589
|
+
capName: "recording",
|
|
28590
|
+
capScope: "system",
|
|
28591
|
+
addonId: null,
|
|
28592
|
+
access: "create"
|
|
28593
|
+
},
|
|
28397
28594
|
"recording.setDeviceConfig": {
|
|
28398
28595
|
capName: "recording",
|
|
28399
28596
|
capScope: "system",
|
|
28400
28597
|
addonId: null,
|
|
28401
28598
|
access: "create"
|
|
28402
28599
|
},
|
|
28600
|
+
"recording.startStorageMigrationMove": {
|
|
28601
|
+
capName: "recording",
|
|
28602
|
+
capScope: "system",
|
|
28603
|
+
addonId: null,
|
|
28604
|
+
access: "create"
|
|
28605
|
+
},
|
|
28403
28606
|
"recordingExport.cancelExport": {
|
|
28404
28607
|
capName: "recordingExport",
|
|
28405
28608
|
capScope: "system",
|
|
@@ -28790,6 +28993,30 @@ Object.freeze({
|
|
|
28790
28993
|
addonId: null,
|
|
28791
28994
|
access: "view"
|
|
28792
28995
|
},
|
|
28996
|
+
"storageMigration.cancel": {
|
|
28997
|
+
capName: "storage-migration",
|
|
28998
|
+
capScope: "system",
|
|
28999
|
+
addonId: null,
|
|
29000
|
+
access: "create"
|
|
29001
|
+
},
|
|
29002
|
+
"storageMigration.plan": {
|
|
29003
|
+
capName: "storage-migration",
|
|
29004
|
+
capScope: "system",
|
|
29005
|
+
addonId: null,
|
|
29006
|
+
access: "view"
|
|
29007
|
+
},
|
|
29008
|
+
"storageMigration.start": {
|
|
29009
|
+
capName: "storage-migration",
|
|
29010
|
+
capScope: "system",
|
|
29011
|
+
addonId: null,
|
|
29012
|
+
access: "create"
|
|
29013
|
+
},
|
|
29014
|
+
"storageMigration.status": {
|
|
29015
|
+
capName: "storage-migration",
|
|
29016
|
+
capScope: "system",
|
|
29017
|
+
addonId: null,
|
|
29018
|
+
access: "view"
|
|
29019
|
+
},
|
|
28793
29020
|
"storageProvider.abortUpload": {
|
|
28794
29021
|
capName: "storage-provider",
|
|
28795
29022
|
capScope: "system",
|
|
@@ -29168,12 +29395,42 @@ Object.freeze({
|
|
|
29168
29395
|
addonId: null,
|
|
29169
29396
|
access: "create"
|
|
29170
29397
|
},
|
|
29398
|
+
"terminalSession.adoptLegacyMonitor": {
|
|
29399
|
+
capName: "terminal-session",
|
|
29400
|
+
capScope: "system",
|
|
29401
|
+
addonId: null,
|
|
29402
|
+
access: "create"
|
|
29403
|
+
},
|
|
29171
29404
|
"terminalSession.close": {
|
|
29172
29405
|
capName: "terminal-session",
|
|
29173
29406
|
capScope: "system",
|
|
29174
29407
|
addonId: null,
|
|
29175
29408
|
access: "create"
|
|
29176
29409
|
},
|
|
29410
|
+
"terminalSession.createInstance": {
|
|
29411
|
+
capName: "terminal-session",
|
|
29412
|
+
capScope: "system",
|
|
29413
|
+
addonId: null,
|
|
29414
|
+
access: "create"
|
|
29415
|
+
},
|
|
29416
|
+
"terminalSession.deleteInstance": {
|
|
29417
|
+
capName: "terminal-session",
|
|
29418
|
+
capScope: "system",
|
|
29419
|
+
addonId: null,
|
|
29420
|
+
access: "delete"
|
|
29421
|
+
},
|
|
29422
|
+
"terminalSession.listInstances": {
|
|
29423
|
+
capName: "terminal-session",
|
|
29424
|
+
capScope: "system",
|
|
29425
|
+
addonId: null,
|
|
29426
|
+
access: "view"
|
|
29427
|
+
},
|
|
29428
|
+
"terminalSession.listLegacyCameras": {
|
|
29429
|
+
capName: "terminal-session",
|
|
29430
|
+
capScope: "system",
|
|
29431
|
+
addonId: null,
|
|
29432
|
+
access: "view"
|
|
29433
|
+
},
|
|
29177
29434
|
"terminalSession.listProfiles": {
|
|
29178
29435
|
capName: "terminal-session",
|
|
29179
29436
|
capScope: "system",
|
|
@@ -29204,6 +29461,12 @@ Object.freeze({
|
|
|
29204
29461
|
addonId: null,
|
|
29205
29462
|
access: "create"
|
|
29206
29463
|
},
|
|
29464
|
+
"terminalSession.setInstanceEnabled": {
|
|
29465
|
+
capName: "terminal-session",
|
|
29466
|
+
capScope: "system",
|
|
29467
|
+
addonId: null,
|
|
29468
|
+
access: "create"
|
|
29469
|
+
},
|
|
29207
29470
|
"terminalSession.writeInput": {
|
|
29208
29471
|
capName: "terminal-session",
|
|
29209
29472
|
capScope: "system",
|
|
@@ -29927,7 +30190,7 @@ var AdminUIAddon = class extends BaseAddon {
|
|
|
29927
30190
|
capability: adminUiCapability,
|
|
29928
30191
|
provider: {
|
|
29929
30192
|
getStaticDir: async () => ({ staticDir: resolveAdminUiDistDir() }),
|
|
29930
|
-
getVersion: async () => ({ version: "1.2.
|
|
30193
|
+
getVersion: async () => ({ version: "1.2.47" })
|
|
29931
30194
|
}
|
|
29932
30195
|
}];
|
|
29933
30196
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-admin-ui",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.47",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Admin UI — Vite frontend build and server-side addon",
|
|
@@ -66,7 +66,6 @@
|
|
|
66
66
|
"qrcode": "^1.5.4",
|
|
67
67
|
"react": "^19.1.0",
|
|
68
68
|
"react-dom": "^19.1.0",
|
|
69
|
-
"react-grid-layout": "^2.2.2",
|
|
70
69
|
"react-i18next": "^17.0.8",
|
|
71
70
|
"react-konva": "^19.2.3",
|
|
72
71
|
"react-router-dom": "^7.13.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Aa as e,do as t,ka as n}from"./src-B5uaqYy4.js";import{I as r,O as i,Q as a,S as o,W as s,a as c,o as l,q as u,x as d,z as f}from"./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-DTufy7Ue.js";import{p}from"./player-overlays-BfbNCp8v.js";import{t as m}from"./FormBuilder-CQPeVoyZ.js";import{t as h}from"./pencil-D6ny7fbm.js";import{t as g}from"./plus-Ct8CXOT7.js";import{F as _,G as v,S as y,i as b,s as x}from"./index-Dg1Uu8YH.js";var S=v(`arrow-right-left`,[[`path`,{d:`m16 3 4 4-4 4`,key:`1x1c3m`}],[`path`,{d:`M20 7H4`,key:`zbl0bi`}],[`path`,{d:`m8 21-4-4 4-4`,key:`h9nckh`}],[`path`,{d:`M4 17h16`,key:`g4d7ey`}]]),C=v(`hard-drive`,[[`line`,{x1:`22`,x2:`2`,y1:`12`,y2:`12`,key:`1y58io`}],[`path`,{d:`M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z`,key:`oot6mr`}],[`line`,{x1:`6`,x2:`6.01`,y1:`16`,y2:`16`,key:`sgf278`}],[`line`,{x1:`10`,x2:`10.01`,y1:`16`,y2:`16`,key:`1l4acy`}]]),w=v(`star`,[[`path`,{d:`M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z`,key:`r04s7s`}]]);a();function T(e){return`${(e/1024**3).toFixed(e>=100*1024**3?0:1)} GB`}function E({location:e}){let t=e.capacity;return t==null?null:o(`span`,{className:`text-[10px] text-foreground-subtle tabular-nums`,children:[T(t.availableBytes),` free of `,T(t.totalBytes)]})}function D(e){let t=e.basePath;if(typeof t==`string`&&t.length>0)return t;let n=Object.keys(e);return n.length===0?``:n.join(`, `)}function O({location:e,cardinality:t,onEdit:n,onDelete:r,onSetDefault:i,onRelocate:a}){let s=D(e.config);return o(`div`,{className:`flex flex-wrap items-center gap-x-3 gap-y-2 px-3 py-2 border-t border-border first:border-t-0 hover:bg-primary/5`,children:[o(`div`,{className:`flex flex-wrap items-center gap-2 min-w-0 flex-1 basis-64`,children:[d(`div`,{className:`w-[88px] shrink-0`,children:e.isDefault?o(`span`,{className:`inline-flex items-center gap-0.5 rounded bg-primary/10 border border-primary/20 px-1.5 py-0.5 text-[10px] font-semibold text-primary uppercase tracking-wide`,title:`Default location for this type`,children:[d(w,{className:`h-2.5 w-2.5 fill-primary`}),`Default`]}):o(`button`,{onClick:()=>i(e),className:`inline-flex items-center gap-0.5 rounded border border-border px-1.5 py-0.5 text-[10px] font-medium text-foreground-subtle hover:text-foreground hover:bg-primary/10 hover:border-primary/30 uppercase tracking-wide`,title:`Promote to default for this type`,children:[d(w,{className:`h-2.5 w-2.5`}),`Set default`]})}),d(`span`,{className:`text-[10px] uppercase tracking-wide text-foreground-subtle bg-background border border-border rounded px-1.5 py-0.5 font-mono`,children:e.providerId}),e.isSystem&&d(`span`,{className:`text-[10px] uppercase tracking-wide text-foreground-subtle bg-background border border-border rounded px-1.5 py-0.5`,title:`System-managed location — cannot be deleted; edit config to relocate`,children:`system`}),e.config.readOnly===!0&&d(`span`,{className:`text-[10px] uppercase tracking-wide text-warning bg-warning/10 border border-warning/30 rounded px-1.5 py-0.5`,title:`Drain mode — reads and age retention continue; nothing new is written here and disk-pressure eviction skips it`,children:`read-only`}),o(`div`,{className:`min-w-0`,children:[d(`div`,{className:`text-xs font-medium text-foreground truncate`,children:e.displayName}),o(`div`,{className:`flex flex-wrap items-center gap-x-2`,children:[s&&d(`span`,{className:`text-[10px] text-foreground-subtle truncate font-mono`,children:s}),d(E,{location:e})]})]})]}),o(`div`,{className:`flex flex-wrap items-center gap-1 shrink-0`,children:[!e.isDefault&&o(`button`,{onClick:()=>i(e),className:`inline-flex items-center gap-1 rounded px-2 py-1 text-[10px] font-medium text-foreground-subtle border border-border hover:text-foreground hover:bg-primary/10`,title:`Set as default for this type`,children:[d(w,{className:`h-3 w-3`}),`Set default`]}),a&&o(`button`,{onClick:()=>a(e),className:`inline-flex items-center gap-1 rounded px-2 py-1 text-[10px] font-medium text-foreground-subtle border border-border hover:text-foreground hover:bg-primary/10`,title:`Move this location's footage/media to another location (drain)`,children:[d(S,{className:`h-3 w-3`}),`Relocate`]}),o(`button`,{onClick:()=>n(e),className:`inline-flex items-center gap-1 rounded px-2 py-1 text-[10px] font-medium text-foreground-subtle border border-border hover:text-foreground hover:bg-primary/10`,children:[d(h,{className:`h-3 w-3`}),`Edit`]}),!e.isSystem&&t!==`single`&&d(`button`,{onClick:()=>r(e),className:`inline-flex items-center gap-1 rounded px-2 py-1 text-[10px] font-medium text-danger hover:bg-danger/10`,title:`Delete location`,children:d(x,{className:`h-3 w-3`})})]})]})}function k({type:e,displayName:t,description:n,cardinality:r,locations:a,onAdd:c,onEdit:l,onDelete:u,onSetDefault:f,onRelocate:p}){let m=s(()=>{let e=[...a];return e.sort((e,t)=>e.isDefault===t.isDefault?e.displayName.localeCompare(t.displayName):e.isDefault?-1:1),e},[a]);return o(`div`,{className:`rounded-lg border border-border bg-surface`,children:[o(`div`,{className:`flex items-start justify-between border-b border-border px-3 py-2`,children:[o(`div`,{className:`space-y-0.5`,children:[o(`div`,{className:`flex items-center gap-2`,children:[d(`span`,{className:`text-sm font-semibold text-foreground capitalize`,children:t}),d(`span`,{className:`text-[10px] uppercase tracking-wide text-foreground-subtle bg-background border border-border rounded px-1.5 py-0.5 font-mono`,children:e})]}),n&&d(`p`,{className:`text-[11px] text-foreground-subtle`,children:n}),r===`single`&&d(`p`,{className:`text-[10px] text-foreground-subtle italic`,children:`Single — one location per type. Edit the existing entry; it can't be split.`})]}),r===`multi`&&o(`button`,{onClick:()=>c(e),className:`inline-flex items-center gap-1 rounded bg-primary px-2 py-1 text-[11px] font-medium text-primary-foreground hover:bg-primary/90`,children:[d(g,{className:`h-3 w-3`}),`Add`]})]}),m.length===0?d(`div`,{className:`px-3 py-4 text-center text-[11px] text-foreground-subtle italic`,children:r===`multi`?`No location registered. Click "Add" to register one.`:`No location registered yet — should be auto-seeded at next boot.`}):d(`div`,{children:m.map(e=>i(O,{...p?{onRelocate:p}:{},key:e.id,location:e,cardinality:r,onEdit:l,onDelete:u,onSetDefault:f}))})]})}a();function A({nodeId:e,value:t,onChange:n}){let i=p().trpcClient,[a,s]=u([]),[c,l]=u(t),[m,h]=u(null),[g,_]=u(null),[v,y]=u(``),b=r(async(t,r)=>{_(null);try{let a=await i.filesystemBrowse.browse.query({nodeId:e,path:t});h(a),l(a.path),r&&n(a.path)}catch(e){_(e instanceof Error?e.message:`browse failed`)}},[i,e,n]);f(()=>{l(t),(async()=>{try{let n=await i.filesystemBrowse.listAllowedRoots.query({nodeId:e});s(n),await b(t&&n.some(e=>t.startsWith(e))?t:n[0]??``,!1)}catch(e){s([]),h(null),_(e instanceof Error&&/not available on node/i.test(e.message)?`This node can't be browsed remotely. Enter the path manually.`:e instanceof Error?e.message:`browse unavailable`)}})()},[e]);let x=async()=>{if(!(!v.trim()||!m)){_(null);try{let t=`${m.path.replace(/\/+$/,``)}/${v.trim()}`;await i.filesystemBrowse.createDir.mutate({nodeId:e,path:t}),y(``),await b(m.path,!0)}catch(e){_(e instanceof Error?e.message:`create failed`)}}},S=e=>`${(e/1e9).toFixed(1)} GB`;return o(`div`,{className:`space-y-2 rounded border border-border p-2`,children:[d(`div`,{className:`flex flex-wrap gap-1`,children:a.map(e=>d(`button`,{onClick:()=>void b(e,!0),className:`rounded border border-border px-2 py-0.5 text-[10px] font-mono hover:border-primary/40`,children:e},e))}),d(`input`,{value:c,onChange:e=>{l(e.target.value),n(e.target.value)},placeholder:`/absolute/path`,className:`w-full rounded border border-border bg-background px-2 py-1 text-[11px] font-mono`}),m&&o(`div`,{className:`text-[10px] text-foreground-subtle`,children:[S(m.freeBytes),` free / `,S(m.totalBytes)]}),d(`div`,{className:`max-h-40 space-y-0.5 overflow-y-auto`,children:m?.entries.map(e=>o(`button`,{onClick:()=>void b(e.path,!0),className:`block w-full truncate rounded px-2 py-1 text-left text-xs hover:bg-primary/5`,children:[`📁 `,e.name]},e.path))}),o(`div`,{className:`flex gap-1`,children:[d(`input`,{value:v,onChange:e=>y(e.target.value),placeholder:`new folder`,className:`flex-1 rounded border border-border bg-background px-2 py-1 text-xs`}),d(`button`,{onClick:()=>void x(),className:`rounded border border-border px-2 py-1 text-xs hover:border-primary/40`,children:`Create`})]}),g&&d(`div`,{className:`text-[10px] text-red-400`,children:g})]})}a();function j({location:r,onClose:i,onSaved:a}){let f=l(),h=p().trpcClient,[g,_]=u({...r.config}),[v,x]=u(r.displayName),[S,C]=u(null),[w,T]=u(!1),E=n(),D=s(()=>{let e=E.data;return Array.isArray(e)?e.find(e=>e.providerId===r.providerId)??null:null},[E.data,r.providerId]),O=e({onSuccess:()=>{f.invalidateQueries({queryKey:[[`storage`,`listLocations`]]}),a()}}),k=D?.shouldSaveDiskSpace===!0,j=D?.nodeLocal===!0,[M,N]=u(typeof r.nodeId==`string`?r.nodeId:`hub`),P=typeof g.basePath==`string`?g.basePath:``,F=e=>_(t=>({...t,basePath:e})),I=g.readOnly===!0,L=c({queryKey:[`storage`,`listLocations`,`ro-guard`],queryFn:()=>h.storage.listLocations.query({})}),R=(L.data??[]).filter(e=>e.type===r.type&&e.id!==r.id&&e.config.readOnly!==!0).length,z=!I&&L.data!==void 0&&R===0,B=e=>_(t=>{let n={...t};return delete n.readOnly,e?{...n,readOnly:!0}:n}),V=typeof g.maxUsedGb==`number`?g.maxUsedGb:``,H=e=>{let t=e.trim(),n=t===``?void 0:Number(t);_(e=>{let t={...e};return n===void 0||!Number.isFinite(n)||n<=0?delete t.maxUsedGb:t.maxUsedGb=n,t})},U=typeof g.minFreePercent==`number`?g.minFreePercent:``,W=e=>{let t=e.trim(),n=t===``?void 0:Number(t);_(e=>{let t={...e};return n===void 0||!Number.isFinite(n)?delete t.minFreePercent:t.minFreePercent=Math.min(100,Math.max(0,n)),t})},G=async()=>{T(!0),C(null);try{C(await(e=>h.storage.testConfig.query(e))({providerId:r.providerId,config:g}))}catch(e){C({ok:!1,error:e instanceof Error?e.message:String(e)})}finally{T(!1)}};return d(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center bg-background/80 backdrop-blur-sm`,onClick:i,children:o(`div`,{className:`w-full max-w-md rounded-xl border border-border bg-surface shadow-2xl`,onClick:e=>e.stopPropagation(),children:[o(`div`,{className:`flex items-start justify-between border-b border-border px-4 py-3`,children:[o(`div`,{className:`space-y-0.5`,children:[o(`h2`,{className:`text-sm font-semibold text-foreground`,children:[`Edit `,r.displayName]}),o(`p`,{className:`text-xs text-foreground-subtle`,children:[d(`span`,{className:`font-mono`,children:r.id}),` ·`,` `,D?.displayName??r.providerId]})]}),d(`button`,{onClick:i,className:`text-foreground-subtle hover:text-foreground`,children:d(b,{className:`h-4 w-4`})})]}),o(`div`,{className:`p-4 space-y-3 max-h-[60vh] overflow-y-auto`,children:[o(`div`,{className:`space-y-1`,children:[d(`label`,{className:`text-[10px] uppercase tracking-wide text-foreground-subtle`,children:`Display name`}),d(`input`,{type:`text`,value:v,onChange:e=>x(e.target.value),className:`w-full rounded border border-border bg-background px-2 py-1.5 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-primary`})]}),D&&d(m,{schema:D.configSchema,values:g,onChange:_}),o(`div`,{className:`space-y-1`,children:[o(`label`,{className:`flex items-center gap-2 text-xs ${z?`text-foreground-subtle cursor-not-allowed`:`text-foreground cursor-pointer`}`,children:[d(`input`,{type:`checkbox`,checked:I,disabled:z,onChange:e=>B(e.target.checked),className:`accent-primary`}),`Read-only (drain mode)`]}),d(`p`,{className:`text-[10px] text-foreground-subtle`,children:z?`Blocked: this is the last writable location of its type — new footage would have nowhere to go.`:`Reads and age-based retention continue; nothing new is written here and disk-pressure eviction skips it. Use it to slowly decommission a disk.`})]}),j&&o(`div`,{className:`space-y-2`,children:[d(`label`,{className:`text-[10px] uppercase tracking-wide text-foreground-subtle`,children:`Node`}),d(t,{selectedNodeId:M,onSelect:N,alwaysShow:!0}),d(`label`,{className:`text-[10px] uppercase tracking-wide text-foreground-subtle`,children:`Path`}),d(A,{nodeId:M,value:P,onChange:F})]}),k&&o(`div`,{className:`space-y-1`,children:[d(`label`,{className:`text-[10px] uppercase tracking-wide text-foreground-subtle`,children:`Min free disk %`}),d(`input`,{type:`number`,min:0,max:100,value:U,placeholder:D?.minFreePercent==null?``:String(D.minFreePercent),onChange:e=>W(e.target.value),className:`w-full rounded border border-border bg-background px-2 py-1.5 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-primary`}),o(`p`,{className:`text-[10px] text-foreground-subtle`,children:[`When free space on this volume drops below this %, the oldest data stored here is evicted to reclaim space.`,D?.minFreePercent==null?` Empty = use the default.`:` Empty = use the default (${D.minFreePercent}%).`]}),d(`label`,{className:`text-[10px] uppercase tracking-wide text-foreground-subtle`,children:`Max used (GB)`}),d(`input`,{type:`number`,min:1,value:V,placeholder:`unlimited`,onChange:e=>H(e.target.value),className:`w-full rounded border border-border bg-background px-2 py-1.5 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-primary`}),d(`p`,{className:`text-[10px] text-foreground-subtle`,children:`Hard cap on the TOTAL bytes evictable data (recordings) may occupy on this location, independent of disk free space — oldest footage is evicted past it. Empty = unlimited.`})]}),!D&&!E.isLoading&&o(`div`,{className:`rounded border border-amber-500/30 bg-amber-500/10 px-3 py-2 text-[11px] text-amber-700 dark:text-amber-300`,children:[`Provider `,d(`code`,{className:`font-mono`,children:r.providerId}),` is no longer registered. Field schema unavailable; raw config is preserved on save.`]}),S&&d(`div`,{className:`rounded border px-3 py-2 text-[11px] ${S.ok?`border-success/30 bg-success/5 text-success`:`border-danger/30 bg-danger/5 text-danger`}`,children:S.ok?`Connection OK.`:`Test failed: ${S.error??`unknown error`}`}),O.isError&&d(`div`,{className:`rounded border border-danger/30 bg-danger/5 text-danger px-3 py-2 text-[11px]`,children:O.error instanceof Error?O.error.message:String(O.error)})]}),o(`div`,{className:`flex items-center justify-between gap-2 border-t border-border px-4 py-3`,children:[d(`button`,{onClick:i,className:`rounded px-3 py-1.5 text-xs text-foreground-subtle border border-border hover:text-foreground`,children:`Cancel`}),o(`div`,{className:`flex items-center gap-2`,children:[d(`button`,{onClick:()=>{G()},disabled:w||!D,className:`rounded border border-border px-3 py-1.5 text-xs text-foreground hover:bg-primary/10 disabled:opacity-50`,children:w?`Testing…`:`Test connection`}),o(`button`,{onClick:()=>{O.mutate({id:r.id,type:r.type,providerId:r.providerId,isDefault:r.isDefault,displayName:v.trim(),config:g,nodeId:j?M:void 0})},disabled:O.isPending||v.trim().length===0,className:`inline-flex items-center gap-1.5 rounded bg-primary px-3 py-1.5 text-xs font-medium text-primary-foreground hover:bg-primary/90 disabled:opacity-50`,children:[O.isPending?d(y,{className:`h-3.5 w-3.5 animate-spin`}):null,O.isPending?`Saving…`:`Save`]})]})]})]})})}function M(e){let t=e.trim().toLowerCase();return t.length===0?``:t.replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``)}function N(e,t){let n=M(t);return`${e}:${n.length>0?n:`default`}`}a();function P({initialType:r,onClose:i,onCreated:a}){let c=l(),f=p().trpcClient,[h,g]=u(`picker`),[v,x]=u(r),[S,C]=u(null),[w,T]=u({}),[E,D]=u(``),[O,k]=u(null),[j,M]=u(!1),[P,F]=u(`hub`),[I,L]=u(null),[R,z]=u(!1),B=e=>T(t=>({...t,basePath:e})),V=typeof w.basePath==`string`?w.basePath:``,H=n(),U=s(()=>{let e=H.data;return Array.isArray(e)?e:[]},[H.data]),W=H.isLoading,G=e({onSuccess:()=>{c.invalidateQueries({queryKey:[[`storage`,`listLocations`]]}),a()}}),K=s(()=>O!==null&&O.length>0?O:N(v,E),[v,E,O]),q=async()=>{if(S){z(!0),L(null);try{L(await(e=>f.storage.testConfig.query(e))({providerId:S.providerId,config:w}))}catch(e){L({ok:!1,error:e instanceof Error?e.message:String(e)})}finally{z(!1)}}};return d(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center bg-background/80 backdrop-blur-sm`,onClick:i,children:o(`div`,{className:`w-full max-w-md rounded-xl border border-border bg-surface shadow-2xl`,onClick:e=>e.stopPropagation(),children:[o(`div`,{className:`flex items-start justify-between border-b border-border px-4 py-3`,children:[o(`div`,{className:`space-y-0.5`,children:[d(`h2`,{className:`text-sm font-semibold text-foreground`,children:{picker:`Add Location — Pick provider`,config:`Add Location — ${S?.displayName??``}`,naming:`Add Location — Name & defaults`}[h]}),o(`p`,{className:`text-xs text-foreground-subtle`,children:[`Type: `,d(`span`,{className:`font-mono`,children:v})]})]}),d(`button`,{onClick:i,className:`text-foreground-subtle hover:text-foreground`,children:d(b,{className:`h-4 w-4`})})]}),h===`picker`&&o(`div`,{className:`p-4 space-y-2`,children:[W&&d(`div`,{className:`text-xs text-foreground-subtle animate-pulse`,children:`Loading providers…`}),!W&&U.length===0&&o(`div`,{className:`rounded border border-border bg-background px-3 py-4 text-center text-xs text-foreground-subtle`,children:[`No storage-provider supports type "`,v,`". Install a compatible addon (e.g.`,` `,d(`code`,{className:`font-mono`,children:`remote-storage`}),`) to enable it.`]}),U.map(e=>o(`button`,{onClick:()=>{C(e),g(`config`)},className:`flex w-full items-center gap-3 rounded-lg border border-border bg-background p-3 text-left hover:border-primary/40 hover:bg-primary/5 transition-colors`,children:[o(`div`,{className:`flex-1 min-w-0`,children:[d(`p`,{className:`text-xs font-semibold text-foreground`,children:e.displayName}),d(`p`,{className:`text-[10px] text-foreground-subtle font-mono mt-0.5 truncate`,children:e.providerId})]}),d(_,{className:`h-4 w-4 text-foreground-subtle flex-shrink-0`})]},e.providerId))]}),h===`config`&&S&&o(`div`,{className:`p-4 space-y-3 max-h-[60vh] overflow-y-auto`,children:[d(m,{schema:S.configSchema,values:w,onChange:T}),S.nodeLocal&&o(`div`,{className:`space-y-2`,children:[d(`label`,{className:`text-[10px] uppercase tracking-wide text-foreground-subtle`,children:`Node`}),d(t,{selectedNodeId:P,onSelect:F,alwaysShow:!0}),d(`label`,{className:`text-[10px] uppercase tracking-wide text-foreground-subtle`,children:`Path`}),d(A,{nodeId:P,value:V,onChange:B})]}),I&&d(`div`,{className:`rounded border px-3 py-2 text-[11px] ${I.ok?`border-success/30 bg-success/5 text-success`:`border-danger/30 bg-danger/5 text-danger`}`,children:I.ok?`Connection OK.`:`Test failed: ${I.error??`unknown error`}`}),o(`div`,{className:`flex items-center justify-between pt-1`,children:[d(`button`,{onClick:()=>g(`picker`),className:`rounded px-3 py-1.5 text-xs text-foreground-subtle border border-border hover:text-foreground`,children:`Back`}),o(`div`,{className:`flex items-center gap-2`,children:[d(`button`,{onClick:()=>{q()},disabled:R,className:`rounded border border-border px-3 py-1.5 text-xs text-foreground hover:bg-primary/10 disabled:opacity-50`,children:R?`Testing…`:`Test connection`}),d(`button`,{onClick:()=>g(`naming`),className:`rounded bg-primary px-3 py-1.5 text-xs font-medium text-primary-foreground hover:bg-primary/90`,children:`Next`})]})]})]}),h===`naming`&&S&&o(`div`,{className:`p-4 space-y-3`,children:[o(`div`,{className:`space-y-1`,children:[d(`label`,{className:`text-[10px] uppercase tracking-wide text-foreground-subtle`,children:`Display name`}),d(`input`,{type:`text`,value:E,onChange:e=>D(e.target.value),placeholder:`${v} on ${S.displayName}`,className:`w-full rounded border border-border bg-background px-2 py-1.5 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-primary`})]}),o(`div`,{className:`space-y-1`,children:[o(`label`,{className:`text-[10px] uppercase tracking-wide text-foreground-subtle`,children:[`Id`,` `,d(`span`,{className:`lowercase tracking-normal text-foreground-subtle`,children:`— auto-derived; override if needed`})]}),d(`input`,{type:`text`,value:K,onChange:e=>k(e.target.value),placeholder:N(v,E),className:`w-full rounded border border-border bg-background px-2 py-1.5 text-xs text-foreground font-mono focus:outline-none focus:ring-1 focus:ring-primary`}),o(`p`,{className:`text-[10px] text-foreground-subtle`,children:[`Format: `,d(`code`,{className:`font-mono`,children:`<type>:<slug>`}),`. Lowercase letters, digits, and hyphens only.`]})]}),o(`label`,{className:`flex items-start gap-2 rounded border border-border bg-background px-3 py-2 cursor-pointer hover:bg-primary/5`,children:[d(`input`,{type:`checkbox`,checked:j,onChange:e=>M(e.target.checked),className:`accent-primary mt-0.5`}),o(`div`,{className:`space-y-0.5`,children:[o(`div`,{className:`text-xs font-medium text-foreground`,children:[`Mark as default for type "`,v,`"`]}),o(`div`,{className:`text-[10px] text-foreground-subtle`,children:[`Setting this as default will demote the current default for this type. References like `,o(`code`,{className:`font-mono`,children:[`"`,v,`"`]}),` resolve to whichever location is the default.`]})]})]}),G.isError&&d(`div`,{className:`rounded border border-danger/30 bg-danger/5 text-danger px-3 py-2 text-[11px]`,children:G.error instanceof Error?G.error.message:String(G.error)}),o(`div`,{className:`flex items-center justify-between pt-1`,children:[d(`button`,{onClick:()=>g(`config`),className:`rounded px-3 py-1.5 text-xs text-foreground-subtle border border-border hover:text-foreground`,children:`Back`}),o(`div`,{className:`flex items-center gap-2`,children:[d(`button`,{onClick:()=>{x(r),C(null),T({}),D(``),k(null),M(!1),L(null),g(`picker`)},className:`rounded px-3 py-1.5 text-xs text-foreground-subtle border border-border hover:text-foreground`,children:`Reset`}),o(`button`,{onClick:()=>{S&&G.mutate({id:K,type:v,displayName:E.trim(),providerId:S.providerId,config:w,isDefault:j,nodeId:S.nodeLocal?P:void 0})},disabled:G.isPending||E.trim().length===0,className:`inline-flex items-center gap-1.5 rounded bg-primary px-3 py-1.5 text-xs font-medium text-primary-foreground hover:bg-primary/90 disabled:opacity-50`,children:[G.isPending?d(y,{className:`h-3.5 w-3.5 animate-spin`}):null,G.isPending?`Saving…`:`Save`]})]})]})]})]})})}export{S as a,C as i,j as n,k as r,P as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{At as e,Jo as t,Tt as n,Xo as r,d as i,g as a,lo as o,m as s,uo as c}from"./src-B5uaqYy4.js";import{Q as l,S as u,o as d,q as f,x as p,z as m}from"./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-DTufy7Ue.js";import{t as h}from"./play-CSzv0kMk.js";import{t as g}from"./plus-Ct8CXOT7.js";import{t as _}from"./refresh-cw-CSup0Ybd.js";import{t as v}from"./square-gf10c5Em.js";import{H as y,K as b,L as x,S,m as C}from"./index-Dg1Uu8YH.js";import{t as w}from"./AdminPage-Dq33XE9j.js";import{t as T}from"./NodeAddonsSettingsPanel-Dup84Hcy.js";l();function E({addonId:e,fallback:t,tileClassName:n,iconPath:r=`assets/icon.svg`}){let[i,a]=f(!1),o=`/api/addon-assets/${e}/${r}`;return p(`div`,{className:`h-10 w-10 rounded-lg flex items-center justify-center shrink-0 ${n}`,children:i?p(t,{className:`h-5 w-5`}):p(`img`,{src:o,alt:e,className:`h-7 w-7 rounded-md bg-white p-1 ring-1 ring-black/5`,onError:()=>a(!0)})})}l();function D({addonId:e,defaultActivity:t,showActivity:n=!0,maxHeight:r=`max-h-64`,defaultTab:i,capability:o}){let[c,l]=f(t??(i===`events`?`events`:`logs`));return u(`div`,{className:`flex flex-col gap-4`,children:[p(T,{nodeId:`hub`,addonIds:[e],level:`global`,capability:o}),n&&u(`div`,{className:`rounded-lg border border-border bg-surface overflow-hidden`,children:[u(`div`,{className:`flex items-center justify-between px-3 py-2 border-b border-border bg-surface-hover/20`,children:[p(`span`,{className:`text-[11px] font-semibold text-foreground-subtle uppercase tracking-wide`,children:`Activity`}),u(`div`,{className:`flex items-center gap-1`,children:[p(O,{kind:`logs`,active:c===`logs`,onClick:()=>l(`logs`)}),p(O,{kind:`events`,active:c===`events`,onClick:()=>l(`events`)})]})]}),c===`logs`?p(a,{addonId:e,maxHeight:r,showFilters:!1}):p(s,{addonId:e,category:`addon.*`,maxHeight:r})]})]})}function O({kind:e,active:t,onClick:n}){return u(`button`,{onClick:n,className:`inline-flex items-center gap-1 rounded px-2 py-0.5 text-[11px] font-medium transition-colors ${t?`bg-primary/10 text-primary`:`text-foreground-subtle hover:text-foreground hover:bg-surface-hover`}`,children:[p(e===`logs`?C:y,{className:`h-3 w-3`}),e===`logs`?`Logs`:`Events`]})}l();function k(e){let{title:n,subtitle:i,pageIcon:a,itemIcon:s,capability:l,installButtonLabel:d=`Add addon`,items:h,isLoading:_,emptyTitle:v=`No addons installed for this capability`,emptyDescription:y,itemIconColor:S,renderStatusBadges:C,renderPrimaryAction:T,itemError:O,renderExpandedPanel:k,workspaceMaxHeight:N=`max-h-72`,trailing:P,showChrome:F=!1}=e,I=h.length>1,[L,R]=f(()=>h[0]?.addonId??null);m(()=>{L&&(h.some(e=>e.addonId===L)||R(h[0]?.addonId??null))},[h,L]);let z=e=>R(t=>t===e?null:e),B=`/system/addons?capability=${encodeURIComponent(l)}`;return p(w,{icon:F?a:void 0,title:F?n:void 0,subtitle:F?i:void 0,actions:F?p(b,{to:B,children:u(r,{variant:`primary`,size:`sm`,children:[p(g,{className:`h-3.5 w-3.5 mr-1`}),d]})}):void 0,children:_?p(t,{children:p(`div`,{className:`p-6 text-sm text-foreground-subtle`,children:`Loading…`})}):h.length===0?p(t,{children:p(c,{title:v,description:y??`Install an addon that declares the "${l}" capability to get started.`,action:F?p(b,{to:B,children:u(r,{variant:`primary`,size:`sm`,children:[p(g,{className:`h-3.5 w-3.5 mr-1`}),d]})}):void 0})}):u(`div`,{className:`flex flex-col gap-4`,children:[h.map(e=>{let n=!I||L===e.addonId,r=S?.(e)??(e.isActive?`bg-emerald-500/15 text-emerald-700 dark:text-emerald-300`:`bg-foreground-subtle/15 text-foreground-subtle`),i=O?.(e)??null;return u(t,{children:[u(`div`,{className:`flex flex-col gap-3 p-4 sm:flex-row sm:items-center ${n?`border-b border-border`:``}`,children:[u(`div`,{className:`flex items-center gap-3 flex-1 min-w-0`,children:[I&&p(`button`,{type:`button`,onClick:()=>z(e.addonId),"aria-label":n?`Collapse`:`Expand`,className:`shrink-0 p-1 rounded hover:bg-foreground-subtle/10 transition-colors`,children:p(x,{className:`h-4 w-4 text-foreground-subtle transition-transform ${n?`rotate-180`:``}`})}),u(`button`,{type:`button`,onClick:()=>I&&z(e.addonId),className:`flex items-center gap-4 flex-1 min-w-0 text-left ${I?`hover:opacity-80 transition-opacity`:``}`,disabled:!I,children:[p(E,{addonId:e.addonId,fallback:s,tileClassName:r}),u(`div`,{className:`flex-1 min-w-0`,children:[u(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[p(`span`,{className:`font-semibold text-foreground`,children:e.displayName}),p(A,{isActive:e.isActive}),C?.(e)]}),p(`div`,{className:`text-xs text-foreground-subtle mt-1 font-mono break-all`,children:e.addonId})]})]})]}),u(`div`,{className:`flex items-center gap-1 shrink-0 flex-wrap justify-end`,children:[T?.(e),p(j,{capName:e.capName??l,addonId:e.addonId,isActive:e.isActive}),p(M,{addonId:e.addonId,displayName:e.displayName})]})]}),n&&u(`div`,{className:`p-4 flex flex-col gap-3`,children:[i!==null&&p(o,{message:i}),k?.(e),p(D,{addonId:e.addonId,maxHeight:N,capability:e.capName??l})]})]},e.addonId)}),P]})})}function A({isActive:e}){return p(`span`,{className:`text-[10px] rounded-full px-2 py-0.5 font-medium ${e?`bg-emerald-500/15 text-emerald-700 dark:text-emerald-300`:`bg-foreground-subtle/15 text-foreground-subtle`}`,children:e?`Enabled`:`Disabled`})}function j({capName:t,addonId:n,isActive:i}){let a=d(),o=e({onSuccess:()=>{a.invalidateQueries({queryKey:[[`addons`,`listCapabilityProviders`]]})}}),s=o.isPending;return u(r,{size:`sm`,variant:i?`secondary`:`primary`,disabled:s,onClick:()=>o.mutate({capName:t,addonId:n,enabled:!i}),children:[s?p(S,{className:`h-3 w-3 animate-spin`}):p(i?v:h,{className:`h-3 w-3`}),i?`Disable`:`Enable`]})}function M({addonId:e,displayName:t}){let r=d(),a=n({onSuccess:()=>{r.invalidateQueries({queryKey:[[`addons`,`listCapabilityProviders`]]})}});return p(i,{label:`Restart`,icon:_,size:`sm`,title:`Restart "${t}"?`,description:`Restarting the addon bounces its subprocess — the provider will briefly drop and reconnect automatically.`,confirmLabel:`Restart`,triggerVariant:`ghost`,confirmVariant:`danger`,disabled:a.isPending,action:()=>a.mutateAsync({addonId:e})})}export{k as t};
|