MicroBT container components
MicroBT container UI for the Operations Centre
UI for MicroBT containers. These components read from MicroBT-shaped device records and render cooling status, fire and water sensors, power meters, and a gauge chart used for temperature readouts.
For components shared across all container vendors (TanksBox, Socket, ContainerControlsBox, etc.), see the Containers overview.
Prerequisites
- Complete the @mdk/foundation installation and add the dependency
- A MicroBT container device record. Cooling components read from
container_specific_stats.cdu;PowerMetersreads fromcontainer_specific_stats.power_meters.
Components
| Component | Description |
|---|---|
FireStatusBox | MicroBT fire and environmental sensors |
GaugeChartComponent | Labeled gauge chart with value and unit |
MicroBTCooling | MicroBT cooling system detail panel |
MicroBTSettings | MicroBT container settings and thresholds |
MicroBTWidgetBox | MicroBT cycle pump and cooling fan widget |
PowerMeters | MicroBT power meter readings panels |
FireStatusBox
Shows smoke detector, water ingress detector, and cooling fan status as colored indicators for MicroBT containers.
Import
import { FireStatusBox } from '@mdk/foundation'Props
| Prop | Type | Default | Description |
|---|---|---|---|
data | FireStatusBoxData | none | Fire and environmental sensor readings |
FireStatusBoxData type
type FireStatusBoxData = {
smokeDetector: string | number
waterIngressDetector: string | number
coolingFanStatus: string | number
}Basic usage
<FireStatusBox
data={{
smokeDetector: microbtContainer.smoke_detector,
waterIngressDetector: microbtContainer.water_ingress_detector,
coolingFanStatus: microbtContainer.cooling_fan_status,
}}
/>Indicators rendered
Smoke Detector 1: redDetectedwhensmokeDetectoris truthy, greenNormalotherwiseWater Ingress Detector: redDetectedwhenwaterIngressDetectoris truthy, greenNormalotherwiseFan Status: greenRunningwhencoolingFanStatusis truthy, grayOffotherwise
Styling
.mdk-fire-status-box: Root element.mdk-fire-status-box__item: Single sensor row.mdk-fire-status-box__label: Sensor label text
GaugeChartComponent
Wraps the core GaugeChart to render a value against a maximum with optional label, custom colors, and an overlaid numeric value and unit.
Import
import { GaugeChartComponent } from '@mdk/foundation'Props
| Prop | Type | Default | Description |
|---|---|---|---|
max | number | required | Maximum value for the gauge |
value | number | required | Current value |
unit | string | required | Unit of measurement |
label | string | '' | Title shown above the gauge |
chartStyle | React.CSSProperties | {} | Inline style on the chart wrapper |
colors | string[] | [COLOR.EMERALD, COLOR.SOFT_TEAL] | Arc colors in HEX |
hideText | boolean | true | Hides the built-in percentage text |
height | number | 200 | Chart height in pixels |
className | string | none | Additional class name on the root |
Basic usage
<GaugeChartComponent
max={100}
value={75.5}
label="Temperature"
unit="°C"
/>Styling
.mdk-gauge-chart-component: Root element.mdk-gauge-chart-component__title: Gauge title.mdk-gauge-chart-component__chart: Chart wrapper.mdk-gauge-chart-component__value: Value readout row.mdk-gauge-chart-component__value-number: Numeric value text.mdk-gauge-chart-component__value-unit: Unit text
MicroBTCooling
Detailed MicroBT cooling view covering cycle pump, main circulation pump (status, switch, speed), cooling fan, and make-up water pump, with Kehua-specific adjustments.
Import
import { MicroBTCooling } from '@mdk/foundation'Props
| Prop | Type | Default | Description |
|---|---|---|---|
data | Device | none | MicroBT container device record |
Basic usage
<MicroBTCooling data={microbtContainer} />Composition
Cycle Pumpindicator fromcdu.cycle_pump_control(greenRunning, grayOff)Main Circulation Pumppanel: status fromcirculation_pump_running_status, switch fromcirculation_pump_switch, speed fromcirculation_pump_speedin%orHzCooling Fanpanel: status fromcooling_fan_control, Kehua-only speed fromcooling_system_status, switch fromcooling_fan_switchMake Up Pumppanel: status is red onmakeup_water_pump_fault, green onmakeup_water_pump_control, gray otherwise; switch frommakeup_water_pump_switch.
Styling
.mdk-micro-bt-cooling: Root element.mdk-micro-bt-cooling__section: Section wrapper.mdk-micro-bt-cooling__section-title: Section heading.mdk-micro-bt-cooling__divider: Horizontal divider between sections.mdk-micro-bt-cooling__row: Row of items inside a section.mdk-micro-bt-cooling__item-row: Single-row layout (cycle pump).mdk-micro-bt-cooling__item: Item cell.mdk-micro-bt-cooling__label: Item label text.mdk-micro-bt-cooling__value: Item value text
MicroBTSettings
Combines container parameter settings with an editable inlet water temperature threshold form for MicroBT containers.
Import
import { MicroBTSettings } from '@mdk/foundation'Props
| Prop | Type | Default | Description |
|---|---|---|---|
data | Device | none | MicroBT container device record |
containerSettings | { thresholds?: Record<string, unknown> } | null | null | Optional custom inlet temperature thresholds |
Basic usage
<MicroBTSettings data={microbtContainer} />With custom thresholds
<MicroBTSettings
data={microbtContainer}
containerSettings={{ thresholds: customThresholds }}
/>Composition
- Renders
ContainerParamsSettingsfor the common container parameters block - Renders
MicroBTEditableThresholdFormwired with MicroBT-specific color, flash, and superflash helpers (getMicroBtInletTempColor,shouldMicroBtTemperatureFlash,shouldMicroBtTemperatureSuperflash) for inlet water temperature
Styling
.mdk-micro-bt-settings: Root element.mdk-micro-bt-settings__divider: Spacer between the params and threshold sections
MicroBTWidgetBox
Compact widget showing MicroBT cycle pump and cooling fan running/off indicators, with a red error state when the cooling fan is not running.
Import
import { MicroBTWidgetBox } from '@mdk/foundation'Props
| Prop | Type | Default | Description |
|---|---|---|---|
data | Device | none | MicroBT container device record |
Basic usage
<MicroBTWidgetBox data={microbtContainer} />Indicators rendered
Cicle Pump: greenRunningwhencdu.circulation_pump_running_statusequalsCONTAINER_STATUS.RUNNING, grayOffotherwiseCooling Fan: greenRunningwhencdu.cooling_fan_controlis truthy, redErrorotherwise
Styling
.mdk-micro-bt-widget-box: Root grid element.mdk-micro-bt-widget-box__item: Single indicator cell.mdk-micro-bt-widget-box__title: Indicator label text
PowerMeters
Renders one data panel per power meter with communication status, A-B/B-C/C-A voltages, power factor, frequency, active and apparent power, and energy.
Import
import { PowerMeters } from '@mdk/foundation'Props
| Prop | Type | Default | Description |
|---|---|---|---|
data | Device | none | MicroBT container device record |
Basic usage
<PowerMeters data={microbtContainer} />Rows rendered
Communication Status: greenNormalwhenstatus === 1, redErrorotherwiseVoltage A-B,Voltage B-C,Voltage C-A:voltage_ab,voltage_bc,voltage_cainVTotal Power Factor:total_power_factor, unitlessFrequency:freqinHzTotal Active Power:total_active_powerinkWTotal Apparent Power:total_apparent_powerinkVATotal Active Energy:total_active_energyinkWh
Styling
.mdk-power-meters: Root element.mdk-power-meters__panel: Single power-meter panel wrapper

