MDK Logo

Operations center

Operations center and monitoring hooks

Hooks for operations center functionality and monitoring.

Package

@tetherto/mdk-react-adapter

Hooks

@tetherto/mdk-react-adapter

Import the public APIs on this page from @tetherto/mdk-react-adapter.

useCabinetDevices

Fetches one LV cabinet's family of devices — the powermeters and temperature sensors whose info.pos sits under the cabinet root (buildCabinetDetailParams) — polled at the Op-Center realtime cadence and flattened across the per-…

(root: string, options: UseCabinetDevicesOptions = {}) => UseCabinetDevicesResult

useCabinetGroups

Fetches the Explorer cabinet-tab devices (powermeters + temperature sensors) and groups them by their owning container (info.container); devices without a container assignment (site-level meters) collect under the site group, sorted la…

(options: UseCabinetGroupsOptions = {}) => UseCabinetGroupsResult

useContainerSettings

Fetches per-model container thresholds/parameters from GET /auth/global/data?type=containerSettings. Feeds the threshold status indicators (tank pressure, oil/water temperature) on the container widgets and detail tabs.

(options: UseContainerSettingsOptions = {}) => UseContainerSettingsResult

useContainerSnapshots

Fetches the detail snapshots for the selected containers — the richer projection (buildContainerDetailParams) that carries container_specific.pdu_data plus the tank / cooling / power-mode config the detail panel controls read. `c…

(containerKeys: string[], options: UseContainerSnapshotsOptions = {}) => UseContainerSnapshotsResult

useContainerWidgets

Data source for the Site Overview Container Widgets grid: the container inventory (one card per container) plus the latest per-miner realtime aggregate sample the cards derive their summaries from. Card-shaped payload derivation lives with…

(options: UseContainerWidgetsOptions = {}) => UseContainerWidgetsResult

useExplorerList

Fetches the thing list behind one Explorer tab (container / miner / cabinet) from GET /auth/list-things, tag-filtered and projected by the foundation's Explorer params builder. Rows are flattened across the per-Kernel envelope so r…

(tab: ExplorerTabValue, options: UseExplorerListOptions = {}) => UseExplorerListResult

useFeatureFlags

Fetches the deployment feature flags from GET /auth/featureConfig (camelCase route — there is no /auth/feature-config). Static deployment config — fetched once per session, no polling. Gates optional tabs/sub-routes (containerCharts,…

(options: UseFeatureFlagsOptions = {}) => UseFeatureFlagsResult

usePduLayout

Fetches a container type's static PDU socket grid from GET /auth/pdu-layout. The grid is provisioned in the container worker's pduGridLayout config keyed by the exact type string — an unprovisioned type is a backend 400 (`ERR_PDU_LAYOU…

(params: UsePduLayoutParams, options: UsePduLayoutOptions = {}) => UsePduLayoutResult

useRackLayout

Fetches the rack structure for a worker type from GET /auth/list-racks (type is required — the backend 400s with ERR_TYPE_INVALID without it). Feeds the Explorer rack grouping.

(params: UseRackLayoutParams, options: UseRackLayoutOptions = {}) => UseRackLayoutResult

useSite

Fetches the configured site label from GET /auth/site. Static deployment config — fetched once per session, no polling.

(options: UseSiteOptions = {}) => UseSiteResult

useThingComment

Device-comment writes for the Explorer detail panel — add, edit, and delete against /auth/thing/comment (the author is stamped server-side from the session token). Comments ride on the thing rows themselves (comments in the list-things…

() => UseThingCommentResult

useThingDetail

Fetches a single thing by id from GET /auth/list-things with the full Op Center field projection — the data source for the Explorer detail panel and the container Thing-detail view.

(id: string | undefined, options: UseThingDetailOptions = {}) => UseThingDetailResult

On this page