MDK Logo
ReferenceUI Kitui-foundation

Constants

Public constants exported by @tetherto/mdk-ui-foundation.

Imported from @tetherto/mdk-ui-foundation.

Dashboard

NameSignature / TypeDescription
DEFAULT_TIMELINE_OPTIONSreadonly TimelineOption[]Canonical short-form intervals exposed by MDK UI Shell. The keys map onto the `key=stat-<value>` query parameter expected by `GET /auth/tail-log`.
SEVERITY_WEIGHTRecord<AlertSeverity, number>Severity level → numeric weight. Higher is more urgent. Used for sorting the active-incidents list (most-severe first).

General

NameSignature / TypeDescription
ALERT_TYPE_POOL_NAME{ readonly ip_worker_name: "IP worker name"; readonly wrong_miner_pool: "Wrong miner pool"; readonly wrong_worker_name: "Wrong worker name"; readonly wrong_miner_subaccount: "Wrong miner subaccount";…
ALERT_TYPE_POOL_VALUE{ readonly IP_WORKER_NAME: "ip_worker_name"; readonly WRONG_MINER_POOL: "wrong_miner_pool"; readonly WRONG_WORKER_NAME: "wrong_worker_name"; readonly WRONG_MINER_SUBACCOUNT: "wrong_miner_subaccount";…
AUTH_LEVELS{ readonly READ: "r"; readonly WRITE: "w"; }
AUTH_PERMISSIONS{ readonly TEMP: "temp"; readonly MINER: "miner"; readonly USERS: "users"; readonly ALERTS: "alerts"; readonly TICKETS: "tickets"; readonly ACTIONS: "actions"; readonly REVENUE: "revenue"; readonly F…
AUTH_TOKEN_QUERY_PARAM"authToken"Pure URL helpers shared by the auth flow. Kept framework-agnostic so the react-adapter (and any future framework adapter) can call them without pulling in router-specific APIs.
CABINET_DEVICES_TYPES_NAME_MAP{ readonly "powermeter-abb-b24": "Powermeter ABB B24"; readonly "sensor-temp-seneca": "Sensor Temp Seneca"; readonly "powermeter-abb-m4m20": "Powermeter ABB M4M20"; readonly "powermeter-abb-m1m20": "…
COMPLETE_CONTAINER_TYPE{ readonly BITMAIN_HYDRO: "container-as-hk3"; readonly BITDEER_M30: "container-bd-d40-m30"; readonly BITDEER_M56: "container-bd-d40-m56"; readonly MICROBT_ALPHA: "container-mbt-alpha"; readonly BITDE…
COMPLETE_MINER_TYPES{ readonly ANTMINER_AM_S21: "miner-am-s21"; readonly WHATSMINER_WM_63: "miner-wm-m63"; readonly WHATSMINER_WM_53: "miner-wm-m53s"; readonly AVALON_AV_a1346: "miner-av-a1346"; readonly WHATSMINER_WM_5…
CONTAINER_LIST_THINGS_LIMIT1000
CONTAINER_MODEL{ readonly M221: "m221"; readonly GAMMA: "gamma"; readonly BITDEER: "bitdeer"; readonly BITMAIN: "bitmain"; readonly MICROBT: "microbt"; readonly ANTSPACE: "antspace"; readonly BITMAIN_IMM: "bitmain-…Container tag / type / threshold literals. Data-layer contracts shared across the toolkit — owned by ui-foundation so the React layers stay free of tag strings.
CONTAINER_MODEL_FAMILY{ readonly BITDEER: "bitdeer"; readonly ANTSPACE_HYDRO: "antspace-hydro"; readonly ANTSPACE_IMMERSION: "antspace-immersion"; readonly MICROBT: "microbt"; readonly GAMMA: "gamma"; }Container model families the tab matrix distinguishes. Detection order matters and mirrors the reference app's if/else chain — see {@link resolveContainerModelFamily}.
CONTAINER_SETTINGS_MODEL{ BITDEER: string; MICROBT: string; HYDRO: string; IMMERSION: string; }
CONTAINER_STATUS{ readonly RUNNING: "running"; readonly OFFLINE: "offline"; readonly STOPPED: "stopped"; }
CONTAINER_TAB{ readonly PDU: "pdu"; readonly HOME: "home"; readonly ALARM: "alarm"; readonly CHARTS: "charts"; readonly HEATMAP: "heatmap"; readonly CONTROLS: "controls"; readonly SETTINGS: "settings"; readonly P…Container detail-view tab keys. The per-model availability matrix lives in `utils/container-tabs.ts`.
CONTAINER_TAB_LABEL{ readonly pdu: "PDU Layout"; readonly home: "Home"; readonly alarm: "Alarm"; readonly charts: "Charts"; readonly heatmap: "Heatmap"; readonly controls: "Controls"; readonly settings: "Settings"; rea…Display labels for the container detail tabs, mirroring the reference app's `containerTabsHelper` (`PDU` renders as "PDU Layout", the rest are capitalised keys).
CONTAINER_TAB_MATRIXRecord<ContainerModelFamily, readonly ContainerTabValue[]>Base tab sequence per model family — order is display order. Power Adjustment is intentionally absent here: it is inserted positionally by {@link getSupportedContainerTabs}.
CONTAINER_TACTICS_TYPE{ readonly COIN: "coin"; readonly DISABLED: "disabled"; readonly ELECTRICITY: "electricity"; }
CONTAINER_TYPE{ readonly BITDEER: "bd"; readonly ANTSPACE: "as"; readonly MICROBT: "mbt"; readonly ANTSPACE_HYDRO: "as-hk3"; readonly ANTSPACE_IMMERSION: "as-immersion"; }
CONTAINER_TYPE_NAME_MAP{ readonly "container-bd-d40-m30": "Bitdeer M30"; readonly "container-bd-d40-m56": "Bitdeer M56"; readonly "container-bd-d40-s19xp": "Bitdeer S19XP"; readonly "container-as-hk3": "Bitmain Hydro"; rea…
CONTAINER_WIDGETS_AGGR_FIELD_KEYSreadonly string[]All realtime aggregate fields the cards read — the tail-log `aggrFields` set.
CONTAINER_WIDGETS_SUMMARY_FIELD{ readonly HASHRATE_MHS_1M_SUM: "hashrate_mhs_1m_group_sum_aggr"; readonly TEMPERATURE_MAX: "temperature_c_group_max_aggr"; readonly TEMPERATURE_AVG: "temperature_c_group_avg_aggr"; }Realtime summary aggregate field names (these carry the `_aggr` suffix).
CONTAINERS_MINER_TYPE{ readonly M56: "m56"; readonly M30: "m30"; readonly A1346: "a1346"; readonly S19XP: "s19xp"; }
DEFAULT_HISTORICAL_WINDOW_MSnumberDefault historical-alerts look-back window (14 days), matching the devkit `<Alerts>` feature default. Wider ranges fan out into more 24h requests — see {@link fetchHistoricalAlertsInChunks}.
DEVICE_ACTION{ readonly SWITCH_CONTAINER: "switchContainer"; readonly SWITCH_COOLING_SYSTEM: "switchCoolingSystem"; readonly SET_TANK_ENABLED: "setTankEnabled"; readonly SET_AIR_EXHAUST_ENABLED: "setAirExhaustEna…Action identifiers accepted by `POST /auth/actions/voting` (the reference app's `ACTION_TYPES`, camelCase vocabulary).
DEVICE_BATCH_ACTION{ readonly MOVE_MINER: "moveMiner"; readonly DELETE_MINER: "deleteMiner"; readonly ATTACH_SPARE_PARTS: "attachSpareParts"; readonly BULK_ADD_SPARE_PARTS: "bulkAddSpareParts"; readonly BATCH_MOVE_SPAR…Batch action identifiers (`POST /auth/actions/voting/batch`) — each groups a set of per-thing sub-actions under one `batchActionUID`.
EXPLORER_TAB{ readonly MINER: "miner"; readonly CABINET: "cabinet"; readonly CONTAINER: "container"; }Explorer list-view tabs.
EXPLORER_TAB_TAGSRecord<ExplorerTabValue, readonly string[]>Thing tags each Explorer tab lists. The cabinet tab unions powermeters and sensors — there is no dedicated `t-cabinet` tag.
LV_CABINET_DEVICES_TAG{ readonly POWERMETER: "t-powermeter"; readonly SENSOR_TEMP: "t-sensor-temp"; }
LV_CABINET_DEVICES_TYPE{ readonly POWERMETER_ABB_B24: "powermeter-abb-b24"; readonly SENSOR_TEMP_SENECA: "sensor-temp-seneca"; readonly POWERMETER_ABB_M1M20: "powermeter-abb-m1m20"; readonly POWERMETER_ABB_M4M20: "powermet…
MAINTENANCE_CONTAINER"maintenance"
MINER_BRAND_NAMES{ readonly av: "Avalon"; readonly am: "Antminer"; readonly wm: "Whatsminer"; }
MINER_MODEL{ readonly AVALON: "avalon"; readonly ANTMINER: "antminer"; readonly WHATSMINER: "whatsminer"; }Device / miner / power-meter tag + type literals. These are data-layer contracts shared between the API surface and the UI — owned by ui-foundation so the React layers can stay free of tag strings.
MINER_MODEL_TO_TYPE_MAP{ readonly av: "avalon"; readonly am: "antminer"; readonly wm: "whatsminer"; }
MINER_POWER_MODE{ readonly SLEEP: "sleep"; readonly LOW: "low"; readonly NORMAL: "normal"; readonly HIGH: "high"; }
MINER_TYPE{ readonly AVALON: "av"; readonly ANTMINER: "am"; readonly WHATSMINER: "wm"; }
MINER_TYPE_MESSAGE{ readonly "miner-av-a1346": "A1346 miners do not report consumption individually, so Avg. efficiency cannot be calculated"; }
MINER_TYPE_NAME_MAP{ readonly "miner-av-a1346": "Avalon A1346"; readonly "miner-am-s21": "Antminer S21"; readonly "miner-wm-m63": "Whatsminer M63"; readonly "miner-wm-m56s": "Whatsminer M56S"; readonly "miner-wm-m53s":…
MinerStatuses{ readonly MINING: "mining"; readonly OFFLINE: "offline"; readonly SLEEPING: "sleeping"; readonly ERROR: "error"; readonly NOT_MINING: "not_mining"; readonly MAINTENANCE: "maintenance"; readonly ALER…
NO_MAINTENANCE_CONTAINER"no_maintenance"
ONE_DAY_MSnumberOne day in milliseconds — the historical-log fetch window size.
OP_CENTRE_CABINET_DETAIL_FIELDSstringThe cabinet-detail field projection — the sensor/powermeter fields the LV cabinet detail reads: each device's `power_w` / `temp_c` reading, status (for the offline marker) and `last.alerts` (for the warnings timeline).
OP_CENTRE_CONTAINER_DETAIL_FIELDSstringThe container-detail field projection — a superset of the list projection that also pulls the full `last.snap.stats` (so the socket transform sees `container_specific.pdu_data`, ambient temp, humidity, …) and the full `last.snap.config` (p…
OP_CENTRE_CONTAINER_WIDGETS_FIELDSstringContainer list projection for the Site Overview widgets — the lean list fields plus `last.snap.stats.container_specific` (cooling system: oil / water pumps, tanks) and `last.snap.config` (per-vendor thresholds), which the vendor boxes (e.g…
OP_CENTRE_LIST_THINGS_FIELDSstringThe list-things field projection the Explorer tables and Container Widgets cards read — the reference app's `LIST_THINGS_FIELDS`, kept as one projection so every consumer sees the same row shape.
PM_ATTRIBUTE_LABEL_MAP{ readonly 'I1 a': "Current L1"; readonly 'I2 a': "Current L2"; readonly 'I3 a': "Current L3"; readonly 'V3 n v': "Voltage L3-N"; readonly 'V2 n v': "Voltage L2-N"; readonly 'V1 n v': "Voltage L1-N";…
POWER_MODE{ readonly SLEEP: "sleep"; readonly LOW: "low"; readonly NORMAL: "normal"; readonly HIGH: "high"; }Miner power modes accepted by `setPowerMode`.
SITE_OVERVIEW_STATUSES{ readonly OFFLINE: "offline"; readonly EMPTY: "empty"; readonly NOT_MINING: "not_mining"; readonly MINING: "mining"; }
SOCKET_STATUSES{ readonly ERROR_MINING: "errorMining"; readonly MINER_DISCONNECTED: "disconnected"; readonly CONNECTING: "connecting"; readonly SLEEP: "sleep"; readonly LOW: "low"; readonly NORMAL: "normal"; readon…
THRESHOLD_LEVEL{ readonly ALERT: "alert"; readonly ALARM: "alarm"; readonly NORMAL: "normal"; readonly ALARM_LOW: "alarmLow"; readonly ALARM_HIGH: "alarmHigh"; readonly CRITICAL_LOW: "criticalLow"; readonly CRITICA…
THRESHOLD_TYPE{ readonly TANK_PRESSURE: "tankPressure"; readonly OIL_TEMPERATURE: "oilTemperature"; readonly WATER_TEMPERATURE: "waterTemperature"; readonly SUPPLY_LIQUID_PRESSURE: "supplyLiquidPressure"; }
USER_ROLE{ readonly ADMIN: "admin"; readonly READ_ONLY: "read_only_user"; readonly SITE_MANAGER: "site_manager"; readonly SITE_OPERATOR: "site_operator"; readonly FIELD_OPERATOR: "field_operator"; readonly RE…
VOTING_SUBMISSION_TYPE"voting"Submission `type` for the voting/approval workflow.